Skip to content

Commit

Permalink
rtlwifi: Fix large packet issue
Browse files Browse the repository at this point in the history
An RX buffer is set to 9100 bytes to receive 8K AMSDU; however, an skb
of this size fails in the kernel.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Chaoming Li authored and John W. Linville committed Dec 22, 2010
1 parent 1721284 commit 5c4bc1c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,22 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
num_rx_inperiod++;
}

if (unlikely(!rtl_action_proc(hw, skb, false)))
if (unlikely(!rtl_action_proc(hw, skb,
false))) {
dev_kfree_skb_any(skb);
else
ieee80211_rx_irqsafe(hw, skb);
} else {
struct sk_buff *uskb = NULL;
u8 *pdata;
uskb = dev_alloc_skb(skb->len + 128);
memcpy(IEEE80211_SKB_RXCB(uskb),
&rx_status,
sizeof(rx_status));
pdata = (u8 *)skb_put(uskb, skb->len);
memcpy(pdata, skb->data, skb->len);
dev_kfree_skb_any(skb);

ieee80211_rx_irqsafe(hw, uskb);
}
} else {
dev_kfree_skb_any(skb);
}
Expand Down

0 comments on commit 5c4bc1c

Please sign in to comment.