aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/usb.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-02-27 19:35:17 -0800
committerJohn W. Linville <linville@tuxdriver.com>2014-02-28 14:33:43 -0500
commit848819f43878a3a3f7c659fee3b6e16c334c3062 (patch)
treedb61e0825a98a223ea1174aed104dba368dc3c18 /drivers/net/wireless/mwifiex/usb.c
parentmwifiex: skipping pending commands after unload (diff)
downloadlinux-dev-848819f43878a3a3f7c659fee3b6e16c334c3062.tar.xz
linux-dev-848819f43878a3a3f7c659fee3b6e16c334c3062.zip
mwifiex: stop AP at shutdown time
Deauth is sent to AP when the device is acting as station at shutdown time. Similarly we should stop AP operation also. mwifiex_deauthenticate() takes care closing the connection based on provided interface type. Add a new function to simplify the code. Reported-by: Avery Pennarun <apenwarr@gmail.com> 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/usb.c')
-rw-r--r--drivers/net/wireless/mwifiex/usb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c
index 21d1316adaa0..93d5d73c4800 100644
--- a/drivers/net/wireless/mwifiex/usb.c
+++ b/drivers/net/wireless/mwifiex/usb.c
@@ -1036,7 +1036,6 @@ static void mwifiex_usb_cleanup_module(void)
if (usb_card && usb_card->adapter) {
struct mwifiex_adapter *adapter = usb_card->adapter;
- int i;
/* In case driver is removed when asynchronous FW downloading is
* in progress
@@ -1047,11 +1046,8 @@ static void mwifiex_usb_cleanup_module(void)
if (adapter->is_suspended)
mwifiex_usb_resume(usb_card->intf);
#endif
- for (i = 0; i < adapter->priv_num; i++)
- if ((GET_BSS_ROLE(adapter->priv[i]) ==
- MWIFIEX_BSS_ROLE_STA) &&
- adapter->priv[i]->media_connected)
- mwifiex_deauthenticate(adapter->priv[i], NULL);
+
+ mwifiex_deauthenticate_all(adapter);
mwifiex_init_shutdown_fw(mwifiex_get_priv(adapter,
MWIFIEX_BSS_ROLE_ANY),