summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorPranav Desai <contact.pranavdesai@gmail.com>2026-10-07 17:23:37 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-13 15:33:53 +0200
commit13f2b41cf3fd35fe9eca0f12d5e621145e6789c6 (patch)
tree71d5f521bd90e7746ff3ff0b2a84c54cf9b5147c /drivers/staging
parent4cd5b75819e108dd725b001ba6c2fd61f419a930 (diff)
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 <contact.pranavdesai@gmail.com> Link: https://patch.msgid.link/20261007115342.1121742-2-contact.pranavdesai@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_security.c8
1 files changed, 4 insertions, 4 deletions
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,