From 62468f0b5a72e506915cf50176b701626767e353 Mon Sep 17 00:00:00 2001
From: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Date: Mon, 23 Nov 2020 10:46:37 +0800
Subject: [PATCH] mt76: allow VHT rate on 2.4GHz

Allow chips that support 11ac to use 256QAM on 2.4GHz

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
---
 mac80211.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/mac80211.c
+++ b/mac80211.c
@@ -281,7 +281,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);
 	if (phy->cap.has_6ghz)
@@ -348,13 +348,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, true, false);
+			       n_rates, true, vht);
 }
 
 static int
@@ -506,7 +506,7 @@ int mt76_register_phy(struct mt76_phy *p
 		return ret;
 
 	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;
 	}
@@ -644,7 +644,7 @@ int mt76_register_device(struct mt76_dev
 		return ret;
 
 	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;
 	}
