Commit edb3f7cf authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove macro FOREACH_AS_STA

The macro definition FOREACH_AS_STA does an assignment inside the
if condition, which is considered a checkpatch error. It has been
removed.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5b5195a5
...@@ -252,12 +252,6 @@ const u8 wlc_prio2prec_map[] = { ...@@ -252,12 +252,6 @@ const u8 wlc_prio2prec_map[] = {
#define BSSCFG_STA(cfg) (1) #define BSSCFG_STA(cfg) (1)
#define BSSCFG_IBSS(cfg) (!(cfg)->BSS) #define BSSCFG_IBSS(cfg) (!(cfg)->BSS)
/* Iterator for "associated" STA bss configs:
(struct brcms_c_info *wlc, int idx, struct brcms_c_bsscfg *cfg) */
#define FOREACH_AS_STA(wlc, idx, cfg) \
for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \
if ((cfg = (wlc)->bsscfg[idx]) && BSSCFG_STA(cfg) && cfg->associated)
/* As above for all non-NULL BSS configs */ /* As above for all non-NULL BSS configs */
#define FOREACH_BSS(wlc, idx, cfg) \ #define FOREACH_BSS(wlc, idx, cfg) \
for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \ for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \
...@@ -396,14 +390,20 @@ bool brcms_c_ps_allowed(struct brcms_c_info *wlc) ...@@ -396,14 +390,20 @@ bool brcms_c_ps_allowed(struct brcms_c_info *wlc)
if (AP_ACTIVE(wlc) || wlc->monitor) if (AP_ACTIVE(wlc) || wlc->monitor)
return false; return false;
FOREACH_AS_STA(wlc, idx, cfg) { for (idx = 0; idx < WLC_MAXBSSCFG; idx++) {
/* disallow PS when one of the following bsscfg specific conditions meets */ cfg = wlc->bsscfg[idx];
if (cfg && BSSCFG_STA(cfg) && cfg->associated) {
/*
* disallow PS when one of the following
* bsscfg specific conditions meets
*/
if (!cfg->BSS || !WLC_PORTOPEN(cfg)) if (!cfg->BSS || !WLC_PORTOPEN(cfg))
return false; return false;
if (!cfg->dtim_programmed) if (!cfg->dtim_programmed)
return false; return false;
} }
}
return true; return true;
} }
...@@ -1060,8 +1060,11 @@ static void WLBANDINITFN(brcms_c_setband) (struct brcms_c_info *wlc, ...@@ -1060,8 +1060,11 @@ static void WLBANDINITFN(brcms_c_setband) (struct brcms_c_info *wlc,
return; return;
/* wait for at least one beacon before entering sleeping state */ /* wait for at least one beacon before entering sleeping state */
FOREACH_AS_STA(wlc, idx, cfg) for (idx = 0; idx < WLC_MAXBSSCFG; idx++) {
cfg = wlc->bsscfg[idx];
if (cfg && BSSCFG_STA(cfg) && cfg->associated)
cfg->PMawakebcn = true; cfg->PMawakebcn = true;
}
brcms_c_set_ps_ctrl(wlc); brcms_c_set_ps_ctrl(wlc);
/* band-specific initializations */ /* band-specific initializations */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment