[PATCH v3 1/6] staging: rtl8723bs: use explicit types for lengths in rtw_security.c

From: Pranav Desai

Date: Wed Oct 07 2026 - 08:26:17 EST


Replace 'uint' with explicit types for length variables in rtw_security.c
based on how they are used:

- aes_cipher(): use u16 for hdrlen and u32 for plen to match the fields
in struct pkt_attrib.
- aes_decipher(): use u8 for hdrlen to match struct rx_pkt_attrib. Use
u32 for plen since it is calculated from a 32-bit packet length.

Signed-off-by: Pranav Desai <contact.pranavdesai@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 72af46391e23..af461971c827 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -780,8 +780,8 @@ static void construct_ctr_preload(u8 *ctr_preload,
ctr_preload[15] = (unsigned char)(c % 256);
}

-static signed int aes_cipher(u8 *key, uint hdrlen,
- u8 *pframe, uint plen)
+static signed int aes_cipher(u8 *key, u16 hdrlen,
+ u8 *pframe, u32 plen)
{
uint qc_exists, a4_exists, i, j, payload_remainder,
num_blocks, payload_index;
@@ -980,8 +980,8 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
return res;
}

-static signed int aes_decipher(u8 *key, uint hdrlen,
- u8 *pframe, uint plen)
+static signed int aes_decipher(u8 *key, u8 hdrlen,
+ u8 *pframe, u32 plen)
{
static u8 message[MAX_MSG_SIZE];
uint qc_exists, a4_exists, i, j, payload_remainder,
--
2.55.0