aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/tx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-08-25 05:43:13 -0400
committerLuciano Coelho <coelho@ti.com>2011-09-14 06:15:05 -0400
commit56d4f8f685c073c7ed7203b78c57f5d893d65102 (patch)
tree43df6c90e21c741c6b76df83bcbd4ea9e6f8993c /drivers/net/wireless/wl12xx/tx.c
parentf8e0af6b8732b47c2531a280753d29a4ca2d114b (diff)
wl12xx: AP mode - don't regulate FW blocks for non-active STAs
Check a STA is associated before regulating its PS-status in mac80211. Should never happen, so warn as a precaution. [Small cosmetic change wrt Kalle Valo's comment. -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/tx.c')
-rw-r--r--drivers/net/wireless/wl12xx/tx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index b6b2d3ac75cf..b876e9eb4e83 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -30,6 +30,7 @@
30#include "reg.h" 30#include "reg.h"
31#include "ps.h" 31#include "ps.h"
32#include "tx.h" 32#include "tx.h"
33#include "event.h"
33 34
34static int wl1271_set_default_wep_key(struct wl1271 *wl, u8 id) 35static int wl1271_set_default_wep_key(struct wl1271 *wl, u8 id)
35{ 36{
@@ -132,6 +133,9 @@ static void wl1271_tx_regulate_link(struct wl1271 *wl, u8 hlid)
132 if (hlid < WL1271_AP_STA_HLID_START) 133 if (hlid < WL1271_AP_STA_HLID_START)
133 return; 134 return;
134 135
136 if (WARN_ON(!wl1271_is_active_sta(wl, hlid)))
137 return;
138
135 fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map); 139 fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map);
136 tx_pkts = wl->links[hlid].allocated_pkts; 140 tx_pkts = wl->links[hlid].allocated_pkts;
137 141