immortalwrt-mt798x/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch
Tianling Shen cd7ba71c76
mac80211: refresh vht patch
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit a58903115203f98dd89883294642b4cf27cc3906)
2023-03-11 15:39:00 +08:00

37 lines
1.2 KiB
Diff

--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -135,7 +135,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
have_80mhz = false;
for (i = 0; i < sband->n_channels; i++) {
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
- IEEE80211_CHAN_NO_80MHZ))
+ IEEE80211_CHAN_NO_80MHZ) &
+ (sband->band != NL80211_BAND_2GHZ))
continue;
have_80mhz = true;
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1925,7 +1925,8 @@ static int ieee80211_build_preq_ies_band
/* Check if any channel in this sband supports at least 80 MHz */
for (i = 0; i < sband->n_channels; i++) {
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
- IEEE80211_CHAN_NO_80MHZ))
+ IEEE80211_CHAN_NO_80MHZ) &
+ (sband->band != NL80211_BAND_2GHZ))
continue;
have_80mhz = true;
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -5122,7 +5122,8 @@ static int ieee80211_prep_channel(struct
have_80mhz = false;
for (i = 0; i < sband->n_channels; i++) {
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
- IEEE80211_CHAN_NO_80MHZ))
+ IEEE80211_CHAN_NO_80MHZ) &
+ (sband->band != NL80211_BAND_2GHZ))
continue;
have_80mhz = true;