summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kaistra <martin.kaistra@linutronix.de>2025-07-09 14:15:22 +0200
committerPing-Ke Shih <pkshih@realtek.com>2025-07-15 10:01:36 +0800
commitd76a1abcf57734d2bcd4a7ec051617edd4513d7f (patch)
treefcb946057fb092327045e1de4c98e3f0558e7cf8
parentcefcf74ae02623a80acffe5f662ed6523575ed46 (diff)
wifi: rtl8xxxu: Fix RX skb size for aggregation disabled
Commit 1e5b3b3fe9e0 ("rtl8xxxu: Adjust RX skb size to include space for phystats") increased the skb size when aggregation is enabled but decreased it for the aggregation disabled case. As a result, if a frame near the maximum size is received, rtl8xxxu_rx_complete() is called with status -EOVERFLOW and then the driver starts to malfunction and no further communication is possible. Restore the skb size in the aggregation disabled case. Fixes: 1e5b3b3fe9e0 ("rtl8xxxu: Adjust RX skb size to include space for phystats") Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250709121522.1992366-1-martin.kaistra@linutronix.de
-rw-r--r--drivers/net/wireless/realtek/rtl8xxxu/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c
index 496836f716aa..f6f169d2062d 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c
@@ -6618,7 +6618,7 @@ static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv,
skb_size = fops->rx_agg_buf_size;
skb_size += (rx_desc_sz + sizeof(struct rtl8723au_phy_stats));
} else {
- skb_size = IEEE80211_MAX_FRAME_LEN;
+ skb_size = IEEE80211_MAX_FRAME_LEN + rx_desc_sz;
}
skb = __netdev_alloc_skb(NULL, skb_size, GFP_KERNEL);