diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-09-05 20:30:21 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-11-20 15:23:49 +0300 |
commit | b02f42f4ed2ff5756780da024108866aa87aa528 (patch) | |
tree | 2eedd7caa5aaf517ea9e09f3d5c87c5da361156c /drivers/net/wireless/mediatek/mt76/mt76x2 | |
parent | aec65e484779c6326116be921cc1bf1aa8e85ecc (diff) | |
download | linux-b02f42f4ed2ff5756780da024108866aa87aa528.tar.xz |
mt76: mt76x02: move MT_CH_TIME_CFG init to mt76x02_mac_cc_reset
Reduces code duplication and adds missing bits for USB variants
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c | 7 |
2 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c index 3cf54963854a..33fcec9179b2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c @@ -133,15 +133,6 @@ int mt76x2_mac_reset(struct mt76x02_dev *dev, bool hard) for (i = 0; i < 16; i++) mt76_rr(dev, MT_TX_STAT_FIFO); - mt76_wr(dev, MT_CH_TIME_CFG, - MT_CH_TIME_CFG_TIMER_EN | - MT_CH_TIME_CFG_TX_AS_BUSY | - MT_CH_TIME_CFG_RX_AS_BUSY | - MT_CH_TIME_CFG_NAV_AS_BUSY | - MT_CH_TIME_CFG_EIFS_AS_BUSY | - MT_CH_CCA_RC_EN | - FIELD_PREP(MT_CH_TIME_CFG_CH_TIMER_CLR, 1)); - mt76x02_set_tx_ackto(dev); return 0; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c index e305b374c904..2910068f4e79 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c @@ -184,13 +184,6 @@ int mt76x2u_init_hardware(struct mt76x02_dev *dev) mt76x02_phy_set_rxpath(dev); mt76x02_phy_set_txdac(dev); - mt76_wr(dev, MT_CH_TIME_CFG, - MT_CH_TIME_CFG_TIMER_EN | - MT_CH_TIME_CFG_TX_AS_BUSY | - MT_CH_TIME_CFG_RX_AS_BUSY | - MT_CH_TIME_CFG_NAV_AS_BUSY | - MT_CH_TIME_CFG_EIFS_AS_BUSY); - return mt76x2u_mac_stop(dev); } |