[][MAC80211][WiFi7][core][Sync to backports-6.6.15]

[Description]
Fix build fail to sync backports to 6.6.15

[Release-log]
N/A

Change-Id: I87f1e7f2fc569f3e7092e2d2b724a3366622cd4c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8698892
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0001-backports-Revert-mac80211-use-the-new-drop-reasons-i.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0001-backports-Revert-mac80211-use-the-new-drop-reasons-i.patch
deleted file mode 100644
index f57a7ad..0000000
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0001-backports-Revert-mac80211-use-the-new-drop-reasons-i.patch
+++ /dev/null
@@ -1,382 +0,0 @@
-From db3959a15f33f3e37d263c4b148fce338fb9fbc3 Mon Sep 17 00:00:00 2001
-From: Shayne Chen <shayne.chen@mediatek.com>
-Date: Mon, 21 Aug 2023 14:20:49 +0800
-Subject: [PATCH 01/40] backports: Revert mac80211: use the new drop reasons
- infrastructure
-
----
- net/mac80211/drop.h        | 56 --------------------------------------
- net/mac80211/ieee80211_i.h |  8 +++++-
- net/mac80211/main.c        | 31 ---------------------
- net/mac80211/rx.c          | 55 +++++++++++++++++++------------------
- net/mac80211/wpa.c         | 24 ++++++++--------
- 5 files changed, 48 insertions(+), 126 deletions(-)
- delete mode 100644 net/mac80211/drop.h
-
-diff --git a/net/mac80211/drop.h b/net/mac80211/drop.h
-deleted file mode 100644
-index 49dc809..0000000
---- a/net/mac80211/drop.h
-+++ /dev/null
-@@ -1,56 +0,0 @@
--/* SPDX-License-Identifier: GPL-2.0-only */
--/*
-- * mac80211 drop reason list
-- *
-- * Copyright (C) 2023 Intel Corporation
-- */
--
--#ifndef MAC80211_DROP_H
--#define MAC80211_DROP_H
--#include <net/dropreason.h>
--
--typedef unsigned int __bitwise ieee80211_rx_result;
--
--#define MAC80211_DROP_REASONS_MONITOR(R)	\
--	R(RX_DROP_M_UNEXPECTED_4ADDR_FRAME)	\
--	R(RX_DROP_M_BAD_BCN_KEYIDX)		\
--	R(RX_DROP_M_BAD_MGMT_KEYIDX)		\
--/* this line for the trailing \ - add before this */
--
--#define MAC80211_DROP_REASONS_UNUSABLE(R)	\
--	R(RX_DROP_U_MIC_FAIL)			\
--	R(RX_DROP_U_REPLAY)			\
--	R(RX_DROP_U_BAD_MMIE)			\
--/* this line for the trailing \ - add before this */
--
--/* having two enums allows for checking ieee80211_rx_result use with sparse */
--enum ___mac80211_drop_reason {
--/* if we get to the end of handlers with RX_CONTINUE this will be the reason */
--	___RX_CONTINUE	= SKB_CONSUMED,
--
--/* this never gets used as an argument to kfree_skb_reason() */
--	___RX_QUEUED	= SKB_NOT_DROPPED_YET,
--
--#define ENUM(x) ___ ## x,
--	___RX_DROP_MONITOR = SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR <<
--		SKB_DROP_REASON_SUBSYS_SHIFT,
--	MAC80211_DROP_REASONS_MONITOR(ENUM)
--
--	___RX_DROP_UNUSABLE = SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE <<
--		SKB_DROP_REASON_SUBSYS_SHIFT,
--	MAC80211_DROP_REASONS_UNUSABLE(ENUM)
--#undef ENUM
--};
--
--enum mac80211_drop_reason {
--	RX_CONTINUE	 = (__force ieee80211_rx_result)___RX_CONTINUE,
--	RX_QUEUED	 = (__force ieee80211_rx_result)___RX_QUEUED,
--	RX_DROP_MONITOR	 = (__force ieee80211_rx_result)___RX_DROP_MONITOR,
--	RX_DROP_UNUSABLE = (__force ieee80211_rx_result)___RX_DROP_UNUSABLE,
--#define DEF(x) x = (__force ieee80211_rx_result)___ ## x,
--	MAC80211_DROP_REASONS_MONITOR(DEF)
--	MAC80211_DROP_REASONS_UNUSABLE(DEF)
--#undef DEF
--};
--
--#endif /* MAC80211_DROP_H */
-diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index 06eb64e..be3fa32 100644
---- a/net/mac80211/ieee80211_i.h
-+++ b/net/mac80211/ieee80211_i.h
-@@ -33,7 +33,6 @@
- #include "key.h"
- #include "sta_info.h"
- #include "debug.h"
--#include "drop.h"
- 
- extern const struct cfg80211_ops mac80211_config_ops;
- 
-@@ -173,6 +172,13 @@ struct ieee80211_tx_data {
- 	unsigned int flags;
- };
- 
-+
-+typedef unsigned __bitwise ieee80211_rx_result;
-+#define RX_CONTINUE		((__force ieee80211_rx_result) 0u)
-+#define RX_DROP_UNUSABLE	((__force ieee80211_rx_result) 1u)
-+#define RX_DROP_MONITOR		((__force ieee80211_rx_result) 2u)
-+#define RX_QUEUED		((__force ieee80211_rx_result) 3u)
-+
- /**
-  * enum ieee80211_packet_rx_flags - packet RX flags
-  * @IEEE80211_RX_AMSDU: a-MSDU packet
-diff --git a/net/mac80211/main.c b/net/mac80211/main.c
-index ec4a930..6fec8ff 100644
---- a/net/mac80211/main.c
-+++ b/net/mac80211/main.c
-@@ -22,7 +22,6 @@
- #include <linux/bitmap.h>
- #include <linux/inetdevice.h>
- #include <net/net_namespace.h>
--#include <net/dropreason.h>
- #include <net/cfg80211.h>
- #include <net/addrconf.h>
- 
-@@ -1523,28 +1522,6 @@ void ieee80211_free_hw(struct ieee80211_hw *hw)
- }
- EXPORT_SYMBOL(ieee80211_free_hw);
- 
--static const char * const drop_reasons_monitor[] = {
--#define V(x)	#x,
--	[0] = "RX_DROP_MONITOR",
--	MAC80211_DROP_REASONS_MONITOR(V)
--};
--
--static struct drop_reason_list drop_reason_list_monitor = {
--	.reasons = drop_reasons_monitor,
--	.n_reasons = ARRAY_SIZE(drop_reasons_monitor),
--};
--
--static const char * const drop_reasons_unusable[] = {
--	[0] = "RX_DROP_UNUSABLE",
--	MAC80211_DROP_REASONS_UNUSABLE(V)
--#undef V
--};
--
--static struct drop_reason_list drop_reason_list_unusable = {
--	.reasons = drop_reasons_unusable,
--	.n_reasons = ARRAY_SIZE(drop_reasons_unusable),
--};
--
- static int __init ieee80211_init(void)
- {
- 	struct sk_buff *skb;
-@@ -1562,11 +1539,6 @@ static int __init ieee80211_init(void)
- 	if (ret)
- 		goto err_netdev;
- 
--	drop_reasons_register_subsys(SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR,
--				     &drop_reason_list_monitor);
--	drop_reasons_register_subsys(SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE,
--				     &drop_reason_list_unusable);
--
- 	return 0;
-  err_netdev:
- 	rc80211_minstrel_exit();
-@@ -1582,9 +1554,6 @@ static void __exit ieee80211_exit(void)
- 
- 	ieee80211_iface_exit();
- 
--	drop_reasons_unregister_subsys(SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR);
--	drop_reasons_unregister_subsys(SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE);
--
- 	rcu_barrier();
- }
- 
-diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index e9f73cb..d1a834d 100644
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -1828,7 +1828,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
- 				cfg80211_rx_unexpected_4addr_frame(
- 					rx->sdata->dev, sta->sta.addr,
- 					GFP_ATOMIC);
--			return RX_DROP_M_UNEXPECTED_4ADDR_FRAME;
-+			return RX_DROP_MONITOR;
- 		}
- 		/*
- 		 * Update counter and free packet here to avoid
-@@ -1963,7 +1963,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
- 				cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
- 							     skb->data,
- 							     skb->len);
--			return RX_DROP_M_BAD_BCN_KEYIDX;
-+			return RX_DROP_MONITOR; /* unexpected BIP keyidx */
- 		}
- 
- 		rx->key = ieee80211_rx_get_bigtk(rx, mmie_keyidx);
-@@ -1977,7 +1977,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
- 
- 		if (mmie_keyidx < NUM_DEFAULT_KEYS ||
- 		    mmie_keyidx >= NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS)
--			return RX_DROP_M_BAD_MGMT_KEYIDX; /* unexpected BIP keyidx */
-+			return RX_DROP_MONITOR; /* unexpected BIP keyidx */
- 		if (rx->link_sta) {
- 			if (ieee80211_is_group_privacy_action(skb) &&
- 			    test_sta_flag(rx->sta, WLAN_STA_MFP))
-@@ -3988,8 +3988,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
- }
- 
- static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
--					struct ieee80211_rate *rate,
--					ieee80211_rx_result reason)
-+					struct ieee80211_rate *rate)
- {
- 	struct ieee80211_sub_if_data *sdata;
- 	struct ieee80211_local *local = rx->local;
-@@ -4053,38 +4052,42 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
- 	}
- 
-  out_free_skb:
--	kfree_skb_reason(skb, (__force u32)reason);
-+	dev_kfree_skb(skb);
- }
- 
- static void ieee80211_rx_handlers_result(struct ieee80211_rx_data *rx,
- 					 ieee80211_rx_result res)
- {
--	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
--	struct ieee80211_supported_band *sband;
--	struct ieee80211_rate *rate = NULL;
--
--	if (res == RX_QUEUED) {
--		I802_DEBUG_INC(rx->sdata->local->rx_handlers_queued);
--		return;
--	}
--
--	if (res != RX_CONTINUE) {
-+	switch (res) {
-+	case RX_DROP_MONITOR:
- 		I802_DEBUG_INC(rx->sdata->local->rx_handlers_drop);
- 		if (rx->sta)
- 			rx->link_sta->rx_stats.dropped++;
--	}
-+		fallthrough;
-+	case RX_CONTINUE: {
-+		struct ieee80211_rate *rate = NULL;
-+		struct ieee80211_supported_band *sband;
-+		struct ieee80211_rx_status *status;
- 
--	if (u32_get_bits((__force u32)res, SKB_DROP_REASON_SUBSYS_MASK) ==
--			SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE) {
--		kfree_skb_reason(rx->skb, (__force u32)res);
--		return;
--	}
-+		status = IEEE80211_SKB_RXCB((rx->skb));
- 
--	sband = rx->local->hw.wiphy->bands[status->band];
--	if (status->encoding == RX_ENC_LEGACY)
--		rate = &sband->bitrates[status->rate_idx];
-+		sband = rx->local->hw.wiphy->bands[status->band];
-+		if (status->encoding == RX_ENC_LEGACY)
-+			rate = &sband->bitrates[status->rate_idx];
- 
--	ieee80211_rx_cooked_monitor(rx, rate, res);
-+		ieee80211_rx_cooked_monitor(rx, rate);
-+		break;
-+		}
-+	case RX_DROP_UNUSABLE:
-+		I802_DEBUG_INC(rx->sdata->local->rx_handlers_drop);
-+		if (rx->sta)
-+			rx->link_sta->rx_stats.dropped++;
-+		dev_kfree_skb(rx->skb);
-+		break;
-+	case RX_QUEUED:
-+		I802_DEBUG_INC(rx->sdata->local->rx_handlers_queued);
-+		break;
-+	}
- }
- 
- static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx,
-diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
-index 4133496..20f742b 100644
---- a/net/mac80211/wpa.c
-+++ b/net/mac80211/wpa.c
-@@ -550,7 +550,7 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx,
- 		if (res < 0 ||
- 		    (!res && !(status->flag & RX_FLAG_ALLOW_SAME_PN))) {
- 			key->u.ccmp.replays++;
--			return RX_DROP_U_REPLAY;
-+			return RX_DROP_UNUSABLE;
- 		}
- 
- 		if (!(status->flag & RX_FLAG_DECRYPTED)) {
-@@ -564,7 +564,7 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx,
- 				    skb->data + hdrlen + IEEE80211_CCMP_HDR_LEN,
- 				    data_len,
- 				    skb->data + skb->len - mic_len))
--				return RX_DROP_U_MIC_FAIL;
-+				return RX_DROP_UNUSABLE;
- 		}
- 
- 		memcpy(key->u.ccmp.rx_pn[queue], pn, IEEE80211_CCMP_PN_LEN);
-@@ -746,7 +746,7 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx)
- 		if (res < 0 ||
- 		    (!res && !(status->flag & RX_FLAG_ALLOW_SAME_PN))) {
- 			key->u.gcmp.replays++;
--			return RX_DROP_U_REPLAY;
-+			return RX_DROP_UNUSABLE;
- 		}
- 
- 		if (!(status->flag & RX_FLAG_DECRYPTED)) {
-@@ -761,7 +761,7 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx)
- 				    data_len,
- 				    skb->data + skb->len -
- 				    IEEE80211_GCMP_MIC_LEN))
--				return RX_DROP_U_MIC_FAIL;
-+				return RX_DROP_UNUSABLE;
- 		}
- 
- 		memcpy(key->u.gcmp.rx_pn[queue], pn, IEEE80211_GCMP_PN_LEN);
-@@ -930,13 +930,13 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)
- 		(skb->data + skb->len - sizeof(*mmie));
- 	if (mmie->element_id != WLAN_EID_MMIE ||
- 	    mmie->length != sizeof(*mmie) - 2)
--		return RX_DROP_U_BAD_MMIE; /* Invalid MMIE */
-+		return RX_DROP_UNUSABLE; /* Invalid MMIE */
- 
- 	bip_ipn_swap(ipn, mmie->sequence_number);
- 
- 	if (memcmp(ipn, key->u.aes_cmac.rx_pn, 6) <= 0) {
- 		key->u.aes_cmac.replays++;
--		return RX_DROP_U_REPLAY;
-+		return RX_DROP_UNUSABLE;
- 	}
- 
- 	if (!(status->flag & RX_FLAG_DECRYPTED)) {
-@@ -946,7 +946,7 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)
- 				   skb->data + 24, skb->len - 24, mic);
- 		if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) {
- 			key->u.aes_cmac.icverrors++;
--			return RX_DROP_U_MIC_FAIL;
-+			return RX_DROP_UNUSABLE;
- 		}
- 	}
- 
-@@ -986,7 +986,7 @@ ieee80211_crypto_aes_cmac_256_decrypt(struct ieee80211_rx_data *rx)
- 
- 	if (memcmp(ipn, key->u.aes_cmac.rx_pn, 6) <= 0) {
- 		key->u.aes_cmac.replays++;
--		return RX_DROP_U_REPLAY;
-+		return RX_DROP_UNUSABLE;
- 	}
- 
- 	if (!(status->flag & RX_FLAG_DECRYPTED)) {
-@@ -996,7 +996,7 @@ ieee80211_crypto_aes_cmac_256_decrypt(struct ieee80211_rx_data *rx)
- 				       skb->data + 24, skb->len - 24, mic);
- 		if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) {
- 			key->u.aes_cmac.icverrors++;
--			return RX_DROP_U_MIC_FAIL;
-+			return RX_DROP_UNUSABLE;
- 		}
- 	}
- 
-@@ -1079,13 +1079,13 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx)
- 		(skb->data + skb->len - sizeof(*mmie));
- 	if (mmie->element_id != WLAN_EID_MMIE ||
- 	    mmie->length != sizeof(*mmie) - 2)
--		return RX_DROP_U_BAD_MMIE; /* Invalid MMIE */
-+		return RX_DROP_UNUSABLE; /* Invalid MMIE */
- 
- 	bip_ipn_swap(ipn, mmie->sequence_number);
- 
- 	if (memcmp(ipn, key->u.aes_gmac.rx_pn, 6) <= 0) {
- 		key->u.aes_gmac.replays++;
--		return RX_DROP_U_REPLAY;
-+		return RX_DROP_UNUSABLE;
- 	}
- 
- 	if (!(status->flag & RX_FLAG_DECRYPTED)) {
-@@ -1104,7 +1104,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx)
- 		    crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) {
- 			key->u.aes_gmac.icverrors++;
- 			kfree(mic);
--			return RX_DROP_U_MIC_FAIL;
-+			return RX_DROP_UNUSABLE;
- 		}
- 		kfree(mic);
- 	}
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0001-backports-add-SKB_DROP_REASON-and-kfree_skb_reason-b.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0001-backports-add-SKB_DROP_REASON-and-kfree_skb_reason-b.patch
new file mode 100644
index 0000000..46f1c4d
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0001-backports-add-SKB_DROP_REASON-and-kfree_skb_reason-b.patch
@@ -0,0 +1,48 @@
+From 0d65414c2ec0772539b728d075aab23b026b553b Mon Sep 17 00:00:00 2001
+From: Evelyn Tsai <evelyn.tsai@mediatek.com>
+Date: Fri, 23 Feb 2024 09:10:09 +0800
+Subject: [PATCH 1/3] backports: add SKB_DROP_REASON and kfree_skb_reason
+ backport on Kernel 5.4
+
+---
+ backport-include/linux/skbuff.h        | 8 ++++++++
+ backport-include/net/dropreason-core.h | 6 ++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/backport-include/linux/skbuff.h b/backport-include/linux/skbuff.h
+index c1592c2..9e23251 100644
+--- a/backport-include/linux/skbuff.h
++++ b/backport-include/linux/skbuff.h
+@@ -144,4 +144,12 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
+ #define napi_build_skb build_skb
+ #endif
+ 
++#if LINUX_VERSION_IS_LESS(6,0,0)
++#define kfree_skb_reason LINUX_BACKPORT(kfree_skb_reason)
++static inline void kfree_skb_reason(struct sk_buff *skb, int reason)
++{
++    return kfree_skb(skb);
++}
++#endif
++
+ #endif /* __BACKPORT_SKBUFF_H */
+diff --git a/backport-include/net/dropreason-core.h b/backport-include/net/dropreason-core.h
+index ab8532e..31c60b9 100644
+--- a/backport-include/net/dropreason-core.h
++++ b/backport-include/net/dropreason-core.h
+@@ -13,6 +13,12 @@
+ 
+ #include <linux/version.h>
+ 
++/* backport for 5.4 */
++#if LINUX_VERSION_IS_LESS(5,5,0)
++#define SKB_DROP_REASON_NOT_SPECIFIED 2
++#define SKB_DROP_REASON_MAX 69
++#endif
++
+ #if LINUX_VERSION_IS_LESS(5,18,0)
+ #define SKB_NOT_DROPPED_YET SKB_DROP_REASON_MAX
+ #endif
+-- 
+2.18.0
+
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
index 77071e5..f6699a6 100644
--- 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
@@ -1,7 +1,7 @@
-From aa09e81d195b255f89ab46f2b4455ce4de29fee1 Mon Sep 17 00:00:00 2001
+From ad78259cef325771ddf30132bd0c80e4a11b4841 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 02/40] backports: update kernel version check for
+Subject: [PATCH 2/3] backports: update kernel version check for
  eth_hw_addr_set()
 
 Kernel v5.4.260 has added this API, so update kernel version check in
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0003-backports-Revert-cfg80211-allow-grace-period-for-DFS.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0003-backports-Revert-cfg80211-allow-grace-period-for-DFS.patch
index 85ed645..ad5ef2e 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0003-backports-Revert-cfg80211-allow-grace-period-for-DFS.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/bp-0003-backports-Revert-cfg80211-allow-grace-period-for-DFS.patch
@@ -1,7 +1,7 @@
-From e8e5a4977e817047060b36827e835bc26194b5c1 Mon Sep 17 00:00:00 2001
+From 23681abf649eaf1eda27dcfd3d17b80e1edeb951 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 19 Oct 2023 09:59:24 +0800
-Subject: [PATCH 03/40] backports: Revert cfg80211: allow grace period for DFS
+Subject: [PATCH 3/3] backports: Revert cfg80211: allow grace period for DFS
  available after beacon shutdown
 
 revert 320-cfg80211-allow-grace-period-for-DFS-available-after-.patch
