summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAmitkumar Karwar2012-02-25 06:36:05 +0100
committerJohn W. Linville2012-03-05 21:20:47 +0100
commita0f6d6caef4033aa9c3e2ea2ceae256c4347a419 (patch)
tree1f1e5b20fa6633f217fd8e13da505265bdc4101c /drivers/net/wireless/mwifiex/cfg80211.c
parentcarl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly" (diff)
downloadkernel-qcow2-linux-a0f6d6caef4033aa9c3e2ea2ceae256c4347a419.tar.gz
kernel-qcow2-linux-a0f6d6caef4033aa9c3e2ea2ceae256c4347a419.tar.xz
kernel-qcow2-linux-a0f6d6caef4033aa9c3e2ea2ceae256c4347a419.zip
mwifiex: handle auto authentication mode correctly
When authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC, driver tries to connect using open mode. The association is failed if AP is configured in shared mode. This patch adds code to try association using shared mode as well if open mode association fails. Now since we returned exact error code in association response handler (instead of -1), corresponding changes are done in mwifiex_process_cmdresp(). Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index a460fb0cc503..6a81101bab44 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -873,6 +873,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
priv->sec_info.wpa2_enabled = false;
priv->wep_key_curr_index = 0;
priv->sec_info.encryption_mode = 0;
+ priv->sec_info.is_authtype_auto = 0;
ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
if (mode == NL80211_IFTYPE_ADHOC) {
@@ -894,11 +895,12 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
}
/* Now handle infra mode. "sme" is valid for infra mode only */
- if (sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC
- || sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM)
+ if (sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) {
auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
- else if (sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY)
- auth_type = NL80211_AUTHTYPE_SHARED_KEY;
+ priv->sec_info.is_authtype_auto = 1;
+ } else {
+ auth_type = sme->auth_type;
+ }
if (sme->crypto.n_ciphers_pairwise) {
priv->sec_info.encryption_mode =