Lines Matching refs:link

38 static struct prov_link link;  variable
42 if (link.conn) { in reset_state()
43 bt_conn_unref(link.conn); in reset_state()
44 link.conn = NULL; in reset_state()
48 (void)k_work_cancel_delayable(&link.prot_timer); in reset_state()
53 const struct prov_bearer_cb *cb = link.cb; in link_closed()
54 void *cb_data = link.cb_data; in link_closed()
70 if (link.conn) { in protocol_timeout()
71 (void)bt_conn_disconnect(link.conn, in protocol_timeout()
87 if (link.conn != conn || !link.cb) { in bt_mesh_pb_gatt_recv()
97 k_work_reschedule(&link.prot_timer, bt_mesh_prov_protocol_timeout_get()); in bt_mesh_pb_gatt_recv()
99 link.cb->recv(&bt_mesh_pb_gatt, link.cb_data, buf); in bt_mesh_pb_gatt_recv()
108 if (link.conn) { in bt_mesh_pb_gatt_start()
112 link.conn = bt_conn_ref(conn); in bt_mesh_pb_gatt_start()
113 k_work_reschedule(&link.prot_timer, bt_mesh_prov_protocol_timeout_get()); in bt_mesh_pb_gatt_start()
115 link.cb->link_opened(&bt_mesh_pb_gatt, link.cb_data); in bt_mesh_pb_gatt_start()
124 if (link.conn != conn) { in bt_mesh_pb_gatt_close()
139 if (link.conn) { in bt_mesh_pb_gatt_cli_start()
143 link.conn = bt_conn_ref(conn); in bt_mesh_pb_gatt_cli_start()
144 k_work_reschedule(&link.prot_timer, bt_mesh_prov_protocol_timeout_get()); in bt_mesh_pb_gatt_cli_start()
153 if (link.conn != conn) { in bt_mesh_pb_gatt_cli_open()
158 link.cb->link_opened(&bt_mesh_pb_gatt, link.cb_data); in bt_mesh_pb_gatt_cli_open()
168 link.cb = cb; in prov_link_open()
169 link.cb_data = cb_data; in prov_link_open()
171 k_work_reschedule(&link.prot_timer, K_SECONDS(timeout)); in prov_link_open()
178 (void)bt_conn_disconnect(link.conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in prov_link_close()
196 link.cb = cb; in link_accept()
197 link.cb_data = cb_data; in link_accept()
205 if (link.comp.cb) { in buf_send_end()
206 link.comp.cb(0, link.comp.cb_data); in buf_send_end()
213 if (!link.conn) { in buf_send()
217 link.comp.cb = cb; in buf_send()
218 link.comp.cb_data = cb_data; in buf_send()
220 k_work_reschedule(&link.prot_timer, bt_mesh_prov_protocol_timeout_get()); in buf_send()
222 return bt_mesh_proxy_msg_send(link.conn, BT_MESH_PROXY_PROV, in buf_send()
233 k_work_init_delayable(&link.prot_timer, protocol_timeout); in bt_mesh_pb_gatt_init()