Skip to content

Commit f3e9177

Browse files
cvinayaknashif
authored andcommitted
Bluetooth: controller: Defer encryption setup if in conn update
Workaround, defer peer initiated encryption while local initiated procedure with instant is not complete. Peer master has sent CONN_UPDATE_IND in response to CONN_PARAM_REQ, and also has initiated a Encryption Setup thereafter. In this case, avoid corruption of the connection update context by deferring the Encryption Setup. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 0fbaf2c commit f3e9177

File tree

1 file changed

+11
-0
lines changed
  • subsys/bluetooth/controller/ll_sw

1 file changed

+11
-0
lines changed

subsys/bluetooth/controller/ll_sw/ctrl.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,6 +2694,17 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *node_rx,
26942694
goto isr_rx_conn_unknown_rsp_send;
26952695
}
26962696

2697+
/* NOTE: workaround to defer peer initiated encryption while
2698+
* local initiated procedure with instant is not complete.
2699+
* Peer master has sent CONN_UPDATE_IND in response to
2700+
* CONN_PARAM_REQ, and also has initiated a Encryption
2701+
* Setup thereafter.
2702+
*/
2703+
if (_radio.conn_curr->llcp_req != _radio.conn_curr->llcp_ack) {
2704+
nack = 1U;
2705+
break;
2706+
}
2707+
26972708
#if defined(CONFIG_BT_CTLR_FAST_ENC)
26982709
/* TODO: BT Spec. text: may finalize the sending of additional
26992710
* data channel PDUs queued in the controller.

0 commit comments

Comments
 (0)