aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-02-06 12:40:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-08 14:51:34 -0500
commitcbb1ec9491fdbd3aa9dee6ad9a3bcb05bdfd279d (patch)
tree4f7e93d4db1cbe07cb8732e5d893a580b029136d /drivers/net/wireless/brcm80211/brcmfmac
parent371830eafeb742e973964b38a55f17b69ea714d0 (diff)
brcmfmac: fix problem connecting to AP without security
The bcm43236 device showed having an issue connection to an AP without security when auth_type was set to automatic. For this particular device a workaround is made by selecting open-system. This problem does not occur when using wpa_supplicant as it will not use auth type automatic. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 153924ecc890..d47b274018ba 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1365,9 +1365,28 @@ brcmf_set_sharedkey(struct net_device *ndev,
1365 return err; 1365 return err;
1366} 1366}
1367 1367
1368static
1369enum nl80211_auth_type brcmf_war_auth_type(struct brcmf_if *ifp,
1370 enum nl80211_auth_type type)
1371{
1372 u32 ci;
1373 if (type == NL80211_AUTHTYPE_AUTOMATIC) {
1374 /* shift to ignore chip revision */
1375 ci = brcmf_get_chip_info(ifp) >> 4;
1376 switch (ci) {
1377 case 43236:
1378 brcmf_dbg(CONN, "43236 WAR: use OPEN instead of AUTO\n");
1379 return NL80211_AUTHTYPE_OPEN_SYSTEM;
1380 default:
1381 break;
1382 }
1383 }
1384 return type;
1385}
1386
1368static s32 1387static s32
1369brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, 1388brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
1370 struct cfg80211_connect_params *sme) 1389 struct cfg80211_connect_params *sme)
1371{ 1390{
1372 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 1391 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
1373 struct brcmf_if *ifp = netdev_priv(ndev); 1392 struct brcmf_if *ifp = netdev_priv(ndev);
@@ -1410,6 +1429,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
1410 goto done; 1429 goto done;
1411 } 1430 }
1412 1431
1432 sme->auth_type = brcmf_war_auth_type(ifp, sme->auth_type);
1413 err = brcmf_set_auth_type(ndev, sme); 1433 err = brcmf_set_auth_type(ndev, sme);
1414 if (err) { 1434 if (err) {
1415 brcmf_err("wl_set_auth_type failed (%d)\n", err); 1435 brcmf_err("wl_set_auth_type failed (%d)\n", err);