From 13ab7c1a449bfb71f1d9563a1a6033da39d3aa1b Mon Sep 17 00:00:00 2001 From: LGA1150 Date: Mon, 23 Nov 2020 10:50:38 +0800 Subject: [PATCH] mt76: allow VHT rate on 2.4GHz --- .../0001-mt76-allow-VHT-rate-on-2.4GHz.patch | 45 +++++++++++++++++++ .../mt76/patches/001-allow-vht-on-2g.patch | 37 --------------- 2 files changed, 45 insertions(+), 37 deletions(-) create mode 100644 package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch delete mode 100644 package/kernel/mt76/patches/001-allow-vht-on-2g.patch diff --git a/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch b/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch new file mode 100644 index 0000000000..99767a0268 --- /dev/null +++ b/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch @@ -0,0 +1,45 @@ +--- a/mac80211.c ++++ b/mac80211.c +@@ -160,7 +160,7 @@ static void mt76_init_stream_cap(struct + void mt76_set_stream_caps(struct mt76_phy *phy, bool vht) + { + if (phy->cap.has_2ghz) +- mt76_init_stream_cap(phy, &phy->sband_2g.sband, false); ++ mt76_init_stream_cap(phy, &phy->sband_2g.sband, vht); + if (phy->cap.has_5ghz) + mt76_init_stream_cap(phy, &phy->sband_5g.sband, vht); + } +@@ -223,13 +223,13 @@ mt76_init_sband(struct mt76_phy *phy, st + + static int + mt76_init_sband_2g(struct mt76_phy *phy, struct ieee80211_rate *rates, +- int n_rates) ++ int n_rates, bool vht) + { + phy->hw->wiphy->bands[NL80211_BAND_2GHZ] = &phy->sband_2g.sband; + + return mt76_init_sband(phy, &phy->sband_2g, mt76_channels_2ghz, + ARRAY_SIZE(mt76_channels_2ghz), rates, +- n_rates, false); ++ n_rates, vht); + } + + static int +@@ -358,7 +358,7 @@ int mt76_register_phy(struct mt76_phy *p + mt76_phy_init(phy, phy->hw); + + if (phy->cap.has_2ghz) { +- ret = mt76_init_sband_2g(phy, rates, n_rates); ++ ret = mt76_init_sband_2g(phy, rates, n_rates, vht); + if (ret) + return ret; + } +@@ -454,7 +454,7 @@ int mt76_register_device(struct mt76_dev + mt76_phy_init(phy, hw); + + if (phy->cap.has_2ghz) { +- ret = mt76_init_sband_2g(phy, rates, n_rates); ++ ret = mt76_init_sband_2g(phy, rates, n_rates, vht); + if (ret) + return ret; + } diff --git a/package/kernel/mt76/patches/001-allow-vht-on-2g.patch b/package/kernel/mt76/patches/001-allow-vht-on-2g.patch deleted file mode 100644 index a89cb8bb52..0000000000 --- a/package/kernel/mt76/patches/001-allow-vht-on-2g.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/mac80211.c -+++ b/mac80211.c -@@ -156,7 +156,7 @@ static void mt76_init_stream_cap(struct - void mt76_set_stream_caps(struct mt76_phy *phy, bool vht) - { - if (phy->dev->cap.has_2ghz) -- mt76_init_stream_cap(phy, &phy->sband_2g.sband, false); -+ mt76_init_stream_cap(phy, &phy->sband_2g.sband, vht); - if (phy->dev->cap.has_5ghz) - mt76_init_stream_cap(phy, &phy->sband_5g.sband, vht); - } -@@ -218,14 +218,14 @@ mt76_init_sband(struct mt76_dev *dev, st - - static int - mt76_init_sband_2g(struct mt76_dev *dev, struct ieee80211_rate *rates, -- int n_rates) -+ int n_rates, bool vht) - { - dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = &dev->phy.sband_2g.sband; - - return mt76_init_sband(dev, &dev->phy.sband_2g, - mt76_channels_2ghz, - ARRAY_SIZE(mt76_channels_2ghz), -- rates, n_rates, false); -+ rates, n_rates, vht); - } - - static int -@@ -445,7 +445,7 @@ int mt76_register_device(struct mt76_dev - mt76_phy_init(dev, hw); - - if (dev->cap.has_2ghz) { -- ret = mt76_init_sband_2g(dev, rates, n_rates); -+ ret = mt76_init_sband_2g(dev, rates, n_rates, vht); - if (ret) - return ret; - }