mt76:禁掉6G,防止重启配置从5G变6G
This commit is contained in:
parent
6d44e0e41c
commit
7ebcc589e4
@ -0,0 +1,67 @@
|
|||||||
|
From 72929ea244bc89a596c63fa46c45ed54fa20297a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Shayne Chen <shayne.chen@mediatek.com>
|
||||||
|
Date: Fri, 6 Jan 2023 11:28:18 +0800
|
||||||
|
Subject: [PATCH] wifi: mt76: mt7915: handle unsupported band configuration
|
||||||
|
|
||||||
|
Firmware does not support simultaneous 5GHz and 6GHz on the same band.
|
||||||
|
Force this case to support 5GHz only.
|
||||||
|
|
||||||
|
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
|
||||||
|
---
|
||||||
|
mt7915/eeprom.c | 14 ++++++++++----
|
||||||
|
mt7915/init.c | 4 ++--
|
||||||
|
2 files changed, 12 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
|
||||||
|
index 849275e1..1371f55c 100644
|
||||||
|
--- a/mt7915/eeprom.c
|
||||||
|
+++ b/mt7915/eeprom.c
|
||||||
|
@@ -156,15 +156,21 @@ static void mt7915_eeprom_parse_band_config(struct mt7915_phy *phy)
|
||||||
|
if (!is_mt7915(&dev->mt76)) {
|
||||||
|
switch (val) {
|
||||||
|
case MT_EE_V2_BAND_SEL_5GHZ:
|
||||||
|
+ case MT_EE_V2_BAND_SEL_5GHZ_6GHZ:
|
||||||
|
phy->mt76->cap.has_5ghz = true;
|
||||||
|
+
|
||||||
|
+ if (val == MT_EE_V2_BAND_SEL_5GHZ_6GHZ) {
|
||||||
|
+ u8p_replace_bits(&eeprom[MT_EE_WIFI_CONF + band],
|
||||||
|
+ MT_EE_V2_BAND_SEL_5GHZ,
|
||||||
|
+ MT_EE_WIFI_CONF0_BAND_SEL);
|
||||||
|
+
|
||||||
|
+ /* force to buffer mode */
|
||||||
|
+ dev->flash_mode = true;
|
||||||
|
+ }
|
||||||
|
return;
|
||||||
|
case MT_EE_V2_BAND_SEL_6GHZ:
|
||||||
|
phy->mt76->cap.has_6ghz = true;
|
||||||
|
return;
|
||||||
|
- case MT_EE_V2_BAND_SEL_5GHZ_6GHZ:
|
||||||
|
- phy->mt76->cap.has_5ghz = true;
|
||||||
|
- phy->mt76->cap.has_6ghz = true;
|
||||||
|
- return;
|
||||||
|
default:
|
||||||
|
phy->mt76->cap.has_2ghz = true;
|
||||||
|
return;
|
||||||
|
diff --git a/mt7915/init.c b/mt7915/init.c
|
||||||
|
index 9ccbc7bc..74425a59 100755
|
||||||
|
--- a/mt7915/init.c
|
||||||
|
+++ b/mt7915/init.c
|
||||||
|
@@ -1311,14 +1311,14 @@ int mt7915_register_device(struct mt7915_dev *dev)
|
||||||
|
if (ret)
|
||||||
|
goto unreg_dev;
|
||||||
|
|
||||||
|
- ieee80211_queue_work(mt76_hw(dev), &dev->init_work);
|
||||||
|
-
|
||||||
|
if (phy2) {
|
||||||
|
ret = mt7915_register_ext_phy(dev, phy2);
|
||||||
|
if (ret)
|
||||||
|
goto unreg_thermal;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ ieee80211_queue_work(mt76_hw(dev), &dev->init_work);
|
||||||
|
+
|
||||||
|
dev->recovery.hw_init_done = true;
|
||||||
|
|
||||||
|
ret = mt7915_init_debugfs(&dev->phy);
|
||||||
|
--
|
||||||
|
2.25.1
|
Loading…
x
Reference in New Issue
Block a user