Skip to content

Commit 2fbb759

Browse files
Bluetooth: controller: Fix PKT_AC_US macro
Advertising channel packets do not have MIC, there's no need to have extra parameter which always has to be set to 0 anyway. Signed-off-by: Andrzej Kaczmarek <[email protected]>
1 parent c68054c commit 2fbb759

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

subsys/bluetooth/controller/ll_sw/pdu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158

159159
#define PKT_US(octets, phy) PKT_DC_US((octets), (PDU_MIC_SIZE), (phy))
160160

161-
#define PKT_AC_US(octets, mic, phy) PKT_DC_US((octets), (mic), (phy))
161+
#define PKT_AC_US(octets, phy) PKT_DC_US((octets), 0, (phy))
162162

163163
#define PKT_BIS_US(octets, mic, phy) PKT_DC_US((octets), (mic), (phy))
164164

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
269269
lll->chan = aux_ptr->chan_idx;
270270
lll->phy = BIT(aux_ptr->phy);
271271

272-
aux_offset_us = ftr->radio_end_us - PKT_AC_US(pdu->len, 0, phy);
272+
aux_offset_us = ftr->radio_end_us - PKT_AC_US(pdu->len, phy);
273273
if (aux_ptr->offs_units) {
274274
lll->window_size_us = 300U;
275275
} else {
@@ -302,7 +302,7 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
302302
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_START_US +
303303
ready_delay_us +
304304
PKT_AC_US(PDU_AC_EXT_PAYLOAD_SIZE_MAX,
305-
0, lll->phy) +
305+
lll->phy) +
306306
EVENT_OVERHEAD_END_US);
307307

308308
ticks_slot_offset = MAX(aux->ull.ticks_active_to_start,

subsys/bluetooth/controller/ll_sw/ull_sync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void ull_sync_setup(struct ll_scan_set *scan, struct ll_scan_aux_set *aux,
438438
sync_offset_us += (uint32_t)si->offs * lll->window_size_event_us;
439439
/* offs_adjust may be 1 only if sync setup by LL_PERIODIC_SYNC_IND */
440440
sync_offset_us += (si->offs_adjust ? OFFS_ADJUST_US : 0U);
441-
sync_offset_us -= PKT_AC_US(pdu->len, 0, lll->phy);
441+
sync_offset_us -= PKT_AC_US(pdu->len, lll->phy);
442442
sync_offset_us -= EVENT_TICKER_RES_MARGIN_US;
443443
sync_offset_us -= EVENT_JITTER_US;
444444
sync_offset_us -= ready_delay_us;
@@ -455,7 +455,7 @@ void ull_sync_setup(struct ll_scan_set *scan, struct ll_scan_aux_set *aux,
455455
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_START_US +
456456
ready_delay_us +
457457
PKT_AC_US(PDU_AC_EXT_PAYLOAD_SIZE_MAX,
458-
0, lll->phy) +
458+
lll->phy) +
459459
EVENT_OVERHEAD_END_US);
460460

461461
ticks_slot_offset = MAX(sync->ull.ticks_active_to_start,

0 commit comments

Comments
 (0)