Skip to content

Commit a92ec0a

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 23281c4 commit a92ec0a

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
@@ -151,7 +151,7 @@
151151

152152
#define PKT_US(octets, phy) PKT_DC_US((octets), (PDU_MIC_SIZE), (phy))
153153

154-
#define PKT_AC_US(octets, mic, phy) PKT_DC_US((octets), (mic), (phy))
154+
#define PKT_AC_US(octets, phy) PKT_DC_US((octets), 0, (phy))
155155

156156
/* Extra bytes for enqueued node_rx metadata: rssi (always), resolving
157157
* index, directed adv report, and mesh channel and instant.

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

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

267-
aux_offset_us = ftr->radio_end_us - PKT_AC_US(pdu->len, 0, phy);
267+
aux_offset_us = ftr->radio_end_us - PKT_AC_US(pdu->len, phy);
268268
if (aux_ptr->offs_units) {
269269
lll->window_size_us = 300U;
270270
} else {
@@ -298,7 +298,7 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
298298
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_START_US +
299299
ready_delay_us +
300300
PKT_AC_US(PDU_AC_EXT_PAYLOAD_SIZE_MAX,
301-
0, lll->phy) +
301+
lll->phy) +
302302
EVENT_OVERHEAD_END_US);
303303

304304
ticks_slot_offset = MAX(aux->evt.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
@@ -421,7 +421,7 @@ void ull_sync_setup(struct ll_scan_set *scan, struct ll_scan_aux_set *aux,
421421
sync_offset_us += (uint32_t)si->offs * lll->window_size_event_us;
422422
/* offs_adjust may be 1 only if sync setup by LL_PERIODIC_SYNC_IND */
423423
sync_offset_us += (si->offs_adjust ? OFFS_ADJUST_US : 0U);
424-
sync_offset_us -= PKT_AC_US(pdu->len, 0, lll->phy);
424+
sync_offset_us -= PKT_AC_US(pdu->len, lll->phy);
425425
sync_offset_us -= EVENT_OVERHEAD_START_US;
426426
sync_offset_us -= EVENT_JITTER_US;
427427
sync_offset_us -= ready_delay_us;
@@ -438,7 +438,7 @@ void ull_sync_setup(struct ll_scan_set *scan, struct ll_scan_aux_set *aux,
438438
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_START_US +
439439
ready_delay_us +
440440
PKT_AC_US(PDU_AC_EXT_PAYLOAD_SIZE_MAX,
441-
0, lll->phy) +
441+
lll->phy) +
442442
EVENT_OVERHEAD_END_US);
443443

444444
ticks_slot_offset = MAX(sync->evt.ticks_active_to_start,

0 commit comments

Comments
 (0)