|
22 | 22 | #include "wme.h" |
23 | 23 |
|
24 | 24 | int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, |
25 | | - struct ieee802_11_elems *elems, bool beacon, |
| 25 | + struct ieee802_11_elems *elems, |
26 | 26 | enum ieee80211_band current_band, |
27 | 27 | u32 sta_flags, u8 *bssid, |
28 | 28 | struct ieee80211_csa_ie *csa_ie) |
@@ -91,19 +91,13 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, |
91 | 91 | return -EINVAL; |
92 | 92 | } |
93 | 93 |
|
94 | | - if (!beacon && sec_chan_offs) { |
| 94 | + if (sec_chan_offs) { |
95 | 95 | secondary_channel_offset = sec_chan_offs->sec_chan_offs; |
96 | | - } else if (beacon && ht_oper) { |
97 | | - secondary_channel_offset = |
98 | | - ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET; |
99 | 96 | } else if (!(sta_flags & IEEE80211_STA_DISABLE_HT)) { |
100 | | - /* If it's not a beacon, HT is enabled and the IE not present, |
101 | | - * it's 20 MHz, 802.11-2012 8.5.2.6: |
102 | | - * This element [the Secondary Channel Offset Element] is |
103 | | - * present when switching to a 40 MHz channel. It may be |
104 | | - * present when switching to a 20 MHz channel (in which |
105 | | - * case the secondary channel offset is set to SCN). |
106 | | - */ |
| 97 | + /* If the secondary channel offset IE is not present, |
| 98 | + * we can't know what's the post-CSA offset, so the |
| 99 | + * best we can do is use 20MHz. |
| 100 | + */ |
107 | 101 | secondary_channel_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE; |
108 | 102 | } |
109 | 103 |
|
|
0 commit comments