abce361673d5f8c55dcced75fd087a3892c57023
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / ath / 922-ath10k-increase-rx-buffer-size-to-2048.patch
1 From: Linus Lüssing <ll@simonwunderlich.de>
2 Date: Wed, 5 Feb 2020 20:10:43 +0100
3 Subject: ath10k: increase rx buffer size to 2048
4
5 Before, only frames with a maximum size of 1528 bytes could be
6 transmitted between two 802.11s nodes.
7
8 For batman-adv for instance, which adds its own header to each frame,
9 we typically need an MTU of at least 1532 bytes to be able to transmit
10 without fragmentation.
11
12 This patch now increases the maxmimum frame size from 1528 to 1656
13 bytes.
14
15 Tested with two ath10k devices in 802.11s mode, as well as with
16 batman-adv on top of 802.11s with forwarding disabled.
17
18 Fix originally found and developed by Ben Greear.
19
20 Link: https://github.com/greearb/ath10k-ct/issues/89
21 Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d
22 Cc: Ben Greear <greearb@candelatech.com>
23 Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
24
25 Forwarded: https://patchwork.kernel.org/patch/11367055/
26
27 --- a/drivers/net/wireless/ath/ath10k/htt.h
28 +++ b/drivers/net/wireless/ath/ath10k/htt.h
29 @@ -2242,7 +2242,7 @@ struct htt_rx_chan_info {
30 * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size,
31 * rounded up to a cache line size.
32 */
33 -#define HTT_RX_BUF_SIZE 1920
34 +#define HTT_RX_BUF_SIZE 2048
35 #define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc))
36
37 /* Refill a bunch of RX buffers for each refill round so that FW/HW can handle