Lines Matching refs:smp_cb
59 memset(&smp_cb, 0, sizeof(tSMP_CB)); in SMP_Init()
60 smp_cb.smp_rsp_timer_ent = alarm_new("smp.smp_rsp_timer_ent"); in SMP_Init()
61 smp_cb.delayed_auth_timer_ent = alarm_new("smp.delayed_auth_timer_ent"); in SMP_Init()
64 smp_cb.trace_level = SMP_INITIAL_TRACE_LEVEL; in SMP_Init()
66 smp_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */ in SMP_Init()
75 smp_cb.cert_failure = static_cast<tSMP_STATUS>( in SMP_Init()
77 if (smp_cb.cert_failure) in SMP_Init()
79 smp_cb.cert_failure); in SMP_Init()
103 if (new_level != 0xFF) smp_cb.trace_level = new_level; in SMP_SetTraceLevel()
105 return (smp_cb.trace_level); in SMP_SetTraceLevel()
121 SMP_TRACE_EVENT("SMP_Register state=%d", smp_cb.state); in SMP_Register()
123 if (smp_cb.p_callback != NULL) { in SMP_Register()
126 smp_cb.p_callback = p_cback; in SMP_Register()
146 tSMP_CB* p_cb = &smp_cb; in SMP_Pair()
190 tSMP_CB* p_cb = &smp_cb; in SMP_BR_PairWith()
234 tSMP_CB* p_cb = &smp_cb; in SMP_PairCancel()
276 if (smp_cb.cb_evt == SMP_CONSENT_REQ_EVT) { in SMP_SecurityGrant()
278 if (smp_cb.selected_association_model == SMP_MODEL_SEC_CONN_JUSTWORKS) { in SMP_SecurityGrant()
280 smp_sm_event(&smp_cb, SMP_SC_NC_OK_EVT, NULL); in SMP_SecurityGrant()
287 smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_SecurityGrant()
289 } else if (smp_cb.selected_association_model == SMP_MODEL_ENCRYPTION_ONLY) { in SMP_SecurityGrant()
291 smp_cb.sec_level = SMP_SEC_UNAUTHENTICATE; in SMP_SecurityGrant()
296 key.p_data = smp_cb.tk.data(); in SMP_SecurityGrant()
299 smp_cb.tk = {0}; in SMP_SecurityGrant()
300 smp_sm_event(&smp_cb, SMP_KEY_READY_EVT, &smp_int_data); in SMP_SecurityGrant()
307 smp_sm_event(&smp_cb, SMP_AUTH_CMPL_EVT, &smp_int_data); in SMP_SecurityGrant()
313 if (smp_cb.smp_over_br) { in SMP_SecurityGrant()
314 if (smp_cb.br_state != SMP_BR_STATE_WAIT_APP_RSP || in SMP_SecurityGrant()
315 smp_cb.cb_evt != SMP_SEC_REQUEST_EVT || smp_cb.pairing_bda != bd_addr) { in SMP_SecurityGrant()
321 smp_cb.cb_evt = SMP_EVT_NONE; in SMP_SecurityGrant()
324 smp_br_state_machine_event(&smp_cb, SMP_BR_API_SEC_GRANT_EVT, in SMP_SecurityGrant()
329 if (smp_cb.state != SMP_STATE_WAIT_APP_RSP || in SMP_SecurityGrant()
330 smp_cb.cb_evt != SMP_SEC_REQUEST_EVT || smp_cb.pairing_bda != bd_addr) in SMP_SecurityGrant()
334 smp_cb.cb_evt = SMP_EVT_NONE; in SMP_SecurityGrant()
337 smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &smp_int_data); in SMP_SecurityGrant()
360 tSMP_CB* p_cb = &smp_cb; in SMP_PasskeyReply()
393 smp_sm_event(&smp_cb, SMP_SC_KEY_READY_EVT, &smp_int_data); in SMP_PasskeyReply()
417 tSMP_CB* p_cb = &smp_cb; in SMP_ConfirmReply()
465 tSMP_CB* p_cb = &smp_cb; in SMP_OobDataReply()
468 SMP_TRACE_EVENT("%s State: %d res:%d", __func__, smp_cb.state, res); in SMP_OobDataReply()
488 smp_sm_event(&smp_cb, SMP_KEY_READY_EVT, &smp_int_data); in SMP_OobDataReply()
503 tSMP_CB* p_cb = &smp_cb; in SMP_SecureConnectionOobDataReply()
552 smp_sm_event(&smp_cb, SMP_SC_OOB_DATA_EVT, &smp_int_data); in SMP_SecureConnectionOobDataReply()
565 smp_sm_event(&smp_cb, SMP_CR_LOC_SC_OOB_DATA_EVT, &smp_int_data); in SMP_CrLocScOobData()