linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723au: changes stop ap mode to use reset function
@ 2014-12-29  2:22 Matthew Emerson
  2015-01-02 15:51 ` Jes Sorensen
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Emerson @ 2014-12-29  2:22 UTC (permalink / raw)
  To: Larry.Finger, Jes.Sorensen, gregkh
  Cc: linux-wireless, devel, linux-kernel, Matthew Emerson

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.

Signed-off-by: Matthew Emerson <emersonmde@gmail.com>
---
 drivers/staging/rtl8723au/core/rtw_ap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index e394d12c36b0..510ee212496f 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -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);
-- 
2.0.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rtl8723au: changes stop ap mode to use reset function
  2014-12-29  2:22 [PATCH] staging: rtl8723au: changes stop ap mode to use reset function Matthew Emerson
@ 2015-01-02 15:51 ` Jes Sorensen
  2015-01-02 18:56   ` Matthew Emerson
  0 siblings, 1 reply; 3+ messages in thread
From: Jes Sorensen @ 2015-01-02 15:51 UTC (permalink / raw)
  To: Matthew Emerson; +Cc: Larry.Finger, gregkh, linux-wireless, devel, linux-kernel

Matthew Emerson <emersonmde@gmail.com> writes:
> 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.
>
> Signed-off-by: Matthew Emerson <emersonmde@gmail.com>
> ---
>  drivers/staging/rtl8723au/core/rtw_ap.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
> index e394d12c36b0..510ee212496f 100644
> --- a/drivers/staging/rtl8723au/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723au/core/rtw_ap.c
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rtl8723au: changes stop ap mode to use reset function
  2015-01-02 15:51 ` Jes Sorensen
@ 2015-01-02 18:56   ` Matthew Emerson
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Emerson @ 2015-01-02 18:56 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: Larry.Finger, gregkh, linux-wireless, devel, linux-kernel

On Fri, Jan 02, 2015 at 10:51:38AM -0500, Jes Sorensen wrote:
> Matthew Emerson <emersonmde@gmail.com> writes:
> > 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.
> >
> > Signed-off-by: Matthew Emerson <emersonmde@gmail.com>
> > ---
> >  drivers/staging/rtl8723au/core/rtw_ap.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
> > index e394d12c36b0..510ee212496f 100644
> > --- a/drivers/staging/rtl8723au/core/rtw_ap.c
> > +++ b/drivers/staging/rtl8723au/core/rtw_ap.c
> > @@ -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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-02 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-29  2:22 [PATCH] staging: rtl8723au: changes stop ap mode to use reset function Matthew Emerson
2015-01-02 15:51 ` Jes Sorensen
2015-01-02 18:56   ` Matthew Emerson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).