diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2022-06-24 12:08:29 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-07-11 13:40:03 +0200 |
commit | 9dfb28e9bcd48235b685979e176ed4366a96d95a (patch) | |
tree | cbcb00867422447a703bf6d3a25e2fd229c0e587 /drivers/net/wireless/mediatek/mt76/mt7921/dma.c | |
parent | mt76: mt7921: make mt7921_pci_driver static (diff) | |
download | linux-9dfb28e9bcd48235b685979e176ed4366a96d95a.tar.xz linux-9dfb28e9bcd48235b685979e176ed4366a96d95a.zip |
mt76: connac: move tx initialization/cleanup in mt76_connac module
Move mt76_connac_init_tx_queues and mt76_connac_tx_cleanup routines
in mt76_connac module. This is a preliminary patch to add mt7990
chipset support.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/dma.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/dma.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c index 3a6b158b779e..d1f10f6d9adc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c @@ -5,20 +5,6 @@ #include "../dma.h" #include "mac.h" -static int mt7921_init_tx_queues(struct mt7921_phy *phy, int idx, int n_desc) -{ - int i, err; - - err = mt76_init_tx_queue(phy->mt76, 0, idx, n_desc, MT_TX_RING_BASE, 0); - if (err < 0) - return err; - - for (i = 0; i <= MT_TXQ_PSD; i++) - phy->mt76->q_tx[i] = phy->mt76->q_tx[0]; - - return 0; -} - static int mt7921_poll_tx(struct napi_struct *napi, int budget) { struct mt7921_dev *dev; @@ -31,7 +17,7 @@ static int mt7921_poll_tx(struct napi_struct *napi, int budget) return 0; } - mt7921_mcu_tx_cleanup(dev); + mt76_connac_tx_cleanup(&dev->mt76); if (napi_complete(napi)) mt7921_irq_enable(dev, MT_INT_TX_DONE_ALL); mt76_connac_pm_unref(&dev->mphy, &dev->pm); @@ -250,8 +236,9 @@ int mt7921_dma_init(struct mt7921_dev *dev) return ret; /* init tx queue */ - ret = mt7921_init_tx_queues(&dev->phy, MT7921_TXQ_BAND0, - MT7921_TX_RING_SIZE); + ret = mt76_connac_init_tx_queues(dev->phy.mt76, MT7921_TXQ_BAND0, + MT7921_TX_RING_SIZE, + MT_TX_RING_BASE, 0); if (ret) return ret; |