Commit 780a8c9e authored by Wen Gong's avatar Wen Gong Committed by Johannes Berg
Browse files

mac80211: do not disable HE if HT is missing on 2.4 GHz



VHT is not supported on 2.4 GHz, but HE is; don't disable HE if HT
is missing there, do that only on 5 GHz (6 GHz is only HE).

Fixes: 57fa5e85 ("mac80211: determine chandef from HE 6 GHz operation")
Signed-off-by: default avatarWen Gong <wgong@codeaurora.org>
Link: https://lore.kernel.org/r/010101747cb617f2-593c5410-1648-4a42-97a0-f3646a5a6dd1-000000@us-west-2.amazonses.com


[rewrite the commit message]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 412a84b5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4861,6 +4861,7 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
	struct ieee80211_supported_band *sband;
	struct cfg80211_chan_def chandef;
	bool is_6ghz = cbss->channel->band == NL80211_BAND_6GHZ;
	bool is_5ghz = cbss->channel->band == NL80211_BAND_5GHZ;
	struct ieee80211_bss *bss = (void *)cbss->priv;
	int ret;
	u32 i;
@@ -4879,7 +4880,7 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
		ifmgd->flags |= IEEE80211_STA_DISABLE_HE;
	}

	if (!sband->vht_cap.vht_supported && !is_6ghz) {
	if (!sband->vht_cap.vht_supported && is_5ghz) {
		ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
		ifmgd->flags |= IEEE80211_STA_DISABLE_HE;
	}