aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-11-27 01:44:56 -0500
committerLuciano Coelho <coelho@ti.com>2012-12-05 02:43:32 -0500
commitb50a62bb39c66e6ed5f1f581bb32644936f08cf3 (patch)
tree94d4d0d33107af0140b68fdd6642e61dc54c768e /drivers/net/wireless/ti
parent583f81644ab34a1314827a1dffc7fc8fbad7dc0f (diff)
wlcore: initialize per-link FW freed blocks correctly
When a link is allocated, sometimes the "freed packets" counter in FW is non zero, but we always assumed it is. This caused us to incorrectly account FW allocated blocks in some cases. When operating in AP mode, this bug caused some stations to never come back from PSM. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wlcore/cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 38243aa8614f..e00d64be8d75 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -322,6 +322,10 @@ int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)
322 __set_bit(link, wl->links_map); 322 __set_bit(link, wl->links_map);
323 __set_bit(link, wlvif->links_map); 323 __set_bit(link, wlvif->links_map);
324 spin_unlock_irqrestore(&wl->wl_lock, flags); 324 spin_unlock_irqrestore(&wl->wl_lock, flags);
325
326 /* take the last "freed packets" value from the current FW status */
327 wl->links[link].prev_freed_pkts =
328 wl->fw_status_2->counters.tx_lnk_free_pkts[link];
325 *hlid = link; 329 *hlid = link;
326 return 0; 330 return 0;
327} 331}