staging: rtl8723au: changes stop ap mode to use reset function
PATCH 1/1 staging: rtl8723au: changes stop ap mode to use reset function
Changes stop_ap_mode23a() to use rtw_reset_securitypriv23a. This makes the code cleaner and fixes two checkpatch.pl errors, one line over 80 characters, and one spacing issue.
--- drivers/staging/rtl8723au/core/rtw_ap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtl8723au/core/rtw_ap.c +2 -4
@@ -1870,10 +1870,8 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) pmlmepriv->update_bcn = false; pmlmeext->bstart_bss = false; -/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */ -memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv )); - padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; - padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; +/* reset and init security priv */ +rtw_reset_securitypriv23a (padapter);/* for ACL */ spin_lock_bh (&pacl_node_q->lock);
Signature · 1 line
2.0.5
Jes Sorensen
NAKQuoted 14 lines · Matthew Emerson
Changes
stop_ap_mode23a()to usertw_reset_securitypriv23a. This makes the code cleaner and fixes two checkpatch.pl errors, one line over 80 characters, and one spacing issue.Signed-off-by Matthew Emerson <[email protected]>--- drivers/staging/rtl8723au/core/rtw_ap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/staging/rtl8723au/core/rtw_ap.c +0
-0
drivers/staging/rtl8723au/core/rtw_ap.c void stop_ap_mode23a(struct rtw_adapter *padapter) · line 1874
Quoted 9 lines
drivers/staging/rtl8723au/core/rtw_ap.c +2
-4@@ -1870,10 +1870,8 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) pmlmepriv->update_bcn = false; pmlmeext->bstart_bss = false; -/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */ -memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv )); - padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; - padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; +/* reset and init security priv */ +rtw_reset_securitypriv23a (padapter);
This is broken, rtw_reset_securitypriv23a() takes different actions based on the value of adapter->securitypriv.dot11AuthAlgrthm - you leave it at it's old value, which does not have the same effect as the above.
If anything you should remove the memset() and call rtw_reset_securitypriv23a() after the two assignments.
NACK
Jes
Quoted 29 lines · Jes Sorensen
Quoted 14 lines · Matthew Emerson
Changes
stop_ap_mode23a()to usertw_reset_securitypriv23a. This makes the code cleaner and fixes two checkpatch.pl errors, one line over 80 characters, and one spacing issue.Signed-off-by Matthew Emerson <[email protected]>--- drivers/staging/rtl8723au/core/rtw_ap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/staging/rtl8723au/core/rtw_ap.c +0
-0drivers/staging/rtl8723au/core/rtw_ap.c void stop_ap_mode23a(struct rtw_adapter *padapter) · line 1874
Quoted 9 lines
drivers/staging/rtl8723au/core/rtw_ap.c +2
-4@@ -1870,10 +1870,8 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) pmlmepriv->update_bcn = false; pmlmeext->bstart_bss = false; -/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */ -memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv )); - padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; - padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; +/* reset and init security priv */ +rtw_reset_securitypriv23a (padapter);This is broken,
rtw_reset_securitypriv23a()takes different actions based on the value ofadapter->securitypriv.dot11AuthAlgrthm- you leave it at it's old value, which does not have the same effect as the above.
Quoted 6 lines
If anything you should remove the
memset()and callrtw_reset_securitypriv23a()after the two assignments.NACK
Jes
Thank you for you feedback! I had noticed that the two assignments above (for .ndisauthtype and .ndisencryptstatus) take place in both branches of the if statement in rtw_reset_securitypriv23a() so I thought removing them here would be okay. I'll be sure to make the changes you suggested.
Thanks for your time,
Matthew Emerson