[openwrt/openwrt] rtl8812au-ct: fix netdevice notifier call warning
LEDE Commits
lede-commits at lists.infradead.org
Sat May 17 11:59:36 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/800ea46bd5df6bc65ef389394db8aec0d3b2f355
commit 800ea46bd5df6bc65ef389394db8aec0d3b2f355
Author: Liangbin Lian <jjm2473 at gmail.com>
AuthorDate: Wed May 14 14:09:31 2025 +0800
rtl8812au-ct: fix netdevice notifier call warning
rtw_ndev_notifier_call should ignore network devices created by other drivers, and it does so,
but when CONFIG_WIRELESS_EXT=n, it does not behave as expected.
Signed-off-by: Liangbin Lian <jjm2473 at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18801
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
package/kernel/rtl8812au-ct/Makefile | 2 +-
.../patches/005-fix-netdevice-notifier.patch | 37 ++++++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/package/kernel/rtl8812au-ct/Makefile b/package/kernel/rtl8812au-ct/Makefile
index 1492a75320..c6d09e50b8 100644
--- a/package/kernel/rtl8812au-ct/Makefile
+++ b/package/kernel/rtl8812au-ct/Makefile
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl8812au-ct
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
diff --git a/package/kernel/rtl8812au-ct/patches/005-fix-netdevice-notifier.patch b/package/kernel/rtl8812au-ct/patches/005-fix-netdevice-notifier.patch
new file mode 100644
index 0000000000..6bc0cb59e8
--- /dev/null
+++ b/package/kernel/rtl8812au-ct/patches/005-fix-netdevice-notifier.patch
@@ -0,0 +1,37 @@
+From 010badc96adbafed214d9cba0236a8a832dbfc77 Mon Sep 17 00:00:00 2001
+From: Liangbin Lian <jjm2473 at gmail.com>
+Date: Mon, 21 Aug 2023 10:26:28 +0800
+Subject: [PATCH] fix netdevice notifier
+
+rtw_ndev_notifier_call should ignore network devices created by other drivers,
+and it does so, but when CONFIG_WIRELESS_EXT=n, it does not behave as expected.
+
+---
+ os_dep/linux/os_intfs.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/os_dep/linux/os_intfs.c
++++ b/os_dep/linux/os_intfs.c
+@@ -746,6 +746,8 @@ u16 rtw_recv_select_queue(struct sk_buff
+ }
+
+ #endif
++int rtw_ndev_init(struct net_device *dev);
++
+ static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long state, void *ptr)
+ {
+ #if (LINUX_VERSION_CODE>=KERNEL_VERSION(3,11,0))
+@@ -761,6 +763,13 @@ static int rtw_ndev_notifier_call(struct
+ if (dev->do_ioctl != rtw_ioctl)
+ #endif
+ return NOTIFY_DONE;
++#else
++#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
++ if (dev->netdev_ops->ndo_init != rtw_ndev_init)
++#else
++ if (dev->init != rtw_ndev_init)
++#endif
++ return NOTIFY_DONE;
+ #endif
+
+ DBG_871X_LEVEL(_drv_info_, FUNC_NDEV_FMT" state:%lu\n", FUNC_NDEV_ARG(dev), state);
More information about the lede-commits
mailing list