Skip to content

Commit 057d493

Browse files
kristrevdavem330
authored andcommitted
qmi_wwan: Do not call netif_rx from rx_fixup
When the QMI_WWAN_FLAG_PASS_THROUGH is set, netif_rx() is called from qmi_wwan_rx_fixup(). When the call to netif_rx() is successful (which is most of the time), usbnet_skb_return() is called (from rx_process()). usbnet_skb_return() will then call netif_rx() a second time for the same skb. Simplify the code and avoid the redundant netif_rx() call by changing qmi_wwan_rx_fixup() to always return 1 when QMI_WWAN_FLAG_PASS_THROUGH is set. We then leave it up to the existing infrastructure to call netif_rx(). Suggested-by: Bjørn Mork <[email protected]> Signed-off-by: Kristian Evensen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c1a3d40 commit 057d493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/qmi_wwan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
575575

576576
if (info->flags & QMI_WWAN_FLAG_PASS_THROUGH) {
577577
skb->protocol = htons(ETH_P_MAP);
578-
return (netif_rx(skb) == NET_RX_SUCCESS);
578+
return 1;
579579
}
580580

581581
switch (skb->data[0] & 0xf0) {

0 commit comments

Comments
 (0)