brcmsmac: remove brcms_bss_cfg->BSS
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 Mar 2013 00:45:51 +0000 (01:45 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 27 Mar 2013 17:37:34 +0000 (13:37 -0400)
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>
drivers/net/wireless/brcm80211/brcmsmac/main.c
drivers/net/wireless/brcm80211/brcmsmac/main.h

index 4e420ea..90e6c0d 100644 (file)
@@ -1069,7 +1069,7 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal)
 
 static void brcms_c_tbtt(struct brcms_c_info *wlc)
 {
-       if (!wlc->bsscfg->BSS)
+       if (wlc->bsscfg->type == BRCMS_TYPE_ADHOC)
                /*
                 * DirFrmQ is now valid...defer setting until end
                 * of ATIM window
@@ -3059,16 +3059,8 @@ static bool brcms_c_ps_allowed(struct brcms_c_info *wlc)
        if (wlc->filter_flags & FIF_PROMISC_IN_BSS)
                return false;
 
-       if (cfg->associated) {
-               /*
-                * disallow PS when one of the following
-                * bsscfg specific conditions meets
-                */
-               if (!cfg->BSS)
-                       return false;
-
+       if (cfg->associated)
                return false;
-       }
 
        return true;
 }
@@ -5078,8 +5070,9 @@ int brcms_c_up(struct brcms_c_info *wlc)
                                struct brcms_bss_cfg *bsscfg = wlc->bsscfg;
                                mboolset(wlc->pub->radio_disabled,
                                         WL_RADIO_HW_DISABLE);
-
-                               if (bsscfg->enable && bsscfg->BSS)
+                               if (bsscfg->enable &&
+                                   (bsscfg->type == BRCMS_TYPE_STATION ||
+                                    bsscfg->type == BRCMS_TYPE_ADHOC))
                                        brcms_err(wlc->hw->d11core,
                                                  "wl%d: up: rfdisable -> "
                                                  "bsscfg_disable()\n",
@@ -7386,7 +7379,8 @@ void brcms_c_update_beacon(struct brcms_c_info *wlc)
 {
        struct brcms_bss_cfg *bsscfg = wlc->bsscfg;
 
-       if (bsscfg->up && !bsscfg->BSS)
+       if (bsscfg->up && (bsscfg->type == BRCMS_TYPE_AP ||
+                          bsscfg->type == BRCMS_TYPE_ADHOC))
                /* Clear the soft intmask */
                wlc->defmacintmask &= ~MI_BCNTPL;
 }
@@ -7461,7 +7455,8 @@ void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend)
        struct brcms_bss_cfg *bsscfg = wlc->bsscfg;
 
        /* update AP or IBSS probe responses */
-       if (bsscfg->up && !bsscfg->BSS)
+       if (bsscfg->up && (bsscfg->type == BRCMS_TYPE_AP ||
+                          bsscfg->type == BRCMS_TYPE_ADHOC))
                brcms_c_bss_update_probe_resp(wlc, bsscfg, suspend);
 }
 
index dbf027c..0cfe782 100644 (file)
@@ -590,7 +590,6 @@ enum brcms_bss_type {
  * up: is this configuration up operational
  * enable: is this configuration enabled
  * associated: is BSS in ASSOCIATED state
- * BSS: infraustructure or adhoc
  * SSID_len: the length of SSID
  * SSID: SSID string
  *
@@ -610,7 +609,6 @@ struct brcms_bss_cfg {
        bool up;
        bool enable;
        bool associated;
-       bool BSS;
        u8 SSID_len;
        u8 SSID[IEEE80211_MAX_SSID_LEN];
        u8 BSSID[ETH_ALEN];