build: BSD compile fixes
[openwrt.git] / package / mac80211 / patches / 863-brcmsmac-remove-brcms_bss_cfg-associated.patch
1 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
2 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
3 @@ -3051,8 +3051,6 @@ static void brcms_b_antsel_set(struct br
4   */
5  static bool brcms_c_ps_allowed(struct brcms_c_info *wlc)
6  {
7 -       struct brcms_bss_cfg *cfg = wlc->bsscfg;
8 -
9         /* disallow PS when one of the following global conditions meets */
10         if (!wlc->pub->associated)
11                 return false;
12 @@ -3061,9 +3059,6 @@ static bool brcms_c_ps_allowed(struct br
13         if (wlc->filter_flags & FIF_PROMISC_IN_BSS)
14                 return false;
15  
16 -       if (cfg->associated)
17 -               return false;
18 -
19         return true;
20  }
21  
22 @@ -3821,7 +3816,7 @@ static void brcms_c_set_home_chanspec(st
23         if (wlc->home_chanspec != chanspec) {
24                 wlc->home_chanspec = chanspec;
25  
26 -               if (wlc->bsscfg->associated)
27 +               if (wlc->pub->associated)
28                         wlc->bsscfg->current_bss->chanspec = chanspec;
29         }
30  }
31 @@ -5435,7 +5430,7 @@ static void brcms_c_ofdm_rateset_war(str
32         u8 r;
33         bool war = false;
34  
35 -       if (wlc->bsscfg->associated)
36 +       if (wlc->pub->associated)
37                 r = wlc->bsscfg->current_bss->rateset.rates[0];
38         else
39                 r = wlc->default_bss->rateset.rates[0];
40 @@ -5529,7 +5524,7 @@ int brcms_c_set_rateset(struct brcms_c_i
41         /* merge rateset coming in with the current mcsset */
42         if (wlc->pub->_n_enab & SUPPORT_11N) {
43                 struct brcms_bss_info *mcsset_bss;
44 -               if (wlc->bsscfg->associated)
45 +               if (wlc->pub->associated)
46                         mcsset_bss = wlc->bsscfg->current_bss;
47                 else
48                         mcsset_bss = wlc->default_bss;
49 @@ -7498,7 +7493,6 @@ void brcms_c_scan_stop(struct brcms_c_in
50  void brcms_c_associate_upd(struct brcms_c_info *wlc, bool state)
51  {
52         wlc->pub->associated = state;
53 -       wlc->bsscfg->associated = state;
54  }
55  
56  /*
57 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.h
58 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.h
59 @@ -589,7 +589,6 @@ enum brcms_bss_type {
60   * type: interface type
61   * up: is this configuration up operational
62   * enable: is this configuration enabled
63 - * associated: is BSS in ASSOCIATED state
64   * SSID_len: the length of SSID
65   * SSID: SSID string
66   *
67 @@ -608,7 +607,6 @@ struct brcms_bss_cfg {
68         enum brcms_bss_type type;
69         bool up;
70         bool enable;
71 -       bool associated;
72         u8 SSID_len;
73         u8 SSID[IEEE80211_MAX_SSID_LEN];
74         u8 BSSID[ETH_ALEN];