Loading system/stack/btm/btm_ble_gap.cc +17 −7 Original line number Diff line number Diff line Loading @@ -569,7 +569,7 @@ tBTM_STATUS BTM_BleObserve(bool start, uint8_t duration, tBTM_INQ_RESULTS_CB* p_ ? BTM_BLE_SCAN_MODE_ACTI : btm_cb.ble_ctr_cb.inq_var.scan_type; btm_send_hci_set_scan_params(btm_cb.ble_ctr_cb.inq_var.scan_type, (uint16_t)ll_scan_interval, (uint8_t)scan_phy, (uint16_t)ll_scan_window, (uint8_t)ll_scan_window, (uint16_t)scan_phy, btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, BTM_BLE_DEFAULT_SFP); Loading Loading @@ -1468,15 +1468,25 @@ void btm_send_hci_set_scan_params(uint8_t scan_type, uint16_t scan_int, uint16_t uint8_t scan_phy, tBLE_ADDR_TYPE addr_type_own, uint8_t scan_filter_policy) { if (bluetooth::shim::GetController()->SupportsBleExtendedAdvertising()) { if (com::android::bluetooth::flags::phy_to_native()) { int phy_cnt = std::bitset<std::numeric_limits<uint8_t>::digits>(scan_phy).count(); scanning_phy_cfg phy_cfgs[phy_cnt]; for (int i = 0; i < phy_cnt; i++) { phy_cfgs[i].scan_type = scan_type; phy_cfgs[i].scan_int = scan_int; phy_cfgs[i].scan_win = scan_win; } btsnd_hcic_ble_set_extended_scan_params(addr_type_own, scan_filter_policy, scan_phy, phy_cfgs); } else { scanning_phy_cfg phy_cfg; phy_cfg.scan_type = scan_type; phy_cfg.scan_int = scan_int; phy_cfg.scan_win = scan_win; if (com::android::bluetooth::flags::phy_to_native()) { btsnd_hcic_ble_set_extended_scan_params(addr_type_own, scan_filter_policy, scan_phy, &phy_cfg); } else { btsnd_hcic_ble_set_extended_scan_params(addr_type_own, scan_filter_policy, 1, &phy_cfg); } } else { Loading Loading
system/stack/btm/btm_ble_gap.cc +17 −7 Original line number Diff line number Diff line Loading @@ -569,7 +569,7 @@ tBTM_STATUS BTM_BleObserve(bool start, uint8_t duration, tBTM_INQ_RESULTS_CB* p_ ? BTM_BLE_SCAN_MODE_ACTI : btm_cb.ble_ctr_cb.inq_var.scan_type; btm_send_hci_set_scan_params(btm_cb.ble_ctr_cb.inq_var.scan_type, (uint16_t)ll_scan_interval, (uint8_t)scan_phy, (uint16_t)ll_scan_window, (uint8_t)ll_scan_window, (uint16_t)scan_phy, btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, BTM_BLE_DEFAULT_SFP); Loading Loading @@ -1468,15 +1468,25 @@ void btm_send_hci_set_scan_params(uint8_t scan_type, uint16_t scan_int, uint16_t uint8_t scan_phy, tBLE_ADDR_TYPE addr_type_own, uint8_t scan_filter_policy) { if (bluetooth::shim::GetController()->SupportsBleExtendedAdvertising()) { if (com::android::bluetooth::flags::phy_to_native()) { int phy_cnt = std::bitset<std::numeric_limits<uint8_t>::digits>(scan_phy).count(); scanning_phy_cfg phy_cfgs[phy_cnt]; for (int i = 0; i < phy_cnt; i++) { phy_cfgs[i].scan_type = scan_type; phy_cfgs[i].scan_int = scan_int; phy_cfgs[i].scan_win = scan_win; } btsnd_hcic_ble_set_extended_scan_params(addr_type_own, scan_filter_policy, scan_phy, phy_cfgs); } else { scanning_phy_cfg phy_cfg; phy_cfg.scan_type = scan_type; phy_cfg.scan_int = scan_int; phy_cfg.scan_win = scan_win; if (com::android::bluetooth::flags::phy_to_native()) { btsnd_hcic_ble_set_extended_scan_params(addr_type_own, scan_filter_policy, scan_phy, &phy_cfg); } else { btsnd_hcic_ble_set_extended_scan_params(addr_type_own, scan_filter_policy, 1, &phy_cfg); } } else { Loading