@@ -9783,19 +9783,22 @@ static bool is_enc_req_pause_tx(struct connection *conn)
9783
9783
pdu_data_tx = (void * )conn -> pkt_tx_head -> pdu_data ;
9784
9784
if ((pdu_data_tx -> ll_id == PDU_DATA_LLID_CTRL ) &&
9785
9785
(pdu_data_tx -> llctrl .opcode == PDU_DATA_LLCTRL_TYPE_ENC_REQ )) {
9786
- if ((conn -> llcp_req != conn -> llcp_ack ) ||
9787
- (conn -> llcp_feature .ack != conn -> llcp_feature .req ) ||
9788
- (conn -> llcp_version .ack != conn -> llcp_version .req ) ||
9786
+ if (((conn -> llcp_req != conn -> llcp_ack ) &&
9787
+ (conn -> llcp_type != LLCP_ENCRYPTION )) ||
9788
+ ((conn -> llcp_req == conn -> llcp_ack ) &&
9789
+ ((conn -> llcp_feature .ack != conn -> llcp_feature .req ) ||
9790
+ (conn -> llcp_version .ack != conn -> llcp_version .req ) ||
9789
9791
#if defined(CONFIG_BT_CTLR_CONN_PARAM_REQ )
9790
- (conn -> llcp_conn_param .ack != conn -> llcp_conn_param .req ) ||
9792
+ (conn -> llcp_conn_param .ack !=
9793
+ conn -> llcp_conn_param .req ) ||
9791
9794
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
9792
9795
#if defined(CONFIG_BT_CTLR_DATA_LENGTH )
9793
- (conn -> llcp_length .ack != conn -> llcp_length .req ) ||
9796
+ (conn -> llcp_length .ack != conn -> llcp_length .req ) ||
9794
9797
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
9795
9798
#if defined(CONFIG_BT_CTLR_PHY )
9796
- (conn -> llcp_phy .ack != conn -> llcp_phy .req ) ||
9799
+ (conn -> llcp_phy .ack != conn -> llcp_phy .req ) ||
9797
9800
#endif /* CONFIG_BT_CTLR_PHY */
9798
- 0 ) {
9801
+ 0 )) ) {
9799
9802
struct radio_pdu_node_tx * node_tx ;
9800
9803
9801
9804
/* if we have control packets enqueued after this PDU
@@ -9825,10 +9828,14 @@ static bool is_enc_req_pause_tx(struct connection *conn)
9825
9828
return true;
9826
9829
}
9827
9830
9828
- conn -> llcp .encryption .initiate = 1U ;
9831
+ if (conn -> llcp_req == conn -> llcp_ack ) {
9832
+ conn -> llcp .encryption .initiate = 1U ;
9829
9833
9830
- conn -> llcp_type = LLCP_ENCRYPTION ;
9831
- conn -> llcp_ack -- ;
9834
+ conn -> llcp_type = LLCP_ENCRYPTION ;
9835
+ conn -> llcp_ack -- ;
9836
+ } else {
9837
+ LL_ASSERT (conn -> llcp_type == LLCP_ENCRYPTION );
9838
+ }
9832
9839
}
9833
9840
9834
9841
/* Head contains a permitted data or control packet. */
0 commit comments