diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-07-07 13:25:23 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-07-08 08:39:47 +0200 |
commit | f1a46384ad568f72c11edbe2a3ec284bf32f2dbd (patch) | |
tree | 2d303dfdcbf970db11aa858b1a02fb7d29ef4d4f /drivers/net/wireless/wl12xx/tx.h | |
parent | wl12xx: always initialize AP-mode max power level (diff) | |
download | linux-f1a46384ad568f72c11edbe2a3ec284bf32f2dbd.tar.xz linux-f1a46384ad568f72c11edbe2a3ec284bf32f2dbd.zip |
wl12xx: start/stop queues according to global per-AC counters
Split tx_queue_count to count per-AC skb's queued, instead of relying on
the skb-queue len. The skb queues used were only valid in STA-mode, as
AP-mode uses per-link queues.
This fixes a major regression in AP-mode, caused by the patch
"wl12xx: implement Tx watermarks per AC". With that patch applied, we
effectively had no regulation of Tx queues in AP-mode. Therefore a
sustained high rate of Tx could cause exhaustion of the skb memory pool.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/tx.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h index 6b7bf3150ec4..5d719b5a3d1d 100644 --- a/drivers/net/wireless/wl12xx/tx.h +++ b/drivers/net/wireless/wl12xx/tx.h @@ -198,6 +198,16 @@ static inline int wl1271_tx_get_mac80211_queue(int queue) } } +static inline int wl1271_tx_total_queue_count(struct wl1271 *wl) +{ + int i, count = 0; + + for (i = 0; i < NUM_TX_QUEUES; i++) + count += wl->tx_queue_count[i]; + + return count; +} + void wl1271_tx_work(struct work_struct *work); void wl1271_tx_work_locked(struct wl1271 *wl); void wl1271_tx_complete(struct wl1271 *wl); |