summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/usb.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-03-17 10:59:18 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-03-25 21:42:22 +0100
commitd7d0f081c48951018133cac38c8c0796f37db727 (patch)
treea949ef9f9a2482efedc25745a2bff81eea2209a6 /drivers/net/wireless/rtlwifi/usb.c
parentrtlwifi: usb: use usb_alloc_coherent for RX buffers (diff)
downloadlinux-d7d0f081c48951018133cac38c8c0796f37db727.tar.xz
linux-d7d0f081c48951018133cac38c8c0796f37db727.zip
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/usb.c')
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 22f29d75947e..8df5836cc99c 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -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);
- }
- dev_kfree_skb_any(skb);
- } else {
+
+ if (likely(rtl_action_proc(hw, skb, false)))
+ ieee80211_rx_irqsafe(hw, skb);
+ else
dev_kfree_skb_any(skb);
- }
}
}