diff options
author | Shayne Chen <shayne.chen@mediatek.com> | 2020-06-24 17:39:37 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 18:10:12 +0200 |
commit | 7660a1bd0c22a05ef9ee36409478ee63044cad0f (patch) | |
tree | 0b28f22d75deaf7cf69d7d62562b272e5b9870e7 /drivers | |
parent | 5acbf34e2a2cee13208e6466346ca987eb772d55 (diff) | |
download | linux-7660a1bd0c22a05ef9ee36409478ee63044cad0f.tar.bz2 |
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: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c index 22e4eabe6578..f4756bb946c3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c @@ -125,6 +125,9 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev) case MT_EE_2GHZ: dev->mt76.cap.has_2ghz = true; break; + case MT_EE_DBDC: + dev->dbdc_support = true; + /* fall through */ default: dev->mt76.cap.has_2ghz = true; dev->mt76.cap.has_5ghz = true; diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h index 571eadc033a3..e93f87af3d2a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h @@ -278,6 +278,7 @@ struct mt7615_dev { bool fw_debug; bool flash_eeprom; + bool dbdc_support; spinlock_t token_lock; struct idr token; diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c index 7224a0078211..06a0f8f7bc89 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c @@ -25,6 +25,9 @@ static void mt7615_init_work(struct work_struct *work) mt7615_phy_init(dev); mt7615_mcu_del_wtbl_all(dev); mt7615_check_offload_capability(dev); + + if (dev->dbdc_support) + mt7615_register_ext_phy(dev); } static int mt7615_init_hardware(struct mt7615_dev *dev) |