Bluetooth: Controller: Fix BIS subevent channel indices
From Bluetooth Core Specification v5.3 Vol 6 Part B Section 4.4.6.8 Channel indices, The subevent number se_n shall be set to the values 1 to NSE, in order, for the subevents on a given BIS - the same values shall be used for all the BISes in a BIG - and to 1 for the control subevent. Hence, fix implementation to reset back to se_n to 1 when next BIS PDUs are transmitted in the subevents. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
9660f52dc7
commit
9a51ece3fd
2 changed files with 31 additions and 26 deletions
|
@ -503,6 +503,7 @@ static void isr_tx_common(void *param,
|
||||||
/* control subevent to use bis = 0 and se_n = 1 */
|
/* control subevent to use bis = 0 and se_n = 1 */
|
||||||
bis = 0U;
|
bis = 0U;
|
||||||
data_chan_use = lll->ctrl_chan_use;
|
data_chan_use = lll->ctrl_chan_use;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
struct lll_adv_iso_stream *stream;
|
struct lll_adv_iso_stream *stream;
|
||||||
uint16_t stream_handle;
|
uint16_t stream_handle;
|
||||||
|
@ -618,14 +619,25 @@ static void isr_tx_common(void *param,
|
||||||
pdu->payload[3] = lll->bis_curr;
|
pdu->payload[3] = lll->bis_curr;
|
||||||
#endif /* TEST_WITH_DUMMY_PDU */
|
#endif /* TEST_WITH_DUMMY_PDU */
|
||||||
|
|
||||||
/* Calculate the radio channel to use for ISO event */
|
if ((lll->bn_curr == 1U) && (lll->irc_curr == 1U)) {
|
||||||
data_chan_use =
|
const uint16_t event_counter =
|
||||||
lll_chan_iso_subevent(data_chan_id,
|
(lll->payload_count / lll->bn) - 1U;
|
||||||
lll->data_chan_map,
|
|
||||||
lll->data_chan_count,
|
|
||||||
&lll->data_chan_prn_s,
|
|
||||||
&lll->data_chan_remap_idx);
|
|
||||||
|
|
||||||
|
/* Calculate the radio channel to use for next BIS */
|
||||||
|
data_chan_use = lll_chan_iso_event(event_counter,
|
||||||
|
data_chan_id,
|
||||||
|
lll->data_chan_map,
|
||||||
|
lll->data_chan_count,
|
||||||
|
&lll->data_chan_prn_s,
|
||||||
|
&lll->data_chan_remap_idx);
|
||||||
|
} else {
|
||||||
|
/* Calculate the radio channel to use for subevent */
|
||||||
|
data_chan_use = lll_chan_iso_subevent(data_chan_id,
|
||||||
|
lll->data_chan_map,
|
||||||
|
lll->data_chan_count,
|
||||||
|
&lll->data_chan_prn_s,
|
||||||
|
&lll->data_chan_remap_idx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pdu->rfu = 0U;
|
pdu->rfu = 0U;
|
||||||
|
|
||||||
|
|
|
@ -603,23 +603,6 @@ isr_rx_find_subevent:
|
||||||
struct lll_sync_iso_stream *stream;
|
struct lll_sync_iso_stream *stream;
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
|
|
||||||
if (skipped) {
|
|
||||||
/* Calculate the Access Address for the current BIS */
|
|
||||||
util_bis_aa_le32(lll->bis_curr, lll->seed_access_addr,
|
|
||||||
access_addr);
|
|
||||||
data_chan_id = lll_chan_id(access_addr);
|
|
||||||
|
|
||||||
/* Skip channel indices for the previous BIS stream */
|
|
||||||
do {
|
|
||||||
/* Calculate the radio channel to use for ISO event */
|
|
||||||
(void)lll_chan_iso_subevent(data_chan_id,
|
|
||||||
lll->data_chan_map,
|
|
||||||
lll->data_chan_count,
|
|
||||||
&lll->data_chan_prn_s,
|
|
||||||
&lll->data_chan_remap_idx);
|
|
||||||
} while (--skipped);
|
|
||||||
}
|
|
||||||
|
|
||||||
handle = lll->stream_handle[lll->stream_curr];
|
handle = lll->stream_handle[lll->stream_curr];
|
||||||
stream = ull_sync_iso_lll_stream_get(handle);
|
stream = ull_sync_iso_lll_stream_get(handle);
|
||||||
if (lll->bis_curr == stream->bis_index) {
|
if (lll->bis_curr == stream->bis_index) {
|
||||||
|
@ -800,9 +783,19 @@ isr_rx_next_subevent:
|
||||||
radio_crc_configure(PDU_CRC_POLYNOMIAL, sys_get_le24(crc_init));
|
radio_crc_configure(PDU_CRC_POLYNOMIAL, sys_get_le24(crc_init));
|
||||||
|
|
||||||
/* Set the channel to use */
|
/* Set the channel to use */
|
||||||
if (bis) {
|
if (bis && (lll->bn_curr == 1U) && (lll->irc_curr == 1U)) {
|
||||||
|
const uint16_t event_counter = (lll->payload_count / lll->bn) -
|
||||||
|
1U;
|
||||||
|
|
||||||
|
/* Calculate the radio channel to use for next BIS */
|
||||||
|
data_chan_use = lll_chan_iso_event(event_counter, data_chan_id,
|
||||||
|
lll->data_chan_map,
|
||||||
|
lll->data_chan_count,
|
||||||
|
&lll->data_chan_prn_s,
|
||||||
|
&lll->data_chan_remap_idx);
|
||||||
|
} else if (bis) {
|
||||||
do {
|
do {
|
||||||
/* Calculate the radio channel to use for ISO event */
|
/* Calculate the radio channel to use for subevent */
|
||||||
data_chan_use = lll_chan_iso_subevent(data_chan_id,
|
data_chan_use = lll_chan_iso_subevent(data_chan_id,
|
||||||
lll->data_chan_map,
|
lll->data_chan_map,
|
||||||
lll->data_chan_count,
|
lll->data_chan_count,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue