Commit 6eb998bd authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Anas Nashif
Browse files

Bluetooth: controller: Fix ping procedure checks



Fix ping procedure to check transaction violations.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 26e335cc
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -5125,13 +5125,14 @@ send_length_resp:
#if defined(CONFIG_BT_CTLR_LE_PING)
static int ping_resp_send(struct ll_conn *conn, struct node_rx_pdu *rx)
{
	struct node_tx *tx;
	struct pdu_data *pdu_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_tx = (void *)tx->pdu;
@@ -5362,6 +5363,7 @@ static inline void ctrl_tx_ack(struct ll_conn *conn, struct node_tx **tx,
	break;

	case PDU_DATA_LLCTRL_TYPE_FEATURE_RSP:
	case PDU_DATA_LLCTRL_TYPE_PING_RSP:
	case PDU_DATA_LLCTRL_TYPE_UNKNOWN_RSP:
		/* Reset the transaction lock */
		conn->common.txn_lock = 0U;