Bluetooth: controller: Add code comments for ext adv report

Added code comments to explain the reasons to drop
incomplete advertising and sync report.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2020-11-21 11:57:14 +05:30 committed by Carles Cufí
commit 283a30875b

View file

@ -4279,6 +4279,13 @@ no_ext_hdr:
if (!(adv_addr || if (!(adv_addr ||
(adi && ((tx_pwr != BT_HCI_LE_ADV_TX_POWER_NO_PREF) || (adi && ((tx_pwr != BT_HCI_LE_ADV_TX_POWER_NO_PREF) ||
data)))) { data)))) {
/* No device address and no valid AD data parsed or
* Tx Power present for this PDU chain that has ADI,
* skip HCI event generation.
* In other terms, generate HCI event if device address
* is present or if Tx pwr and/or data is present from
* anonymous device.
*/
goto le_ext_adv_report_invalid; goto le_ext_adv_report_invalid;
} }
} }
@ -4606,6 +4613,9 @@ no_ext_hdr:
} else { } else {
/* Data incomplete and no more to come */ /* Data incomplete and no more to come */
if ((tx_pwr == BT_HCI_LE_ADV_TX_POWER_NO_PREF) && !data) { if ((tx_pwr == BT_HCI_LE_ADV_TX_POWER_NO_PREF) && !data) {
/* No Tx Power value and no valid AD data parsed in this
* chain of PDUs, skip HCI event generation.
*/
goto le_per_adv_report_invalid; goto le_per_adv_report_invalid;
} }
} }