public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 3/9] mt76: mt7615: use larger rx buffers if VHT is supported
Date: Wed, 22 Apr 2020 18:04:31 +0200	[thread overview]
Message-ID: <20200422160437.99466-3-nbd@nbd.name> (raw)
In-Reply-To: <20200422160437.99466-1-nbd@nbd.name>

In VHT mode we can receive larger MPDUs. Increasing the buffer size reduces
fragmentation here, which should improve performance.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c
index 5cdbe3747901..0b1fbddd1c3f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c
@@ -192,8 +192,13 @@ static void mt7663_dma_sched_init(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;
 	int ret;
 
+	/* Increase buffer size to receive large VHT MPDUs */
+	if (dev->mt76.cap.has_5ghz)
+		rx_buf_size *= 2;
+
 	mt76_dma_attach(&dev->mt76);
 
 	mt76_wr(dev, MT_WPDMA_GLO_CFG,
@@ -234,7 +239,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, MT_RX_BUF_SIZE,
+			       MT7615_RX_MCU_RING_SIZE, rx_buf_size,
 			       MT_RX_RING_BASE);
 	if (ret)
 		return ret;
@@ -243,7 +248,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, MT_RX_BUF_SIZE, MT_RX_RING_BASE);
+			       rx_ring_size, rx_buf_size, MT_RX_RING_BASE);
 	if (ret)
 		return ret;
 
-- 
2.24.0


  parent reply	other threads:[~2020-04-22 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 16:04 [PATCH 1/9] mt76: mt7615: fix sta ampdu factor for VHT Felix Fietkau
2020-04-22 16:04 ` [PATCH 2/9] mt76: fix A-MPDU density handling Felix Fietkau
2020-04-22 16:04 ` Felix Fietkau [this message]
2020-04-22 16:04 ` [PATCH 4/9] mt76: mt7615: never use an 802.11b CF-End rate on 5GHz Felix Fietkau
2020-04-22 16:04 ` [PATCH 5/9] mt76: mt7603: " Felix Fietkau
2020-04-22 16:04 ` [PATCH 6/9] mt76: mt7615: adjust timing in mt7615_mac_set_timing to match fw/hw values Felix Fietkau
2020-04-22 16:04 ` [PATCH 7/9] mt76: mt7615: do not adjust MAC timings if the device is not running Felix Fietkau
2020-04-22 16:04 ` [PATCH 8/9] mt76: mt7615: fix tx status rate index calculation Felix Fietkau
2020-04-22 16:04 ` [PATCH 9/9] mt76: mt7603: " Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422160437.99466-3-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox