diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-10-19 22:19:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-29 15:19:31 -0400 |
commit | e45a841972b9d43e19e61ab3089bbe0d52a990e8 (patch) | |
tree | 291b887ea3af0370f2e8ea67fb9d6a8a22dbba05 /drivers/net | |
parent | ccd609538e99d3465a8d498f3655098f44cd253b (diff) |
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')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 38a58713de6..60461325dff 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, | |||
1819 | 1819 | ||
1820 | wiphy_dbg(wiphy, "info: received scan request on %s\n", dev->name); | 1820 | wiphy_dbg(wiphy, "info: received scan request on %s\n", dev->name); |
1821 | 1821 | ||
1822 | if (atomic_read(&priv->wmm.tx_pkts_queued) >= | 1822 | if ((request->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && |
1823 | atomic_read(&priv->wmm.tx_pkts_queued) >= | ||
1823 | MWIFIEX_MIN_TX_PENDING_TO_CANCEL_SCAN) { | 1824 | MWIFIEX_MIN_TX_PENDING_TO_CANCEL_SCAN) { |
1824 | dev_dbg(priv->adapter->dev, "scan rejected due to traffic\n"); | 1825 | dev_dbg(priv->adapter->dev, "scan rejected due to traffic\n"); |
1825 | return -EBUSY; | 1826 | return -EBUSY; |
@@ -2251,7 +2252,8 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) | |||
2251 | wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1; | 2252 | wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1; |
2252 | 2253 | ||
2253 | wiphy->features |= NL80211_FEATURE_HT_IBSS | | 2254 | wiphy->features |= NL80211_FEATURE_HT_IBSS | |
2254 | NL80211_FEATURE_INACTIVITY_TIMER; | 2255 | NL80211_FEATURE_INACTIVITY_TIMER | |
2256 | NL80211_FEATURE_LOW_PRIORITY_SCAN; | ||
2255 | 2257 | ||
2256 | /* Reserve space for mwifiex specific private data for BSS */ | 2258 | /* Reserve space for mwifiex specific private data for BSS */ |
2257 | wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv); | 2259 | wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv); |
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 5896b1fb4a2..05965267cc2 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -1776,12 +1776,16 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1776 | priv->user_scan_cfg = NULL; | 1776 | priv->user_scan_cfg = NULL; |
1777 | } | 1777 | } |
1778 | } else { | 1778 | } else { |
1779 | if (!mwifiex_wmm_lists_empty(adapter)) { | 1779 | if (!mwifiex_wmm_lists_empty(adapter) && |
1780 | (priv->scan_request && (priv->scan_request->flags & | ||
1781 | NL80211_SCAN_FLAG_LOW_PRIORITY))) { | ||
1780 | spin_unlock_irqrestore(&adapter->scan_pending_q_lock, | 1782 | spin_unlock_irqrestore(&adapter->scan_pending_q_lock, |
1781 | flags); | 1783 | flags); |
1782 | adapter->scan_delay_cnt = 1; | 1784 | adapter->scan_delay_cnt = 1; |
1783 | mod_timer(&priv->scan_delay_timer, jiffies + | 1785 | mod_timer(&priv->scan_delay_timer, jiffies + |
1784 | msecs_to_jiffies(MWIFIEX_SCAN_DELAY_MSEC)); | 1786 | msecs_to_jiffies(MWIFIEX_SCAN_DELAY_MSEC)); |
1787 | dev_dbg(priv->adapter->dev, | ||
1788 | "info: %s: deferring scan\n", __func__); | ||
1785 | } else { | 1789 | } else { |
1786 | /* Get scan command from scan_pending_q and put to | 1790 | /* Get scan command from scan_pending_q and put to |
1787 | cmd_pending_q */ | 1791 | cmd_pending_q */ |