diff options
author | Arik Nemtsov <arik@wizery.com> | 2012-11-27 06:44:58 (GMT) |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-12-05 07:43:33 (GMT) |
commit | 8591d42452f16b1888419da4456142864b08ef9e (patch) | |
tree | 4c63565b5951f716f036b1e47d98fdb388aa6633 /drivers/net/wireless/ti/wlcore/ps.c | |
parent | 1e0708a9574aee0136611edc5d3a7a9b2775a113 (diff) | |
download | linux-fsl-qoriq-8591d42452f16b1888419da4456142864b08ef9e.tar.xz |
wlcore: count packets held per AC in each vif
This accounting will help find a vif that has data in a specific AC.
Otherwise we have to traverse all the links, which can be lengthy for
the AP case.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/ps.c')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/ps.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c index ffcd843..9b7b6e2 100644 --- a/drivers/net/wireless/ti/wlcore/ps.c +++ b/drivers/net/wireless/ti/wlcore/ps.c @@ -239,11 +239,12 @@ static void wl1271_ps_filter_frames(struct wl1271 *wl, u8 hlid) struct ieee80211_tx_info *info; unsigned long flags; int filtered[NUM_TX_QUEUES]; + struct wl1271_link *lnk = &wl->links[hlid]; /* filter all frames currently in the low level queues for this hlid */ for (i = 0; i < NUM_TX_QUEUES; i++) { filtered[i] = 0; - while ((skb = skb_dequeue(&wl->links[hlid].tx_queue[i]))) { + while ((skb = skb_dequeue(&lnk->tx_queue[i]))) { filtered[i]++; if (WARN_ON(wl12xx_is_dummy_packet(wl, skb))) @@ -257,8 +258,11 @@ static void wl1271_ps_filter_frames(struct wl1271 *wl, u8 hlid) } spin_lock_irqsave(&wl->wl_lock, flags); - for (i = 0; i < NUM_TX_QUEUES; i++) + for (i = 0; i < NUM_TX_QUEUES; i++) { wl->tx_queue_count[i] -= filtered[i]; + if (lnk->wlvif) + lnk->wlvif->tx_queue_count[i] -= filtered[i]; + } spin_unlock_irqrestore(&wl->wl_lock, flags); wl1271_handle_tx_low_watermark(wl); |