aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/main.c
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2010-09-26 16:49:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-28 15:47:56 -0400
commitcb139ecc0c030e8ccc736bd86cfef502c200825a (patch)
tree9d7a09f50e584d7f75689840bf7e78c941e80c07 /drivers/net/wireless/ath/carl9170/main.c
parent042c53f6e84896701b67012ad525bc44ea6de25f (diff)
carl9170: fix tx_ampdu_upload counter
tx_ampdu_upload was not decreased when an a-MPDU frame had to be kicked out from the tx_pending queues. This broke ampdu aggregation, because the scheduler waits until tx_ampdu_upload drops to zero, before making the next aggregate. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/main.c')
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index d28b4ff8d28..a8b0cec78b3 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -230,8 +230,15 @@ static void carl9170_flush(struct ar9170 *ar, bool drop_queued)
230 for (i = 0; i < ar->hw->queues; i++) { 230 for (i = 0; i < ar->hw->queues; i++) {
231 struct sk_buff *skb; 231 struct sk_buff *skb;
232 232
233 while ((skb = skb_dequeue(&ar->tx_pending[i]))) 233 while ((skb = skb_dequeue(&ar->tx_pending[i]))) {
234 struct ieee80211_tx_info *info;
235
236 info = IEEE80211_SKB_CB(skb);
237 if (info->flags & IEEE80211_TX_CTL_AMPDU)
238 atomic_dec(&ar->tx_ampdu_upload);
239
234 carl9170_tx_status(ar, skb, false); 240 carl9170_tx_status(ar, skb, false);
241 }
235 } 242 }
236 } 243 }
237 244
@@ -1462,6 +1469,7 @@ static void carl9170_op_sta_notify(struct ieee80211_hw *hw,
1462 skb_queue_walk_safe(&ar->tx_pending[i], skb, tmp) { 1469 skb_queue_walk_safe(&ar->tx_pending[i], skb, tmp) {
1463 struct _carl9170_tx_superframe *super; 1470 struct _carl9170_tx_superframe *super;
1464 struct ieee80211_hdr *hdr; 1471 struct ieee80211_hdr *hdr;
1472 struct ieee80211_tx_info *info;
1465 1473
1466 super = (void *) skb->data; 1474 super = (void *) skb->data;
1467 hdr = (void *) super->frame_data; 1475 hdr = (void *) super->frame_data;
@@ -1470,6 +1478,11 @@ static void carl9170_op_sta_notify(struct ieee80211_hw *hw,
1470 continue; 1478 continue;
1471 1479
1472 __skb_unlink(skb, &ar->tx_pending[i]); 1480 __skb_unlink(skb, &ar->tx_pending[i]);
1481
1482 info = IEEE80211_SKB_CB(skb);
1483 if (info->flags & IEEE80211_TX_CTL_AMPDU)
1484 atomic_dec(&ar->tx_ampdu_upload);
1485
1473 carl9170_tx_status(ar, skb, false); 1486 carl9170_tx_status(ar, skb, false);
1474 } 1487 }
1475 spin_unlock_bh(&ar->tx_pending[i].lock); 1488 spin_unlock_bh(&ar->tx_pending[i].lock);