Home | History | Annotate | Download | only in src

Lines Matching full:bd_addr

61 BOOLEAN blacklistPairingRetries(BD_ADDR bd_addr)
67 if (blacklist_pairing_retries[i][0] == bd_addr[0] &&
68 blacklist_pairing_retries[i][1] == bd_addr[1] &&
69 blacklist_pairing_retries[i][2] == bd_addr[2])
115 BD_ADDR bd_addr;
150 BD_ADDR bd_addr;
158 BD_ADDR oob_bdaddr; /* peer bdaddr*/
206 static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr, tBTA_TRANSPORT transport);
208 static void btif_update_remote_properties(BD_ADDR bd_addr, BD_NAME bd_name,
231 extern int btif_hh_connect(bt_bdaddr_t *bd_addr);
338 bdcpy(remote_bdaddr.address, p_search_data->inq_res.bd_addr);
440 btm_status = BTM_ReadRemoteVersion(*(BD_ADDR*)remote_bdaddr, &lmp_ver,
466 static void bond_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr, bt_bond_state_t state)
478 HAL_CBACK(bt_hal_cbacks, bond_state_changed_cb, status, bd_addr, state);
483 bdcpy(pairing_cb.bd_addr, bd_addr->address);
505 btm_status = BTM_ReadRemoteVersion(*(BD_ADDR*)p_bd, &lmp_ver,
527 static void btif_update_remote_properties(BD_ADDR bd_addr, BD_NAME bd_name,
538 bdcpy(bdaddr.address, bd_addr);
601 bdcpy(remote_bd.address, pairing_cb.bd_addr);
622 static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr, tBTA_TRANSPORT transport)
624 BOOLEAN is_hid = check_cod(bd_addr, COD_HID_POINTING);
625 bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
631 bd2str(bd_addr, &bdstr);
638 if (btif_storage_get_remote_addr_type(bd_addr, &addr_type) != BT_STATUS_SUCCESS)
640 btif_storage_set_remote_addr_type(bd_addr, BLE_ADDR_PUBLIC);
644 (btif_storage_get_remote_addr_type(bd_addr, &addr_type) == BT_STATUS_SUCCESS) &&
647 BTA_DmAddBleDevice(bd_addr->address, addr_type, BT_DEVICE_TYPE_BLE);
658 status = btif_hh_connect(bd_addr);
660 bond_state_changed(status, bd_addr, BT_BOND_STATE_NONE);
664 BTA_DmBondByTransport((UINT8 *)bd_addr->address, transport);
681 void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr)
686 is a valid hid connection with this bd_addr. If yes VUP will be issued.*/
688 if (btif_hh_virtual_unplug(bd_addr) != BT_STATUS_SUCCESS)
691 BTA_DmRemoveDevice((UINT8 *)bd_addr->address);
704 uint16_t btif_dm_get_connection_state(const bt_bdaddr_t *bd_addr)
706 return BTA_DmGetConnectionState((UINT8 *)bd_addr->address);
800 bt_bdaddr_t bd_addr;
806 btif_update_remote_properties(p_pin_req->bd_addr, p_pin_req->bd_name,
809 bdcpy(bd_addr.address, p_pin_req->bd_addr);
812 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDING);
824 if (check_cod(&bd_addr, COD_AV_HEADSETS) ||
825 check_cod(&bd_addr, COD_AV_HANDSFREE) ||
826 check_cod(&bd_addr, COD_AV_HEADPHONES) ||
827 check_cod(&bd_addr, COD_AV_PORTABLE_AUDIO) ||
828 check_cod(&bd_addr, COD_AV_HIFI_AUDIO) ||
829 check_cod(&bd_addr, COD_HID_POINTING))
833 if ((btif_storage_is_device_autopair_blacklisted(&bd_addr) == FALSE) &&
843 BTA_DmPinReply( (UINT8*)bd_addr.address, TRUE, 4, pin_code.pin);
847 else if (check_cod(&bd_addr, COD_HID_KEYBOARD) ||
848 check_cod(&bd_addr, COD_HID_COMBO))
850 if(( btif_storage_is_fixed_pin_zeros_keyboard (&bd_addr) == TRUE) &&
860 BTA_DmPinReply( (UINT8*)bd_addr.address, TRUE, 4, pin_code.pin);
866 &bd_addr, &bd_name, cod);
880 bt_bdaddr_t bd_addr;
888 btif_update_remote_properties(p_ssp_cfm_req->bd_addr, p_ssp_cfm_req->bd_name,
891 bdcpy(bd_addr.address, p_ssp_cfm_req->bd_addr);
895 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDING);
900 !(check_cod((bt_bdaddr_t*)&p_ssp_cfm_req->bd_addr, COD_HID_POINTING)))
924 btif_dm_ssp_reply(&bd_addr, BT_SSP_VARIANT_CONSENT, TRUE, 0);
937 HAL_CBACK(bt_hal_cbacks, ssp_request_cb, &bd_addr, &bd_name, cod,
944 bt_bdaddr_t bd_addr;
951 btif_update_remote_properties(p_ssp_key_notif->bd_addr, p_ssp_key_notif->bd_name,
954 bdcpy(bd_addr.address, p_ssp_key_notif->bd_addr);
957 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDING);
966 HAL_CBACK(bt_hal_cbacks, ssp_request_cb, &bd_addr, &bd_name,
982 bt_bdaddr_t bd_addr;
987 bdcpy(bd_addr.address, p_auth_cmpl->bd_addr);
996 ret = btif_storage_add_bonded_device(&bd_addr,
1009 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_NONE);
1021 bdcpy(bd_addr.address, p_auth_cmpl->bd_addr);
1023 if (check_sdp_bl(&bd_addr) && check_cod_hid(&bd_addr, COD_HID_MAJOR))
1031 bond_state_changed(status, &bd_addr, state);
1035 bt_bdaddr_t bd_addr;
1047 BT_STATUS_SUCCESS, &bd_addr, 1, &prop);
1057 btif_dm_get_remote_services(&bd_addr);
1067 if (blacklistPairingRetries(bd_addr.address) && pairing_cb.timeout_retries)
1071 btif_dm_cb_create_bond (&bd_addr, BTA_TRANSPORT_UNKNOWN);
1090 btif_storage_remove_bonded_device(&bd_addr);
1105 if (check_cod(&bd_addr, COD_AV_HEADSETS) ||
1106 check_cod(&bd_addr, COD_AV_HANDSFREE) ||
1107 check_cod(&bd_addr, COD_AV_HEADPHONES) ||
1108 check_cod(&bd_addr, COD_AV_PORTABLE_AUDIO) ||
1109 check_cod(&bd_addr, COD_AV_HIFI_AUDIO) ||
1110 check_cod(&bd_addr, COD_HID_POINTING))
1112 btif_storage_add_device_to_autopair_blacklist (&bd_addr);
1118 btif_dm_cb_create_bond (&bd_addr, BTA_TRANSPORT_UNKNOWN);
1132 if (check_cod(&bd_addr, COD_HID_POINTING)) {
1135 btif_storage_remove_bonded_device(&bd_addr);
1137 bond_state_changed(status, &bd_addr, state);
1170 bdcpy(bdaddr.address, p_search_data->disc_res.bd_addr);
1194 bdcpy(bdaddr.address, p_search_data->inq_res.bd_addr);
1231 /* BD_ADDR */
1340 bt_bdaddr_t bd_addr;
1343 bdcpy(bd_addr.address, p_data->disc_res.bd_addr);
1353 btif_dm_get_remote_services(&bd_addr);
1374 (bdcmp(p_data->disc_res.bd_addr, pairing_cb.bd_addr) == 0)&&
1380 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDED);
1386 ret = btif_storage_set_remote_device_property(&bd_addr, &prop);
1390 BT_STATUS_SUCCESS, &bd_addr, 1, &prop);
1410 bt_bdaddr_t bd_addr;
1428 bdcpy(bd_addr.address, p_data->disc_ble_res.bd_addr);
1434 ret = btif_storage_set_remote_device_property(&bd_addr, &prop);
1439 BT_STATUS_SUCCESS, &bd_addr, 1, &prop);
1474 bt_bdaddr_t bd_addr;
1477 bdcpy(bd_addr.address, p_data->disc_res.bd_addr);
1493 BT_STATUS_SUCCESS, &bd_addr, 1, &prop);
1520 bt_bdaddr_t bd_addr;
1575 btif_enable_bluetooth_evt(p_data->enable.status, p_data->enable.bd_addr);
1605 bdcpy(bd_addr.address, pairing_cb.bd_addr);
1606 bond_state_changed(p_data->bond_cancel_cmpl.result, &bd_addr, BT_BOND_STATE_NONE);
1618 bdcpy(bd_addr.address, p_data->link_down.bd_addr);
1622 btif_hh_remove_device(bd_addr);
1625 btif_storage_remove_ble_bonding_keys(&bd_addr);
1627 btif_storage_remove_bonded_device(&bd_addr);
1628 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_NONE);
1656 bdcpy(bd_addr.address, p_data->link_up.bd_addr);
1659 btif_update_remote_version_property(&bd_addr);
1662 &bd_addr, BT_ACL_STATE_CONNECTED);
1666 bdcpy(bd_addr.address, p_data->link_down.bd_addr);
1669 &bd_addr, BT_ACL_STATE_DISCONNECTED);
1691 bond_state_changed(BT_STATUS_SUCCESS, (bt_bdaddr_t*)p_data->ble_key.bd_addr,
1694 else if (memcmp (pairing_cb.bd_addr, p_data->ble_key.bd_addr, BD_ADDR_LEN)!=0)
2226 bt_status_t btif_dm_create_bond(const bt_bdaddr_t *bd_addr, int transport)
2230 bdcpy(create_bond_cb.bdaddr.address, bd_addr->address);
2233 BTIF_TRACE_EVENT("%s: bd_addr=%s, transport=%d", __FUNCTION__,
2234 bd2str((bt_bdaddr_t *) bd_addr, &bdstr), transport);
2254 bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr)
2258 BTIF_TRACE_EVENT("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
2273 BTA_DmBleSecurityGrant((UINT8 *)bd_addr->address,BTA_DM_SEC_PAIR_NOT_SPT);
2277 BTA_DmConfirm( (UINT8 *)bd_addr->address, FALSE);
2278 BTA_DmBondCancel ((UINT8 *)bd_addr->address);
2279 btif_storage_remove_bonded_device((bt_bdaddr_t *)bd_addr);
2286 BTA_DmBondCancel ((UINT8 *)bd_addr->address);
2290 BTA_DmPinReply( (UINT8 *)bd_addr->address, FALSE, 0, NULL);
2293 BTA_DmBondCancel ((UINT8 *)bd_addr->address);
2299 BTA_DmConfirm( (UINT8 *)bd_addr->address, FALSE);
2303 BTA_DmPinReply( (UINT8 *)bd_addr->address, FALSE, 0, NULL);
2306 BTA_DmBondCancel ((UINT8 *)bd_addr->address);
2307 btif_storage_remove_bonded_device((bt_bdaddr_t *)bd_addr);
2327 bdcmp(bdaddr->address, pairing_cb.bd_addr) == 0)
2343 bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr)
2347 BTIF_TRACE_EVENT("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
2349 (char *)bd_addr, sizeof(bt_bdaddr_t), NULL);
2364 bt_status_t btif_dm_pin_reply( const bt_bdaddr_t *bd_addr, uint8_t accept,
2377 BD_ADDR remote_bd_addr;
2378 bdcpy(remote_bd_addr, bd_addr->address);
2389 BTA_DmPinReply( (UINT8 *)bd_addr->address, accept, pin_len, pin_code->pin);
2394 BTA_DmPinReply( (UINT8 *)bd_addr->address, accept, pin_len, pin_code->pin);
2411 bt_status_t btif_dm_ssp_reply(const bt_bdaddr_t *bd_addr,
2431 BTA_DmBleSecurityGrant((UINT8 *)bd_addr->address,BTA_DM_SEC_GRANTED);
2433 BTA_DmBleSecurityGrant((UINT8 *)bd_addr->address,BTA_DM_SEC_PAIR_NOT_SPT);
2436 BTA_DmConfirm( (UINT8 *)bd_addr->address, accept);
2439 BTA_DmConfirm( (UINT8 *)bd_addr->address, accept);
2563 void btif_dm_proc_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap, tBTA_OOB_DATA *p_oob_data,
2574 UNUSED (bd_addr);
2606 void btif_dm_proc_io_rsp(BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
2609 UNUSED (bd_addr);
2695 BOOLEAN btif_dm_proc_rmt_oob(BD_ADDR bd_addr, BT_OCTET16 p_c, BT_OCTET16 p_r)
2705 bdcpy(oob_cb.oob_bdaddr, bd_addr);
2740 bdcpy(bt_bd_addr.address, bd_addr);
2753 bt_bdaddr_t bd_addr;
2760 btif_update_remote_properties(p_ssp_key_notif->bd_addr , p_ssp_key_notif->bd_name,
2762 bdcpy(bd_addr.address, p_ssp_key_notif->bd_addr);
2765 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDING);
2769 HAL_CBACK(bt_hal_cbacks, ssp_request_cb, &bd_addr, &bd_name,
2786 bt_bdaddr_t bd_addr;
2790 bdcpy(bd_addr.address, p_auth_cmpl->bd_addr);
2801 BTA_GATTC_Refresh(bd_addr.address);
2802 btif_dm_get_remote_services(&bd_addr);
2823 bond_state_changed(status, &bd_addr, state);
2875 bt_bdaddr_t bd_addr;
2879 bdcpy(bd_addr.address, pairing_cb.bd_addr);
2883 btif_storage_add_ble_bonding_key(&bd_addr,
2891 btif_storage_add_ble_bonding_key(&bd_addr,
2900 btif_storage_add_ble_bonding_key(&bd_addr,
2909 btif_storage_add_ble_bonding_key(&bd_addr,
2917 btif_storage_add_ble_bonding_key(&bd_addr,
2928 bt_bdaddr_t bd_addr;
2932 bdcpy(bd_addr.address, pairing_cb.bd_addr);
2933 btif_storage_remove_ble_bonding_keys(&bd_addr);
2948 bt_bdaddr_t bd_addr;
2960 btif_update_remote_properties(p_ble_req->bd_addr,p_ble_req->bd_name,NULL,BT_DEVICE_TYPE_BLE);
2962 bdcpy(bd_addr.address, p_ble_req->bd_addr);
2965 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDING);
2973 HAL_CBACK(bt_hal_cbacks, ssp_request_cb, &bd_addr, &bd_name, cod,
2990 bt_bdaddr_t bd_addr;
2995 btif_update_remote_properties(p_pin_req->bd_addr,p_pin_req->bd_name,NULL,BT_DEVICE_TYPE_BLE);
2997 bdcpy(bd_addr.address, p_pin_req->bd_addr);
3000 bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDING);
3006 &bd_addr, &bd_name, cod);
3010 void btif_dm_update_ble_remote_properties( BD_ADDR bd_addr, BD_NAME bd_name,
3013 btif_update_remote_properties(bd_addr,bd_name,NULL,dev_type);
3070 bt_bdaddr_t bd_addr;
3073 bdcpy(bd_addr.address, pairing_cb.bd_addr);
3074 btif_dm_cancel_bond(&bd_addr);