package/devel/binutils: Update to 2.27
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 652-0007-rtl8xxxu-Adjust-RX-skb-size-to-include-space-for-phy.patch
1 From 1e5b3b3fe9e00a3afe3092dbe1a3fc1e9079bf35 Mon Sep 17 00:00:00 2001
2 From: Jes Sorensen <Jes.Sorensen@redhat.com>
3 Date: Mon, 27 Jun 2016 12:32:05 -0400
4 Subject: [PATCH] rtl8xxxu: Adjust RX skb size to include space for phystats
5
6 The old allocation didn't leave space for phystats in the buffer,
7 allowing the packet to be rejected if a frame size of size
8 IEEE80211_MAX_FRAME_LEN was received.
9
10 Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
11 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 ---
13 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 7 ++++---
14 1 file changed, 4 insertions(+), 3 deletions(-)
15
16 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
17 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
18 @@ -5276,11 +5276,12 @@ static int rtl8xxxu_submit_rx_urb(struct
19
20 rx_desc_sz = fops->rx_desc_size;
21
22 - if (priv->rx_buf_aggregation && fops->rx_agg_buf_size)
23 + if (priv->rx_buf_aggregation && fops->rx_agg_buf_size) {
24 skb_size = fops->rx_agg_buf_size;
25 - else
26 + skb_size += (rx_desc_sz + sizeof(struct rtl8723au_phy_stats));
27 + } else {
28 skb_size = IEEE80211_MAX_FRAME_LEN;
29 - skb_size += rx_desc_sz;
30 + }
31
32 skb = __netdev_alloc_skb(NULL, skb_size, GFP_KERNEL);
33 if (!skb)