diff mbox

[05/13] brcmfmac: only do auth_type workaround when no WPA or RSN IE is provided

Message ID 1362311132-29561-6-git-send-email-arend@broadcom.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arend van Spriel March 3, 2013, 11:45 a.m. UTC
The workaround is only needed when auth_type is automatic AND there is
no WPA or RSN information element provided by cfg80211.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-yb: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Johannes Berg March 3, 2013, 5:20 p.m. UTC | #1
On Sun, 2013-03-03 at 12:45 +0100, Arend van Spriel wrote:
> The workaround is only needed when auth_type is automatic AND there is
> no WPA or RSN information element provided by cfg80211.

Does this really actually happen? Why would wpa_s select automatic when
it knows it's going to be open?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel March 3, 2013, 7:47 p.m. UTC | #2
On 03/03/13 18:20, Johannes Berg wrote:
> On Sun, 2013-03-03 at 12:45 +0100, Arend van Spriel wrote:
>> The workaround is only needed when auth_type is automatic AND there is
>> no WPA or RSN information element provided by cfg80211.
>
> Does this really actually happen? Why would wpa_s select automatic when
> it knows it's going to be open?
>

Hi Johannes,

You are right and it does not happen with wpa_s. However, it does 
'actually really happen' :-) when using iw to connect to an unsecure AP.

Regards,
Arend

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg March 3, 2013, 8:35 p.m. UTC | #3
On Sun, 2013-03-03 at 20:47 +0100, Arend van Spriel wrote:
> On 03/03/13 18:20, Johannes Berg wrote:
> > On Sun, 2013-03-03 at 12:45 +0100, Arend van Spriel wrote:
> >> The workaround is only needed when auth_type is automatic AND there is
> >> no WPA or RSN information element provided by cfg80211.
> >
> > Does this really actually happen? Why would wpa_s select automatic when
> > it knows it's going to be open?
> >

> You are right and it does not happen with wpa_s. However, it does 
> 'actually really happen' :-) 

:-)
Just curious.

> when using iw to connect to an unsecure AP.

Right but then checking for RSN/WPA won't make a difference? I guess I
don't really understand the code, so you better ignore me ;-)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel March 4, 2013, 8:29 a.m. UTC | #4
On 03/03/13 21:35, Johannes Berg wrote:
> On Sun, 2013-03-03 at 20:47 +0100, Arend van Spriel wrote:
>> On 03/03/13 18:20, Johannes Berg wrote:
>>> On Sun, 2013-03-03 at 12:45 +0100, Arend van Spriel wrote:
>>>> The workaround is only needed when auth_type is automatic AND there is
>>>> no WPA or RSN information element provided by cfg80211.
>>>
>>> Does this really actually happen? Why would wpa_s select automatic when
>>> it knows it's going to be open?
>>>
>
>> You are right and it does not happen with wpa_s. However, it does
>> 'actually really happen' :-)
>
> :-)
> Just curious.
>
>> when using iw to connect to an unsecure AP.
>
> Right but then checking for RSN/WPA won't make a difference? I guess I
> don't really understand the code, so you better ignore me ;-)

Hi Johannes,

I would not go that far. I guess what you are really asking is whether 
auth_type will ever be set to automatic when we do get a RSN/WPA ie and 
I have to admit you got a point there.

John,

Can you pull this patch out of the series.

Regards,
Arend

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 2af9c0f..73f5528 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1605,6 +1605,9 @@  brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
 			}
 		}
 		brcmf_fil_iovar_data_set(ifp, "wpaie", ie, ie_len);
+		if (!ie_len)
+			sme->auth_type = brcmf_war_auth_type(ifp,
+							     sme->auth_type);
 	}
 
 	err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG,
@@ -1635,7 +1638,6 @@  brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
 		goto done;
 	}
 
-	sme->auth_type = brcmf_war_auth_type(ifp, sme->auth_type);
 	err = brcmf_set_auth_type(ndev, sme);
 	if (err) {
 		brcmf_err("wl_set_auth_type failed (%d)\n", err);