diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-09-21 05:23:17 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-24 21:02:07 +0200 |
commit | 22c22d2710ab828ea36487abd1d7f94f79a86a68 (patch) | |
tree | b5a25542823e6c6b3a31ca11dace24114cc212b5 /drivers | |
parent | brcmfmac: get rid of void pointer in struct brcmf_cfg80211_priv (diff) | |
download | linux-22c22d2710ab828ea36487abd1d7f94f79a86a68.tar.xz linux-22c22d2710ab828ea36487abd1d7f94f79a86a68.zip |
mwifiex: disconnect the device before entering suspend state
By default, device is disconnected before entering suspend state.
User can keep the connection alive by using module parameter
"disconect_on_suspend=0".
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')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index d7ad2d4a069f..731562f026f5 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -26,6 +26,9 @@ #include "11n.h" #include "cfg80211.h" +static int disconnect_on_suspend = 1; +module_param(disconnect_on_suspend, int, 0644); + /* * Copies the multicast address list from device to driver. * @@ -448,6 +451,16 @@ EXPORT_SYMBOL_GPL(mwifiex_cancel_hs); int mwifiex_enable_hs(struct mwifiex_adapter *adapter) { struct mwifiex_ds_hs_cfg hscfg; + struct mwifiex_private *priv; + int i; + + if (disconnect_on_suspend) { + for (i = 0; i < adapter->priv_num; i++) { + priv = adapter->priv[i]; + if (priv) + mwifiex_deauthenticate(priv, NULL); + } + } if (adapter->hs_activated) { dev_dbg(adapter->dev, "cmd: HS Already actived\n"); |