diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/init.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/init.c | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index b5d37a8caa09..39f03ce5a5b1 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c | |||
@@ -84,18 +84,19 @@ static void scan_delay_timer_fn(unsigned long data) | |||
84 | spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags); | 84 | spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags); |
85 | 85 | ||
86 | if (priv->user_scan_cfg) { | 86 | if (priv->user_scan_cfg) { |
87 | dev_dbg(priv->adapter->dev, | 87 | if (priv->scan_request) { |
88 | "info: %s: scan aborted\n", __func__); | 88 | dev_dbg(priv->adapter->dev, |
89 | cfg80211_scan_done(priv->scan_request, 1); | 89 | "info: aborting scan\n"); |
90 | priv->scan_request = NULL; | 90 | cfg80211_scan_done(priv->scan_request, 1); |
91 | priv->scan_request = NULL; | ||
92 | } else { | ||
93 | dev_dbg(priv->adapter->dev, | ||
94 | "info: scan already aborted\n"); | ||
95 | } | ||
96 | |||
91 | kfree(priv->user_scan_cfg); | 97 | kfree(priv->user_scan_cfg); |
92 | priv->user_scan_cfg = NULL; | 98 | priv->user_scan_cfg = NULL; |
93 | } | 99 | } |
94 | |||
95 | if (priv->scan_pending_on_block) { | ||
96 | priv->scan_pending_on_block = false; | ||
97 | up(&priv->async_sem); | ||
98 | } | ||
99 | goto done; | 100 | goto done; |
100 | } | 101 | } |
101 | 102 | ||
@@ -387,9 +388,17 @@ void mwifiex_wake_up_net_dev_queue(struct net_device *netdev, | |||
387 | struct mwifiex_adapter *adapter) | 388 | struct mwifiex_adapter *adapter) |
388 | { | 389 | { |
389 | unsigned long dev_queue_flags; | 390 | unsigned long dev_queue_flags; |
391 | unsigned int i; | ||
390 | 392 | ||
391 | spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); | 393 | spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); |
392 | netif_tx_wake_all_queues(netdev); | 394 | |
395 | for (i = 0; i < netdev->num_tx_queues; i++) { | ||
396 | struct netdev_queue *txq = netdev_get_tx_queue(netdev, i); | ||
397 | |||
398 | if (netif_tx_queue_stopped(txq)) | ||
399 | netif_tx_wake_queue(txq); | ||
400 | } | ||
401 | |||
393 | spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); | 402 | spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); |
394 | } | 403 | } |
395 | 404 | ||
@@ -400,9 +409,17 @@ void mwifiex_stop_net_dev_queue(struct net_device *netdev, | |||
400 | struct mwifiex_adapter *adapter) | 409 | struct mwifiex_adapter *adapter) |
401 | { | 410 | { |
402 | unsigned long dev_queue_flags; | 411 | unsigned long dev_queue_flags; |
412 | unsigned int i; | ||
403 | 413 | ||
404 | spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); | 414 | spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); |
405 | netif_tx_stop_all_queues(netdev); | 415 | |
416 | for (i = 0; i < netdev->num_tx_queues; i++) { | ||
417 | struct netdev_queue *txq = netdev_get_tx_queue(netdev, i); | ||
418 | |||
419 | if (!netif_tx_queue_stopped(txq)) | ||
420 | netif_tx_stop_queue(txq); | ||
421 | } | ||
422 | |||
406 | spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); | 423 | spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); |
407 | } | 424 | } |
408 | 425 | ||