summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/join.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-02-28 04:35:17 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-02-28 20:33:43 +0100
commit848819f43878a3a3f7c659fee3b6e16c334c3062 (patch)
treedb61e0825a98a223ea1174aed104dba368dc3c18 /drivers/net/wireless/mwifiex/join.c
parentmwifiex: skipping pending commands after unload (diff)
downloadlinux-848819f43878a3a3f7c659fee3b6e16c334c3062.tar.xz
linux-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/join.c')
-rw-r--r--drivers/net/wireless/mwifiex/join.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index e9bd43526d80..89dc62a467f4 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -1443,7 +1443,20 @@ int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac)
return ret;
}
-EXPORT_SYMBOL_GPL(mwifiex_deauthenticate);
+
+/* This function deauthenticates/disconnects from all BSS. */
+void mwifiex_deauthenticate_all(struct mwifiex_adapter *adapter)
+{
+ struct mwifiex_private *priv;
+ int i;
+
+ for (i = 0; i < adapter->priv_num; i++) {
+ priv = adapter->priv[i];
+ if (priv)
+ mwifiex_deauthenticate(priv, NULL);
+ }
+}
+EXPORT_SYMBOL_GPL(mwifiex_deauthenticate_all);
/*
* This function converts band to radio type used in channel TLV.