Reduce rx buffer size to 2048 for mt7921/mt7915/mt7615 since we now support rx amsdu offload Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> --- drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 9 ++------- drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 12 +++++------- drivers/net/wireless/mediatek/mt76/mt7921/dma.c | 8 +++----- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c index b6184234cad2..00aefea1bf61 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c @@ -222,14 +222,9 @@ void mt7615_dma_start(struct mt7615_dev *dev) int mt7615_dma_init(struct mt7615_dev *dev) { int rx_ring_size = MT7615_RX_RING_SIZE; - int rx_buf_size = MT_RX_BUF_SIZE; u32 mask; int ret; - /* Increase buffer size to receive large VHT MPDUs */ - if (dev->mphy.cap.has_5ghz) - rx_buf_size *= 2; - mt76_dma_attach(&dev->mt76); mt76_wr(dev, MT_WPDMA_GLO_CFG, @@ -270,7 +265,7 @@ int mt7615_dma_init(struct mt7615_dev *dev) /* init rx queues */ ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU], 1, - MT7615_RX_MCU_RING_SIZE, rx_buf_size, + MT7615_RX_MCU_RING_SIZE, MT_RX_BUF_SIZE, MT_RX_RING_BASE); if (ret) return ret; @@ -279,7 +274,7 @@ int mt7615_dma_init(struct mt7615_dev *dev) rx_ring_size /= 2; ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MAIN], 0, - rx_ring_size, rx_buf_size, MT_RX_RING_BASE); + rx_ring_size, MT_RX_BUF_SIZE, MT_RX_RING_BASE); if (ret) return ret; diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/dma.c b/drivers/net/wireless/mediatek/mt76/mt7915/dma.c index 69a7e3dce113..9182568f95c7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/dma.c @@ -79,8 +79,6 @@ void mt7915_dma_prefetch(struct mt7915_dev *dev) int mt7915_dma_init(struct mt7915_dev *dev) { - /* Increase buffer size to receive large VHT/HE MPDUs */ - int rx_buf_size = MT_RX_BUF_SIZE * 2; u32 hif1_ofs = 0; int ret; @@ -144,28 +142,28 @@ int mt7915_dma_init(struct mt7915_dev *dev) /* event from WM */ ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU], MT7915_RXQ_MCU_WM, MT7915_RX_MCU_RING_SIZE, - rx_buf_size, MT_RX_EVENT_RING_BASE); + MT_RX_BUF_SIZE, MT_RX_EVENT_RING_BASE); if (ret) return ret; /* event from WA */ ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU_WA], MT7915_RXQ_MCU_WA, MT7915_RX_MCU_RING_SIZE, - rx_buf_size, MT_RX_EVENT_RING_BASE); + MT_RX_BUF_SIZE, MT_RX_EVENT_RING_BASE); if (ret) return ret; /* rx data queue */ ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MAIN], MT7915_RXQ_BAND0, MT7915_RX_RING_SIZE, - rx_buf_size, MT_RX_DATA_RING_BASE); + MT_RX_BUF_SIZE, MT_RX_DATA_RING_BASE); if (ret) return ret; if (dev->dbdc_support) { ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_EXT], MT7915_RXQ_BAND1, MT7915_RX_RING_SIZE, - rx_buf_size, + MT_RX_BUF_SIZE, MT_RX_DATA_RING_BASE + hif1_ofs); if (ret) return ret; @@ -174,7 +172,7 @@ int mt7915_dma_init(struct mt7915_dev *dev) ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_EXT_WA], MT7915_RXQ_MCU_WA_EXT, MT7915_RX_MCU_RING_SIZE, - rx_buf_size, + MT_RX_BUF_SIZE, MT_RX_EVENT_RING_BASE + hif1_ofs); if (ret) return ret; diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c index 5e745e9c2185..7d7d43a5422f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c @@ -380,9 +380,7 @@ int mt7921_wpdma_reinit_cond(struct mt7921_dev *dev) int mt7921_dma_init(struct mt7921_dev *dev) { - /* Increase buffer size to receive large VHT/HE MPDUs */ struct mt76_bus_ops *bus_ops; - int rx_buf_size = MT_RX_BUF_SIZE * 2; int ret; dev->bus_ops = dev->mt76.bus; @@ -430,7 +428,7 @@ int mt7921_dma_init(struct mt7921_dev *dev) ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU], MT7921_RXQ_MCU_WM, MT7921_RX_MCU_RING_SIZE, - rx_buf_size, MT_RX_EVENT_RING_BASE); + MT_RX_BUF_SIZE, MT_RX_EVENT_RING_BASE); if (ret) return ret; @@ -438,14 +436,14 @@ int mt7921_dma_init(struct mt7921_dev *dev) ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU_WA], MT7921_RXQ_MCU_WM, MT7921_RX_MCU_RING_SIZE, - rx_buf_size, MT_WFDMA0(0x540)); + MT_RX_BUF_SIZE, MT_WFDMA0(0x540)); if (ret) return ret; /* rx data */ ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MAIN], MT7921_RXQ_BAND0, MT7921_RX_RING_SIZE, - rx_buf_size, MT_RX_DATA_RING_BASE); + MT_RX_BUF_SIZE, MT_RX_DATA_RING_BASE); if (ret) return ret; -- 2.31.1