aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 8c50d3b3fabb..062247ef3ad2 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -570,7 +570,7 @@ static void wl1271_irq_work(struct work_struct *work)
570 570
571 /* Check if any tx blocks were freed */ 571 /* Check if any tx blocks were freed */
572 if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) && 572 if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) &&
573 !skb_queue_empty(&wl->tx_queue)) { 573 wl->tx_queue_count) {
574 /* 574 /*
575 * In order to avoid starvation of the TX path, 575 * In order to avoid starvation of the TX path,
576 * call the work function directly. 576 * call the work function directly.
@@ -891,6 +891,7 @@ static int wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
891 struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb); 891 struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb);
892 struct ieee80211_sta *sta = txinfo->control.sta; 892 struct ieee80211_sta *sta = txinfo->control.sta;
893 unsigned long flags; 893 unsigned long flags;
894 int q;
894 895
895 /* 896 /*
896 * peek into the rates configured in the STA entry. 897 * peek into the rates configured in the STA entry.
@@ -918,10 +919,12 @@ static int wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
918 set_bit(WL1271_FLAG_STA_RATES_CHANGED, &wl->flags); 919 set_bit(WL1271_FLAG_STA_RATES_CHANGED, &wl->flags);
919 } 920 }
920#endif 921#endif
922 wl->tx_queue_count++;
921 spin_unlock_irqrestore(&wl->wl_lock, flags); 923 spin_unlock_irqrestore(&wl->wl_lock, flags);
922 924
923 /* queue the packet */ 925 /* queue the packet */
924 skb_queue_tail(&wl->tx_queue, skb); 926 q = wl1271_tx_get_queue(skb_get_queue_mapping(skb));
927 skb_queue_tail(&wl->tx_queue[q], skb);
925 928
926 /* 929 /*
927 * The chip specific setup must run before the first TX packet - 930 * The chip specific setup must run before the first TX packet -
@@ -935,7 +938,7 @@ static int wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
935 * The workqueue is slow to process the tx_queue and we need stop 938 * The workqueue is slow to process the tx_queue and we need stop
936 * the queue here, otherwise the queue will get too long. 939 * the queue here, otherwise the queue will get too long.
937 */ 940 */
938 if (skb_queue_len(&wl->tx_queue) >= WL1271_TX_QUEUE_HIGH_WATERMARK) { 941 if (wl->tx_queue_count >= WL1271_TX_QUEUE_HIGH_WATERMARK) {
939 wl1271_debug(DEBUG_TX, "op_tx: stopping queues"); 942 wl1271_debug(DEBUG_TX, "op_tx: stopping queues");
940 943
941 spin_lock_irqsave(&wl->wl_lock, flags); 944 spin_lock_irqsave(&wl->wl_lock, flags);
@@ -2719,7 +2722,8 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
2719 wl->hw = hw; 2722 wl->hw = hw;
2720 wl->plat_dev = plat_dev; 2723 wl->plat_dev = plat_dev;
2721 2724
2722 skb_queue_head_init(&wl->tx_queue); 2725 for (i = 0; i < NUM_TX_QUEUES; i++)
2726 skb_queue_head_init(&wl->tx_queue[i]);
2723 2727
2724 INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work); 2728 INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work);
2725 INIT_DELAYED_WORK(&wl->pspoll_work, wl1271_pspoll_work); 2729 INIT_DELAYED_WORK(&wl->pspoll_work, wl1271_pspoll_work);