summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAmitkumar Karwar2012-10-20 04:19:15 +0200
committerJohn W. Linville2012-10-29 20:19:31 +0100
commite45a841972b9d43e19e61ab3089bbe0d52a990e8 (patch)
tree291b887ea3af0370f2e8ea67fb9d6a8a22dbba05 /drivers/net/wireless/mwifiex/cfg80211.c
parentbcma: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_... (diff)
downloadkernel-qcow2-linux-e45a841972b9d43e19e61ab3089bbe0d52a990e8.tar.gz
kernel-qcow2-linux-e45a841972b9d43e19e61ab3089bbe0d52a990e8.tar.xz
kernel-qcow2-linux-e45a841972b9d43e19e61ab3089bbe0d52a990e8.zip
mwifiex: use LOW_PRIORITY scan flag provided in scan request
We will delay/abort scan operation based on traffic for low priority scan. 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/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 38a58713de6a..60461325dff8 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1819,7 +1819,8 @@ 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) >=
+ if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
+ 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;
@@ -2251,7 +2252,8 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1;
wiphy->features |= NL80211_FEATURE_HT_IBSS |
- NL80211_FEATURE_INACTIVITY_TIMER;
+ NL80211_FEATURE_INACTIVITY_TIMER |
+ NL80211_FEATURE_LOW_PRIORITY_SCAN;
/* Reserve space for mwifiex specific private data for BSS */
wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv);