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:
Axel Le Bourhis 2025-06-03 15:56:59 +02:00 committed by Benjamin Cabé
commit 928aa4a196

View file

@ -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;
}