summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/join.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/join.c
parentace273551b7c9c2cfbfc606ac4cd518c67f80faf (diff)
downloadlwn-848819f43878a3a3f7c659fee3b6e16c334c3062.tar.gz
lwn-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.