aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/scan.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-09-12 10:38:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-15 15:00:52 -0400
commitd8d91253ba11bb6e98105c2bc88a40d08fac06ff (patch)
tree62ab4e47c86d5f180c1fbde0b1790de03c0b1a3d /drivers/net/wireless/mwifiex/scan.c
parent971a73f5523ea0512267949bd6ae3f68b9f3431f (diff)
mwifiex: remove low priority scan handling
We have a logic in driver to delay or abort low priority scan to serve Tx traffic effectively. With scan channel gap support added, firmware now allows driver to send Tx data while scan operation is in progress. Hence low priority scan handling in driver is not required now. This patch removes related code. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/scan.c')
-rw-r--r--drivers/net/wireless/mwifiex/scan.c59
1 files changed, 29 insertions, 30 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 2d1a2471fae3..c09ebeee6ddf 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1766,7 +1766,7 @@ static void mwifiex_complete_scan(struct mwifiex_private *priv)
1766static void mwifiex_check_next_scan_command(struct mwifiex_private *priv) 1766static void mwifiex_check_next_scan_command(struct mwifiex_private *priv)
1767{ 1767{
1768 struct mwifiex_adapter *adapter = priv->adapter; 1768 struct mwifiex_adapter *adapter = priv->adapter;
1769 struct cmd_ctrl_node *cmd_node; 1769 struct cmd_ctrl_node *cmd_node, *tmp_node;
1770 unsigned long flags; 1770 unsigned long flags;
1771 1771
1772 spin_lock_irqsave(&adapter->scan_pending_q_lock, flags); 1772 spin_lock_irqsave(&adapter->scan_pending_q_lock, flags);
@@ -1787,37 +1787,36 @@ static void mwifiex_check_next_scan_command(struct mwifiex_private *priv)
1787 priv->scan_aborting = false; 1787 priv->scan_aborting = false;
1788 dev_dbg(adapter->dev, "info: scan already aborted\n"); 1788 dev_dbg(adapter->dev, "info: scan already aborted\n");
1789 } 1789 }
1790 } else { 1790 } else if ((priv->scan_aborting && !priv->scan_request) ||
1791 if ((priv->scan_aborting && !priv->scan_request) || 1791 priv->scan_block) {
1792 priv->scan_block) { 1792 list_for_each_entry_safe(cmd_node, tmp_node,
1793 spin_unlock_irqrestore(&adapter->scan_pending_q_lock, 1793 &adapter->scan_pending_q, list) {
1794 flags);
1795 adapter->scan_delay_cnt = MWIFIEX_MAX_SCAN_DELAY_CNT;
1796 mod_timer(&priv->scan_delay_timer, jiffies);
1797 dev_dbg(priv->adapter->dev,
1798 "info: %s: triggerring scan abort\n", __func__);
1799 } else if (!mwifiex_wmm_lists_empty(adapter) &&
1800 (priv->scan_request && (priv->scan_request->flags &
1801 NL80211_SCAN_FLAG_LOW_PRIORITY))) {
1802 spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
1803 flags);
1804 adapter->scan_delay_cnt = 1;
1805 mod_timer(&priv->scan_delay_timer, jiffies +
1806 msecs_to_jiffies(MWIFIEX_SCAN_DELAY_MSEC));
1807 dev_dbg(priv->adapter->dev,
1808 "info: %s: deferring scan\n", __func__);
1809 } else {
1810 /* Get scan command from scan_pending_q and put to
1811 * cmd_pending_q
1812 */
1813 cmd_node = list_first_entry(&adapter->scan_pending_q,
1814 struct cmd_ctrl_node, list);
1815 list_del(&cmd_node->list); 1794 list_del(&cmd_node->list);
1816 spin_unlock_irqrestore(&adapter->scan_pending_q_lock, 1795 mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
1817 flags); 1796 }
1818 mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, 1797 spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags);
1819 true); 1798
1799 spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags);
1800 adapter->scan_processing = false;
1801 spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
1802
1803 if (priv->scan_request) {
1804 dev_dbg(adapter->dev, "info: aborting scan\n");
1805 cfg80211_scan_done(priv->scan_request, 1);
1806 priv->scan_request = NULL;
1807 } else {
1808 priv->scan_aborting = false;
1809 dev_dbg(adapter->dev, "info: scan already aborted\n");
1820 } 1810 }
1811 } else {
1812 /* Get scan command from scan_pending_q and put to
1813 * cmd_pending_q
1814 */
1815 cmd_node = list_first_entry(&adapter->scan_pending_q,
1816 struct cmd_ctrl_node, list);
1817 list_del(&cmd_node->list);
1818 spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags);
1819 mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, true);
1821 } 1820 }
1822 1821
1823 return; 1822 return;