@@ -164,7 +164,9 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
164164 chandef -> center_freq1 = channel -> center_freq ;
165165
166166 if (!ht_oper || !sta_ht_cap .ht_supported ) {
167- ret = IEEE80211_STA_DISABLE_HT | IEEE80211_STA_DISABLE_VHT ;
167+ ret = IEEE80211_STA_DISABLE_HT |
168+ IEEE80211_STA_DISABLE_VHT |
169+ IEEE80211_STA_DISABLE_HE ;
168170 goto out ;
169171 }
170172
@@ -185,7 +187,9 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
185187 "Wrong control channel: center-freq: %d ht-cfreq: %d ht->primary_chan: %d band: %d - Disabling HT\n" ,
186188 channel -> center_freq , ht_cfreq ,
187189 ht_oper -> primary_chan , channel -> band );
188- ret = IEEE80211_STA_DISABLE_HT | IEEE80211_STA_DISABLE_VHT ;
190+ ret = IEEE80211_STA_DISABLE_HT |
191+ IEEE80211_STA_DISABLE_VHT |
192+ IEEE80211_STA_DISABLE_HE ;
189193 goto out ;
190194 }
191195
@@ -301,7 +305,8 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
301305 IEEE80211_CHAN_DISABLED )) {
302306 if (WARN_ON (chandef -> width == NL80211_CHAN_WIDTH_20_NOHT )) {
303307 ret = IEEE80211_STA_DISABLE_HT |
304- IEEE80211_STA_DISABLE_VHT ;
308+ IEEE80211_STA_DISABLE_VHT |
309+ IEEE80211_STA_DISABLE_HE ;
305310 break ;
306311 }
307312
@@ -393,6 +398,7 @@ static int ieee80211_config_bw(struct ieee80211_sub_if_data *sdata,
393398
394399 if (flags != (ifmgd -> flags & (IEEE80211_STA_DISABLE_HT |
395400 IEEE80211_STA_DISABLE_VHT |
401+ IEEE80211_STA_DISABLE_HE |
396402 IEEE80211_STA_DISABLE_40MHZ |
397403 IEEE80211_STA_DISABLE_80P80MHZ |
398404 IEEE80211_STA_DISABLE_160MHZ )) ||
@@ -4760,10 +4766,22 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
47604766 IEEE80211_STA_DISABLE_80P80MHZ |
47614767 IEEE80211_STA_DISABLE_160MHZ );
47624768
4769+ /* disable HT/VHT/HE if we don't support them */
4770+ if (!sband -> ht_cap .ht_supported ) {
4771+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HT ;
4772+ ifmgd -> flags |= IEEE80211_STA_DISABLE_VHT ;
4773+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HE ;
4774+ }
4775+
4776+ if (!sband -> vht_cap .vht_supported )
4777+ ifmgd -> flags |= IEEE80211_STA_DISABLE_VHT ;
4778+
4779+ if (!ieee80211_get_he_sta_cap (sband ))
4780+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HE ;
4781+
47634782 rcu_read_lock ();
47644783
4765- if (!(ifmgd -> flags & IEEE80211_STA_DISABLE_HT ) &&
4766- sband -> ht_cap .ht_supported ) {
4784+ if (!(ifmgd -> flags & IEEE80211_STA_DISABLE_HT )) {
47674785 const u8 * ht_oper_ie , * ht_cap_ie ;
47684786
47694787 ht_oper_ie = ieee80211_bss_get_ie (cbss , WLAN_EID_HT_OPERATION );
@@ -4780,8 +4798,7 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
47804798 }
47814799 }
47824800
4783- if (!(ifmgd -> flags & IEEE80211_STA_DISABLE_VHT ) &&
4784- sband -> vht_cap .vht_supported ) {
4801+ if (!(ifmgd -> flags & IEEE80211_STA_DISABLE_VHT )) {
47854802 const u8 * vht_oper_ie , * vht_cap ;
47864803
47874804 vht_oper_ie = ieee80211_bss_get_ie (cbss ,
@@ -4791,9 +4808,10 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
47914808 if (vht_oper && !ht_oper ) {
47924809 vht_oper = NULL ;
47934810 sdata_info (sdata ,
4794- "AP advertised VHT without HT, disabling both \n" );
4811+ "AP advertised VHT without HT, disabling HT/VHT/HE \n" );
47954812 ifmgd -> flags |= IEEE80211_STA_DISABLE_HT ;
47964813 ifmgd -> flags |= IEEE80211_STA_DISABLE_VHT ;
4814+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HE ;
47974815 }
47984816
47994817 vht_cap = ieee80211_bss_get_ie (cbss , WLAN_EID_VHT_CAPABILITY );
@@ -4803,9 +4821,6 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
48034821 }
48044822 }
48054823
4806- if (!ieee80211_get_he_sta_cap (sband ))
4807- ifmgd -> flags |= IEEE80211_STA_DISABLE_HE ;
4808-
48094824 if (!(ifmgd -> flags & IEEE80211_STA_DISABLE_HE )) {
48104825 const struct cfg80211_bss_ies * ies ;
48114826 const u8 * he_oper_ie ;
@@ -5304,27 +5319,15 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
53045319 }
53055320 }
53065321
5307- /* Also disable HT if we don't support it or the AP doesn't use WMM */
53085322 sband = local -> hw .wiphy -> bands [req -> bss -> channel -> band ];
5309- if (!sband -> ht_cap .ht_supported ||
5310- local -> hw .queues < IEEE80211_NUM_ACS || !bss -> wmm_used ||
5311- ifmgd -> flags & IEEE80211_STA_DISABLE_WMM ) {
5312- ifmgd -> flags |= IEEE80211_STA_DISABLE_HT ;
5313- if (!bss -> wmm_used &&
5314- !(ifmgd -> flags & IEEE80211_STA_DISABLE_WMM ))
5315- netdev_info (sdata -> dev ,
5316- "disabling HT as WMM/QoS is not supported by the AP\n" );
5317- }
53185323
5319- /* disable VHT if we don't support it or the AP doesn't use WMM */
5320- if (!sband -> vht_cap .vht_supported ||
5321- local -> hw .queues < IEEE80211_NUM_ACS || !bss -> wmm_used ||
5322- ifmgd -> flags & IEEE80211_STA_DISABLE_WMM ) {
5324+ /* also disable HT/VHT/HE if the AP doesn't use WMM */
5325+ if (!bss -> wmm_used ) {
5326+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HT ;
53235327 ifmgd -> flags |= IEEE80211_STA_DISABLE_VHT ;
5324- if (!bss -> wmm_used &&
5325- !(ifmgd -> flags & IEEE80211_STA_DISABLE_WMM ))
5326- netdev_info (sdata -> dev ,
5327- "disabling VHT as WMM/QoS is not supported by the AP\n" );
5328+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HE ;
5329+ netdev_info (sdata -> dev ,
5330+ "disabling HT/VHT/HE as WMM/QoS is not supported by the AP\n" );
53285331 }
53295332
53305333 memcpy (& ifmgd -> ht_capa , & req -> ht_capa , sizeof (ifmgd -> ht_capa ));
@@ -5456,6 +5459,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
54565459 if (req -> flags & ASSOC_REQ_DISABLE_HT ) {
54575460 ifmgd -> flags |= IEEE80211_STA_DISABLE_HT ;
54585461 ifmgd -> flags |= IEEE80211_STA_DISABLE_VHT ;
5462+ ifmgd -> flags |= IEEE80211_STA_DISABLE_HE ;
54595463 }
54605464
54615465 if (req -> flags & ASSOC_REQ_DISABLE_VHT )
0 commit comments