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

Bluetooth: controller: Fix Feature Exchange checks


Fix Feature Exchange procedure to check transaction
violations.
Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 651afd7c
Showing with 10 additions and 4 deletions
+10 -4
......@@ -4332,14 +4332,15 @@ static int feature_rsp_send(struct ll_conn *conn, struct node_rx_pdu *rx,
struct pdu_data *pdu_rx)
{
struct pdu_data_llctrl_feature_req *req;
struct node_tx *tx;
struct pdu_data *pdu_tx;
struct node_tx *tx;
uint32_t feat;
int err;
/* acquire tx mem */
tx = mem_acquire(&mem_conn_tx_ctrl.free);
/* Check transaction violation and get free ctrl tx PDU */
tx = ctrl_tx_rsp_mem_acquire(conn, rx, &err);
if (!tx) {
return -ENOBUFS;
return err;
}
/* AND the feature set to get Feature USED */
......@@ -5350,6 +5351,11 @@ static inline void ctrl_tx_ack(struct ll_conn *conn, struct node_tx **tx,
}
break;
case PDU_DATA_LLCTRL_TYPE_FEATURE_RSP:
/* Reset the transaction lock */
conn->common.txn_lock = 0U;
break;
#if defined(CONFIG_BT_CTLR_LE_ENC)
#if defined(CONFIG_BT_CENTRAL)
case PDU_DATA_LLCTRL_TYPE_ENC_REQ:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment