Commit fe8d730a authored by Brian Norris's avatar Brian Norris Committed by Kalle Valo

mwifiex: utilize netif_tx_{wake,stop}_all_queues()

We're open-coding these. Just use the helpers.
Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent f7d7e4b6
...@@ -337,17 +337,9 @@ void mwifiex_wake_up_net_dev_queue(struct net_device *netdev, ...@@ -337,17 +337,9 @@ void mwifiex_wake_up_net_dev_queue(struct net_device *netdev,
struct mwifiex_adapter *adapter) struct mwifiex_adapter *adapter)
{ {
unsigned long dev_queue_flags; unsigned long dev_queue_flags;
unsigned int i;
spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags);
netif_tx_wake_all_queues(netdev);
for (i = 0; i < netdev->num_tx_queues; i++) {
struct netdev_queue *txq = netdev_get_tx_queue(netdev, i);
if (netif_tx_queue_stopped(txq))
netif_tx_wake_queue(txq);
}
spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags);
} }
...@@ -358,17 +350,9 @@ void mwifiex_stop_net_dev_queue(struct net_device *netdev, ...@@ -358,17 +350,9 @@ void mwifiex_stop_net_dev_queue(struct net_device *netdev,
struct mwifiex_adapter *adapter) struct mwifiex_adapter *adapter)
{ {
unsigned long dev_queue_flags; unsigned long dev_queue_flags;
unsigned int i;
spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags);
netif_tx_stop_all_queues(netdev);
for (i = 0; i < netdev->num_tx_queues; i++) {
struct netdev_queue *txq = netdev_get_tx_queue(netdev, i);
if (!netif_tx_queue_stopped(txq))
netif_tx_stop_queue(txq);
}
spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment