@@ -400,4 +400,9 @@ static inline bool netif_is_bridge_port(const struct net_device *dev)
}
#endif
+#if LINUX_VERSION_IS_LESS(5,10,0)
+#define netif_rx_any_context LINUX_BACKPORT(netif_rx_any_context)
+int netif_rx_any_context(struct sk_buff *skb);
+#endif /* < 5.10 */
+
#endif /* __BACKPORT_NETDEVICE_H */
@@ -40,6 +40,7 @@ compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o
compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o
compat-$(CPTCFG_KERNEL_5_3) += backport-5.3.o
compat-$(CPTCFG_KERNEL_5_5) += backport-5.5.o
+compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o
compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o
compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o
new file mode 100644
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/export.h>
+#include <linux/kernel.h>
+#include <linux/netdevice.h>
+
+int netif_rx_any_context(struct sk_buff *skb)
+{
+ /*
+ * If invoked from contexts which do not invoke bottom half
+ * processing either at return from interrupt or when softrqs are
+ * reenabled, use netif_rx_ni() which invokes bottomhalf processing
+ * directly.
+ */
+ if (in_interrupt())
+ return netif_rx(skb);
+ else
+ return netif_rx_ni(skb);
+}
+EXPORT_SYMBOL(netif_rx_any_context);
Add the netif_rx_any_context which was added in commit c11171a41338 ("net: Add netif_rx_any_context()") in kernel 5.10. This is used by libertas and mwifiex. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- backport/backport-include/linux/netdevice.h | 5 +++++ backport/compat/Makefile | 1 + backport/compat/backport-5.10.c | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 backport/compat/backport-5.10.c