diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-03-23 20:45:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-27 13:37:34 -0400 |
commit | 45c4f657ce9388921deced415b076d49ed231188 (patch) | |
tree | 5de8746080d6c9e32af2a92b54364dbcb1a71061 /drivers/net/wireless/brcm80211/brcmsmac/main.c | |
parent | 70268ce280e9e06c002383b1691d97276d8cd1fb (diff) |
brcmsmac: remove brcms_bss_cfg->BSS
This was a read only member. The checks using BSS are replaced by
better fitting checks of the new type member.
The change in brcms_c_tbtt() was based on code from b43, in
brcms_c_ps_allowed() the same happens with BSS being true or false,
beaconing and probe responses are just needed in ap mode.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/main.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 4e420ead38e9..90e6c0d93194 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -1069,7 +1069,7 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal) | |||
1069 | 1069 | ||
1070 | static void brcms_c_tbtt(struct brcms_c_info *wlc) | 1070 | static void brcms_c_tbtt(struct brcms_c_info *wlc) |
1071 | { | 1071 | { |
1072 | if (!wlc->bsscfg->BSS) | 1072 | if (wlc->bsscfg->type == BRCMS_TYPE_ADHOC) |
1073 | /* | 1073 | /* |
1074 | * DirFrmQ is now valid...defer setting until end | 1074 | * DirFrmQ is now valid...defer setting until end |
1075 | * of ATIM window | 1075 | * of ATIM window |
@@ -3059,16 +3059,8 @@ static bool brcms_c_ps_allowed(struct brcms_c_info *wlc) | |||
3059 | if (wlc->filter_flags & FIF_PROMISC_IN_BSS) | 3059 | if (wlc->filter_flags & FIF_PROMISC_IN_BSS) |
3060 | return false; | 3060 | return false; |
3061 | 3061 | ||
3062 | if (cfg->associated) { | 3062 | if (cfg->associated) |
3063 | /* | ||
3064 | * disallow PS when one of the following | ||
3065 | * bsscfg specific conditions meets | ||
3066 | */ | ||
3067 | if (!cfg->BSS) | ||
3068 | return false; | ||
3069 | |||
3070 | return false; | 3063 | return false; |
3071 | } | ||
3072 | 3064 | ||
3073 | return true; | 3065 | return true; |
3074 | } | 3066 | } |
@@ -5078,8 +5070,9 @@ int brcms_c_up(struct brcms_c_info *wlc) | |||
5078 | struct brcms_bss_cfg *bsscfg = wlc->bsscfg; | 5070 | struct brcms_bss_cfg *bsscfg = wlc->bsscfg; |
5079 | mboolset(wlc->pub->radio_disabled, | 5071 | mboolset(wlc->pub->radio_disabled, |
5080 | WL_RADIO_HW_DISABLE); | 5072 | WL_RADIO_HW_DISABLE); |
5081 | 5073 | if (bsscfg->enable && | |
5082 | if (bsscfg->enable && bsscfg->BSS) | 5074 | (bsscfg->type == BRCMS_TYPE_STATION || |
5075 | bsscfg->type == BRCMS_TYPE_ADHOC)) | ||
5083 | brcms_err(wlc->hw->d11core, | 5076 | brcms_err(wlc->hw->d11core, |
5084 | "wl%d: up: rfdisable -> " | 5077 | "wl%d: up: rfdisable -> " |
5085 | "bsscfg_disable()\n", | 5078 | "bsscfg_disable()\n", |
@@ -7386,7 +7379,8 @@ void brcms_c_update_beacon(struct brcms_c_info *wlc) | |||
7386 | { | 7379 | { |
7387 | struct brcms_bss_cfg *bsscfg = wlc->bsscfg; | 7380 | struct brcms_bss_cfg *bsscfg = wlc->bsscfg; |
7388 | 7381 | ||
7389 | if (bsscfg->up && !bsscfg->BSS) | 7382 | if (bsscfg->up && (bsscfg->type == BRCMS_TYPE_AP || |
7383 | bsscfg->type == BRCMS_TYPE_ADHOC)) | ||
7390 | /* Clear the soft intmask */ | 7384 | /* Clear the soft intmask */ |
7391 | wlc->defmacintmask &= ~MI_BCNTPL; | 7385 | wlc->defmacintmask &= ~MI_BCNTPL; |
7392 | } | 7386 | } |
@@ -7461,7 +7455,8 @@ void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend) | |||
7461 | struct brcms_bss_cfg *bsscfg = wlc->bsscfg; | 7455 | struct brcms_bss_cfg *bsscfg = wlc->bsscfg; |
7462 | 7456 | ||
7463 | /* update AP or IBSS probe responses */ | 7457 | /* update AP or IBSS probe responses */ |
7464 | if (bsscfg->up && !bsscfg->BSS) | 7458 | if (bsscfg->up && (bsscfg->type == BRCMS_TYPE_AP || |
7459 | bsscfg->type == BRCMS_TYPE_ADHOC)) | ||
7465 | brcms_c_bss_update_probe_resp(wlc, bsscfg, suspend); | 7460 | brcms_c_bss_update_probe_resp(wlc, bsscfg, suspend); |
7466 | } | 7461 | } |
7467 | 7462 | ||