summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7921/init.c
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2021-10-19 07:11:44 +0800
committerFelix Fietkau <nbd@nbd.name>2021-10-20 10:36:59 +0200
commit16d98b548365fcd6fc3fe2e1ae73c9e3cc5ee43d (patch)
tree2dd90ccf01435d4c85591dccaf99972f41921a62 /drivers/net/wireless/mediatek/mt76/mt7921/init.c
parent8c94f0e63bb3f6ea5755d416293788ba93dfc82f (diff)
mt76: mt7921: rely on mcu_get_nic_capability
Rely on mcu_get_nic_capability to obtain Tx quota information for the SDIO device, get PHY capability, MAC address and then we can totally drop mt7921/eeprom.c and any unnecessary code. Noting that mt76_connac_mcu_get_nic_capability should be run before set flag MT76_STATE_MCU_RUNNING being set to setup the proper parameters like Tx quota control before the device is started to running. Tested-by: Deren Wu <deren.wu@mediatek.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/init.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/init.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index d310d6e1e566..6a4b014e8afd 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -149,7 +149,6 @@ EXPORT_SYMBOL_GPL(mt7921_mac_init);
static int __mt7921_init_hardware(struct mt7921_dev *dev)
{
- struct mt76_dev *mdev = &dev->mt76;
int ret;
/* force firmware operation mode into normal state,
@@ -160,9 +159,7 @@ static int __mt7921_init_hardware(struct mt7921_dev *dev)
if (ret)
goto out;
- ret = mt7921_eeprom_init(dev);
- if (ret)
- goto out;
+ mt76_eeprom_override(&dev->mphy);
ret = mt7921_mcu_set_eeprom(dev);
if (ret)
@@ -170,11 +167,6 @@ static int __mt7921_init_hardware(struct mt7921_dev *dev)
ret = mt7921_mac_init(dev);
out:
- if (ret && mdev->eeprom.data) {
- devm_kfree(mdev->dev, mdev->eeprom.data);
- mdev->eeprom.data = NULL;
- }
-
return ret;
}