From 297d1ac172bed9b18f28ffac03c55244325ac8f9 Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Thu, 24 Aug 2023 14:39:16 +0800 Subject: [PATCH] mxm_wifiex: fix next-20230804 Linux Factory rebase build errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When build wifi driver based on next-20230804 Linux code, will observe the following build errors. mlinux/moal_shim.c: In function ‘moal_recv_event’: mlinux/moal_shim.c:3475:25: error: too few arguments to function ‘cfg80211_ch_switch_notify’ mlinux/moal_main.c: In function ‘woal_set_rps_map’: mlinux/moal_main.c:3657:29: error: invalid use of undefined type ‘struct netdev_rx_queue’ 3657 | if (!queue || !queue->dev) { | ^~ In file included from ./include/linux/rculist.h:11, from ./include/linux/pid.h:5, from ./include/linux/sched.h:14, from ./arch/arm64/include/asm/compat.h:28, from ./arch/arm64/include/asm/stat.h:13, from ./include/linux/stat.h:6, from ./include/linux/module.h:13, from mlinux/moal_main.h:38, from mlinux/moal_main.c:29: mlinux/moal_main.c:3701:22: error: invalid use of undefined type ‘struct netdev_rx_queue’ 3701 | queue->rps_map, mutex_is_locked(&local_rps_map_mutex)); | ^~ ./include/linux/rcupdate.h:447:19: note: in definition of macro ‘__rcu_dereference_protected’ 447 | ((typeof(*p) __force __kernel *)(p)); \ ...... This is caused by kernel patch 49e47a5b6145("net: move struct netdev_rx_queue out of netdevice.h"), now netdev_rx_queue has been removed to a new header. Note: The patch was introduced in L6.5 kernel next tree, but kernel linus tree hasn't added, so maybe you need to keep this patch until kernel linus tree add this patch and change the kerenl version accordingly. Signed-off-by: Sherry Sun --- mxm_wifiex/wlan_src/mlinux/moal_main.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mxm_wifiex/wlan_src/mlinux/moal_main.h b/mxm_wifiex/wlan_src/mlinux/moal_main.h index 14ba1bc..5b9927c 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_main.h +++ b/mxm_wifiex/wlan_src/mlinux/moal_main.h @@ -118,6 +118,10 @@ Change log: #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0) +#include +#endif + #include "mlan.h" #include "moal_shim.h" /* Wireless header */