diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 13c7102f9864..9bb9ad31c2f5 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -987,6 +987,17 @@ static int wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
987 | 987 | ||
988 | spin_lock_irqsave(&wl->wl_lock, flags); | 988 | spin_lock_irqsave(&wl->wl_lock, flags); |
989 | wl->tx_queue_count++; | 989 | wl->tx_queue_count++; |
990 | |||
991 | /* | ||
992 | * The workqueue is slow to process the tx_queue and we need stop | ||
993 | * the queue here, otherwise the queue will get too long. | ||
994 | */ | ||
995 | if (wl->tx_queue_count >= WL1271_TX_QUEUE_HIGH_WATERMARK) { | ||
996 | wl1271_debug(DEBUG_TX, "op_tx: stopping queues"); | ||
997 | ieee80211_stop_queues(wl->hw); | ||
998 | set_bit(WL1271_FLAG_TX_QUEUE_STOPPED, &wl->flags); | ||
999 | } | ||
1000 | |||
990 | spin_unlock_irqrestore(&wl->wl_lock, flags); | 1001 | spin_unlock_irqrestore(&wl->wl_lock, flags); |
991 | 1002 | ||
992 | /* queue the packet */ | 1003 | /* queue the packet */ |
@@ -1001,19 +1012,6 @@ static int wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1001 | if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags)) | 1012 | if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags)) |
1002 | ieee80211_queue_work(wl->hw, &wl->tx_work); | 1013 | ieee80211_queue_work(wl->hw, &wl->tx_work); |
1003 | 1014 | ||
1004 | /* | ||
1005 | * The workqueue is slow to process the tx_queue and we need stop | ||
1006 | * the queue here, otherwise the queue will get too long. | ||
1007 | */ | ||
1008 | if (wl->tx_queue_count >= WL1271_TX_QUEUE_HIGH_WATERMARK) { | ||
1009 | wl1271_debug(DEBUG_TX, "op_tx: stopping queues"); | ||
1010 | |||
1011 | spin_lock_irqsave(&wl->wl_lock, flags); | ||
1012 | ieee80211_stop_queues(wl->hw); | ||
1013 | set_bit(WL1271_FLAG_TX_QUEUE_STOPPED, &wl->flags); | ||
1014 | spin_unlock_irqrestore(&wl->wl_lock, flags); | ||
1015 | } | ||
1016 | |||
1017 | return NETDEV_TX_OK; | 1015 | return NETDEV_TX_OK; |
1018 | } | 1016 | } |
1019 | 1017 | ||