Commit 7660a1bd authored by Shayne Chen's avatar Shayne Chen Committed by Felix Fietkau

mt76: mt7615: register ext_phy if DBDC is detected

MT_EE_WIFI_CONF field can be used to detect if the chipset is MT7615D.
Thus, add support to automatically register ext_phy if DBDC is detected.
Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 5acbf34e
...@@ -125,6 +125,9 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev) ...@@ -125,6 +125,9 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev)
case MT_EE_2GHZ: case MT_EE_2GHZ:
dev->mt76.cap.has_2ghz = true; dev->mt76.cap.has_2ghz = true;
break; break;
case MT_EE_DBDC:
dev->dbdc_support = true;
/* fall through */
default: default:
dev->mt76.cap.has_2ghz = true; dev->mt76.cap.has_2ghz = true;
dev->mt76.cap.has_5ghz = true; dev->mt76.cap.has_5ghz = true;
......
...@@ -278,6 +278,7 @@ struct mt7615_dev { ...@@ -278,6 +278,7 @@ struct mt7615_dev {
bool fw_debug; bool fw_debug;
bool flash_eeprom; bool flash_eeprom;
bool dbdc_support;
spinlock_t token_lock; spinlock_t token_lock;
struct idr token; struct idr token;
......
...@@ -25,6 +25,9 @@ static void mt7615_init_work(struct work_struct *work) ...@@ -25,6 +25,9 @@ static void mt7615_init_work(struct work_struct *work)
mt7615_phy_init(dev); mt7615_phy_init(dev);
mt7615_mcu_del_wtbl_all(dev); mt7615_mcu_del_wtbl_all(dev);
mt7615_check_offload_capability(dev); mt7615_check_offload_capability(dev);
if (dev->dbdc_support)
mt7615_register_ext_phy(dev);
} }
static int mt7615_init_hardware(struct mt7615_dev *dev) static int mt7615_init_hardware(struct mt7615_dev *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment