Skip to content

Commit

Permalink
wl12xx: AP mode - don't regulate FW blocks for non-active STAs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Sep 14, 2011
1 parent f8e0af6 commit 56d4f8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/wl12xx/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "reg.h"
#include "ps.h"
#include "tx.h"
#include "event.h"

static int wl1271_set_default_wep_key(struct wl1271 *wl, u8 id)
{
Expand Down Expand Up @@ -132,6 +133,9 @@ static void wl1271_tx_regulate_link(struct wl1271 *wl, u8 hlid)
if (hlid < WL1271_AP_STA_HLID_START)
return;

if (WARN_ON(!wl1271_is_active_sta(wl, hlid)))
return;

fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map);
tx_pkts = wl->links[hlid].allocated_pkts;

Expand Down

0 comments on commit 56d4f8f

Please sign in to comment.