]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: sdio: honor the largest Tx buffer the hardware can support
authorSean Wang <sean.wang@mediatek.com>
Fri, 14 Jan 2022 23:56:32 +0000 (07:56 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 3 Feb 2022 12:58:00 +0000 (13:58 +0100)
commit5a8513f8b3ef8eaa146312558bd0e874f8e17873
tree493320e057ecfd1a2fd1d63a77ce643861e742bf
parentb8af69b0c8c0148a2e1d93028879302c1e8ddd25
mt76: sdio: honor the largest Tx buffer the hardware can support

We don't have to create a separate sdio.xmit_buf buffer for each queue.
Instead, we just need to create one, reuse it across all queues to reduce
memory consumption further.

And then we should take it into account the actual the host and the device
MMC capability to determine what the appropriate xmit_buf_size can be.

Both MT7921S and MT7663 can support up to Tx FIFO size of 0x3fe00 which
means the device can receive 511 blocks of block size 512 in a row from
the host. So if the driver aggregates the frames as many as possible the
the device can support, we can merge multiple MMC requests into a single
one to get rid of the overhead of the handling and synchronizing in those
unnecessary MMC requests and reduce the SDIO lock contention with the
Bluetooth concurrent traffic and finally to have the higher bus
utilization with less idle cycle.

With the patch, it is helpful for WiFi to have steady throughput
performance especially while running Bluetooth concurrently.

Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
drivers/net/wireless/mediatek/mt76/sdio.c
drivers/net/wireless/mediatek/mt76/sdio_txrx.c