fix(ble/bluedroid): Fixed BLE set adv param check

This commit is contained in:
zhanghaipeng 2024-05-09 17:37:23 +08:00
parent 7212e4e1a8
commit 4593ae0741

View File

@ -388,6 +388,12 @@ void BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy)
&p_cb->adv_addr_type); &p_cb->adv_addr_type);
} }
uint8_t null_addr[BD_ADDR_LEN] = {0};
if ((p_cb->evt_type == 0x01 || p_cb->evt_type == 0x04) && memcmp(p_addr_ptr, null_addr, BD_ADDR_LEN) == 0) {
/* directed advertising */
return;
}
btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min :
BTM_BLE_GAP_ADV_SLOW_INT), BTM_BLE_GAP_ADV_SLOW_INT),
(UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max :