[PATCH] ath10k: Increase buffer to fix >1500 MTU frames

Fabian Bläse fabian at blaese.de
Do Apr 30 15:02:07 CEST 2020


The ath10k seems to have an issue with large frames
transmitted over 802.11s. This issue has been worked around
in ath10k-ct. The same patch has now been merged into OpenWrt.

As this might fix mesh issues with ath10k devices, it is backported
to our firmware using a build patch.

Link: https://github.com/openwrt/openwrt/commit/066ec97167e49b5c037b04dc4ec76c4cad5b75e2
Link: https://github.com/greearb/ath10k-ct/issues/89
Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d

Signed-off-by: Fabian Bläse <fabian at blaese.de>
---
 ...h10k-increase-rx-buffer-size-to-2048.patch | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 build_patches/openwrt/0030-mac80211-ath10k-increase-rx-buffer-size-to-2048.patch

diff --git a/build_patches/openwrt/0030-mac80211-ath10k-increase-rx-buffer-size-to-2048.patch b/build_patches/openwrt/0030-mac80211-ath10k-increase-rx-buffer-size-to-2048.patch
new file mode 100644
index 0000000..8bfe089
--- /dev/null
+++ b/build_patches/openwrt/0030-mac80211-ath10k-increase-rx-buffer-size-to-2048.patch
@@ -0,0 +1,79 @@
+From 40423025eb5d203affd1e0bb6677d5fabf7a522d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <ll at simonwunderlich.de>
+Date: Wed, 5 Feb 2020 20:10:43 +0100
+Subject: [PATCH] mac80211: ath10k: increase rx buffer size to 2048
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Before, only frames with a maximum size of 1528 bytes could be
+transmitted between two 802.11s nodes.
+
+For batman-adv for instance, which adds its own header to each frame,
+we typically need an MTU of at least 1532 bytes to be able to transmit
+without fragmentation.
+
+This patch now increases the maxmimum frame size from 1528 to 1656
+bytes.
+
+Tested with two ath10k devices in 802.11s mode, as well as with
+batman-adv on top of 802.11s with forwarding disabled.
+
+Fix originally found and developed by Ben Greear.
+
+Link: https://github.com/greearb/ath10k-ct/issues/89
+Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d
+Cc: Ben Greear <greearb at candelatech.com>
+Signed-off-by: Linus Lüssing <ll at simonwunderlich.de>
+Signed-off-by: Sven Eckelmann <sven at narfation.org>
+---
+ ...h10k-increase-rx-buffer-size-to-2048.patch | 37 +++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+ create mode 100644 package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch
+
+diff --git a/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch
+new file mode 100644
+index 0000000000..55429139fa
+--- /dev/null
++++ b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch
+@@ -0,0 +1,37 @@
++From: Linus Lüssing <ll at simonwunderlich.de>
++Date: Wed, 5 Feb 2020 20:10:43 +0100
++Subject: ath10k: increase rx buffer size to 2048
++
++Before, only frames with a maximum size of 1528 bytes could be
++transmitted between two 802.11s nodes.
++
++For batman-adv for instance, which adds its own header to each frame,
++we typically need an MTU of at least 1532 bytes to be able to transmit
++without fragmentation.
++
++This patch now increases the maxmimum frame size from 1528 to 1656
++bytes.
++
++Tested with two ath10k devices in 802.11s mode, as well as with
++batman-adv on top of 802.11s with forwarding disabled.
++
++Fix originally found and developed by Ben Greear.
++
++Link: https://github.com/greearb/ath10k-ct/issues/89
++Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d
++Cc: Ben Greear <greearb at candelatech.com>
++Signed-off-by: Linus Lüssing <ll at simonwunderlich.de>
++
++Forwarded: https://patchwork.kernel.org/patch/11367055/
++
++--- a/drivers/net/wireless/ath/ath10k/htt.h
+++++ b/drivers/net/wireless/ath/ath10k/htt.h
++@@ -2219,7 +2219,7 @@ struct htt_rx_chan_info {
++  * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size,
++  * rounded up to a cache line size.
++  */
++-#define HTT_RX_BUF_SIZE 1920
+++#define HTT_RX_BUF_SIZE 2048
++ #define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc))
++ 
++ /* Refill a bunch of RX buffers for each refill round so that FW/HW can handle
+-- 
+2.26.2
+
-- 
2.26.2



Mehr Informationen über die Mailingliste franken-dev