staging: r8188eu: two simple cleanups
cover staging: r8188eu: two simple cleanups
This series contains two simple cleanups.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (2):
staging: r8188eu: busetkipkey is boolean
staging: r8188eu: bgrpkey_handshake is set but never used
drivers/staging/r8188eu/core/rtw_mlme.c | 1 - drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- drivers/staging/r8188eu/include/rtw_security.h | 1 - 4 files changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/2 staging: r8188eu: busetkipkey is boolean
The field busetkipkey of struct security_priv is set to boolean values only. Remove unneeded comparisions from if statements that use this field.
--- drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +1 -1
@@ -471,7 +471,7 @@ static struct recv_frame *decryptor(struct adapter *padapter, struct recv_framebreak ; } }else if (prxattrib->bdecrypted ==1 && prxattrib->encrypt >0 && - (psecuritypriv->busetkipkey ==1 || prxattrib->encrypt != _TKIP_)) + (psecuritypriv->busetkipkey || prxattrib->encrypt != _TKIP_)) psecuritypriv->hw_decrypted = true;if (res == _FAIL) {
drivers/staging/r8188eu/core/rtw_xmit.c +1 -1
@@ -626,7 +626,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p pattrib->iv_len =8 ; pattrib->icv_len =4 ; -if (padapter->securitypriv.busetkipkey == _FAIL) { +if (!padapter->securitypriv.busetkipkey) { res = _FAIL; goto exit; }
Signature · 1 line
2.39.2
PATCH 2/2 staging: r8188eu: bgrpkey_handshake is set but never used
In reply to Michael StraubeThe field bgrpkey_handshake of struct security_priv is set but never used. Remove it.
--- drivers/staging/r8188eu/core/rtw_mlme.c | 1 - drivers/staging/r8188eu/include/rtw_security.h | 1 - 2 files changed, 2 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme.c +0 -1
@@ -944,7 +944,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, strif (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { padapter->securitypriv.binstallGrpkey = false; padapter->securitypriv.busetkipkey = false; - padapter->securitypriv.bgrpkey_handshake = false; psta->ieee8021x_blocked = true; psta->dot118021XPrivacy = padapter->securitypriv.dot11PrivacyAlgrthm;memset ((u8 *)&psta->dot118021x_UncstKey,0 ,sizeof (union Keytype ));
drivers/staging/r8188eu/include/rtw_security.h +0 -1
@@ -116,7 +116,6 @@ struct security_priv {u8 binstallGrpkey;u8 busetkipkey;u8 bcheck_grpkey; -u8 bgrpkey_handshake;s32 sw_encrypt;/* from registry_priv */ s32 sw_decrypt;/* from registry_priv */ s32 hw_decrypted;/* if the rx packets is hw_decrypted==false,i
Signature · 1 line
2.39.2
Quoted 8 lines · Michael Straube
This series contains two simple cleanups.
Tested on
x86_64with Inter-Tech DMG-02.Michael Straube (2):
staging: r8188eu: busetkipkey is boolean
staging: r8188eu:bgrpkey_handshakeis set but never used
Quoted 6 lines
drivers/staging/r8188eu/core/rtw_mlme.c | 1 - drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- drivers/staging/r8188eu/include/rtw_security.h | 1 - 4 files changed, 2 insertions(+), 4 deletions(-)
Greg KH
maintainerQuoted 8 lines · Michael Straube
This series contains two simple cleanups.
Tested on
x86_64with Inter-Tech DMG-02.Michael Straube (2):
staging: r8188eu: busetkipkey is boolean
staging: r8188eu:bgrpkey_handshakeis set but never used
Quoted 10 lines
drivers/staging/r8188eu/core/rtw_mlme.c | 1 - drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- drivers/staging/r8188eu/include/rtw_security.h | 1 - 4 files changed, 2 insertions(+), 4 deletions(-)Signature · 1 line
2.39.2
Sorry, but I've now deleted this driver, so these patches do not apply.
greg k-h