Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259749
b: refs/heads/master
c: edb3f7c
h: refs/heads/master
i:
  259747: 06284df
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 540df0a commit 12ad327
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b5195a57b8144a59e7c0cf9599aeeaac6afaa8a
refs/heads/master: edb3f7cf0415ec6ca51dcfd6d8c4337a078a708a
31 changes: 17 additions & 14 deletions trunk/drivers/staging/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ const u8 wlc_prio2prec_map[] = {
#define BSSCFG_STA(cfg) (1)
#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 */
#define FOREACH_BSS(wlc, idx, cfg) \
for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \
Expand Down Expand Up @@ -396,13 +390,19 @@ bool brcms_c_ps_allowed(struct brcms_c_info *wlc)
if (AP_ACTIVE(wlc) || wlc->monitor)
return false;

FOREACH_AS_STA(wlc, idx, cfg) {
/* disallow PS when one of the following bsscfg specific conditions meets */
if (!cfg->BSS || !WLC_PORTOPEN(cfg))
return false;
for (idx = 0; idx < WLC_MAXBSSCFG; idx++) {
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))
return false;

if (!cfg->dtim_programmed)
return false;
if (!cfg->dtim_programmed)
return false;
}
}

return true;
Expand Down Expand Up @@ -1060,8 +1060,11 @@ static void WLBANDINITFN(brcms_c_setband) (struct brcms_c_info *wlc,
return;

/* wait for at least one beacon before entering sleeping state */
FOREACH_AS_STA(wlc, idx, cfg)
cfg->PMawakebcn = true;
for (idx = 0; idx < WLC_MAXBSSCFG; idx++) {
cfg = wlc->bsscfg[idx];
if (cfg && BSSCFG_STA(cfg) && cfg->associated)
cfg->PMawakebcn = true;
}
brcms_c_set_ps_ctrl(wlc);

/* band-specific initializations */
Expand Down

0 comments on commit 12ad327

Please sign in to comment.