diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-02-23 00:22:30 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-02-23 11:18:46 +0200 |
commit | 09039f42a24084c10e7761ab28ef22932c62a46f (patch) | |
tree | 09c46d96003ef58080c3559158c94a7c5dd0b3b7 /drivers/net/wireless/wl12xx/main.c | |
parent | 409622ecc2a3b618b31b1894ed6360fbdca95d62 (diff) |
wl12xx: AP-mode - count free FW TX blocks per link
Count the number of FW TX blocks allocated per link. We add blocks to a
link counter when allocated for a TX descriptor. We remove blocks
according to counters in fw_status indicating the number of freed blocks
in FW. These counters are polled after each IRQ.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 92f82204333..5772a33d79e 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -574,6 +574,17 @@ static void wl1271_fw_status(struct wl1271 *wl, if (total) clear_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags); + if (wl->bss_type == BSS_TYPE_AP_BSS) { + for (i = 0; i < AP_MAX_LINKS; i++) { + u8 cnt = status->tx_lnk_free_blks[i] - + wl->links[i].prev_freed_blks; + + wl->links[i].prev_freed_blks = + status->tx_lnk_free_blks[i]; + wl->links[i].allocated_blks -= cnt; + } + } + /* update the host-chipset time offset */ getnstimeofday(&ts); wl->time_offset = (timespec_to_ns(&ts) >> 10) - |