Commit 038c89b2 authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Alberto Escolar
Browse files

Bluetooth: Controller: Remove redundant CIS encryption code



Remove redundant unused CIS encryption related code.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 0777583c
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -715,33 +715,6 @@ static void isr_rx(void *param)
			/* Increment sequence number */
			cis_lll->sn++;

#if defined(CONFIG_BT_CTLR_LE_ENC)
			if (!cis_lll->npi) {
				/* Get reference to PDU Tx */
				struct node_tx_iso *node_tx;
				struct pdu_cis *pdu_tx;
				uint8_t payload_index;
				memq_link_t *link;

				payload_index = bn_tx - 1U;
				link = memq_peek_n(cis_lll->memq_tx.head,
						   cis_lll->memq_tx.tail,
						   payload_index,
						   (void **)&node_tx);
				pdu_tx = (void *)node_tx->pdu;
				if (pdu_tx->len) {
					/* Get reference to ACL context */
					const struct lll_conn *conn_lll =
						ull_conn_lll_get(cis_lll->acl_handle);

					/* if encrypted increment tx counter */
					if (conn_lll->enc_tx) {
						cis_lll->tx.ccm.counter++;
					}
				}
			}
#endif /* CONFIG_BT_CTLR_LE_ENC */

			/* Increment burst number */
			if (bn_tx <= cis_lll->tx.bn) {
				bn_tx++;
@@ -782,9 +755,6 @@ static void isr_rx(void *param)
					goto isr_rx_done;
				}

				/* Increment counter */
				cis_lll->rx.ccm.counter++;

				/* Record MIC valid */
				mic_state = LLL_CONN_MIC_PASS;
			}
+0 −26
Original line number Diff line number Diff line
@@ -510,29 +510,6 @@ static void isr_rx(void *param)
			/* Increment sequence number */
			cis_lll->sn++;

#if defined(CONFIG_BT_CTLR_LE_ENC)
			if (!cis_lll->npi) {
				/* Get reference to PDU Tx */
				struct node_tx_iso *node_tx;
				struct pdu_cis *pdu_tx;
				uint8_t payload_index;
				memq_link_t *link;

				payload_index = bn_tx - 1U;
				link = memq_peek_n(cis_lll->memq_tx.head,
						   cis_lll->memq_tx.tail,
						   payload_index,
						   (void **)&node_tx);
				pdu_tx = (void *)node_tx->pdu;
				if (pdu_tx->len) {
					/* if encrypted increment tx counter */
					if (conn_lll->enc_tx) {
						cis_lll->tx.ccm.counter++;
					}
				}
			}
#endif /* CONFIG_BT_CTLR_LE_ENC */

			/* Increment burst number */
			if (bn_tx <= cis_lll->tx.bn) {
				bn_tx++;
@@ -572,9 +549,6 @@ static void isr_rx(void *param)
					return;
				}

				/* Increment counter */
				cis_lll->rx.ccm.counter++;

				/* Record MIC valid */
				mic_state = LLL_CONN_MIC_PASS;
			}