summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/ps.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-12-18 22:25:41 +0400
committerLuciano Coelho <coelho@ti.com>2011-12-21 00:30:14 +0400
commita0c7b7825e026c7acf63fd92a5182efd3aff637f (patch)
tree84e316833522bc0c644129c2abcd23ca7d81ab2f /drivers/net/wireless/wl12xx/ps.c
parent5b37ddfec23c17e16b99d8b5c5d1815b312af060 (diff)
downloadlinux-a0c7b7825e026c7acf63fd92a5182efd3aff637f.tar.xz
wl12xx: make WL1271_FLAG_IDLE flag per-vif
This flag should be set per-vif, rather than globally. Rename the flag to indicate IN_USE (rather than IDLE), as in the default configuration (i.e. flag is clear) the vif should be idle. Change all the bit operations (and elp conditions) appropriately. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/ps.c')
-rw-r--r--drivers/net/wireless/wl12xx/ps.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/ps.c b/drivers/net/wireless/wl12xx/ps.c
index a7a11088dd31..a2bdacdd7e1d 100644
--- a/drivers/net/wireless/wl12xx/ps.c
+++ b/drivers/net/wireless/wl12xx/ps.c
@@ -53,8 +53,11 @@ void wl1271_elp_work(struct work_struct *work)
goto out;
wl12xx_for_each_wlvif(wl, wlvif) {
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS)
+ goto out;
+
if (!test_bit(WLVIF_FLAG_PSM, &wlvif->flags) &&
- !test_bit(WL1271_FLAG_IDLE, &wl->flags))
+ test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
goto out;
}
@@ -78,8 +81,11 @@ void wl1271_ps_elp_sleep(struct wl1271 *wl)
return;
wl12xx_for_each_wlvif(wl, wlvif) {
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS)
+ return;
+
if (!test_bit(WLVIF_FLAG_PSM, &wlvif->flags) &&
- !test_bit(WL1271_FLAG_IDLE, &wl->flags))
+ test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
return;
}