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 <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
This commit is contained in:
Sherry Sun 2022-04-11 10:38:37 +08:00
parent 35da828282
commit ce5f564cb7
1 changed files with 8 additions and 0 deletions

View File

@ -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
}
}
}