Lines Matching refs:pairing_cb
222 static btif_dm_pairing_cb_t pairing_cb; variable
535 if ((pairing_cb.state == state) && (state == BT_BOND_STATE_BONDING)) in bond_state_changed()
538 if (!bdaddr_is_empty(&pairing_cb.static_bdaddr)) in bond_state_changed()
545 if (pairing_cb.bond_type == BOND_TYPE_TEMPORARY) in bond_state_changed()
549 state, pairing_cb.state, pairing_cb.sdp_attempts); in bond_state_changed()
555 pairing_cb.state = state; in bond_state_changed()
556 bdcpy(pairing_cb.bd_addr, bd_addr->address); in bond_state_changed()
558 if (!pairing_cb.sdp_attempts) in bond_state_changed()
559 memset(&pairing_cb, 0, sizeof(pairing_cb)); in bond_state_changed()
675 …_DEBUG("%s: status=%d pairing_cb.state=%d", __FUNCTION__, p_remote_name->status, pairing_cb.state); in btif_dm_cb_hid_remote_name()
676 if (pairing_cb.state == BT_BOND_STATE_BONDING) in btif_dm_cb_hid_remote_name()
680 bdcpy(remote_bd.address, pairing_cb.bd_addr); in btif_dm_cb_hid_remote_name()
746 pairing_cb.is_local_initiated = TRUE; in btif_dm_cb_create_bond()
923 if (pairing_cb.is_local_initiated && (p_pin_req->min_16_digit == FALSE)) in btif_dm_pin_req_evt()
935 (pairing_cb.autopair_attempts == 0)) in btif_dm_pin_req_evt()
943 pairing_cb.autopair_attempts++; in btif_dm_pin_req_evt()
952 (pairing_cb.autopair_attempts == 0)) in btif_dm_pin_req_evt()
960 pairing_cb.autopair_attempts++; in btif_dm_pin_req_evt()
984 BOOLEAN is_incoming = !(pairing_cb.state == BT_BOND_STATE_BONDING); in btif_dm_ssp_cfm_req_evt()
1007 pairing_cb.bond_type = BOND_TYPE_TEMPORARY; in btif_dm_ssp_cfm_req_evt()
1009 pairing_cb.bond_type = BOND_TYPE_PERSISTENT; in btif_dm_ssp_cfm_req_evt()
1011 btm_set_bond_type_dev(p_ssp_cfm_req->bd_addr, pairing_cb.bond_type); in btif_dm_ssp_cfm_req_evt()
1013 pairing_cb.is_ssp = TRUE; in btif_dm_ssp_cfm_req_evt()
1023 if (is_incoming && pairing_cb.bond_type != BOND_TYPE_TEMPORARY && in btif_dm_ssp_cfm_req_evt()
1046 pairing_cb.sdp_attempts = 0; in btif_dm_ssp_cfm_req_evt()
1073 pairing_cb.is_ssp = TRUE; in btif_dm_ssp_key_notif_evt()
1102 BTIF_TRACE_DEBUG("%s: bond state=%d", __func__, pairing_cb.state); in btif_dm_auth_cmpl_evt()
1111 pairing_cb.bond_type == BOND_TYPE_PERSISTENT) in btif_dm_auth_cmpl_evt()
1115 __FUNCTION__, p_auth_cmpl->key_type, pairing_cb.bond_type); in btif_dm_auth_cmpl_evt()
1118 pairing_cb.pin_code_len); in btif_dm_auth_cmpl_evt()
1124 __FUNCTION__, p_auth_cmpl->key_type, pairing_cb.bond_type); in btif_dm_auth_cmpl_evt()
1125 if(pairing_cb.bond_type == BOND_TYPE_TEMPORARY) in btif_dm_auth_cmpl_evt()
1139 if (bdcmp(p_auth_cmpl->bd_addr, pairing_cb.bd_addr) != 0) { in btif_dm_auth_cmpl_evt()
1158 pairing_cb.timeout_retries = 0; in btif_dm_auth_cmpl_evt()
1168 if(!pairing_cb.is_local_initiated && skip_sdp) in btif_dm_auth_cmpl_evt()
1193 if(pairing_cb.state == BT_BOND_STATE_BONDING && in btif_dm_auth_cmpl_evt()
1194 (bdcmp(p_auth_cmpl->bd_addr, pairing_cb.bd_addr) != 0)) in btif_dm_auth_cmpl_evt()
1198 bdcpy(pairing_cb.static_bdaddr.address, p_auth_cmpl->bd_addr); in btif_dm_auth_cmpl_evt()
1209 pairing_cb.sdp_attempts = 1; in btif_dm_auth_cmpl_evt()
1224 && pairing_cb.timeout_retries) in btif_dm_auth_cmpl_evt()
1226 …ACE_WARNING("%s() - Pairing timeout; retrying (%d) ...", __FUNCTION__, pairing_cb.timeout_retries); in btif_dm_auth_cmpl_evt()
1227 --pairing_cb.timeout_retries; in btif_dm_auth_cmpl_evt()
1257 if (pairing_cb.autopair_attempts == 1) in btif_dm_auth_cmpl_evt()
1500 (pairing_cb.state == BT_BOND_STATE_BONDING ) && in btif_dm_search_services_evt()
1501 (pairing_cb.sdp_attempts < BTIF_DM_MAX_SDP_ATTEMPTS_AFTER_PAIRING)) in btif_dm_search_services_evt()
1504 pairing_cb.sdp_attempts++; in btif_dm_search_services_evt()
1525 if ((pairing_cb.state == BT_BOND_STATE_BONDING) && in btif_dm_search_services_evt()
1526 ((bdcmp(p_data->disc_res.bd_addr, pairing_cb.bd_addr) == 0) || in btif_dm_search_services_evt()
1527 (bdcmp(p_data->disc_res.bd_addr, pairing_cb.static_bdaddr.address) == 0)) && in btif_dm_search_services_evt()
1528 pairing_cb.sdp_attempts > 0) in btif_dm_search_services_evt()
1532 pairing_cb.sdp_attempts = 0; in btif_dm_search_services_evt()
1536 if (bdcmp(p_data->disc_res.bd_addr, pairing_cb.static_bdaddr.address) == 0) in btif_dm_search_services_evt()
1723 memset(&pairing_cb, 0, sizeof(btif_dm_pairing_cb_t)); in btif_dm_upstreams_evt()
1724 pairing_cb.bond_type = BOND_TYPE_PERSISTENT; in btif_dm_upstreams_evt()
1759 if (pairing_cb.state == BT_BOND_STATE_BONDING) in btif_dm_upstreams_evt()
1761 bdcpy(bd_addr.address, pairing_cb.bd_addr); in btif_dm_upstreams_evt()
1762 btm_set_bond_type_dev(pairing_cb.bd_addr, BOND_TYPE_UNKNOWN); in btif_dm_upstreams_evt()
1844 if (pairing_cb.state != BT_BOND_STATE_BONDING) in btif_dm_upstreams_evt()
1850 else if (memcmp (pairing_cb.bd_addr, p_data->ble_key.bd_addr, BD_ADDR_LEN)!=0) in btif_dm_upstreams_evt()
1860 pairing_cb.ble.is_penc_key_rcvd = TRUE; in btif_dm_upstreams_evt()
1861 pairing_cb.ble.penc_key = p_data->ble_key.p_key_value->penc_key; in btif_dm_upstreams_evt()
1866 pairing_cb.ble.is_pid_key_rcvd = TRUE; in btif_dm_upstreams_evt()
1867 pairing_cb.ble.pid_key = p_data->ble_key.p_key_value->pid_key; in btif_dm_upstreams_evt()
1872 pairing_cb.ble.is_pcsrk_key_rcvd = TRUE; in btif_dm_upstreams_evt()
1873 pairing_cb.ble.pcsrk_key = p_data->ble_key.p_key_value->pcsrk_key; in btif_dm_upstreams_evt()
1878 pairing_cb.ble.is_lenc_key_rcvd = TRUE; in btif_dm_upstreams_evt()
1879 pairing_cb.ble.lenc_key = p_data->ble_key.p_key_value->lenc_key; in btif_dm_upstreams_evt()
1884 pairing_cb.ble.is_lcsrk_key_rcvd = TRUE; in btif_dm_upstreams_evt()
1885 pairing_cb.ble.lcsrk_key = p_data->ble_key.p_key_value->lcsrk_key; in btif_dm_upstreams_evt()
1890 pairing_cb.ble.is_lidk_key_rcvd = TRUE; in btif_dm_upstreams_evt()
2041 pairing_cb.timeout_retries = NUM_TIMEOUT_RETRIES; in btif_dm_generic_evt()
2357 if (pairing_cb.state != BT_BOND_STATE_NONE) in btif_dm_create_bond()
2360 btif_stats_add_bond_event(bd_addr, BTIF_DM_FUNC_CREATE_BOND, pairing_cb.state); in btif_dm_create_bond()
2403 btif_stats_add_bond_event(bd_addr, BTIF_DM_FUNC_CANCEL_BOND, pairing_cb.state); in btif_dm_cancel_bond()
2409 if (pairing_cb.state == BT_BOND_STATE_BONDING) in btif_dm_cancel_bond()
2414 if (pairing_cb.is_ssp) in btif_dm_cancel_bond()
2416 if (pairing_cb.is_le_only) in btif_dm_cancel_bond()
2429 if (pairing_cb.is_le_only) in btif_dm_cancel_bond()
2442 if (pairing_cb.is_ssp) in btif_dm_cancel_bond()
2471 if (pairing_cb.state == BT_BOND_STATE_BONDING && in btif_dm_hh_open_failed()
2472 bdcmp(bdaddr->address, pairing_cb.bd_addr) == 0) in btif_dm_hh_open_failed()
2494 btif_stats_add_bond_event(bd_addr, BTIF_DM_FUNC_REMOVE_BOND, pairing_cb.state); in btif_dm_remove_bond()
2520 if (pairing_cb.is_le_only) in btif_dm_pin_reply()
2539 pairing_cb.pin_code_len = pin_len; in btif_dm_pin_reply()
2545 pairing_cb.pin_code_len = pin_len; in btif_dm_pin_reply()
2576 if (pairing_cb.is_le_only) in btif_dm_ssp_reply()
2578 if(pairing_cb.is_le_nc) in btif_dm_ssp_reply()
2756 if(pairing_cb.is_local_initiated) in btif_dm_proc_io_req()
2767 __FUNCTION__, pairing_cb.auth_req); in btif_dm_proc_io_req()
2768 *p_auth_req = (pairing_cb.auth_req & BTA_AUTH_BONDS); in btif_dm_proc_io_req()
2771 if ((yes_no_bit) || (pairing_cb.io_cap & BTM_IO_CAP_IO) ) in btif_dm_proc_io_req()
2791 pairing_cb.auth_req = auth_req; in btif_dm_proc_io_rsp()
2792 pairing_cb.io_cap = io_cap; in btif_dm_proc_io_rsp()
3028 pairing_cb.is_ssp = FALSE; in btif_dm_ble_key_notif_evt()
3154 bdcpy(bd_addr.address, pairing_cb.bd_addr); in btif_dm_save_ble_bonding_keys()
3156 if (pairing_cb.ble.is_penc_key_rcvd) in btif_dm_save_ble_bonding_keys()
3159 (char *) &pairing_cb.ble.penc_key, in btif_dm_save_ble_bonding_keys()
3164 if (pairing_cb.ble.is_pid_key_rcvd) in btif_dm_save_ble_bonding_keys()
3167 (char *) &pairing_cb.ble.pid_key, in btif_dm_save_ble_bonding_keys()
3172 if (pairing_cb.ble.is_pcsrk_key_rcvd) in btif_dm_save_ble_bonding_keys()
3175 (char *) &pairing_cb.ble.pcsrk_key, in btif_dm_save_ble_bonding_keys()
3180 if (pairing_cb.ble.is_lenc_key_rcvd) in btif_dm_save_ble_bonding_keys()
3183 (char *) &pairing_cb.ble.lenc_key, in btif_dm_save_ble_bonding_keys()
3188 if (pairing_cb.ble.is_lcsrk_key_rcvd) in btif_dm_save_ble_bonding_keys()
3191 (char *) &pairing_cb.ble.lcsrk_key, in btif_dm_save_ble_bonding_keys()
3196 if (pairing_cb.ble.is_lidk_key_rcvd) in btif_dm_save_ble_bonding_keys()
3212 bdcpy(bd_addr.address, pairing_cb.bd_addr); in btif_dm_remove_ble_bonding_keys()
3234 if (pairing_cb.state == BT_BOND_STATE_BONDING) in btif_dm_ble_sec_req_evt()
3253 pairing_cb.bond_type = BOND_TYPE_PERSISTENT; in btif_dm_ble_sec_req_evt()
3254 pairing_cb.is_le_only = TRUE; in btif_dm_ble_sec_req_evt()
3255 pairing_cb.is_le_nc = FALSE; in btif_dm_ble_sec_req_evt()
3256 pairing_cb.is_ssp = TRUE; in btif_dm_ble_sec_req_evt()
3257 btm_set_bond_type_dev(p_ble_req->bd_addr, pairing_cb.bond_type); in btif_dm_ble_sec_req_evt()
3293 pairing_cb.is_le_only = TRUE; in btif_dm_ble_passkey_req_evt()
3316 pairing_cb.is_ssp = FALSE; in btif_dm_ble_key_nc_req_evt()
3317 pairing_cb.is_le_only = TRUE; in btif_dm_ble_key_nc_req_evt()
3318 pairing_cb.is_le_nc = TRUE; in btif_dm_ble_key_nc_req_evt()
3351 pairing_cb.is_ssp = FALSE; in btif_dm_ble_oob_req_evt()
3352 pairing_cb.is_le_only = TRUE; in btif_dm_ble_oob_req_evt()
3353 pairing_cb.is_le_nc = FALSE; in btif_dm_ble_oob_req_evt()
3415 if (pairing_cb.state == BT_BOND_STATE_BONDING) in btif_dm_on_disable()
3420 bdcpy(bd_addr.address, pairing_cb.bd_addr); in btif_dm_on_disable()