Commit 1e5b3b3f authored by Jes Sorensen's avatar Jes Sorensen Committed by Kalle Valo

rtl8xxxu: Adjust RX skb size to include space for phystats

The old allocation didn't leave space for phystats in the buffer,
allowing the packet to be rejected if a frame size of size
IEEE80211_MAX_FRAME_LEN was received.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 04319ae2
...@@ -5276,11 +5276,12 @@ static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv, ...@@ -5276,11 +5276,12 @@ static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv,
rx_desc_sz = fops->rx_desc_size; rx_desc_sz = fops->rx_desc_size;
if (priv->rx_buf_aggregation && fops->rx_agg_buf_size) if (priv->rx_buf_aggregation && fops->rx_agg_buf_size) {
skb_size = fops->rx_agg_buf_size; skb_size = fops->rx_agg_buf_size;
else skb_size += (rx_desc_sz + sizeof(struct rtl8723au_phy_stats));
} else {
skb_size = IEEE80211_MAX_FRAME_LEN; skb_size = IEEE80211_MAX_FRAME_LEN;
skb_size += rx_desc_sz; }
skb = __netdev_alloc_skb(NULL, skb_size, GFP_KERNEL); skb = __netdev_alloc_skb(NULL, skb_size, GFP_KERNEL);
if (!skb) if (!skb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment