From 13f2b41cf3fd35fe9eca0f12d5e621145e6789c6 Mon Sep 17 00:00:00 2001 From: Pranav Desai Date: Wed, 7 Oct 2026 17:23:37 +0530 Subject: staging: rtl8723bs: use explicit types for lengths in rtw_security.c 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 Link: https://patch.msgid.link/20261007115342.1121742-2-contact.pranavdesai@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/core/rtw_security.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index c6a23ddc419f..4e689cef38a1 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, -- cgit v1.2.3