提交 d7d0f081 编写于 作者: J Jussi Kivilinna 提交者: John W. Linville

rtlwifi: usb: remove extra skb copy on RX path

RX path has extra copying of packets, that can be avoided.
Signed-off-by: NJussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 872de8ff
...@@ -513,23 +513,12 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw, ...@@ -513,23 +513,12 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
if (unicast) if (unicast)
rtlpriv->link_info.num_rx_inperiod++; rtlpriv->link_info.num_rx_inperiod++;
} }
if (likely(rtl_action_proc(hw, skb, false))) {
struct sk_buff *uskb = NULL; if (likely(rtl_action_proc(hw, skb, false)))
u8 *pdata; ieee80211_rx_irqsafe(hw, skb);
else
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 {
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
}
} }
static void _rtl_rx_pre_process(struct ieee80211_hw *hw, struct sk_buff *skb) static void _rtl_rx_pre_process(struct ieee80211_hw *hw, struct sk_buff *skb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册