drivers: bluetooth: hci_nxp: fix discarding multi part adv reports
In case of extended advertising, advertising data can be reported in parts, so we shouldn't discard them. Instead, only discard the legacy advertising reports. Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
This commit is contained in:
parent
c91b98c829
commit
928aa4a196
1 changed files with 11 additions and 1 deletions
|
@ -221,9 +221,19 @@ static bool is_hci_event_discardable(const uint8_t *evt_data)
|
|||
|
||||
switch (subevt_type) {
|
||||
case BT_HCI_EVT_LE_ADVERTISING_REPORT:
|
||||
case BT_HCI_EVT_LE_EXT_ADVERTISING_REPORT:
|
||||
ret = true;
|
||||
break;
|
||||
#if defined(CONFIG_BT_EXT_ADV)
|
||||
case BT_HCI_EVT_LE_EXT_ADVERTISING_REPORT:
|
||||
{
|
||||
const struct bt_hci_evt_le_ext_advertising_report *ext_adv =
|
||||
(void *)&evt_data[3];
|
||||
|
||||
return (ext_adv->num_reports == 1) &&
|
||||
((ext_adv->adv_info[0].evt_type &
|
||||
BT_HCI_LE_ADV_EVT_TYPE_LEGACY) != 0);
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue