Lines Matching refs:bd_addr

135 extern bt_status_t btif_dm_remove_bond(const RawAddress* bd_addr);
142 extern void btif_dm_cb_remove_bond(const RawAddress* bd_addr);
274 BTA_HhSendData(p_dev->dev_handle, p_dev->bd_addr, p_buf); in update_keyboard_lockstates()
345 static btif_hh_device_t* btif_hh_find_dev_by_bda(const RawAddress& bd_addr) { in btif_hh_find_dev_by_bda() argument
349 btif_hh_cb.devices[i].bd_addr == bd_addr) { in btif_hh_find_dev_by_bda()
366 const RawAddress& bd_addr) { in btif_hh_find_connected_dev_by_bda() argument
370 btif_hh_cb.devices[i].bd_addr == bd_addr) { in btif_hh_find_connected_dev_by_bda()
385 void btif_hh_stop_vup_timer(RawAddress* bd_addr) { in btif_hh_stop_vup_timer() argument
386 btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in btif_hh_stop_vup_timer()
402 void btif_hh_start_vup_timer(const RawAddress* bd_addr) { in btif_hh_start_vup_timer() argument
405 btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in btif_hh_start_vup_timer()
425 if (btif_hh_cb.added_devices[i].bd_addr == bda) { in btif_hh_add_added_dev()
431 if (btif_hh_cb.added_devices[i].bd_addr.IsEmpty()) { in btif_hh_add_added_dev()
433 btif_hh_cb.added_devices[i].bd_addr = bda; in btif_hh_add_added_dev()
452 void btif_hh_remove_device(RawAddress bd_addr) { in btif_hh_remove_device() argument
457 LOG(INFO) << __func__ << ": bda = " << bd_addr; in btif_hh_remove_device()
461 if (p_added_dev->bd_addr == bd_addr) { in btif_hh_remove_device()
463 btif_storage_remove_hid_info(p_added_dev->bd_addr); in btif_hh_remove_device()
464 memset(&(p_added_dev->bd_addr), 0, 6); in btif_hh_remove_device()
470 p_dev = btif_hh_find_dev_by_bda(bd_addr); in btif_hh_remove_device()
472 LOG(WARNING) << " Oops, can't find device " << bd_addr; in btif_hh_remove_device()
478 HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), in btif_hh_remove_device()
530 bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr) { in btif_hh_virtual_unplug() argument
533 p_dev = btif_hh_find_dev_by_bda(*bd_addr); in btif_hh_virtual_unplug()
537 bd_addr->ToString().c_str()); in btif_hh_virtual_unplug()
539 btif_hh_start_vup_timer(bd_addr); in btif_hh_virtual_unplug()
546 __func__, bd_addr->ToString().c_str()); in btif_hh_virtual_unplug()
548 btif_hh_start_vup_timer(bd_addr); in btif_hh_virtual_unplug()
554 bd_addr->ToString().c_str(), btif_hh_cb.status); in btif_hh_virtual_unplug()
555 if ((btif_hh_cb.pending_conn_address == *bd_addr) && in btif_hh_virtual_unplug()
574 bt_status_t btif_hh_connect(const RawAddress* bd_addr) { in btif_hh_connect() argument
578 btif_hh_device_t* dev = btif_hh_find_dev_by_bda(*bd_addr); in btif_hh_connect()
588 if (btif_hh_cb.added_devices[i].bd_addr == *bd_addr) { in btif_hh_connect()
590 LOG(WARNING) << __func__ << ": Device " << *bd_addr in btif_hh_connect()
599 LOG(ERROR) << __func__ << ": Error, device " << *bd_addr in btif_hh_connect()
601 added_dev->bd_addr = RawAddress::kEmpty; in btif_hh_connect()
613 btif_hh_cb.pending_conn_address = *bd_addr; in btif_hh_connect()
614 BTA_HhOpen(*bd_addr, BTA_HH_PROTO_RPT_MODE, BTUI_HH_SECURITY); in btif_hh_connect()
617 auto tmp = *bd_addr; in btif_hh_connect()
633 void btif_hh_disconnect(RawAddress* bd_addr) { in btif_hh_disconnect() argument
635 p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in btif_hh_disconnect()
794 p_dev->bd_addr = p_data->conn.bda; in btif_hh_upstreams_evt()
804 p_dev->bd_addr = p_data->conn.bda; in btif_hh_upstreams_evt()
814 HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), in btif_hh_upstreams_evt()
822 btif_hh_stop_vup_timer(&(p_dev->bd_addr)); in btif_hh_upstreams_evt()
842 btif_hh_stop_vup_timer(&(p_dev->bd_addr)); in btif_hh_upstreams_evt()
848 BTA_DmRemoveDevice(p_dev->bd_addr); in btif_hh_upstreams_evt()
858 HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), in btif_hh_upstreams_evt()
880 (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
884 (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
899 HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
917 (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
921 HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
931 HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
942 HAL_CBACK(bt_hh_callbacks, idle_time_cb, (RawAddress*)&(p_dev->bd_addr), in btif_hh_upstreams_evt()
974 &p_dev->bd_addr, &prop_name) == BT_STATUS_SUCCESS) { in btif_hh_upstreams_evt()
986 if (btif_hh_add_added_dev(p_dev->bd_addr, p_dev->attr_mask)) { in btif_hh_upstreams_evt()
990 VLOG(1) << "BTA_HH_GET_DSCP_EVT:bda = " << p_dev->bd_addr; in btif_hh_upstreams_evt()
991 BTA_HhAddDev(p_dev->bd_addr, p_dev->attr_mask, p_dev->sub_class, in btif_hh_upstreams_evt()
995 &(p_dev->bd_addr), p_dev->attr_mask, p_dev->sub_class, in btif_hh_upstreams_evt()
1042 if (btif_hh_cb.added_devices[i].bd_addr == p_data->dev_info.bda) { in btif_hh_upstreams_evt()
1046 btif_hh_cb.added_devices[i].bd_addr = RawAddress::kEmpty; in btif_hh_upstreams_evt()
1065 VLOG(1) << "BTA_HH_VC_UNPLUG_EVT:bda = " << p_dev->bd_addr; in btif_hh_upstreams_evt()
1068 btif_hh_stop_vup_timer(&(p_dev->bd_addr)); in btif_hh_upstreams_evt()
1071 HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), in btif_hh_upstreams_evt()
1076 if (p_dev->local_vup || check_cod_hid(&(p_dev->bd_addr))) { in btif_hh_upstreams_evt()
1078 BTA_DmRemoveDevice(p_dev->bd_addr); in btif_hh_upstreams_evt()
1080 btif_hh_remove_device(p_dev->bd_addr); in btif_hh_upstreams_evt()
1081 HAL_CBACK(bt_hh_callbacks, virtual_unplug_cb, &(p_dev->bd_addr), in btif_hh_upstreams_evt()
1150 RawAddress* bd_addr = (RawAddress*)p_param; in btif_hh_handle_evt() local
1155 ret = btif_hh_connect(bd_addr); in btif_hh_handle_evt()
1157 HAL_CBACK(bt_hh_callbacks, connection_state_cb, bd_addr, in btif_hh_handle_evt()
1160 HAL_CBACK(bt_hh_callbacks, connection_state_cb, bd_addr, in btif_hh_handle_evt()
1166 btif_hh_disconnect(bd_addr); in btif_hh_handle_evt()
1167 HAL_CBACK(bt_hh_callbacks, connection_state_cb, bd_addr, in btif_hh_handle_evt()
1173 ret = btif_hh_virtual_unplug(bd_addr); in btif_hh_handle_evt()
1241 static bt_status_t connect(RawAddress* bd_addr) { in connect() argument
1244 (char*)bd_addr, sizeof(RawAddress), NULL); in connect()
1259 static bt_status_t disconnect(RawAddress* bd_addr) { in disconnect() argument
1269 p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in disconnect()
1272 (char*)bd_addr, sizeof(RawAddress), NULL); in disconnect()
1288 static bt_status_t virtual_unplug(RawAddress* bd_addr) { in virtual_unplug() argument
1296 p_dev = btif_hh_find_dev_by_bda(*bd_addr); in virtual_unplug()
1299 bd_addr->ToString().c_str()); in virtual_unplug()
1302 btif_transfer_context(btif_hh_handle_evt, BTIF_HH_VUP_REQ_EVT, (char*)bd_addr, in virtual_unplug()
1316 static bt_status_t get_idle_time(RawAddress* bd_addr) { in get_idle_time() argument
1319 BTIF_TRACE_DEBUG("%s: addr = %s", __func__, bd_addr->ToString().c_str()); in get_idle_time()
1326 btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in get_idle_time()
1342 static bt_status_t set_idle_time(RawAddress* bd_addr, uint8_t idle_time) { in set_idle_time() argument
1346 bd_addr->ToString().c_str(), idle_time); in set_idle_time()
1353 btif_hh_device_t* p_dev = p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in set_idle_time()
1356 bd_addr->ToString().c_str()); in set_idle_time()
1373 static bt_status_t set_info(RawAddress* bd_addr, bthh_hid_info_t hid_info) { in set_info() argument
1377 VLOG(1) << __func__ << " BTHH: addr = " << *bd_addr; in set_info()
1400 if (btif_hh_add_added_dev(*bd_addr, hid_info.attr_mask)) { in set_info()
1401 BTA_HhAddDev(*bd_addr, hid_info.attr_mask, hid_info.sub_class, in set_info()
1419 static bt_status_t get_protocol(RawAddress* bd_addr, in get_protocol() argument
1423 VLOG(1) << __func__ << " BTHH: addr = " << *bd_addr; in get_protocol()
1430 btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in get_protocol()
1446 static bt_status_t set_protocol(RawAddress* bd_addr, in set_protocol() argument
1453 << " addr = " << *bd_addr; in set_protocol()
1460 p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in set_protocol()
1462 LOG(WARNING) << " Error, device" << *bd_addr << " not opened"; in set_protocol()
1485 static bt_status_t get_report(RawAddress* bd_addr, in get_report() argument
1493 << " addr = " << *bd_addr; in get_report()
1500 p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in get_report()
1502 LOG(ERROR) << " Error, device" << *bd_addr << " not opened"; in get_report()
1524 static bt_status_t set_report(RawAddress* bd_addr, in set_report() argument
1530 << " addr=" << *bd_addr; in set_report()
1537 p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in set_report()
1539 LOG(ERROR) << " Error, device" << *bd_addr << " not opened"; in set_report()
1580 static bt_status_t send_data(RawAddress* bd_addr, char* data) { in send_data() argument
1584 VLOG(1) << __func__ << " addr=" << *bd_addr; in send_data()
1591 p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr); in send_data()
1593 LOG(ERROR) << " Error, device" << *bd_addr << " not opened"; in send_data()
1616 BTA_HhSendData(p_dev->dev_handle, *bd_addr, p_buf); in send_data()