summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/tx.h
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-07-07 14:25:23 +0300
committerLuciano Coelho <coelho@ti.com>2011-07-08 09:39:47 +0300
commitf1a46384ad568f72c11edbe2a3ec284bf32f2dbd (patch)
tree2d303dfdcbf970db11aa858b1a02fb7d29ef4d4f /drivers/net/wireless/wl12xx/tx.h
parent097f882153f0ec13617074fa3bdb683b8215e20c (diff)
downloadop-kernel-dev-f1a46384ad568f72c11edbe2a3ec284bf32f2dbd.zip
op-kernel-dev-f1a46384ad568f72c11edbe2a3ec284bf32f2dbd.tar.gz
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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h
index 6b7bf31..5d719b5 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);
OpenPOWER on IntegriCloud