mwifiex: disconnect the device before entering suspend state
PATCH 1/1 mwifiex: disconnect the device before entering suspend state
From: Amitkumar Karwar <[email protected]>
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 <[email protected]>
Signed-off-by Bing Zhao <[email protected]>
--- drivers/net/wireless/mwifiex/sta_ioctl.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
drivers/net/wireless/mwifiex/sta_ioctl.c +13 -0
@@ -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" );
Signature · 1 line
1.7.0.2
PATCH 1/1 mwifiex: block scan request during heavy Tx traffic
From: Amitkumar Karwar <[email protected]>
Currently scan operation is delayed/aborted based on Tx traffic consistency. This decision is taken after receiving scan response of first scan command from FW. But when heavy traffic is running, we can not even afford to send first scan command and go off channel for 30msec. We will block scan request in this case.
Signed-off-by Amitkumar Karwar <[email protected]>
Signed-off-by Bing Zhao <[email protected]>
--- drivers/net/wireless/mwifiex/cfg80211.c | 6 ++++++ drivers/net/wireless/mwifiex/main.h | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +6 -0
@@ -1502,6 +1502,12 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,wiphy_dbg (wiphy,"info: received scan request on %s\n" , dev->name); +if (atomic_read (&priv->wmm.tx_pkts_queued) >= +MWIFIEX_MIN_TX_PENDING_TO_CANCEL_SCAN ) { +dev_dbg (priv->adapter->dev,"scan rejected due to traffic\n" ); +return -EBUSY ; + } + priv->scan_request = request; priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg),
drivers/net/wireless/mwifiex/main.h +2 -0
@@ -91,6 +91,8 @@ enum {#define MWIFIEX_MAX_EMPTY_TX_Q_CNT 10#define MWIFIEX_SCAN_DELAY_MSEC 20 +#define MWIFIEX_MIN_TX_PENDING_TO_CANCEL_SCAN 2 +#define RSN_GTK_OUI_OFFSET 2#define MWIFIEX_OUI_NOT_PRESENT 0
Signature · 1 line
1.7.0.2