Lines Matching refs:link
33 static struct prov_link link; variable
37 if (link.conn) { in reset_state()
38 bt_conn_unref(link.conn); in reset_state()
39 link.conn = NULL; in reset_state()
43 (void)k_work_cancel_delayable(&link.prot_timer); in reset_state()
45 link.rx_buf = bt_mesh_proxy_get_buf(); in reset_state()
50 const struct prov_bearer_cb *cb = link.cb; in link_closed()
51 void *cb_data = link.cb_data; in link_closed()
60 if (!link.conn) { in protocol_timeout()
73 if (link.conn != conn || !link.cb) { in bt_mesh_pb_gatt_recv()
83 k_work_reschedule(&link.prot_timer, PROTOCOL_TIMEOUT); in bt_mesh_pb_gatt_recv()
85 link.cb->recv(&pb_gatt, link.cb_data, buf); in bt_mesh_pb_gatt_recv()
94 if (link.conn) { in bt_mesh_pb_gatt_open()
98 link.conn = bt_conn_ref(conn); in bt_mesh_pb_gatt_open()
99 k_work_reschedule(&link.prot_timer, PROTOCOL_TIMEOUT); in bt_mesh_pb_gatt_open()
101 link.cb->link_opened(&pb_gatt, link.cb_data); in bt_mesh_pb_gatt_open()
110 if (link.conn != conn) { in bt_mesh_pb_gatt_close()
133 link.cb = cb; in link_accept()
134 link.cb_data = cb_data; in link_accept()
141 if (link.comp.cb) { in buf_send_end()
142 link.comp.cb(0, link.comp.cb_data); in buf_send_end()
149 if (!link.conn) { in buf_send()
153 link.comp.cb = cb; in buf_send()
154 link.comp.cb_data = cb_data; in buf_send()
156 k_work_reschedule(&link.prot_timer, PROTOCOL_TIMEOUT); in buf_send()
158 return bt_mesh_pb_gatt_send(link.conn, buf, buf_send_end, NULL); in buf_send()
168 k_work_init_delayable(&link.prot_timer, protocol_timeout); in pb_gatt_init()