Skip to content

Commit ae8649c

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: controller: Fix connection failed to be established
Fix connection failed to be established regression introduced by the commit 350c569 ("Bluetooth: controller: Avoid offseting to lldata"). As the Rx-ed PDU buffer is re-used to construct the connection complete message towards HCI, the fields in the Rx-ed PDU need to be backup for future use in the control path. Here the channel selection bit is backup now. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 6ba4488 commit ae8649c

File tree

1 file changed

+7
-1
lines changed
  • subsys/bluetooth/controller/ll_sw

1 file changed

+7
-1
lines changed

subsys/bluetooth/controller/ll_sw/ctrl.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,7 @@ static inline u32_t isr_rx_scan(u8_t devmatch_ok, u8_t devmatch_id,
13501350
struct radio_le_conn_cmplt *radio_le_conn_cmplt;
13511351
struct radio_pdu_node_rx *node_rx;
13521352
struct pdu_adv *pdu_adv_tx;
1353+
u8_t pdu_adv_rx_chan_sel;
13531354
struct connection *conn;
13541355
u32_t ticks_slot_offset;
13551356
u32_t conn_interval_us;
@@ -1382,6 +1383,11 @@ static inline u32_t isr_rx_scan(u8_t devmatch_ok, u8_t devmatch_id,
13821383

13831384
if (IS_ENABLED(CONFIG_BT_CTLR_CHAN_SEL_2)) {
13841385
pdu_adv_tx->chan_sel = 1;
1386+
1387+
/* backup, as Rx-ed buffer is used to enqueue
1388+
* connection message.
1389+
*/
1390+
pdu_adv_rx_chan_sel = pdu_adv_rx->chan_sel;
13851391
} else {
13861392
pdu_adv_tx->chan_sel = 0;
13871393
}
@@ -1552,7 +1558,7 @@ static inline u32_t isr_rx_scan(u8_t devmatch_ok, u8_t devmatch_id,
15521558

15531559
le_chan_sel_algo = (void *)node_rx->pdu_data;
15541560

1555-
if (pdu_adv_rx->chan_sel) {
1561+
if (pdu_adv_rx_chan_sel) {
15561562
u16_t aa_ls =
15571563
((u16_t)conn->access_addr[1] << 8) |
15581564
conn->access_addr[0];

0 commit comments

Comments
 (0)