Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267405
b: refs/heads/master
c: 49552d3
h: refs/heads/master
i:
  267403: 371343a
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 9b9a573 commit 5944e66
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 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: 0da649102e6b2efc772b48ab7d1f70b9486ac6f1
refs/heads/master: 49552d332bf72d08701ee92b99f2408017910efb
47 changes: 26 additions & 21 deletions trunk/drivers/staging/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,14 @@
#define BSSCFG_STA(cfg) (1)
#define BSSCFG_IBSS(cfg) (!(cfg)->BSS)

/* As above for all non-NULL BSS configs */
/* iterate through all valid bsscfg entries */
#define FOREACH_BSS(wlc, idx, cfg) \
for (idx = 0; (int) idx < BRCMS_MAXBSSCFG; idx++) \
if ((cfg = (wlc)->bsscfg[idx]))
for (idx = 0; (int) idx < BRCMS_MAXBSSCFG; idx++) { \
cfg = (wlc)->bsscfg[idx]; \
if (!cfg) \
continue;
/* close marker for iterator code block */
#define END_FOREACH_BSS() }

/* Shared memory location index for various AC params */
#define wme_shmemacindex(ac) wme_ac2fifo[ac]
Expand Down Expand Up @@ -3315,14 +3319,14 @@ void brcms_c_init(struct brcms_c_info *wlc)
brcms_c_reprate_init(wlc);

/* write ethernet address to core */
FOREACH_BSS(wlc, i, bsscfg) {
FOREACH_BSS(wlc, i, bsscfg)
brcms_c_set_mac(bsscfg);
brcms_c_set_bssid(bsscfg);
}
END_FOREACH_BSS()

/* Update tsf_cfprep if associated and up */
if (wlc->pub->associated) {
FOREACH_BSS(wlc, i, bsscfg) {
FOREACH_BSS(wlc, i, bsscfg)
if (bsscfg->up) {
u32 bi;

Expand All @@ -3340,7 +3344,7 @@ void brcms_c_init(struct brcms_c_info *wlc)

break;
}
}
END_FOREACH_BSS()
}

brcms_c_bandinit_ordered(wlc, chanspec);
Expand Down Expand Up @@ -3540,15 +3544,15 @@ void brcms_c_switch_shortslot(struct brcms_c_info *wlc, bool shortslot)
wlc->shortslot = shortslot;

/* update the capability based on current shortslot mode */
FOREACH_BSS(wlc, idx, cfg) {
FOREACH_BSS(wlc, idx, cfg)
if (!cfg->associated)
continue;
cfg->current_bss->capability &=
~WLAN_CAPABILITY_SHORT_SLOT_TIME;
if (wlc->shortslot)
cfg->current_bss->capability |=
WLAN_CAPABILITY_SHORT_SLOT_TIME;
}
END_FOREACH_BSS()

brcms_b_set_shortslot(wlc->hw, shortslot);
}
Expand Down Expand Up @@ -3589,12 +3593,13 @@ void brcms_c_set_home_chanspec(struct brcms_c_info *wlc, u16 chanspec)

wlc->home_chanspec = chanspec;

FOREACH_BSS(wlc, idx, cfg) {
FOREACH_BSS(wlc, idx, cfg)
if (!cfg->associated)
continue;

cfg->current_bss->chanspec = chanspec;
}
END_FOREACH_BSS()


}
}
Expand Down Expand Up @@ -5309,14 +5314,14 @@ static void brcms_c_watchdog(void *arg)
brcms_c_statsupd(wlc);

/* Manage TKIP countermeasures timers */
FOREACH_BSS(wlc, i, cfg) {
FOREACH_BSS(wlc, i, cfg)
if (cfg->tk_cm_dt) {
cfg->tk_cm_dt--;
}
if (cfg->tk_cm_bt) {
cfg->tk_cm_bt--;
}
}
END_FOREACH_BSS()

/* Call any registered watchdog handlers */
for (i = 0; i < BRCMS_MAXMODULES; i++) {
Expand Down Expand Up @@ -5474,15 +5479,15 @@ int brcms_c_up(struct brcms_c_info *wlc)
mboolset(wlc->pub->radio_disabled,
WL_RADIO_HW_DISABLE);

FOREACH_BSS(wlc, idx, bsscfg) {
FOREACH_BSS(wlc, idx, bsscfg)
if (!BSSCFG_STA(bsscfg)
|| !bsscfg->enable || !bsscfg->BSS)
continue;
wiphy_err(wlc->wiphy, "wl%d.%d: up"
": rfdisable -> "
"bsscfg_disable()\n",
wlc->pub->unit, idx);
}
END_FOREACH_BSS()
}
}
}
Expand Down Expand Up @@ -8918,10 +8923,10 @@ void brcms_c_update_beacon(struct brcms_c_info *wlc)
struct brcms_bss_cfg *bsscfg;

/* update AP or IBSS beacons */
FOREACH_BSS(wlc, idx, bsscfg) {
FOREACH_BSS(wlc, idx, bsscfg)
if (bsscfg->up && (BSSCFG_AP(bsscfg) || !bsscfg->BSS))
brcms_c_bss_update_beacon(wlc, bsscfg);
}
END_FOREACH_BSS()
}

/* Write ssid into shared memory */
Expand All @@ -8947,10 +8952,10 @@ void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend)
struct brcms_bss_cfg *bsscfg;

/* update AP or IBSS probe responses */
FOREACH_BSS(wlc, idx, bsscfg) {
FOREACH_BSS(wlc, idx, bsscfg)
if (bsscfg->up && (BSSCFG_AP(bsscfg) || !bsscfg->BSS))
brcms_c_bss_update_probe_resp(wlc, bsscfg, suspend);
}
END_FOREACH_BSS()
}

void
Expand Down Expand Up @@ -9031,9 +9036,9 @@ void brcms_c_reprate_init(struct brcms_c_info *wlc)
int i;
struct brcms_bss_cfg *bsscfg;

FOREACH_BSS(wlc, i, bsscfg) {
FOREACH_BSS(wlc, i, bsscfg)
brcms_c_bsscfg_reprate_init(bsscfg);
}
END_FOREACH_BSS()
}

/* per bsscfg init tx reported rate mechanism */
Expand Down

0 comments on commit 5944e66

Please sign in to comment.