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>
diff --git a/drivers/net/wireless/wl12xx/ps.c b/drivers/net/wireless/wl12xx/ps.c
index a7a1108..a2bdacd 100644
--- a/drivers/net/wireless/wl12xx/ps.c
+++ b/drivers/net/wireless/wl12xx/ps.c
@@ -53,8 +53,11 @@
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 @@
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;
}