Lines Matching refs:p_cb
90 tSMP_CB* p_cb = &smp_cb; in smp_connect_callback() local
95 p_cb->pairing_bda.ToString().c_str()); in smp_connect_callback()
99 if (bd_addr == p_cb->pairing_bda) { in smp_connect_callback()
104 if (!p_cb->connect_initialized) { in smp_connect_callback()
105 p_cb->connect_initialized = true; in smp_connect_callback()
107 p_cb->role = L2CA_GetBleConnRole(bd_addr); in smp_connect_callback()
110 p_cb->local_r_key = p_cb->local_i_key = SMP_SEC_DEFAULT_KEY; in smp_connect_callback()
111 p_cb->loc_auth_req = p_cb->peer_auth_req = SMP_DEFAULT_AUTH_REQ; in smp_connect_callback()
112 p_cb->cb_evt = SMP_IO_CAP_REQ_EVT; in smp_connect_callback()
113 smp_sm_event(p_cb, SMP_L2CAP_CONN_EVT, NULL); in smp_connect_callback()
118 smp_sm_event(p_cb, SMP_L2CAP_DISCONN_EVT, &int_data); in smp_connect_callback()
136 tSMP_CB* p_cb = &smp_cb; in smp_data_received() local
161 if ((p_cb->state == SMP_STATE_IDLE) && in smp_data_received()
162 (p_cb->br_state == SMP_BR_STATE_IDLE) && in smp_data_received()
163 !(p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD)) { in smp_data_received()
164 p_cb->role = L2CA_GetBleConnRole(bd_addr); in smp_data_received()
165 p_cb->pairing_bda = bd_addr; in smp_data_received()
166 } else if (bd_addr != p_cb->pairing_bda) { in smp_data_received()
175 if (bd_addr == p_cb->pairing_bda) { in smp_data_received()
176 alarm_set_on_mloop(p_cb->smp_rsp_timer_ent, SMP_WAIT_FOR_RSP_TIMEOUT_MS, in smp_data_received()
179 smp_log_metrics(p_cb->pairing_bda, false /* incoming */, in smp_data_received()
186 __func__, cmd, p_cb->peer_auth_req, p_cb->loc_auth_req); in smp_data_received()
188 if ((p_cb->peer_auth_req & SMP_SC_SUPPORT_BIT) && in smp_data_received()
189 (p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT)) { in smp_data_received()
194 p_cb->rcvd_cmd_code = cmd; in smp_data_received()
195 p_cb->rcvd_cmd_len = (uint8_t)p_buf->len; in smp_data_received()
198 smp_sm_event(p_cb, cmd, &smp_int_data); in smp_data_received()
212 tSMP_CB* p_cb = &smp_cb; in smp_tx_complete_callback() local
214 if (p_cb->total_tx_unacked >= num_pkt) in smp_tx_complete_callback()
215 p_cb->total_tx_unacked -= num_pkt; in smp_tx_complete_callback()
219 if (p_cb->total_tx_unacked == 0 && p_cb->wait_for_authorization_complete) { in smp_tx_complete_callback()
223 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in smp_tx_complete_callback()
225 smp_br_state_machine_event(p_cb, SMP_BR_AUTH_CMPL_EVT, &smp_int_data); in smp_tx_complete_callback()
242 tSMP_CB* p_cb = &smp_cb; in smp_br_connect_callback() local
254 << ", pairing_bda:" << p_cb->pairing_bda in smp_br_connect_callback()
257 if (bd_addr != p_cb->pairing_bda) return; in smp_br_connect_callback()
260 if (!p_cb->connect_initialized) { in smp_br_connect_callback()
261 p_cb->connect_initialized = true; in smp_br_connect_callback()
263 p_cb->local_r_key = p_cb->local_i_key = SMP_BR_SEC_DEFAULT_KEY; in smp_br_connect_callback()
264 p_cb->loc_auth_req = p_cb->peer_auth_req = 0; in smp_br_connect_callback()
265 p_cb->cb_evt = SMP_BR_KEYS_REQ_EVT; in smp_br_connect_callback()
266 smp_br_state_machine_event(p_cb, SMP_BR_L2CAP_CONN_EVT, NULL); in smp_br_connect_callback()
271 smp_br_state_machine_event(p_cb, SMP_BR_L2CAP_DISCONN_EVT, &int_data); in smp_br_connect_callback()
287 tSMP_CB* p_cb = &smp_cb; in smp_br_data_received() local
311 if ((p_cb->state == SMP_STATE_IDLE) && in smp_br_data_received()
312 (p_cb->br_state == SMP_BR_STATE_IDLE)) { in smp_br_data_received()
313 p_cb->role = HCI_ROLE_SLAVE; in smp_br_data_received()
314 p_cb->smp_over_br = true; in smp_br_data_received()
315 p_cb->pairing_bda = bd_addr; in smp_br_data_received()
316 } else if (bd_addr != p_cb->pairing_bda) { in smp_br_data_received()
324 if (bd_addr == p_cb->pairing_bda) { in smp_br_data_received()
325 alarm_set_on_mloop(p_cb->smp_rsp_timer_ent, SMP_WAIT_FOR_RSP_TIMEOUT_MS, in smp_br_data_received()
328 smp_log_metrics(p_cb->pairing_bda, false /* incoming */, in smp_br_data_received()
331 p_cb->rcvd_cmd_code = cmd; in smp_br_data_received()
332 p_cb->rcvd_cmd_len = (uint8_t)p_buf->len; in smp_br_data_received()
335 smp_br_state_machine_event(p_cb, cmd, &smp_int_data); in smp_br_data_received()