staging: rtl8723bs: avoid linelength > 100 in rtw_security
PATCH 1/1 staging: rtl8723bs: avoid linelength > 100 in rtw_security
Signed-off-by Gowtham S Bhushan <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_security.c | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +18 -11
@@ -34,7 +34,7 @@ const char *security_type_str(u8 value)/* Need to consider the fragment situation */ void rtw_wep_encrypt (struct adapter *padapter,u8 *pxmitframe) -{/* exclude ICV */ +{/* exclude ICV */ union {__le32 f0;unsigned char f1[4 ];
@@ -64,7 +64,9 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)for (curfragnum =0 ; curfragnum < pattrib->nr_frags; curfragnum++) { iv = pframe + pattrib->hdrlen;memcpy (&wepkey[0 ], iv,3 ); -memcpy (&wepkey[3 ], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0 ], keylength); +memcpy (&wepkey[3 ], + &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0 ], + keylength); payload = pframe + pattrib->iv_len + pattrib->hdrlen;if ((curfragnum +1 ) == pattrib->nr_frags) {/* the last fragment */
@@ -112,7 +114,10 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe) keyindex = prxattrib->key_index; keylength = psecuritypriv->dot11DefKeylen[keyindex];memcpy (&wepkey[0 ], iv,3 ); -/* memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength); */ +/* memcpy(&wepkey[3], +* &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], +* *keylength); +*/ memcpy (&wepkey[3 ], &psecuritypriv->dot11DefKey[keyindex].skey[0 ], keylength); length = ((union recv_frame *)precvframe)->u.hdr.len - prxattrib->hdrlen - prxattrib->iv_len;
@@ -157,7 +162,8 @@ void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b) pmicdata->L ^= pmicdata->M; pmicdata->R ^=ROL32 (pmicdata->L,17 ); pmicdata->L += pmicdata->R; - pmicdata->R ^= ((pmicdata->L &0xff00ff00 ) >>8 ) | ((pmicdata->L &0x00ff00ff ) <<8 ); + pmicdata->R ^= ((pmicdata->L &0xff00ff00 ) >>8 ) | + ((pmicdata->L &0x00ff00ff ) <<8 ); pmicdata->L += pmicdata->R; pmicdata->R ^=ROL32 (pmicdata->L,3 ); pmicdata->L += pmicdata->R;
@@ -418,7 +424,7 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)/* The hlen isn't include the IV */ u32 rtw_tkip_encrypt (struct adapter *padapter,u8 *pxmitframe) -{/* exclude ICV */ +{/* exclude ICV */ u16 pnl;u32 pnh;u8 rc4key[16 ];
@@ -491,7 +497,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)/* The hlen isn't include the IV */ u32 rtw_tkip_decrypt (struct adapter *padapter,u8 *precvframe) -{/* exclude ICV */ +{/* exclude ICV */ u16 pnl;u32 pnh;u8 rc4key[16 ];
@@ -747,7 +753,7 @@ static void construct_ctr_preload(u8 *ctr_preload, ctr_preload[i] =0x00 ; i =0 ; - ctr_preload[0 ] =0x01 ;/* flag */ + ctr_preload[0 ] =0x01 ;/* flag */ if (qc_exists && a4_exists) ctr_preload[1 ] = mpdu[30 ] &0x0f ;/* QoC_Control */ if (qc_exists && !a4_exists)
@@ -758,7 +764,7 @@ static void construct_ctr_preload(u8 *ctr_preload, ctr_preload[1 ] |=BIT (4 );for (i =2 ; i <8 ; i++) - ctr_preload[i] = mpdu[i +8 ];/* ctr_preload[2:7] = A2[0:5] = mpdu[10:15] */ + ctr_preload[i] = mpdu[i +8 ];/* ctr_preload[2:7] = A2[0:5] = mpdu[10:15] */ for (i =8 ; i <14 ; i++) ctr_preload[i] = pn_vector[13 - i];/* ctr_preload[8:13] = PN[5:0] */ ctr_preload[14 ] = (unsigned char )(c /256 );/* Ctr */
@@ -766,7 +772,7 @@ static void construct_ctr_preload(u8 *ctr_preload, }static signed int aes_cipher (u8 *key,uint hdrlen, -u8 *pframe,uint plen) +u8 *pframe,uint plen) {uint qc_exists, a4_exists, i, j, payload_remainder, num_blocks, payload_index;
@@ -967,7 +973,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) }static signed int aes_decipher (u8 *key,uint hdrlen, -u8 *pframe,uint plen) +u8 *pframe,uint plen) {static u8 message[MAX_MSG_SIZE ]; uint qc_exists, a4_exists, i, j, payload_remainder,
@@ -1430,7 +1436,8 @@ void rtw_sec_restore_wep_key(struct adapter *adapter)struct security_priv *securitypriv = &adapter->securitypriv;signed int keyid; -if ((securitypriv->dot11_privacy_algrthm == _WEP40_) || (securitypriv->dot11_privacy_algrthm == _WEP104_)) { +if ((securitypriv->dot11_privacy_algrthm == _WEP40_) || + (securitypriv->dot11_privacy_algrthm == _WEP104_)) {for (keyid =0 ; keyid <4 ; keyid++) {if (securitypriv->key_mask &BIT (keyid)) {if (keyid == securitypriv->dot11PrivacyKeyIndex)
Signature · 1 line
2.55.0
Greg Kroah-Hartman
maintainerQuoted 10 lines · Gowtham S Bhushan
Signed-off-by Gowtham S Bhushan <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_security.c | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-)drivers/staging/rtl8723bs/core/rtw_security.c +0
-0
drivers/staging/rtl8723bs/core/rtw_security.c const char *security_type_str(u8 value) · line 37
Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_security.c +1
-1@@ -34,7 +34,7 @@ const char *security_type_str(u8 value)/* Need to consider the fragment situation */ void rtw_wep_encrypt (struct adapter *padapter,u8 *pxmitframe) -{/* exclude ICV */ +{/* exclude ICV */
Why is the comment indented like that? That's very odd, don't you think?
And there was no changelog text :(
thanks,
greg k-h