Lines Matching refs:p_cb

145   tSMP_CB* p_cb = &smp_cb;  in SMP_Pair()  local
148 p_cb->state, p_cb->br_state, p_cb->flags, in SMP_Pair()
151 if (p_cb->state != SMP_STATE_IDLE || in SMP_Pair()
152 p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD || p_cb->smp_over_br) { in SMP_Pair()
156 p_cb->flags = SMP_PAIR_FLAGS_WE_STARTED_DD; in SMP_Pair()
157 p_cb->pairing_bda = bd_addr; in SMP_Pair()
162 p_cb->status = SMP_PAIR_INTERNAL_ERR; in SMP_Pair()
164 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_Pair()
189 tSMP_CB* p_cb = &smp_cb; in SMP_BR_PairWith() local
192 p_cb->state, p_cb->br_state, p_cb->flags, in SMP_BR_PairWith()
195 if (p_cb->state != SMP_STATE_IDLE || p_cb->smp_over_br || in SMP_BR_PairWith()
196 p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD) { in SMP_BR_PairWith()
201 p_cb->role = HCI_ROLE_MASTER; in SMP_BR_PairWith()
202 p_cb->flags = SMP_PAIR_FLAGS_WE_STARTED_DD; in SMP_BR_PairWith()
203 p_cb->smp_over_br = true; in SMP_BR_PairWith()
204 p_cb->pairing_bda = bd_addr; in SMP_BR_PairWith()
210 p_cb->status = SMP_PAIR_INTERNAL_ERR; in SMP_BR_PairWith()
211 smp_br_state_machine_event(p_cb, SMP_BR_AUTH_CMPL_EVT, &smp_int_data); in SMP_BR_PairWith()
233 tSMP_CB* p_cb = &smp_cb; in SMP_PairCancel() local
237 if (p_cb->cert_failure == SMP_PASSKEY_ENTRY_FAIL || in SMP_PairCancel()
238 p_cb->cert_failure == SMP_NUMERIC_COMPAR_FAIL) in SMP_PairCancel()
239 err_code = p_cb->cert_failure; in SMP_PairCancel()
241 BTM_TRACE_EVENT("SMP_CancelPair state=%d flag=0x%x ", p_cb->state, in SMP_PairCancel()
242 p_cb->flags); in SMP_PairCancel()
243 if (p_cb->state != SMP_STATE_IDLE && p_cb->pairing_bda == bd_addr) { in SMP_PairCancel()
244 p_cb->is_pair_cancel = true; in SMP_PairCancel()
248 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_PairCancel()
321 tSMP_CB* p_cb = &smp_cb; in SMP_PasskeyReply() local
326 if (p_cb->cb_evt != SMP_PASSKEY_REQ_EVT) { in SMP_PasskeyReply()
327 SMP_TRACE_WARNING("SMP_PasskeyReply() - Wrong State: %d", p_cb->state); in SMP_PasskeyReply()
331 if (bd_addr != p_cb->pairing_bda) { in SMP_PasskeyReply()
348 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_PasskeyReply()
350 } else if (p_cb->selected_association_model == in SMP_PasskeyReply()
356 smp_convert_string_to_tk(&p_cb->tk, passkey); in SMP_PasskeyReply()
378 tSMP_CB* p_cb = &smp_cb; in SMP_ConfirmReply() local
383 if (p_cb->cb_evt != SMP_NC_REQ_EVT) { in SMP_ConfirmReply()
384 SMP_TRACE_WARNING("%s() - Wrong State: %d", __func__, p_cb->state); in SMP_ConfirmReply()
388 if (bd_addr != p_cb->pairing_bda) { in SMP_ConfirmReply()
403 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_ConfirmReply()
405 smp_sm_event(p_cb, SMP_SC_NC_OK_EVT, NULL); in SMP_ConfirmReply()
426 tSMP_CB* p_cb = &smp_cb; in SMP_OobDataReply() local
432 if (p_cb->state != SMP_STATE_WAIT_APP_RSP || p_cb->cb_evt != SMP_OOB_REQ_EVT) in SMP_OobDataReply()
438 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_OobDataReply()
442 memcpy(p_cb->tk.data(), p_data, len); in SMP_OobDataReply()
445 key.p_data = p_cb->tk.data(); in SMP_OobDataReply()
467 tSMP_CB* p_cb = &smp_cb; in SMP_SecureConnectionOobDataReply() local
474 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_SecureConnectionOobDataReply()
481 __func__, p_cb->req_oob_type, p_oob->loc_oob_data.present, in SMP_SecureConnectionOobDataReply()
484 if (p_cb->state != SMP_STATE_WAIT_APP_RSP || in SMP_SecureConnectionOobDataReply()
485 p_cb->cb_evt != SMP_SC_OOB_REQ_EVT) in SMP_SecureConnectionOobDataReply()
489 switch (p_cb->req_oob_type) { in SMP_SecureConnectionOobDataReply()
509 smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_SecureConnectionOobDataReply()
513 p_cb->sc_oob_data = *p_oob; in SMP_SecureConnectionOobDataReply()