From 4f17224637d5b45b1c6e7524c9bb31c73f0110c2 Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Mon, 11 Apr 2022 10:38:37 +0800 Subject: [PATCH] mxm_wifiex: Use netif_rx() in L5.17 kernel Since kernel commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Signed-off-by: Sherry Sun Approved-by: Tian Yang --- mxm_wifiex/wlan_src/mlinux/moal_shim.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mxm_wifiex/wlan_src/mlinux/moal_shim.c b/mxm_wifiex/wlan_src/mlinux/moal_shim.c index a142ecb..5779df5 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_shim.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_shim.c @@ -1464,7 +1464,11 @@ mlan_status moal_recv_amsdu_packet(t_void *pmoal, pmlan_buffer pmbuf) netif_receive_skb(frame); local_bh_enable(); } else { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) + netif_rx(frame); +#else netif_rx_ni(frame); +#endif } } } @@ -1724,7 +1728,11 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf) netif_receive_skb(skb); local_bh_enable(); } else { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) + netif_rx(skb); +#else netif_rx_ni(skb); +#endif } } }