nimble/ll: Rename local variable for better readability
@@ -3518,6 +3518,7 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr)
uint8_t hdr_byte;
uint8_t rxd_sn;
uint8_t *rxbuf;
+ uint8_t llid;
uint16_t acl_len;
uint16_t acl_hdr;
struct ble_ll_conn_sm *connsm;
@@ -3535,14 +3536,14 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr)
rxbuf = rxpdu->om_data;
hdr_byte = rxbuf[0];
acl_len = rxbuf[1];
- acl_hdr = hdr_byte & BLE_LL_DATA_HDR_LLID_MASK;
+ llid = hdr_byte & BLE_LL_DATA_HDR_LLID_MASK;
/*
* Check that the LLID and payload length are reasonable.
* Empty payload is only allowed for LLID == 01b.
* */
- if ((acl_hdr == 0) ||
- ((acl_len == 0) && (acl_hdr != BLE_LL_LLID_DATA_FRAG))) {
+ if ((llid == 0) ||
+ ((acl_len == 0) && (llid != BLE_LL_LLID_DATA_FRAG))) {
STATS_INC(ble_ll_conn_stats, rx_bad_llid);
goto conn_rx_data_pdu_end;
}
@@ -3582,7 +3583,7 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr)
connsm->last_rxd_sn = rxd_sn;
/* No need to do anything if empty pdu */
- if ((acl_hdr == BLE_LL_LLID_DATA_FRAG) && (acl_len == 0)) {
+ if ((llid == BLE_LL_LLID_DATA_FRAG) && (acl_len == 0)) {
goto conn_rx_data_pdu_end;
}
@@ -3598,7 +3599,7 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr)
}
#endif
- if (acl_hdr == BLE_LL_LLID_CTRL) {
+ if (llid == BLE_LL_LLID_CTRL) {
/* Process control frame */
STATS_INC(ble_ll_conn_stats, rx_ctrl_pdus);
if (ble_ll_ctrl_rx_pdu(connsm, rxpdu)) {
@@ -3614,7 +3615,7 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr)
os_mbuf_prepend(rxpdu, 2);
rxbuf = rxpdu->om_data;
- acl_hdr = (acl_hdr << 12) | connsm->conn_handle;
+ acl_hdr = (llid << 12) | connsm->conn_handle;
put_le16(rxbuf, acl_hdr);
put_le16(rxbuf + 2, acl_len);
ble_hci_trans_ll_acl_tx(rxpdu);
