mwifiex: handle auto authentication mode correctly
authorAmitkumar Karwar <akarwar@marvell.com>
Sat, 25 Feb 2012 05:36:05 +0000 (21:36 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 5 Mar 2012 20:20:47 +0000 (15:20 -0500)
commita0f6d6caef4033aa9c3e2ea2ceae256c4347a419
tree1f1e5b20fa6633f217fd8e13da505265bdc4101c
parentc288ec614e264b46853c65d3db9ccf91d53c9484
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>
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/mwifiex/join.c
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/sta_ioctl.c