mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
rtlwifi: usb: remove extra skb copy on RX path
RX path has extra copying of packets, that can be avoided. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
872de8ff04
commit
d7d0f081c4
@ -513,22 +513,11 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
|
||||
if (unicast)
|
||||
rtlpriv->link_info.num_rx_inperiod++;
|
||||
}
|
||||
if (likely(rtl_action_proc(hw, skb, false))) {
|
||||
struct sk_buff *uskb = NULL;
|
||||
u8 *pdata;
|
||||
|
||||
uskb = dev_alloc_skb(skb->len + 128);
|
||||
if (uskb) { /* drop packet on allocation failure */
|
||||
memcpy(IEEE80211_SKB_RXCB(uskb), &rx_status,
|
||||
sizeof(rx_status));
|
||||
pdata = (u8 *)skb_put(uskb, skb->len);
|
||||
memcpy(pdata, skb->data, skb->len);
|
||||
ieee80211_rx_irqsafe(hw, uskb);
|
||||
}
|
||||
if (likely(rtl_action_proc(hw, skb, false)))
|
||||
ieee80211_rx_irqsafe(hw, skb);
|
||||
else
|
||||
dev_kfree_skb_any(skb);
|
||||
} else {
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user