@@ -25,7 +25,7 @@
  5 files changed, 6 insertions(+), 57 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 45068d6..7676475 100644
+index a77e8a5..0a825af 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
 @@ -175,8 +175,6 @@ enum ieee80211_channel_flags {
@@ -70,7 +70,7 @@
  	}
  
 diff --git a/net/wireless/chan.c b/net/wireless/chan.c
-index 3750cb9..37ed7c6 100644
+index f8348bc..510079f 100644
 --- a/net/wireless/chan.c
 +++ b/net/wireless/chan.c
 @@ -461,8 +461,6 @@ static void cfg80211_set_chans_dfs_state(struct wiphy *wiphy, u32 center_freq,
@@ -82,7 +82,7 @@
  	}
  }
  
-@@ -875,49 +873,6 @@ static bool cfg80211_get_chans_dfs_available(struct wiphy *wiphy,
+@@ -876,49 +874,6 @@ static bool cfg80211_get_chans_dfs_available(struct wiphy *wiphy,
  	return true;
  }
  
@@ -133,23 +133,23 @@
  				const struct cfg80211_chan_def *chandef)
  {
 diff --git a/net/wireless/core.h b/net/wireless/core.h
-index a8da284..70fc2e6 100644
+index 9aef18e..46aa2a0 100644
 --- a/net/wireless/core.h
 +++ b/net/wireless/core.h
-@@ -487,8 +487,6 @@ void cfg80211_set_dfs_state(struct wiphy *wiphy,
+@@ -481,8 +481,6 @@ void cfg80211_set_dfs_state(struct wiphy *wiphy,
  			    enum nl80211_dfs_state dfs_state);
  
  void cfg80211_dfs_channels_update_work(struct work_struct *work);
 -void cfg80211_update_last_available(struct wiphy *wiphy,
 -				    const struct cfg80211_chan_def *chandef);
  
- unsigned int
- cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy,
+ void cfg80211_sched_dfs_chan_update(struct cfg80211_registered_device *rdev);
+ 
 diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
-index f6e2c2d..8b87bc9 100644
+index 0002464..3cdfbd2 100644
 --- a/net/wireless/mlme.c
 +++ b/net/wireless/mlme.c
-@@ -915,8 +915,6 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
+@@ -930,8 +930,6 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
  			if (c->dfs_state == NL80211_DFS_UNAVAILABLE) {
  				time_dfs_update = IEEE80211_DFS_MIN_NOP_TIME_MS;
  				radar_event = NL80211_RADAR_NOP_FINISHED;
@@ -158,7 +158,7 @@
  			} else {
  				if (regulatory_pre_cac_allowed(wiphy) ||
  				    cfg80211_any_wiphy_oper_chan(wiphy, c))
-@@ -924,10 +922,11 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
+@@ -939,10 +937,11 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
  
  				time_dfs_update = REG_PRE_CAC_EXPIRY_GRACE_MS;
  				radar_event = NL80211_RADAR_PRE_CAC_EXPIRED;
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0001-mtk-mac80211-do-not-setup-twt-when-twt-responder-is-.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0001-mtk-mac80211-do-not-setup-twt-when-twt-responder-is-.patch
index 31d3017..a054a6b 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0001-mtk-mac80211-do-not-setup-twt-when-twt-responder-is-.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0001-mtk-mac80211-do-not-setup-twt-when-twt-responder-is-.patch
@@ -1,4 +1,4 @@
-From f85b69219664d26546f95885c7466d4fa08fb08c Mon Sep 17 00:00:00 2001
+From 45ed016428208e89e136b5af7e50bec57d63fdf6 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Tue, 18 Jan 2022 20:29:44 +0800
 Subject: [PATCH 01/37] mtk: mac80211: do not setup twt when twt responder is
@@ -9,10 +9,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index d1a834d..15bb653 100644
+index 961ef53..c23b74a 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -3423,6 +3423,9 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx)
+@@ -3422,6 +3422,9 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx)
  	if (sdata->vif.type != NL80211_IFTYPE_AP)
  		return false;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0002-mtk-cfg80211-extend-CAC-time-for-weather-radar-chann.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0002-mtk-cfg80211-extend-CAC-time-for-weather-radar-chann.patch
index a59fc0b..c4f3a37 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0002-mtk-cfg80211-extend-CAC-time-for-weather-radar-chann.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0002-mtk-cfg80211-extend-CAC-time-for-weather-radar-chann.patch
@@ -1,4 +1,4 @@
-From 22f7b334932cbab63060ba390e917a57cc7779f8 Mon Sep 17 00:00:00 2001
+From 3481facddee5af51f45c35d9d9dcd2586acbab38 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Tue, 29 Mar 2022 16:06:30 +0800
 Subject: [PATCH 02/37] mtk: cfg80211: extend CAC time for weather radar
@@ -13,7 +13,7 @@
  3 files changed, 11 insertions(+)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 7676475..d9a7828 100644
+index 0a825af..25f15d0 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
 @@ -149,6 +149,7 @@ enum ieee80211_channel_flags {
@@ -25,10 +25,10 @@
  
  /**
 diff --git a/net/wireless/chan.c b/net/wireless/chan.c
-index 37ed7c6..e250830 100644
+index 510079f..30a2f00 100644
 --- a/net/wireless/chan.c
 +++ b/net/wireless/chan.c
-@@ -931,6 +931,13 @@ static unsigned int cfg80211_get_chans_dfs_cac_time(struct wiphy *wiphy,
+@@ -932,6 +932,13 @@ static unsigned int cfg80211_get_chans_dfs_cac_time(struct wiphy *wiphy,
  		if (!(c->flags & IEEE80211_CHAN_RADAR))
  			continue;
  
@@ -43,10 +43,10 @@
  			dfs_cac_ms = c->dfs_cac_ms;
  	}
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 8a6e2c0..12943c7 100644
+index 193e7d6..dd76503 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -9992,6 +9992,9 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
+@@ -10011,6 +10011,9 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
  	if (WARN_ON(!cac_time_ms))
  		cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0003-mtk-mac80211-it-s-invalid-case-when-frag_threshold-i.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0003-mtk-mac80211-it-s-invalid-case-when-frag_threshold-i.patch
index e0d44a7..381e843 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0003-mtk-mac80211-it-s-invalid-case-when-frag_threshold-i.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0003-mtk-mac80211-it-s-invalid-case-when-frag_threshold-i.patch
@@ -1,4 +1,4 @@
-From c81bb69d6904835e4e5601c150dedc9743d2e58b Mon Sep 17 00:00:00 2001
+From 5a633b424cf49f50e211aa89712150028532407f Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
 Date: Fri, 1 Apr 2022 09:15:21 +0800
 Subject: [PATCH 03/37] mtk: mac80211: it's invalid case when frag_threshold is
@@ -10,10 +10,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 12943c7..4a12891 100644
+index dd76503..508edc1 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -3650,6 +3650,9 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
+@@ -3651,6 +3651,9 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
  			goto out;
  		}
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0004-mtk-mac80211-add-support-for-runtime-set-inband-disc.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0004-mtk-mac80211-add-support-for-runtime-set-inband-disc.patch
index 9b8b212..5644758 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0004-mtk-mac80211-add-support-for-runtime-set-inband-disc.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0004-mtk-mac80211-add-support-for-runtime-set-inband-disc.patch
@@ -1,4 +1,4 @@
-From b3f657e7a0ce98c986b3b803a963820d98d82c7f Mon Sep 17 00:00:00 2001
+From 1cc0213bb5d4152c41cd6dd00eef4a613a5a0a99 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Wed, 19 Oct 2022 13:45:42 +0800
 Subject: [PATCH 04/37] mtk: mac80211: add support for runtime set inband
@@ -14,10 +14,10 @@
  5 files changed, 60 insertions(+), 6 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index d9a7828..204d1a4 100644
+index 25f15d0..5b2e242 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -1355,6 +1355,7 @@ struct cfg80211_fils_discovery {
+@@ -1379,6 +1379,7 @@ struct cfg80211_fils_discovery {
  	u32 max_interval;
  	size_t tmpl_len;
  	const u8 *tmpl;
@@ -26,7 +26,7 @@
  
  /**
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 2e5b5c6..96e4ec9 100644
+index 231abd1..4eac89a 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
 @@ -526,6 +526,7 @@ struct ieee80211_ftm_responder_params {
@@ -50,10 +50,10 @@
  	/* keep last */
  	__NL80211_FILS_DISCOVERY_ATTR_LAST,
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index f4649d1..baff0e6 100644
+index 6b62644..3c07357 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -990,6 +990,7 @@ static int ieee80211_set_fils_discovery(struct ieee80211_sub_if_data *sdata,
+@@ -993,6 +993,7 @@ static int ieee80211_set_fils_discovery(struct ieee80211_sub_if_data *sdata,
  	fd = &link_conf->fils_discovery;
  	fd->min_interval = params->min_interval;
  	fd->max_interval = params->max_interval;
@@ -61,7 +61,7 @@
  
  	old = sdata_dereference(link->u.ap.fils_discovery, sdata);
  	new = kzalloc(sizeof(*new) + params->tmpl_len, GFP_KERNEL);
-@@ -1513,9 +1514,11 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
+@@ -1516,9 +1517,11 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
  	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  	struct ieee80211_link_data *link;
  	struct beacon_data *old;
@@ -74,7 +74,7 @@
  
  	sdata_assert_lock(sdata);
  
-@@ -1546,6 +1549,31 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
+@@ -1549,6 +1552,31 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
  		changed |= BSS_CHANGED_HE_BSS_COLOR;
  	}
  
@@ -107,10 +107,10 @@
  	return 0;
  }
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 4a12891..680511a 100644
+index 508edc1..abb9585 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -423,6 +423,7 @@ nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = {
+@@ -424,6 +424,7 @@ nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = {
  	[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000),
  	[NL80211_FILS_DISCOVERY_ATTR_TMPL] =
  			NLA_POLICY_BINARY_RANGE(NL80211_FILS_DISCOVERY_TMPL_MIN_LEN, IEEE80211_MAX_DATA_LEN),
@@ -127,7 +127,7 @@
  
  	return 0;
  }
-@@ -6224,7 +6227,8 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
+@@ -6243,7 +6246,8 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
  	unsigned int link_id = nl80211_link_id(info->attrs);
  	struct net_device *dev = info->user_ptr[1];
  	struct wireless_dev *wdev = dev->ieee80211_ptr;
@@ -137,7 +137,7 @@
  	int err;
  
  	if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
-@@ -6237,17 +6241,36 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
+@@ -6256,17 +6260,36 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
  	if (!wdev->links[link_id].ap.beacon_interval)
  		return -EINVAL;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0005-mtk-cfg80211-implement-DFS-status-show-cac-and-nop-s.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0005-mtk-cfg80211-implement-DFS-status-show-cac-and-nop-s.patch
index 5a839f2..79b5cc4 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0005-mtk-cfg80211-implement-DFS-status-show-cac-and-nop-s.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0005-mtk-cfg80211-implement-DFS-status-show-cac-and-nop-s.patch
@@ -1,4 +1,4 @@
-From 1217977018874b810cc295ea631684876b108a4b Mon Sep 17 00:00:00 2001
+From 3ef5311c371391368404bbe466ff1904155dac8f Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 22 Sep 2022 14:27:41 +0800
 Subject: [PATCH 05/37] mtk: cfg80211: implement DFS status show, cac and nop
@@ -16,10 +16,10 @@
  7 files changed, 360 insertions(+), 7 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 204d1a4..0c9bb5c 100644
+index 5b2e242..9567c1b 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -4817,6 +4817,7 @@ struct cfg80211_ops {
+@@ -4841,6 +4841,7 @@ struct cfg80211_ops {
  				    struct link_station_del_parameters *params);
  	int	(*set_hw_timestamp)(struct wiphy *wiphy, struct net_device *dev,
  				    struct cfg80211_set_hw_timestamp *hwts);
@@ -28,10 +28,10 @@
  
  /*
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index baff0e6..0e67d89 100644
+index 3c07357..af284d2 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -5048,6 +5048,25 @@ static int ieee80211_set_hw_timestamp(struct wiphy *wiphy,
+@@ -5057,6 +5057,25 @@ static int ieee80211_set_hw_timestamp(struct wiphy *wiphy,
  	return local->ops->set_hw_timestamp(&local->hw, &sdata->vif, hwts);
  }
  
@@ -57,14 +57,14 @@
  const struct cfg80211_ops mac80211_config_ops = {
  	.add_virtual_intf = ieee80211_add_iface,
  	.del_virtual_intf = ieee80211_del_iface,
-@@ -5160,4 +5179,5 @@ const struct cfg80211_ops mac80211_config_ops = {
+@@ -5169,4 +5188,5 @@ const struct cfg80211_ops mac80211_config_ops = {
  	.mod_link_station = ieee80211_mod_link_station,
  	.del_link_station = ieee80211_del_link_station,
  	.set_hw_timestamp = ieee80211_set_hw_timestamp,
 +	.skip_cac = ieee80211_skip_cac,
  };
 diff --git a/net/wireless/core.h b/net/wireless/core.h
-index 70fc2e6..ea1b6ff 100644
+index 46aa2a0..8e9a2c9 100644
 --- a/net/wireless/core.h
 +++ b/net/wireless/core.h
 @@ -86,6 +86,9 @@ struct cfg80211_registered_device {
@@ -410,10 +410,10 @@
 +	DEBUGFS_ADD(dfs_available_reset, 0600);
  }
 diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
-index 8b87bc9..e3cbfc0 100644
+index 3cdfbd2..70b4013 100644
 --- a/net/wireless/mlme.c
 +++ b/net/wireless/mlme.c
-@@ -1054,13 +1054,16 @@ __cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
+@@ -1069,13 +1069,16 @@ __cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
  		queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk);
  		cfg80211_sched_dfs_chan_update(rdev);
  		wdev = rdev->background_radar_wdev;
@@ -430,7 +430,7 @@
  		break;
  	default:
  		return;
-@@ -1080,6 +1083,7 @@ cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
+@@ -1095,6 +1098,7 @@ cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
  					chandef, event);
  	wiphy_unlock(&rdev->wiphy);
  }
@@ -438,7 +438,7 @@
  
  void cfg80211_background_cac_done_wk(struct work_struct *work)
  {
-@@ -1141,8 +1145,10 @@ cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rde
+@@ -1156,8 +1160,10 @@ cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rde
  	if (!cac_time_ms)
  		cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0006-mtk-mac80211-Set-TWT-Information-Frame-Disabled-bit-.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0006-mtk-mac80211-Set-TWT-Information-Frame-Disabled-bit-.patch
index bfc573f..05fc4c3 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0006-mtk-mac80211-Set-TWT-Information-Frame-Disabled-bit-.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0006-mtk-mac80211-Set-TWT-Information-Frame-Disabled-bit-.patch
@@ -1,4 +1,4 @@
-From 4a5ee80eab091e6481f2ebd05cb736eaba82c936 Mon Sep 17 00:00:00 2001
+From a00c69d75f0ed444651391781f46351ea1417779 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Tue, 4 Oct 2022 10:47:05 +0800
 Subject: [PATCH 06/37] mtk: mac80211: Set TWT Information Frame Disabled bit
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0007-mtk-mac80211-check-the-control-channel-before-downgr.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0007-mtk-mac80211-check-the-control-channel-before-downgr.patch
index 458d245..ce63f41 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0007-mtk-mac80211-check-the-control-channel-before-downgr.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0007-mtk-mac80211-check-the-control-channel-before-downgr.patch
@@ -1,4 +1,4 @@
-From 5a69533bf3617ac9fad84e0759c06868552bc35b Mon Sep 17 00:00:00 2001
+From a2cb7d582c92644990fb3833b70ea3f18a539a02 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 16 Dec 2022 03:31:06 +0800
 Subject: [PATCH 07/37] mtk: mac80211: check the control channel before
@@ -9,10 +9,10 @@
  1 file changed, 23 insertions(+)
 
 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
-index f93eb38..86f762d 100644
+index 73f8df0..24d34d4 100644
 --- a/net/mac80211/mlme.c
 +++ b/net/mac80211/mlme.c
-@@ -4791,6 +4791,26 @@ ieee80211_verify_sta_eht_mcs_support(struct ieee80211_sub_if_data *sdata,
+@@ -4814,6 +4814,26 @@ ieee80211_verify_sta_eht_mcs_support(struct ieee80211_sub_if_data *sdata,
  	return true;
  }
  
@@ -39,7 +39,7 @@
  static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
  				  struct ieee80211_link_data *link,
  				  struct cfg80211_bss *cbss,
-@@ -5033,6 +5053,9 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
+@@ -5056,6 +5076,9 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
  	    chandef.width == NL80211_CHAN_WIDTH_10)
  		goto out;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0008-mtk-mac80211-fix-tx-amsdu-aggregation.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0008-mtk-mac80211-fix-tx-amsdu-aggregation.patch
index b23d498..87b4945 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0008-mtk-mac80211-fix-tx-amsdu-aggregation.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0008-mtk-mac80211-fix-tx-amsdu-aggregation.patch
@@ -1,4 +1,4 @@
-From a547f34675e8b65dabdd8ef438633cd4e467b550 Mon Sep 17 00:00:00 2001
+From 500f2f8a8f6690f496f35da6b75ab559298f4403 Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Wed, 14 Dec 2022 00:26:50 -0800
 Subject: [PATCH 08/37] mtk: mac80211: fix tx amsdu aggregation
@@ -9,10 +9,10 @@
  2 files changed, 11 insertions(+), 2 deletions(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 96e4ec9..eb229aa 100644
+index 4eac89a..dcff7af 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -2921,6 +2921,13 @@ static inline void _ieee80211_hw_set(struct ieee80211_hw *hw,
+@@ -2924,6 +2924,13 @@ static inline void _ieee80211_hw_set(struct ieee80211_hw *hw,
  }
  #define ieee80211_hw_set(hw, flg)	_ieee80211_hw_set(hw, IEEE80211_HW_##flg)
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0009-mtk-mac80211-add-fill-receive-path-ops-to-get-wed-id.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0009-mtk-mac80211-add-fill-receive-path-ops-to-get-wed-id.patch
index fdec67c..7e8993c 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0009-mtk-mac80211-add-fill-receive-path-ops-to-get-wed-id.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0009-mtk-mac80211-add-fill-receive-path-ops-to-get-wed-id.patch
@@ -1,4 +1,4 @@
-From 02b742ba338449626cd3435bddb5cfe7219d0ce8 Mon Sep 17 00:00:00 2001
+From 02ac6da3f76e0da03d30d5b7b59f24190495accd Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Wed, 18 May 2022 15:10:22 +0800
 Subject: [PATCH 09/37] mtk: mac80211: add fill receive path ops to get wed idx
@@ -12,10 +12,10 @@
  4 files changed, 50 insertions(+)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index eb229aa..2c282e6 100644
+index dcff7af..65ba482 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -4255,6 +4255,8 @@ struct ieee80211_prep_tx_info {
+@@ -4258,6 +4258,8 @@ struct ieee80211_prep_tx_info {
   *	disable background CAC/radar detection.
   * @net_fill_forward_path: Called from .ndo_fill_forward_path in order to
   *	resolve a path for hardware flow offloading
@@ -24,7 +24,7 @@
   * @change_vif_links: Change the valid links on an interface, note that while
   *	removing the old link information is still valid (link_conf pointer),
   *	but may immediately disappear after the function returns. The old or
-@@ -4631,6 +4633,9 @@ struct ieee80211_ops {
+@@ -4634,6 +4636,9 @@ struct ieee80211_ops {
  				     struct ieee80211_sta *sta,
  				     struct net_device_path_ctx *ctx,
  				     struct net_device_path *path);
@@ -35,10 +35,10 @@
  				struct ieee80211_vif *vif,
  				u16 old_links, u16 new_links,
 diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
-index 650d8d1..d187206 100644
+index 7d8cec9..576f893 100644
 --- a/net/mac80211/driver-ops.h
 +++ b/net/mac80211/driver-ops.h
-@@ -1519,6 +1519,19 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
+@@ -1524,6 +1524,19 @@ static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
  	return ret;
  }
  
@@ -59,7 +59,7 @@
  				   struct ieee80211_sub_if_data *sdata,
  				   struct net_device *dev,
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index be586bc..b8dfd32 100644
+index 6e3bfb4..4de8d3d 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
 @@ -930,6 +930,28 @@ out:
@@ -100,7 +100,7 @@
  };
  
 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 8a6917c..3650dcd 100644
+index 172173b..fd82488 100644
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
 @@ -868,6 +868,15 @@ struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif)
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0010-mtk-mac80211-fix-build-error-on-Linux-Kernel-5.4.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0010-mtk-mac80211-fix-build-error-on-Linux-Kernel-5.4.patch
index 750d038..f37dcf9 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0010-mtk-mac80211-fix-build-error-on-Linux-Kernel-5.4.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0010-mtk-mac80211-fix-build-error-on-Linux-Kernel-5.4.patch
@@ -1,4 +1,4 @@
-From f647704869b94f0fba01631043b733edc48c6e74 Mon Sep 17 00:00:00 2001
+From d878da2558d32ce7ec97dad083a38392e653e54e Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Tue, 13 Dec 2022 09:04:49 +0800
 Subject: [PATCH 10/37] mtk: mac80211: fix build error on Linux Kernel 5.4
@@ -11,7 +11,7 @@
  4 files changed, 12 insertions(+), 14 deletions(-)
 
 diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
-index 4b99809..7aaae32 100644
+index 2fa1862..e53b73e 100644
 --- a/include/linux/ieee80211.h
 +++ b/include/linux/ieee80211.h
 @@ -310,11 +310,9 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
@@ -44,7 +44,7 @@
  #include "rate.h"
  #include "sta_info.h"
 diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
-index 20f742b..93ec2f3 100644
+index 2d8e38b..0bb3907 100644
 --- a/net/mac80211/wpa.c
 +++ b/net/mac80211/wpa.c
 @@ -351,7 +351,7 @@ static u8 ccmp_gcmp_aad(struct sk_buff *skb, u8 *aad)
@@ -66,10 +66,10 @@
  
  
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 680511a..15e3eeb 100644
+index abb9585..c652a01 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -461,11 +461,6 @@ nl80211_sta_wme_policy[NL80211_STA_WME_MAX + 1] = {
+@@ -462,11 +462,6 @@ nl80211_sta_wme_policy[NL80211_STA_WME_MAX + 1] = {
  	[NL80211_STA_WME_MAX_SP] = { .type = NLA_U8 },
  };
  
@@ -81,7 +81,7 @@
  static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
  	[0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
  	[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
-@@ -805,8 +800,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
+@@ -806,8 +801,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
  	[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
  	[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
  	[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
@@ -91,7 +91,7 @@
  
  	[NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS] = { .type = NLA_U16 },
  	[NL80211_ATTR_HW_TIMESTAMP_ENABLED] = { .type = NLA_FLAG },
-@@ -16687,9 +16681,11 @@ static const struct genl_ops nl80211_ops[] = {
+@@ -16729,9 +16723,11 @@ static const struct genl_ops nl80211_ops[] = {
  		/* can be retrieved by unprivileged users */
  		.internal_flags = IFLAGS(NL80211_FLAG_NEED_WIPHY),
  	},
@@ -103,7 +103,7 @@
  	{
  		.cmd = NL80211_CMD_SET_WIPHY,
  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
-@@ -17534,8 +17530,10 @@ static struct genl_family nl80211_fam __genl_ro_after_init = {
+@@ -17576,8 +17572,10 @@ static struct genl_family nl80211_fam __genl_ro_after_init = {
  	.module = THIS_MODULE,
  	.ops = nl80211_ops,
  	.n_ops = ARRAY_SIZE(nl80211_ops),
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0011-mtk-mac80211-track-obss-color-bitmap.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0011-mtk-mac80211-track-obss-color-bitmap.patch
index 0e77267..89bb49e 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0011-mtk-mac80211-track-obss-color-bitmap.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0011-mtk-mac80211-track-obss-color-bitmap.patch
@@ -1,4 +1,4 @@
-From 5b3511b6e6820f608082df886bf2bdb9cc0c429b Mon Sep 17 00:00:00 2001
+From c4919b0d1dd5c92c081852be3ef37511f0406475 Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Mon, 13 Mar 2023 05:23:37 +0800
 Subject: [PATCH 11/37] mtk: mac80211: track obss color bitmap
@@ -15,7 +15,7 @@
  3 files changed, 27 insertions(+), 1 deletion(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 2c282e6..b90e828 100644
+index 65ba482..1a13d47 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
 @@ -744,6 +744,7 @@ struct ieee80211_bss_conf {
@@ -27,10 +27,10 @@
  	u32 unsol_bcast_probe_resp_interval;
  	struct cfg80211_bitrate_mask beacon_tx_rate;
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 15bb653..65ff365 100644
+index c23b74a..2df16de 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -3356,9 +3356,13 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
+@@ -3355,9 +3355,13 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
  
  		color = le32_get_bits(he_oper->he_oper_params,
  				      IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0012-mtk-mac80211-ageout-color-bitmap.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0012-mtk-mac80211-ageout-color-bitmap.patch
index d55f44f..4d838c8 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0012-mtk-mac80211-ageout-color-bitmap.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0012-mtk-mac80211-ageout-color-bitmap.patch
@@ -1,4 +1,4 @@
-From 5137077a48ee6eff2910863341d137b4448a6382 Mon Sep 17 00:00:00 2001
+From 999bc7e5454349e1d43e7eaedccbbf291446a0fd Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Mon, 13 Mar 2023 05:36:59 +0800
 Subject: [PATCH 12/37] mtk: mac80211: ageout color bitmap
@@ -15,7 +15,7 @@
  6 files changed, 44 insertions(+)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index b90e828..6ff6d3a 100644
+index 1a13d47..361fe92 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
 @@ -745,6 +745,7 @@ struct ieee80211_bss_conf {
@@ -27,10 +27,10 @@
  	u32 unsol_bcast_probe_resp_interval;
  	struct cfg80211_bitrate_mask beacon_tx_rate;
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index 0e67d89..22bff46 100644
+index af284d2..de3d181 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -4880,6 +4880,36 @@ out:
+@@ -4889,6 +4889,36 @@ out:
  	return err;
  }
  
@@ -68,10 +68,10 @@
  ieee80211_set_radar_background(struct wiphy *wiphy,
  			       struct cfg80211_chan_def *chandef)
 diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index be3fa32..35452b0 100644
+index aecc401..6b0b149 100644
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -998,6 +998,7 @@ struct ieee80211_link_data {
+@@ -992,6 +992,7 @@ struct ieee80211_link_data {
  
  	struct work_struct color_change_finalize_work;
  	struct delayed_work color_collision_detect_work;
@@ -79,7 +79,7 @@
  	u64 color_bitmap;
  
  	/* context reservation -- protected with chanctx_mtx */
-@@ -1995,9 +1996,13 @@ void ieee80211_csa_finalize_work(struct work_struct *work);
+@@ -1991,9 +1992,13 @@ void ieee80211_csa_finalize_work(struct work_struct *work);
  int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
  			     struct cfg80211_csa_settings *params);
  
@@ -94,7 +94,7 @@
  /* interface handling */
  #define MAC80211_SUPPORTED_FEATURES_TX	(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index b8dfd32..e5b5e74 100644
+index 4de8d3d..b3de593 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
 @@ -541,6 +541,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
@@ -117,7 +117,7 @@
   err_del_interface:
  	drv_remove_interface(local, sdata);
 diff --git a/net/mac80211/link.c b/net/mac80211/link.c
-index 6148208..2f64b69 100644
+index 16cbaea..116100a 100644
 --- a/net/mac80211/link.c
 +++ b/net/mac80211/link.c
 @@ -47,6 +47,8 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata,
@@ -130,10 +130,10 @@
  	if (!deflink) {
  		switch (sdata->vif.type) {
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 65ff365..a3b4cac 100644
+index 2df16de..fead07e 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -3358,6 +3358,7 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
+@@ -3357,6 +3357,7 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
  				      IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
  
  		bss_conf->used_color_bitmap |= BIT_ULL(color);
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0013-mtk-mac80211-update-max_bssid_indicator-based-on-rea.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0013-mtk-mac80211-update-max_bssid_indicator-based-on-rea.patch
index 5d0beff..3f0264a 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0013-mtk-mac80211-update-max_bssid_indicator-based-on-rea.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0013-mtk-mac80211-update-max_bssid_indicator-based-on-rea.patch
@@ -1,4 +1,4 @@
-From 5deaec7265ca0cf5f25168996dd1a779b747f9c7 Mon Sep 17 00:00:00 2001
+From 27ea38045f6ef4a8296d8e019114aa1508e3ad9f Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 14 Apr 2023 05:05:17 +0800
 Subject: [PATCH 13/37] mtk: mac80211: update max_bssid_indicator based on real
@@ -9,10 +9,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index 22bff46..916332c 100644
+index de3d181..9b9be1a 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -1183,9 +1183,11 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
+@@ -1186,9 +1186,11 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
  	/* copy in optional mbssid_ies */
  	if (mbssid) {
  		u8 *pos = new->tail + new->tail_len;
@@ -24,7 +24,7 @@
  		pos += ieee80211_copy_mbssid_beacon(pos, new->mbssid_ies,
  						    mbssid);
  		if (rnr) {
-@@ -1194,8 +1196,7 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
+@@ -1197,8 +1199,7 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
  			ieee80211_copy_rnr_beacon(pos, new->rnr_ies, rnr);
  		}
  		/* update bssid_indicator */
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0014-mtk-mac80211-support-configurable-addba-resp-time.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0014-mtk-mac80211-support-configurable-addba-resp-time.patch
index ed85667..3b04947 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0014-mtk-mac80211-support-configurable-addba-resp-time.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0014-mtk-mac80211-support-configurable-addba-resp-time.patch
@@ -1,4 +1,4 @@
-From 579cfe869588f2d21ed98428b976242c6b7e63a1 Mon Sep 17 00:00:00 2001
+From 9b75b1851bdef31b88ebdce320c65e41cc12b7aa Mon Sep 17 00:00:00 2001
 From: Lian Chen <lian.chen@mediatek.com>
 Date: Wed, 7 Jun 2023 15:30:34 +0800
 Subject: [PATCH 14/37] mtk: mac80211: support configurable addba resp time.
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mtk-mac80211-add-sta-assisted-DFS-state-update-mecha.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mtk-mac80211-add-sta-assisted-DFS-state-update-mecha.patch
index 7067429..6fc06d2 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mtk-mac80211-add-sta-assisted-DFS-state-update-mecha.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0015-mtk-mac80211-add-sta-assisted-DFS-state-update-mecha.patch
@@ -1,4 +1,4 @@
-From f4e731440b86297124dd8ef41eb8d78820cf2200 Mon Sep 17 00:00:00 2001
+From c30a607cc3e06ced08c3b93f13706fb158a4d137 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Feb 2023 14:25:24 +0800
 Subject: [PATCH 15/37] mtk: mac80211: add sta-assisted DFS state update
@@ -13,10 +13,10 @@
  4 files changed, 92 insertions(+)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 0c9bb5c..085ad51 100644
+index 9567c1b..0b5a4e6 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -8479,6 +8479,20 @@ void cfg80211_cac_event(struct net_device *netdev,
+@@ -8526,6 +8526,20 @@ void cfg80211_cac_event(struct net_device *netdev,
  			const struct cfg80211_chan_def *chandef,
  			enum nl80211_radar_event event, gfp_t gfp);
  
@@ -62,7 +62,7 @@
  
  /**
 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
-index 86f762d..df39a8b 100644
+index 24d34d4..6077e89 100644
 --- a/net/mac80211/mlme.c
 +++ b/net/mac80211/mlme.c
 @@ -1981,6 +1981,11 @@ ieee80211_sta_process_chanswitch(struct ieee80211_link_data *link,
@@ -88,7 +88,7 @@
  }
  
  static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata)
-@@ -5445,6 +5454,9 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
+@@ -5469,6 +5478,9 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
  		event.u.mlme.status = MLME_SUCCESS;
  		drv_event_callback(sdata->local, sdata, &event);
  		sdata_info(sdata, "associated\n");
@@ -99,7 +99,7 @@
  		info.success = 1;
  	}
 diff --git a/net/wireless/chan.c b/net/wireless/chan.c
-index e250830..a19cb61 100644
+index 30a2f00..41644e2 100644
 --- a/net/wireless/chan.c
 +++ b/net/wireless/chan.c
 @@ -14,6 +14,7 @@
@@ -110,7 +110,7 @@
  
  static bool cfg80211_valid_60g_freq(u32 freq)
  {
-@@ -1436,6 +1437,65 @@ bool cfg80211_any_usable_channels(struct wiphy *wiphy,
+@@ -1438,6 +1439,65 @@ bool cfg80211_any_usable_channels(struct wiphy *wiphy,
  }
  EXPORT_SYMBOL(cfg80211_any_usable_channels);
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0016-mtk-nl80211-Mark-DFS-channel-as-available-for-CSA.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0016-mtk-nl80211-Mark-DFS-channel-as-available-for-CSA.patch
index ede955e..e216b2d 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0016-mtk-nl80211-Mark-DFS-channel-as-available-for-CSA.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0016-mtk-nl80211-Mark-DFS-channel-as-available-for-CSA.patch
@@ -1,4 +1,4 @@
-From c4358cc7577fec9fc477e178ac974aca8252ea0b Mon Sep 17 00:00:00 2001
+From e915ce4271b5d63fb7018295f0bd853e38b198c0 Mon Sep 17 00:00:00 2001
 From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
 Date: Fri, 17 Mar 2023 17:36:01 +0800
 Subject: [PATCH 16/37] mtk: nl80211: Mark DFS channel as available for CSA.
@@ -8,10 +8,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 15e3eeb..8a86723 100644
+index c652a01..3046677 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -10250,6 +10250,11 @@ skip_beacons:
+@@ -10269,6 +10269,11 @@ skip_beacons:
  	if (err)
  		goto free;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0017-mtk-cfg80211-fix-early-return-in-cfg80211_stop_backg.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0017-mtk-cfg80211-fix-early-return-in-cfg80211_stop_backg.patch
index dedfcd6..f607975 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0017-mtk-cfg80211-fix-early-return-in-cfg80211_stop_backg.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0017-mtk-cfg80211-fix-early-return-in-cfg80211_stop_backg.patch
@@ -1,4 +1,4 @@
-From fb9c880c91cef6dd8434ca079b572dbc922b26d0 Mon Sep 17 00:00:00 2001
+From e95e57878ced57d49e5aefe777f8922761d2f8f1 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 27 Jul 2023 10:25:59 +0800
 Subject: [PATCH 17/37] mtk: cfg80211: fix early return in
@@ -10,10 +10,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
-index e3cbfc0..d345c72 100644
+index 70b4013..e264609 100644
 --- a/net/wireless/mlme.c
 +++ b/net/wireless/mlme.c
-@@ -1169,9 +1169,9 @@ void cfg80211_stop_background_radar_detection(struct wireless_dev *wdev)
+@@ -1184,9 +1184,9 @@ void cfg80211_stop_background_radar_detection(struct wireless_dev *wdev)
  		return;
  
  	rdev_set_radar_background(rdev, NULL);
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0018-mtk-cfg80211-add-background-radar-stop-when-backgrou.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0018-mtk-cfg80211-add-background-radar-stop-when-backgrou.patch
index 26bd623..b4d9669 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0018-mtk-cfg80211-add-background-radar-stop-when-backgrou.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0018-mtk-cfg80211-add-background-radar-stop-when-backgrou.patch
@@ -1,4 +1,4 @@
-From 0cdc99a767548427a60c761b1bb115c3fa88b68e Mon Sep 17 00:00:00 2001
+From 7aa02107ca82d71f0a6f2d892bbf72b76fe8d2d0 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 27 Jul 2023 10:27:04 +0800
 Subject: [PATCH 18/37] mtk: cfg80211: add background radar stop when
@@ -10,10 +10,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 8a86723..5f64b63 100644
+index 3046677..2be678c 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -10021,6 +10021,10 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
+@@ -10040,6 +10040,10 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
  		wdev->cac_started = true;
  		wdev->cac_start_time = jiffies;
  		wdev->cac_time_ms = cac_time_ms;
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0019-mtk-mac80211-avoid-kernel-warning-of-check_flush_dep.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0019-mtk-mac80211-avoid-kernel-warning-of-check_flush_dep.patch
index 62234ee..748cf7c 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0019-mtk-mac80211-avoid-kernel-warning-of-check_flush_dep.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0019-mtk-mac80211-avoid-kernel-warning-of-check_flush_dep.patch
@@ -1,4 +1,4 @@
-From 8703d77b8337ebd8df417fc4a6d95dde0c06de5f Mon Sep 17 00:00:00 2001
+From b72e19fd852a014531dcfc667eb82f2a26b9196b Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Thu, 3 Aug 2023 07:17:44 +0800
 Subject: [PATCH 19/37] mtk: mac80211: avoid kernel warning of
@@ -9,10 +9,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/net/mac80211/main.c b/net/mac80211/main.c
-index 6fec8ff..e64a864 100644
+index a7acd22..168f09d 100644
 --- a/net/mac80211/main.c
 +++ b/net/mac80211/main.c
-@@ -1287,7 +1287,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
+@@ -1286,7 +1286,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
  		hw->queues = IEEE80211_MAX_QUEUES;
  
  	local->workqueue =
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0020-mtk-mac80211-avoid-calling-switch_vif_chanctx-when-u.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0020-mtk-mac80211-avoid-calling-switch_vif_chanctx-when-u.patch
index 7dc8973..bb3981b 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0020-mtk-mac80211-avoid-calling-switch_vif_chanctx-when-u.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0020-mtk-mac80211-avoid-calling-switch_vif_chanctx-when-u.patch
@@ -1,4 +1,4 @@
-From 3402e771b7a2d912e8d77ff4644d8ae10ca07703 Mon Sep 17 00:00:00 2001
+From 4accf70da3e00dfc1021d751310b4564fb1fad3f Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 7 Aug 2023 19:00:53 +0800
 Subject: [PATCH 20/37] mtk: mac80211: avoid calling switch_vif_chanctx when
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0021-mtk-mac80211-Add-utilities-for-converting-op_class.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0021-mtk-mac80211-Add-utilities-for-converting-op_class.patch
index d7c1f63..124ac8e 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0021-mtk-mac80211-Add-utilities-for-converting-op_class.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0021-mtk-mac80211-Add-utilities-for-converting-op_class.patch
@@ -1,4 +1,4 @@
-From d8ef7d680fd8c973d8352cf56d41ab404e083e70 Mon Sep 17 00:00:00 2001
+From 3012337540e2bfdf708cdd113c25c2501bf63da7 Mon Sep 17 00:00:00 2001
 From: Michael-CY Lee <michael-cy.lee@mediatek.com>
 Date: Mon, 14 Aug 2023 18:03:29 +0800
 Subject: [PATCH 21/37] mtk: mac80211: Add utilities for converting op_class
@@ -13,10 +13,10 @@
  2 files changed, 154 insertions(+), 1 deletion(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 085ad51..138c67c 100644
+index 0b5a4e6..19c8abe 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -8676,6 +8676,31 @@ void cfg80211_ch_switch_started_notify(struct net_device *dev,
+@@ -8723,6 +8723,31 @@ void cfg80211_ch_switch_started_notify(struct net_device *dev,
  bool ieee80211_operating_class_to_band(u8 operating_class,
  				       enum nl80211_band *band);
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0022-mtk-mac80211-refactor-STA-CSA-parsing-flows.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0022-mtk-mac80211-refactor-STA-CSA-parsing-flows.patch
index f831e1e..af8fb94 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0022-mtk-mac80211-refactor-STA-CSA-parsing-flows.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0022-mtk-mac80211-refactor-STA-CSA-parsing-flows.patch
@@ -1,4 +1,4 @@
-From 720315c7e94190098346fb41d79f44ca705d063e Mon Sep 17 00:00:00 2001
+From 8ecaec9854b8449c824f77a5b3b6c6bba6720b9d Mon Sep 17 00:00:00 2001
 From: Michael-CY Lee <michael-cy.lee@mediatek.com>
 Date: Thu, 28 Sep 2023 09:28:50 +0800
 Subject: [PATCH 22/37] mtk: mac80211: refactor STA CSA parsing flows
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0023-mtk-mac80211-add-EHT-BA1024-support.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0023-mtk-mac80211-add-EHT-BA1024-support.patch
index fadd0ce..d7d7c9f 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0023-mtk-mac80211-add-EHT-BA1024-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0023-mtk-mac80211-add-EHT-BA1024-support.patch
@@ -1,4 +1,4 @@
-From 9e7ab898f2a2688d58b339235bb38ac4594903ad Mon Sep 17 00:00:00 2001
+From 33ad860265ded8546ac378d721e1b7d0142e069c Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Sun, 25 Dec 2022 22:43:46 +0800
 Subject: [PATCH 23/37] mtk: mac80211: add EHT BA1024 support
@@ -9,10 +9,10 @@
  2 files changed, 45 insertions(+), 2 deletions(-)
 
 diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
-index 7aaae32..3308e85 100644
+index e53b73e..2eb145e 100644
 --- a/include/linux/ieee80211.h
 +++ b/include/linux/ieee80211.h
-@@ -1267,6 +1267,8 @@ struct ieee80211_mgmt {
+@@ -1343,6 +1343,8 @@ struct ieee80211_mgmt {
  					__le16 status;
  					__le16 capab;
  					__le16 timeout;
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0024-mtk-mac80211-add-rate-duration-for-EHT-rate.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0024-mtk-mac80211-add-rate-duration-for-EHT-rate.patch
index f66aa79..5db0a2f 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0024-mtk-mac80211-add-rate-duration-for-EHT-rate.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0024-mtk-mac80211-add-rate-duration-for-EHT-rate.patch
@@ -1,4 +1,4 @@
-From f8d6814a152ee0a51bd0265bf9af5c6919a9cda7 Mon Sep 17 00:00:00 2001
+From f3a735030c257da9f8a4248802270dba37c26eb4 Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
 Date: Sun, 25 Dec 2022 22:43:46 +0800
 Subject: [PATCH 24/37] mtk: mac80211: add rate duration for EHT rate.
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0025-mtk-mac80211-add-send-bar-action-when-recieve-addba-.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0025-mtk-mac80211-add-send-bar-action-when-recieve-addba-.patch
index 13a06a0..401c8a8 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0025-mtk-mac80211-add-send-bar-action-when-recieve-addba-.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0025-mtk-mac80211-add-send-bar-action-when-recieve-addba-.patch
@@ -1,4 +1,4 @@
-From 8a15deedea82333fc2b0a4aeeffed6364ebb1edd Mon Sep 17 00:00:00 2001
+From 9e9286abe5cb3ff378b01046d19ddba0944562e1 Mon Sep 17 00:00:00 2001
 From: ye he <ye.he@mediatek.com>
 Date: Wed, 22 Feb 2023 16:09:32 +0800
 Subject: [PATCH 25/37] mtk: mac80211: add send bar action when recieve addba
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0026-mtk-mac80211-inrease-beacon-loss-count.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0026-mtk-mac80211-inrease-beacon-loss-count.patch
index a81f4a0..6f6a98b 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0026-mtk-mac80211-inrease-beacon-loss-count.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0026-mtk-mac80211-inrease-beacon-loss-count.patch
@@ -1,4 +1,4 @@
-From 2cf6dd719d5f5c095ae7790430fac9468a7568c0 Mon Sep 17 00:00:00 2001
+From 2733993c8fb2e6392cddd718c1b95164c49af642 Mon Sep 17 00:00:00 2001
 From: Amit Khatri <amit.khatri@mediatek.com>
 Date: Thu, 6 Apr 2023 21:37:33 +0800
 Subject: [PATCH 26/37] mtk: mac80211: inrease beacon loss count
@@ -16,7 +16,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
-index df39a8b..ccc72da 100644
+index 6077e89..47a6590 100644
 --- a/net/mac80211/mlme.c
 +++ b/net/mac80211/mlme.c
 @@ -61,7 +61,7 @@ MODULE_PARM_DESC(max_probe_tries,
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0027-mtk-cfg80211-add-support-for-updating-background-cha.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0027-mtk-cfg80211-add-support-for-updating-background-cha.patch
index 5a668c6..1f46543 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0027-mtk-cfg80211-add-support-for-updating-background-cha.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0027-mtk-cfg80211-add-support-for-updating-background-cha.patch
@@ -1,4 +1,4 @@
-From e07ead7c1b4cca5c31903895aab84295fc78256c Mon Sep 17 00:00:00 2001
+From c35a634d57fc0a12d7415c05aaf239e29e0e8357 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 5 Jul 2023 09:49:02 +0800
 Subject: [PATCH 27/37] mtk: cfg80211: add support for updating background
@@ -12,10 +12,10 @@
  3 files changed, 32 insertions(+)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 138c67c..1e8ce82 100644
+index 19c8abe..2e499ed 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -8493,6 +8493,20 @@ void cfg80211_sta_update_dfs_state(struct wireless_dev *wdev,
+@@ -8540,6 +8540,20 @@ void cfg80211_sta_update_dfs_state(struct wireless_dev *wdev,
  				   const struct cfg80211_chan_def *csa_chandef,
  				   bool associated);
  
@@ -61,10 +61,10 @@
  	NL80211_RADAR_STA_CAC_EXPIRED,
  };
 diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
-index d345c72..5510d77 100644
+index e264609..8e77205 100644
 --- a/net/wireless/mlme.c
 +++ b/net/wireless/mlme.c
-@@ -1158,6 +1158,18 @@ cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rde
+@@ -1173,6 +1173,18 @@ cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rde
  	return 0;
  }
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0028-mtk-mac80211-Allow-STA-interface-to-set-TX-queue-par.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0028-mtk-mac80211-Allow-STA-interface-to-set-TX-queue-par.patch
index b344c4d..9affe14 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0028-mtk-mac80211-Allow-STA-interface-to-set-TX-queue-par.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0028-mtk-mac80211-Allow-STA-interface-to-set-TX-queue-par.patch
@@ -1,4 +1,4 @@
-From 1add4148216d25e1523e872badbb9ad23fe5fc72 Mon Sep 17 00:00:00 2001
+From 180f80da3952be05a0177b565559a16dee708925 Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Fri, 7 Jul 2023 17:17:30 +0800
 Subject: [PATCH 28/37] mtk: mac80211: Allow STA interface to set TX queue
@@ -10,10 +10,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 5f64b63..6eb1bba 100644
+index 2be678c..aed186f 100644
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -3497,6 +3497,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
+@@ -3498,6 +3498,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
  		}
  
  		if (netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0029-mtk-mac80211-export-ieee80211_tpt_led_trig_tx-rx-for.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0029-mtk-mac80211-export-ieee80211_tpt_led_trig_tx-rx-for.patch
index f95ab99..0af68c3 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0029-mtk-mac80211-export-ieee80211_tpt_led_trig_tx-rx-for.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0029-mtk-mac80211-export-ieee80211_tpt_led_trig_tx-rx-for.patch
@@ -1,4 +1,4 @@
-From 9d85abfd21151dd60583a80a7fdf34c837e9996f Mon Sep 17 00:00:00 2001
+From ef1f8c941108eca2665a6caff0cd016c36584d76 Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Fri, 23 Jun 2023 05:53:50 +0800
 Subject: [PATCH 29/37] mtk: mac80211: export ieee80211_tpt_led_trig_tx/rx for
@@ -22,10 +22,10 @@
  5 files changed, 36 insertions(+), 20 deletions(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 6ff6d3a..345c323 100644
+index 361fe92..d641b18 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -4744,6 +4744,8 @@ __ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
+@@ -4747,6 +4747,8 @@ __ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
  				   unsigned int flags,
  				   const struct ieee80211_tpt_blink *blink_table,
  				   unsigned int blink_table_len);
@@ -34,7 +34,7 @@
  #endif
  /**
   * ieee80211_get_tx_led_name - get name of TX LED
-@@ -4854,6 +4856,21 @@ ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags,
+@@ -4857,6 +4859,21 @@ ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags,
  #endif
  }
  
@@ -57,7 +57,7 @@
   * ieee80211_unregister_hw - Unregister a hardware device
   *
 diff --git a/net/mac80211/led.c b/net/mac80211/led.c
-index b992430..3109501 100644
+index c60d070..0ecc3ea 100644
 --- a/net/mac80211/led.c
 +++ b/net/mac80211/led.c
 @@ -364,6 +364,22 @@ __ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
@@ -111,7 +111,7 @@
 -#endif
 -}
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index a3b4cac..fb3d2e4 100644
+index fead07e..1541e9c 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
 @@ -5401,7 +5401,7 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
@@ -124,10 +124,10 @@
  		if (status->flag & RX_FLAG_8023)
  			__ieee80211_rx_handle_8023(hw, pubsta, skb, list);
 diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
-index 3b8e548..0ed18d5 100644
+index 019fc77..c8fade8 100644
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -4321,7 +4321,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
+@@ -4323,7 +4323,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
  	len = 0;
   out:
  	if (len)
@@ -136,7 +136,7 @@
  	rcu_read_unlock();
  }
  
-@@ -4647,7 +4647,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
+@@ -4649,7 +4649,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
  	sta->deflink.tx_stats.packets[queue] += skbs;
  	sta->deflink.tx_stats.bytes[queue] += len;
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0030-mtk-mac80211-add-packet-count-input-for-dev_sw_netst.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0030-mtk-mac80211-add-packet-count-input-for-dev_sw_netst.patch
index 7d5877e..c33da52 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0030-mtk-mac80211-add-packet-count-input-for-dev_sw_netst.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0030-mtk-mac80211-add-packet-count-input-for-dev_sw_netst.patch
@@ -1,4 +1,4 @@
-From 63bbe30ccac3b6839bddaec3226b06e9a3f73a1d Mon Sep 17 00:00:00 2001
+From 4e785260ea9523efea8deb29f3f7ec7a7dab5128 Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Tue, 22 Aug 2023 05:02:53 +0800
 Subject: [PATCH 30/37] mtk: mac80211: add packet count input for
@@ -53,7 +53,7 @@
  }
  #endif /* < 5.10 */
 diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
-index adbcfdf..f93359a 100644
+index 6c2c1e5..3bc64d8 100644
 --- a/drivers/net/usb/qmi_wwan.c
 +++ b/drivers/net/usb/qmi_wwan.c
 @@ -210,7 +210,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
@@ -92,7 +92,7 @@
  				netif_receive_skb(skb);
  			} else {
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index fb3d2e4..347867c 100644
+index 1541e9c..7a80945 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
 @@ -853,7 +853,7 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
@@ -104,7 +104,7 @@
  				netif_receive_skb(skb);
  			}
  		}
-@@ -2632,7 +2632,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
+@@ -2631,7 +2631,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
  	skb = rx->skb;
  	xmit_skb = NULL;
  
@@ -113,7 +113,7 @@
  
  	if (rx->sta) {
  		/* The seqno index has the same property as needed
-@@ -4050,7 +4050,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
+@@ -4054,7 +4054,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
  		}
  
  		prev_dev = sdata->dev;
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0031-mtk-mac80211-add-per-bss-flag-to-support-vendors-cou.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0031-mtk-mac80211-add-per-bss-flag-to-support-vendors-cou.patch
index 68a2543..7690697 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0031-mtk-mac80211-add-per-bss-flag-to-support-vendors-cou.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0031-mtk-mac80211-add-per-bss-flag-to-support-vendors-cou.patch
@@ -1,4 +1,4 @@
-From de77510ea0bd145fe2d93321d14755b74c95bde3 Mon Sep 17 00:00:00 2001
+From f500b4d7d2eb30f46fe0b75afb7b9bd94f96cf55 Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Wed, 16 Aug 2023 07:23:34 +0800
 Subject: [PATCH 31/37] mtk: mac80211: add per-bss flag to support vendors
@@ -23,10 +23,10 @@
  	/* add new features before the definition below */
  	NUM_NL80211_EXT_FEATURES,
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 347867c..07dddcd 100644
+index 7a80945..0cf8c59 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -2632,7 +2632,9 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
+@@ -2631,7 +2631,9 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
  	skb = rx->skb;
  	xmit_skb = NULL;
  
@@ -49,10 +49,10 @@
  	/* The seqno index has the same property as needed
  	 * for the rx_msdu field, i.e. it is IEEE80211_NUM_TIDS
 diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
-index 0ed18d5..c6eec00 100644
+index c8fade8..0f6c960 100644
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3540,7 +3540,9 @@ ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
+@@ -3541,7 +3541,9 @@ ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
  	if (key)
  		info->control.hw_key = &key->conf;
  
@@ -63,7 +63,7 @@
  
  	if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
  		tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
-@@ -4311,7 +4313,9 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
+@@ -4313,7 +4315,9 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
  			goto out;
  		}
  
@@ -74,7 +74,7 @@
  
  		ieee80211_xmit(sdata, sta, skb);
  	}
-@@ -4643,7 +4647,10 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
+@@ -4645,7 +4649,10 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
  		info->ack_frame_id = ieee80211_store_ack_skb(local, skb,
  							     &info->flags, NULL);
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0032-mtk-mac80211-set-eht_support-to-false-when-AP-is-not.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0032-mtk-mac80211-set-eht_support-to-false-when-AP-is-not.patch
index 3c649f5..cf32642 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0032-mtk-mac80211-set-eht_support-to-false-when-AP-is-not.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0032-mtk-mac80211-set-eht_support-to-false-when-AP-is-not.patch
@@ -1,4 +1,4 @@
-From 217bb748ec05993d39a85aff28f45dd8e8320f82 Mon Sep 17 00:00:00 2001
+From c117e28dd0caf91f0d1ce7516ba6aa90f8bb07f4 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Wed, 25 Oct 2023 13:37:00 +0800
 Subject: [PATCH 32/37] mtk: mac80211: set eht_support to false when AP is not
@@ -10,10 +10,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index 916332c..2072a7a 100644
+index 9b9be1a..cf694bc 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -1375,6 +1375,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
+@@ -1378,6 +1378,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
  		link_conf->eht_su_beamformer = false;
  		link_conf->eht_su_beamformee = false;
  		link_conf->eht_mu_beamformer = false;
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0033-mtk-mac80211-Add-cert-mode-to-disable-ba-timeout.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0033-mtk-mac80211-Add-cert-mode-to-disable-ba-timeout.patch
index 7ec384e..eb4281e 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0033-mtk-mac80211-Add-cert-mode-to-disable-ba-timeout.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0033-mtk-mac80211-Add-cert-mode-to-disable-ba-timeout.patch
@@ -1,4 +1,4 @@
-From 45e2564bd74224196b9495ea520ccf7186d9074a Mon Sep 17 00:00:00 2001
+From bc5e57c30a65a64e74ef4d8c355a4a4c83673c73 Mon Sep 17 00:00:00 2001
 From: "Allen.Ye" <allen.ye@mediatek.com>
 Date: Thu, 9 Nov 2023 11:37:37 +0800
 Subject: [PATCH 33/37] mtk: mac80211: Add cert mode to disable ba timeout
@@ -14,10 +14,10 @@
  3 files changed, 59 insertions(+), 1 deletion(-)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 345c323..cef6577 100644
+index d641b18..ba8343f 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -2907,8 +2907,14 @@ struct ieee80211_hw {
+@@ -2910,8 +2910,14 @@ struct ieee80211_hw {
  	u32 max_mtu;
  	const s8 *tx_power_levels;
  	u8 max_txpwr_levels_idx;
@@ -49,10 +49,10 @@
  				  TU_TO_EXP_TIME(tid_tx->timeout));
  			tid_tx->last_tx = jiffies;
 diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
-index aa04167..9424243 100644
+index 006b46d..8c29786 100644
 --- a/net/mac80211/debugfs.c
 +++ b/net/mac80211/debugfs.c
-@@ -440,6 +440,54 @@ static const struct file_operations reset_ops = {
+@@ -449,6 +449,54 @@ static const struct file_operations reset_ops = {
  };
  #endif
  
@@ -107,7 +107,7 @@
  static const char *hw_flag_names[] = {
  #define FLAG(F)	[IEEE80211_HW_##F] = #F
  	FLAG(HAS_RATE_CONTROL),
-@@ -671,6 +719,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
+@@ -680,6 +728,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
  	debugfs_create_u32("aql_threshold", 0600,
  			   phyd, &local->aql_threshold);
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0035-mtk-mac80211-ACS-channel-time-is-reset-by-ch_restore.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0034-mtk-mac80211-ACS-channel-time-is-reset-by-ch_restore.patch
similarity index 84%
rename from autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0035-mtk-mac80211-ACS-channel-time-is-reset-by-ch_restore.patch
rename to autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0034-mtk-mac80211-ACS-channel-time-is-reset-by-ch_restore.patch
index 35a9d0d..b6e976a 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0035-mtk-mac80211-ACS-channel-time-is-reset-by-ch_restore.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0034-mtk-mac80211-ACS-channel-time-is-reset-by-ch_restore.patch
@@ -1,7 +1,7 @@
-From c4c3bfb8d2c7e986bd16ae589fdb25711550adc2 Mon Sep 17 00:00:00 2001
+From 618d7f6ad1b398bc21258559c80928febba3dfac Mon Sep 17 00:00:00 2001
 From: "fancy.liu" <fancy.liu@mediatek.com>
 Date: Wed, 29 Nov 2023 13:51:13 +0800
-Subject: [PATCH 35/37] mtk: mac80211: ACS channel time is reset by ch_restore
+Subject: [PATCH 34/37] mtk: mac80211: ACS channel time is reset by ch_restore
 
 Issue:
 There's a chance that the channel time for duty channel is zero in ACS
@@ -29,10 +29,10 @@
  2 files changed, 16 insertions(+)
 
 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index cef6577..2e4b66e 100644
+index ba8343f..453466a 100644
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -7482,4 +7482,11 @@ int ieee80211_set_active_links(struct ieee80211_vif *vif, u16 active_links);
+@@ -7485,4 +7485,11 @@ int ieee80211_set_active_links(struct ieee80211_vif *vif, u16 active_links);
  void ieee80211_set_active_links_async(struct ieee80211_vif *vif,
  				      u16 active_links);
  
@@ -45,10 +45,10 @@
 +
  #endif /* MAC80211_H */
 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 3650dcd..5bd40c6 100644
+index fd82488..f0bb4e8 100644
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
-@@ -5155,3 +5155,12 @@ void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id)
+@@ -5154,3 +5154,12 @@ void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id)
  
  	*len_pos = elem_len;
  }
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0034-mtk-mac80211-Fix-he_6ghz_oper-NULL-pointer-access.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0034-mtk-mac80211-Fix-he_6ghz_oper-NULL-pointer-access.patch
deleted file mode 100644
index c109064..0000000
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0034-mtk-mac80211-Fix-he_6ghz_oper-NULL-pointer-access.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 2ae2bae36bb0fb44107f6f01fff4c6f03f5db754 Mon Sep 17 00:00:00 2001
-From: Michael-CY Lee <michael-cy.lee@mediatek.com>
-Date: Tue, 21 Nov 2023 10:16:31 +0800
-Subject: [PATCH 34/37] mtk: mac80211: Fix he_6ghz_oper NULL pointer access
-
-Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
----
- include/linux/ieee80211.h | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
-index 3308e85..a23ec4c 100644
---- a/include/linux/ieee80211.h
-+++ b/include/linux/ieee80211.h
-@@ -2671,12 +2671,14 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)
- static inline const struct ieee80211_he_6ghz_oper *
- ieee80211_he_6ghz_oper(const struct ieee80211_he_operation *he_oper)
- {
--	const u8 *ret = (const void *)&he_oper->optional;
-+	const u8 *ret;
- 	u32 he_oper_params;
- 
- 	if (!he_oper)
- 		return NULL;
- 
-+	ret = (const void *)&he_oper->optional;
-+
- 	he_oper_params = le32_to_cpu(he_oper->he_oper_params);
- 
- 	if (!(he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO))
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0036-mtk-mac80211-Fix-SMPS-action-frame-cap-check.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0035-mtk-mac80211-Fix-SMPS-action-frame-cap-check.patch
similarity index 80%
rename from autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0036-mtk-mac80211-Fix-SMPS-action-frame-cap-check.patch
rename to autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0035-mtk-mac80211-Fix-SMPS-action-frame-cap-check.patch
index e9cc850..794407f 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0036-mtk-mac80211-Fix-SMPS-action-frame-cap-check.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0035-mtk-mac80211-Fix-SMPS-action-frame-cap-check.patch
@@ -1,7 +1,7 @@
-From e2a94c3ec7aa8f578b1b81b1f5225a631bf6a53f Mon Sep 17 00:00:00 2001
+From 9ff05c938d2a2b82d022aa8f671d2333cd8a992a Mon Sep 17 00:00:00 2001
 From: "Allen.Ye" <allen.ye@mediatek.com>
 Date: Thu, 30 Nov 2023 14:01:29 +0800
-Subject: [PATCH 36/37] mtk: mac80211: Fix SMPS action frame cap check
+Subject: [PATCH 35/37] mtk: mac80211: Fix SMPS action frame cap check
 
 Fix SMPS action frame cap check.
 Due to 6G band doesn't have HT cap, we change cap check into each action
@@ -13,10 +13,10 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 07dddcd..d431f57 100644
+index 0cf8c59..fe3a538 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -3494,9 +3494,6 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
+@@ -3493,9 +3493,6 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
  
  	switch (mgmt->u.action.category) {
  	case WLAN_CATEGORY_HT:
@@ -26,7 +26,7 @@
  
  		if (sdata->vif.type != NL80211_IFTYPE_STATION &&
  		    sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
-@@ -3515,6 +3512,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
+@@ -3514,6 +3511,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
  			enum ieee80211_smps_mode smps_mode;
  			struct sta_opmode_info sta_opmode = {};
  
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0037-mtk-mac80211-Add-CSA-action-frame-tx-when-channel-sw.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0036-mtk-mac80211-Add-CSA-action-frame-tx-when-channel-sw.patch
similarity index 86%
rename from autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0037-mtk-mac80211-Add-CSA-action-frame-tx-when-channel-sw.patch
rename to autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0036-mtk-mac80211-Add-CSA-action-frame-tx-when-channel-sw.patch
index 8a8f4b1..a5cf569 100644
--- a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0037-mtk-mac80211-Add-CSA-action-frame-tx-when-channel-sw.patch
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0036-mtk-mac80211-Add-CSA-action-frame-tx-when-channel-sw.patch
@@ -1,7 +1,7 @@
-From 488e67b3592e6e36622e12a212739d4d74710a56 Mon Sep 17 00:00:00 2001
+From 2bb34cb05062f9f53252c5a15304a75141e02660 Mon Sep 17 00:00:00 2001
 From: "fancy.liu" <fancy.liu@mediatek.com>
 Date: Thu, 30 Nov 2023 16:42:59 +0800
-Subject: [PATCH 37/37] mtk: mac80211: Add CSA action frame tx when channel
+Subject: [PATCH 36/37] mtk: mac80211: Add CSA action frame tx when channel
  switch on AP
 
 Description:
@@ -20,10 +20,10 @@
  2 files changed, 21 insertions(+), 17 deletions(-)
 
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index 2072a7a..1554849 100644
+index cf694bc..a2d1688 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -3790,15 +3790,7 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
+@@ -3798,15 +3798,7 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
  		 * immediately too.  If we would delay the switch
  		 * until the next TBTT, we would have to set the probe
  		 * response here.
@@ -39,7 +39,7 @@
  
  		if ((params->n_counter_offsets_beacon >
  		     IEEE80211_MAX_CNTDWN_COUNTERS_NUM) ||
-@@ -3814,14 +3806,20 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
+@@ -3822,14 +3814,20 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
  		csa.n_counter_offsets_presp = params->n_counter_offsets_presp;
  		csa.count = params->count;
  
@@ -66,7 +66,7 @@
  		break;
  	case NL80211_IFTYPE_ADHOC:
  		if (!sdata->vif.cfg.ibss_joined)
-@@ -3893,6 +3891,7 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
+@@ -3901,6 +3899,7 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
  		}
  #endif
  	default:
@@ -74,7 +74,7 @@
  		return -EOPNOTSUPP;
  	}
  
-@@ -3982,6 +3981,7 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
+@@ -3990,6 +3989,7 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
  
  	err = ieee80211_set_csa_beacon(sdata, params, &changed);
  	if (err) {
@@ -83,10 +83,10 @@
  		goto out;
  	}
 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 5bd40c6..f36a5c0 100644
+index f0bb4e8..00a20a6 100644
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
-@@ -4515,8 +4515,11 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
+@@ -4514,8 +4514,11 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
  	u8 *pos;
  
  	if (sdata->vif.type != NL80211_IFTYPE_ADHOC &&
@@ -99,7 +99,7 @@
  
  	skb = dev_alloc_skb(local->tx_headroom + hdr_len +
  			    5 + /* channel switch announcement element */
-@@ -4533,9 +4536,10 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
+@@ -4532,9 +4535,10 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
  
  	eth_broadcast_addr(mgmt->da);
  	memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
diff --git a/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0037-mtk-mac80211-fix-AP-mgmt-not-encrypted-in-WDS-mode-w.patch b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0037-mtk-mac80211-fix-AP-mgmt-not-encrypted-in-WDS-mode-w.patch
new file mode 100644
index 0000000..d0d5004
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211_dev/patches/subsys/mtk-0037-mtk-mac80211-fix-AP-mgmt-not-encrypted-in-WDS-mode-w.patch
@@ -0,0 +1,38 @@
+From 84a875b2506fb720f902540ba23815e7b6958d92 Mon Sep 17 00:00:00 2001
+From: Michael-CY Lee <michael-cy.lee@mediatek.com>
+Date: Thu, 25 Jan 2024 14:07:23 +0800
+Subject: [PATCH 37/37] mtk: mac80211: fix AP mgmt not encrypted in WDS mode
+ with PMF on
+
+In ieee80211_tx_prepare(), if tx->sta is still NULL after calling
+sta_info_get(), the skb might be mgmt for WDS peer, so sta_info_get_bss()
+if called to find sta from AP_VLAN, and then interface type & 4-addr
+using is checked.
+
+CR-Id: WCNCR00289305
+Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
+---
+ net/mac80211/tx.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
+index 0f6c960..8f85193 100644
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -1241,6 +1241,13 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
+ 		if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) {
+ 			tx->sta = sta_info_get(sdata, hdr->addr1);
+ 			aggr_check = true;
++
++			if (!tx->sta) {
++				tx->sta = sta_info_get_bss(sdata, hdr->addr1);
++				if (!tx->sta || !tx->sta->sdata->wdev.use_4addr ||
++				    tx->sta->sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
++					tx->sta = NULL;
++			}
+ 		}
+ 	}
+ 
+-- 
+2.18.0
+