[][MAC80211][WiFi6/7][misc][fix ucode and backport 6.5 patch fail]
[Description]
Fix missing NL80211_SUPPORT in ucode and cause unknown symbol.
Fix WiFi7 release build fail due to Kernel v5.4.260 adding eth_hw_addr_set
[Release-log]
N/A
Change-Id: I1521de254102f38bc9881347759d76345e9856f1
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8318144
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0002-backports-update-kernel-version-check-for-eth_hw_add.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0002-backports-update-kernel-version-check-for-eth_hw_add.patch
new file mode 100644
index 0000000..bc5dd23
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0002-backports-update-kernel-version-check-for-eth_hw_add.patch
@@ -0,0 +1,40 @@
+From 085740016672333854d07d4ae266b6fa15103936 Mon Sep 17 00:00:00 2001
+From: Shayne Chen <shayne.chen@mediatek.com>
+Date: Mon, 27 Nov 2023 16:39:36 +0800
+Subject: [PATCH] backports: update kernel version check for eth_hw_addr_set()
+
+Kernel v5.4.260 has added this API, so update kernel version check in
+backports include.
+
+CR-Id: WCNCR00238098
+Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
+Change-Id: I708aabbe51de9d480932ce03b30d004bf1d67ebd
+---
+ backport-include/linux/etherdevice.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/backport-include/linux/etherdevice.h b/backport-include/linux/etherdevice.h
+index 51a7d6d..ecc3bc2 100644
+--- a/backport-include/linux/etherdevice.h
++++ b/backport-include/linux/etherdevice.h
+@@ -39,7 +39,7 @@ static inline void u64_to_ether_addr(u64 u, u8 *addr)
+ }
+ #endif /* LINUX_VERSION_IS_LESS(4,11,0) */
+
+-#if LINUX_VERSION_IS_LESS(5,15,0)
++#if LINUX_VERSION_IS_LESS(5,4,260)
+ /**
+ * eth_hw_addr_set - Assign Ethernet address to a net_device
+ * @dev: pointer to net_device structure
+@@ -51,7 +51,7 @@ static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
+ {
+ ether_addr_copy(dev->dev_addr, addr);
+ }
+-#endif /* LINUX_VERSION_IS_LESS(5,15,0) */
++#endif /* LINUX_VERSION_IS_LESS(5,4,260) */
+
+ #if LINUX_VERSION_IS_LESS(5,16,0)
+ static inline int backport_device_get_mac_address(struct device *dev, char *addr)
+--
+2.18.0
+
diff --git a/autobuild_mac80211_release/package/utils/ucode/patches/0001-change-cmakelist.patch b/autobuild_mac80211_release/package/utils/ucode/patches/0001-change-cmakelist.patch
new file mode 100644
index 0000000..9b3f932
--- /dev/null
+++ b/autobuild_mac80211_release/package/utils/ucode/patches/0001-change-cmakelist.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ade8aac..c8ae7b7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,13 +28,10 @@ find_library(libuci NAMES uci)
+ find_library(libubox NAMES ubox)
+ find_library(libubus NAMES ubus)
+ find_library(libblobmsg_json NAMES blobmsg_json)
++find_library(libnl_tiny NAMES nl-tiny)
+
+-if(LINUX)
+- find_library(libnl_tiny NAMES nl-tiny)
+-
+- if(libnl_tiny AND libubox)
+- set(DEFAULT_NL_SUPPORT ON)
+- endif()
++if(libnl_tiny AND libubox)
++ set(DEFAULT_NL_SUPPORT ON)
+ endif()
+
+ if(libuci AND libubox)