Bluetooth: Controller: Rename drop to accept to avoid negations
Rename the variable drop to accept to avoid multiple use of negations in the implementation. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
471543e75e
commit
c706a095e8
1 changed files with 10 additions and 9 deletions
|
@ -6167,7 +6167,7 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
|
||||||
uint8_t hdr_len;
|
uint8_t hdr_len;
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
int8_t rssi;
|
int8_t rssi;
|
||||||
bool drop;
|
bool accept;
|
||||||
|
|
||||||
if (!(event_mask & BT_EVT_MASK_LE_META_EVENT) ||
|
if (!(event_mask & BT_EVT_MASK_LE_META_EVENT) ||
|
||||||
(!(le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) &&
|
(!(le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) &&
|
||||||
|
@ -6303,17 +6303,18 @@ no_ext_hdr:
|
||||||
/* FIXME: Use correct data status else chain PDU report will
|
/* FIXME: Use correct data status else chain PDU report will
|
||||||
* be filtered out.
|
* be filtered out.
|
||||||
*/
|
*/
|
||||||
drop = !ftr->sync_rx_enabled ||
|
accept = ftr->sync_rx_enabled &&
|
||||||
(sync->nodups && dup_found(PDU_ADV_TYPE_EXT_IND,
|
(!sync->nodups ||
|
||||||
sync->peer_id_addr_type,
|
!dup_found(PDU_ADV_TYPE_EXT_IND,
|
||||||
sync->peer_id_addr,
|
sync->peer_id_addr_type,
|
||||||
DUP_EXT_ADV_MODE_PERIODIC,
|
sync->peer_id_addr,
|
||||||
adi, 0U));
|
DUP_EXT_ADV_MODE_PERIODIC,
|
||||||
|
adi, 0U));
|
||||||
#endif /* CONFIG_BT_CTLR_DUP_FILTER_LEN > 0 &&
|
#endif /* CONFIG_BT_CTLR_DUP_FILTER_LEN > 0 &&
|
||||||
* CONFIG_BT_CTLR_SYNC_PERIODIC_ADI_SUPPORT
|
* CONFIG_BT_CTLR_SYNC_PERIODIC_ADI_SUPPORT
|
||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
drop = !ftr->sync_rx_enabled;
|
accept = ftr->sync_rx_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
data_len_max = ADV_REPORT_EVT_MAX_LEN -
|
data_len_max = ADV_REPORT_EVT_MAX_LEN -
|
||||||
|
@ -6322,7 +6323,7 @@ no_ext_hdr:
|
||||||
|
|
||||||
evt_buf = buf;
|
evt_buf = buf;
|
||||||
|
|
||||||
if ((le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) && !drop) {
|
if ((le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) && accept) {
|
||||||
do {
|
do {
|
||||||
struct bt_hci_evt_le_per_advertising_report *sep;
|
struct bt_hci_evt_le_per_advertising_report *sep;
|
||||||
uint8_t data_len_frag;
|
uint8_t data_len_frag;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue