Patch "qmi_wwan: Do not call netif_rx from rx_fixup" has been added to the 5.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    qmi_wwan: Do not call netif_rx from rx_fixup

to the 5.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     qmi_wwan-do-not-call-netif_rx-from-rx_fixup.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1c8b1cad219f6a92497835e76f99048bcd42dda0
Author: Kristian Evensen <kristian.evensen@xxxxxxxxx>
Date:   Tue Jun 15 12:01:51 2021 +0200

    qmi_wwan: Do not call netif_rx from rx_fixup
    
    [ Upstream commit 057d49334c02a79af81c30a8d240e641bd6f1741 ]
    
    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 <bjorn@xxxxxxx>
    Signed-off-by: Kristian Evensen <kristian.evensen@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 6700f1970b24..bc55ec739af9 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -575,7 +575,7 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 
 	if (info->flags & QMI_WWAN_FLAG_PASS_THROUGH) {
 		skb->protocol = htons(ETH_P_MAP);
-		return (netif_rx(skb) == NET_RX_SUCCESS);
+		return 1;
 	}
 
 	switch (skb->data[0] & 0xf0) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux