diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-02-24 21:36:05 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:20:47 -0500 |
commit | a0f6d6caef4033aa9c3e2ea2ceae256c4347a419 (patch) | |
tree | 1f1e5b20fa6633f217fd8e13da505265bdc4101c /drivers/net/wireless/mwifiex/sta_ioctl.c | |
parent | c288ec614e264b46853c65d3db9ccf91d53c9484 (diff) | |
download | op-kernel-dev-a0f6d6caef4033aa9c3e2ea2ceae256c4347a419.zip op-kernel-dev-a0f6d6caef4033aa9c3e2ea2ceae256c4347a419.tar.gz |
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/sta_ioctl.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 866026e..e10161f 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -249,6 +249,17 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, * application retrieval */ priv->assoc_rsp_size = 0; ret = mwifiex_associate(priv, bss_desc); + + /* If auth type is auto and association fails using open mode, + * try to connect using shared mode */ + if (ret == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG && + priv->sec_info.is_authtype_auto && + priv->sec_info.wep_enabled) { + priv->sec_info.authentication_mode = + NL80211_AUTHTYPE_SHARED_KEY; + ret = mwifiex_associate(priv, bss_desc); + } + if (bss) cfg80211_put_bss(bss); } else { |