Commit 871ab25c authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Anas Nashif
Browse files

Bluetooth: controller: Fix reject extended indication checks



Fix reject extended indication PDU dispatch to check
transaction violations.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent cd0ed046
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -4522,11 +4522,12 @@ static int reject_ext_ind_send(struct ll_conn *conn, struct node_rx_pdu *rx,
{
	struct pdu_data *pdu_ctrl_tx;
	struct node_tx *tx;
	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;
	}

	pdu_ctrl_tx = (void *)tx->pdu;
@@ -5430,6 +5431,12 @@ static inline void ctrl_tx_ack(struct ll_conn *conn, struct node_tx **tx,
	case PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND:
		if (pdu_tx->llctrl.reject_ext_ind.reject_opcode !=
		    PDU_DATA_LLCTRL_TYPE_ENC_REQ) {
			/* Reset the transaction lock set by connection
			 * parameter request and PHY update procedure when
			 * sending the Reject Ext Ind PDU.
			 */
			conn->common.txn_lock = 0U;

			break;
		}
		__fallthrough;