Commit e8929c33 authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Anas Nashif
Browse files

Bluetooth: Controller: Fix Extended Advertising channel use



Add implementation defined channel index in the auxiliary
pointer of the common extended payload format in the primary
channel PDUs and the same be used in the transmission of
auxiliary PDUs.

Fixes #35668.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 7597eef8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,8 @@ if(CONFIG_BT_LL_SW_SPLIT)
      )
  endif()
  if(CONFIG_BT_CONN OR
     (CONFIG_BT_BROADCASTER AND
      CONFIG_BT_CTLR_ADV_EXT) OR
     CONFIG_BT_CTLR_ADV_PERIODIC OR
     CONFIG_BT_CTLR_SYNC_PERIODIC)
    zephyr_library_sources(
+1 −1
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ config BT_CTLR_PHY_CODED

config BT_CTLR_CHAN_SEL_2
	bool "Channel Selection Algorithm #2"
	depends on (BT_CONN || BT_CTLR_ADV_PERIODIC || BT_CTLR_SYNC_PERIODIC) && BT_CTLR_CHAN_SEL_2_SUPPORT
	depends on (BT_CONN || (BT_BROADCASTER && BT_CTLR_ADV_EXT) || BT_CTLR_ADV_PERIODIC || BT_CTLR_SYNC_PERIODIC) && BT_CTLR_CHAN_SEL_2_SUPPORT
	default y
	help
	  Enable support for Bluetooth 5.0 LE Channel Selection Algorithm #2 in
+8 −0
Original line number Diff line number Diff line
@@ -56,6 +56,14 @@ struct lll_adv_aux {
	struct lll_hdr hdr;
	struct lll_adv *adv;

	/* Implementation defined radio event counter to calculate auxiliary
	 * PDU channel index.
	 */
	uint16_t data_chan_counter;

	/* Temporary stored use by primary channel PDU event to fill the
	 * auxiliary offset to this auxiliary PDU event.
	 */
	uint32_t ticks_offset;

	struct lll_adv_pdu data;
+4 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 Nordic Semiconductor ASA
 * Copyright (c) 2018-2021 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */
@@ -10,5 +10,6 @@ void lll_adv_aux_prepare(void *param);

extern uint8_t ull_adv_aux_lll_handle_get(struct lll_adv_aux *lll);
extern struct pdu_adv_aux_ptr *
ull_adv_aux_lll_offset_fill(uint32_t ticks_offset, uint32_t start_us,
			    struct pdu_adv *pdu);
	ull_adv_aux_lll_offset_fill(struct pdu_adv *pdu,
				    uint32_t ticks_offset,
				    uint32_t start_us);
+7 −3
Original line number Diff line number Diff line
@@ -1217,9 +1217,13 @@ static void isr_done(void *param)
		start_us = radio_tmr_start_now(1);

#if defined(CONFIG_BT_CTLR_ADV_EXT)
		if (lll->aux) {
			ull_adv_aux_lll_offset_fill(lll->aux->ticks_offset,
						    start_us, pdu);
		struct lll_adv_aux *lll_aux;

		lll_aux = lll->aux;
		if (lll_aux) {
			(void)ull_adv_aux_lll_offset_fill(pdu,
							  lll_aux->ticks_offset,
							  start_us);
		}
#else /* !CONFIG_BT_CTLR_ADV_EXT */
		ARG_UNUSED(pdu);
Loading