Lines Matching full:p_cb
94 tSMP_CB* p_cb = &smp_cb;
101 if (bd_addr == p_cb->pairing_bda) {
106 if (!p_cb->connect_initialized) {
107 p_cb->connect_initialized = true;
109 p_cb->role = L2CA_GetBleConnRole(bd_addr);
112 p_cb->local_r_key = p_cb->local_i_key = SMP_SEC_DEFAULT_KEY;
113 p_cb->loc_auth_req = p_cb->peer_auth_req = SMP_DEFAULT_AUTH_REQ;
114 p_cb->cb_evt = SMP_IO_CAP_REQ_EVT;
115 smp_sm_event(p_cb, SMP_L2CAP_CONN_EVT, NULL);
120 smp_sm_event(p_cb, SMP_L2CAP_DISCONN_EVT, &int_data);
138 tSMP_CB* p_cb = &smp_cb;
154 if ((p_cb->state == SMP_STATE_IDLE) &&
155 (p_cb->br_state == SMP_BR_STATE_IDLE) &&
156 !(p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD)) {
157 p_cb->role = L2CA_GetBleConnRole(bd_addr);
158 p_cb->pairing_bda = bd_addr;
159 } else if (bd_addr != p_cb->pairing_bda) {
168 if (bd_addr == p_cb->pairing_bda) {
169 alarm_set_on_mloop(p_cb->smp_rsp_timer_ent, SMP_WAIT_FOR_RSP_TIMEOUT_MS,
176 __func__, cmd, p_cb->peer_auth_req, p_cb->loc_auth_req);
178 if ((p_cb->peer_auth_req & SMP_SC_SUPPORT_BIT) &&
179 (p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT)) {
184 p_cb->rcvd_cmd_code = cmd;
185 p_cb->rcvd_cmd_len = (uint8_t)p_buf->len;
186 smp_sm_event(p_cb, cmd, p);
200 tSMP_CB* p_cb = &smp_cb;
202 if (p_cb->total_tx_unacked >= num_pkt)
203 p_cb->total_tx_unacked -= num_pkt;
208 if (p_cb->total_tx_unacked == 0 && p_cb->wait_for_authorization_complete) {
210 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
212 smp_br_state_machine_event(p_cb, SMP_BR_AUTH_CMPL_EVT, &reason);
228 tSMP_CB* p_cb = &smp_cb;
239 if (bd_addr != p_cb->pairing_bda) return;
245 if (!p_cb->connect_initialized) {
246 p_cb->connect_initialized = true;
248 p_cb->local_r_key = p_cb->local_i_key = SMP_BR_SEC_DEFAULT_KEY;
249 p_cb->loc_auth_req = p_cb->peer_auth_req = 0;
250 p_cb->cb_evt = SMP_BR_KEYS_REQ_EVT;
251 smp_br_state_machine_event(p_cb, SMP_BR_L2CAP_CONN_EVT, NULL);
256 smp_br_state_machine_event(p_cb, SMP_BR_L2CAP_DISCONN_EVT, &int_data);
272 tSMP_CB* p_cb = &smp_cb;
288 if ((p_cb->state == SMP_STATE_IDLE) &&
289 (p_cb->br_state == SMP_BR_STATE_IDLE)) {
290 p_cb->role = HCI_ROLE_SLAVE;
291 p_cb->smp_over_br = true;
292 p_cb->pairing_bda = bd_addr;
293 } else if (bd_addr != p_cb->pairing_bda) {
301 if (bd_addr == p_cb->pairing_bda) {
302 alarm_set_on_mloop(p_cb->smp_rsp_timer_ent, SMP_WAIT_FOR_RSP_TIMEOUT_MS,
305 p_cb->rcvd_cmd_code = cmd;
306 p_cb->rcvd_cmd_len = (uint8_t)p_buf->len;
307 smp_br_state_machine_event(p_cb, cmd, p);