diff options
author | Marco Cesati <marcocesati@gmail.com> | 2021-03-12 11:26:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-12 19:25:41 +0300 |
commit | d495c5503d1339cb57ab0bab428e43fd062d0678 (patch) | |
tree | 1819ad8f3a1555f7fb0bb76f7e64ed4cd9486bbb /drivers/staging/rtl8723bs/core/rtw_security.c | |
parent | 95cf028829cfc3fba576865136253f4b49d829fb (diff) | |
download | linux-d495c5503d1339cb57ab0bab428e43fd062d0678.tar.xz |
staging: rtl8723bs: remove typedefs in basic_types.h
This commit fixes the following checkpatch.pl warning:
WARNING: do not add new typedefs
#16: FILE: include/basic_types.h:16:
+typedef signed int sint;
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-28-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core/rtw_security.c')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_security.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index a311595deafb..4550113a55a2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -148,7 +148,7 @@ static void arcfour_encrypt(struct arc4context *parc4ctx, u8 *dest, u8 *src, u32 dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx); } -static sint bcrc32initialized; +static signed int bcrc32initialized; static u32 crc32_table[256]; @@ -162,7 +162,7 @@ static void crc32_init(void) if (bcrc32initialized == 1) return; else { - sint i, j; + signed int i, j; u32 c; u8 *p = (u8 *)&c, *p1; u8 k; @@ -184,7 +184,7 @@ static void crc32_init(void) } } -static __le32 getcrc32(u8 *buf, sint len) +static __le32 getcrc32(u8 *buf, signed int len) { u8 *p; u32 crc; @@ -209,7 +209,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) unsigned char crc[4]; struct arc4context mycontext; - sint curfragnum, length; + signed int curfragnum, length; u32 keylength; u8 *pframe, *payload, *iv; /* wepkey */ @@ -266,7 +266,7 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe) /* exclude ICV */ u8 crc[4]; struct arc4context mycontext; - sint length; + signed int length; u32 keylength; u8 *pframe, *payload, *iv, wepkey[16]; u8 keyindex; @@ -549,7 +549,7 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in R */ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) { - sint i; + signed int i; /* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */ p1k[0] = Lo16(iv32); @@ -597,7 +597,7 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) */ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) { - sint i; + signed int i; u16 PPK[6]; /* temporary key for mixing */ /* Note: all adds in the PPK[] equations below are mod 2**16 */ @@ -651,7 +651,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) u8 crc[4]; u8 hw_hdr_offset = 0; struct arc4context mycontext; - sint curfragnum, length; + signed int curfragnum, length; u8 *pframe, *payload, *iv, *prwskey; union pn48 dot11txpn; @@ -727,7 +727,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) u8 ttkey[16]; u8 crc[4]; struct arc4context mycontext; - sint length; + signed int length; u8 *pframe, *payload, *iv, *prwskey; union pn48 dot11txpn; @@ -874,31 +874,31 @@ exit: static void bitwise_xor(u8 *ina, u8 *inb, u8 *out); static void construct_mic_iv(u8 *mic_header1, - sint qc_exists, - sint a4_exists, + signed int qc_exists, + signed int a4_exists, u8 *mpdu, uint payload_length, u8 *pn_vector, uint frtype); /* add for CONFIG_IEEE80211W, none 11w also can use */ static void construct_mic_header1(u8 *mic_header1, - sint header_length, + signed int header_length, u8 *mpdu, uint frtype); /* for CONFIG_IEEE80211W, none 11w also can use */ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, - sint a4_exists, - sint qc_exists); + signed int a4_exists, + signed int qc_exists); static void construct_ctr_preload(u8 *ctr_preload, - sint a4_exists, - sint qc_exists, + signed int a4_exists, + signed int qc_exists, u8 *mpdu, u8 *pn_vector, - sint c, + signed int c, uint frtype); /* for CONFIG_IEEE80211W, none 11w also can use */ static void xor_128(u8 *a, u8 *b, u8 *out); static void xor_32(u8 *a, u8 *b, u8 *out); static u8 sbox(u8 a); -static void next_key(u8 *key, sint round); +static void next_key(u8 *key, signed int round); static void byte_sub(u8 *in, u8 *out); static void shift_row(u8 *in, u8 *out); static void mix_column(u8 *in, u8 *out); @@ -912,7 +912,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext); /****************************************/ static void xor_128(u8 *a, u8 *b, u8 *out) { - sint i; + signed int i; for (i = 0; i < 16; i++) out[i] = a[i] ^ b[i]; @@ -921,7 +921,7 @@ static void xor_128(u8 *a, u8 *b, u8 *out) static void xor_32(u8 *a, u8 *b, u8 *out) { - sint i; + signed int i; for (i = 0; i < 4; i++) out[i] = a[i] ^ b[i]; @@ -930,11 +930,11 @@ static void xor_32(u8 *a, u8 *b, u8 *out) static u8 sbox(u8 a) { - return sbox_table[(sint)a]; + return sbox_table[(signed int)a]; } -static void next_key(u8 *key, sint round) +static void next_key(u8 *key, signed int round) { u8 rcon; u8 sbox_key[4]; @@ -961,7 +961,7 @@ static void next_key(u8 *key, sint round) static void byte_sub(u8 *in, u8 *out) { - sint i; + signed int i; for (i = 0; i < 16; i++) out[i] = sbox(in[i]); @@ -990,7 +990,7 @@ static void shift_row(u8 *in, u8 *out) static void mix_column(u8 *in, u8 *out) { - sint i; + signed int i; u8 add1b[4]; u8 add1bf7[4]; u8 rotl[4]; @@ -1047,8 +1047,8 @@ static void mix_column(u8 *in, u8 *out) static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext) { - sint round; - sint i; + signed int round; + signed int i; u8 intermediatea[16]; u8 intermediateb[16]; u8 round_key[16]; @@ -1084,14 +1084,14 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext) /* nonce */ /************************************************/ static void construct_mic_iv(u8 *mic_iv, - sint qc_exists, - sint a4_exists, + signed int qc_exists, + signed int a4_exists, u8 *mpdu, uint payload_length, u8 *pn_vector, uint frtype) /* add for CONFIG_IEEE80211W, none 11w also can use */ { - sint i; + signed int i; mic_iv[0] = 0x59; @@ -1128,7 +1128,7 @@ static void construct_mic_iv(u8 *mic_iv, /* Build AAD SC, A1, A2 */ /************************************************/ static void construct_mic_header1(u8 *mic_header1, - sint header_length, + signed int header_length, u8 *mpdu, uint frtype) /* for CONFIG_IEEE80211W, none 11w also can use */ { @@ -1163,10 +1163,10 @@ static void construct_mic_header1(u8 *mic_header1, /************************************************/ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, - sint a4_exists, - sint qc_exists) + signed int a4_exists, + signed int qc_exists) { - sint i; + signed int i; for (i = 0; i < 16; i++) mic_header2[i] = 0x00; @@ -1208,14 +1208,14 @@ static void construct_mic_header2(u8 *mic_header2, /* nonce */ /************************************************/ static void construct_ctr_preload(u8 *ctr_preload, - sint a4_exists, - sint qc_exists, + signed int a4_exists, + signed int qc_exists, u8 *mpdu, u8 *pn_vector, - sint c, + signed int c, uint frtype) /* for CONFIG_IEEE80211W, none 11w also can use */ { - sint i = 0; + signed int i = 0; for (i = 0; i < 16; i++) ctr_preload[i] = 0x00; @@ -1250,13 +1250,13 @@ static void construct_ctr_preload(u8 *ctr_preload, /************************************/ static void bitwise_xor(u8 *ina, u8 *inb, u8 *out) { - sint i; + signed int i; for (i = 0; i < 16; i++) out[i] = ina[i] ^ inb[i]; } -static sint aes_cipher(u8 *key, uint hdrlen, +static signed int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) { uint qc_exists, a4_exists, i, j, payload_remainder, @@ -1428,7 +1428,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) /* unsigned char message[MAX_MSG_SIZE]; */ /* Intermediate Buffers */ - sint curfragnum, length; + signed int curfragnum, length; u8 *pframe, *prwskey; /* *payload,*iv */ u8 hw_hdr_offset = 0; struct pkt_attrib *pattrib = &((struct xmit_frame *)pxmitframe)->attrib; @@ -1471,13 +1471,13 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) return res; } -static sint aes_decipher(u8 *key, uint hdrlen, +static signed int aes_decipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) { static u8 message[MAX_MSG_SIZE]; uint qc_exists, a4_exists, i, j, payload_remainder, num_blocks, payload_index; - sint res = _SUCCESS; + signed int res = _SUCCESS; u8 pn_vector[6]; u8 mic_iv[16]; u8 mic_header1[16]; @@ -1704,7 +1704,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) /* Intermediate Buffers */ - sint length; + signed int length; u8 *pframe, *prwskey; /* *payload,*iv */ struct sta_info *stainfo; struct rx_pkt_attrib *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib; @@ -2241,7 +2241,7 @@ int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac) void rtw_sec_restore_wep_key(struct adapter *adapter) { struct security_priv *securitypriv = &(adapter->securitypriv); - sint keyid; + signed int keyid; if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) || (_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) { for (keyid = 0; keyid < 4; keyid++) { |