[rdkb][common][bsp][Refactor and sync wifi from openwrt]

[Description]
b82e2a9 [mac80211][mt76][Update driver version and fix dual band performance issue]
b5e8562 [MAC80211][core][Add BSS color bitmap patch for backport 6.1]
0f3e311 [MAC80211][misc][Add MT7996 external openwrt build]
4051cf2 [MAC80211][misc][Fix firmware bin missing issue for mt7622 autobuild]
85ca739 [MAC80211][hostapd][Change patch name for add-11v_mbss-and-ema-support.patch]
a0433da [MAC80211][misc][Fix Bss Color Bitmap patch]
b91b478 [MAC80211][core][Fix CAC skip command for BW160 case]

[Release-log]

Change-Id: Iccd26267d13e77654758dfbeb447e55f49e53ce1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
similarity index 100%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
similarity index 100%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
index 5e6bf88..283b55c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
@@ -78,11 +78,11 @@
     file://mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
     file://mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
     file://mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch \
-    file://mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch \
     file://mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch \
     file://mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch \
     file://mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch \
-    file://mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0100-hostapd-mtk-update-eht-operation-elem.patch \
     "
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch b/recipes-wifi/hostapd/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
similarity index 100%
rename from recipes-wifi/hostapd/files/patches/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/hostapd/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
similarity index 100%
rename from recipes-wifi/hostapd/files/patches/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
diff --git a/recipes-wifi/hostapd/files/patches/patches.inc b/recipes-wifi/hostapd/files/patches/patches.inc
index 48bd493..3ec1290 100644
--- a/recipes-wifi/hostapd/files/patches/patches.inc
+++ b/recipes-wifi/hostapd/files/patches/patches.inc
@@ -78,10 +78,10 @@
     file://mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
     file://mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
     file://mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch \
-    file://mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch \
     file://mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch \
     file://mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch \
     file://mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch \
-    file://mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     "
diff --git a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0009-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0009-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
index 0d382ef..1e4eb5b 100644
--- a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0009-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
+++ b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0009-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
@@ -1,22 +1,22 @@
-From 58f7244e69613f8248dd4e01f9c7920adb0f88f5 Mon Sep 17 00:00:00 2001
+From 4485bc86685082b37de5a1f3e04c29be65a902a0 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 09/16] cfg80211: mtk: implement DFS status show, cac and nop
- skip command via debugfs
+Subject: [PATCH] cfg80211: mtk: implement DFS status show, cac and nop skip
+ command via debugfs
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
  include/net/cfg80211.h  |   1 +
  net/mac80211/cfg.c      |  20 +++
  net/wireless/core.h     |   3 +
- net/wireless/debugfs.c  | 270 ++++++++++++++++++++++++++++++++++++++--
+ net/wireless/debugfs.c  | 271 ++++++++++++++++++++++++++++++++++++++--
  net/wireless/mlme.c     |   6 +
  net/wireless/rdev-ops.h |  14 +++
  net/wireless/trace.h    |  12 ++
- 7 files changed, 319 insertions(+), 7 deletions(-)
+ 7 files changed, 320 insertions(+), 7 deletions(-)
 
 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index 9728bf8..f9c2cc3 100644
+index d99b59f..bbd3de4 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
 @@ -4641,6 +4641,7 @@ struct cfg80211_ops {
@@ -28,10 +28,10 @@
  
  /*
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index cd5444e..5718c56 100644
+index 27f7616..3e35433 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -4870,6 +4870,25 @@ ieee80211_del_link_station(struct wiphy *wiphy, struct net_device *dev,
+@@ -4900,6 +4900,25 @@ ieee80211_del_link_station(struct wiphy *wiphy, struct net_device *dev,
  	return ret;
  }
  
@@ -57,7 +57,7 @@
  const struct cfg80211_ops mac80211_config_ops = {
  	.add_virtual_intf = ieee80211_add_iface,
  	.del_virtual_intf = ieee80211_del_iface,
-@@ -4981,4 +5000,5 @@ const struct cfg80211_ops mac80211_config_ops = {
+@@ -5011,4 +5030,5 @@ const struct cfg80211_ops mac80211_config_ops = {
  	.add_link_station = ieee80211_add_link_station,
  	.mod_link_station = ieee80211_mod_link_station,
  	.del_link_station = ieee80211_del_link_station,
@@ -78,7 +78,7 @@
  	struct work_struct background_cac_abort_wk;
  
 diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c
-index 0878b16..e0fcb59 100644
+index 0878b16..f5f23d0 100644
 --- a/net/wireless/debugfs.c
 +++ b/net/wireless/debugfs.c
 @@ -9,6 +9,7 @@
@@ -89,7 +89,7 @@
  
  #define DEBUGFS_READONLY_FILE(name, buflen, fmt, value...)		\
  static ssize_t name## _read(struct file *file, char __user *userbuf,	\
-@@ -96,16 +97,271 @@ static const struct file_operations ht40allow_map_ops = {
+@@ -96,16 +97,272 @@ static const struct file_operations ht40allow_map_ops = {
  	.llseek = default_llseek,
  };
  
@@ -171,7 +171,8 @@
 +				if (remain_time > wait_time_ms)
 +					remain_time = 0;
 +			} else if (chan->dfs_state == NL80211_DFS_USABLE) {
-+				if (wdev->cac_started && cfg80211_is_sub_chan(chandef, chan, false)) {
++				if (wdev->cac_started &&
++				    cfg80211_is_sub_chan(chandef, chan, false)) {
 +					jiffies_passed = jiffies - wdev->cac_start_time;
 +					wait_time_ms = wdev->cac_time_ms;
 +					remain_time = (wait_time_ms -
@@ -316,8 +317,8 @@
 +			chandef = &wdev->links[0].ap.chandef;
 +			chan = chandef->chan;
 +
-+			if ((chan->flags & IEEE80211_CHAN_RADAR) &&
-+			    chan->dfs_state == NL80211_DFS_USABLE && wdev->cac_started) {
++			if ((cfg80211_chandef_dfs_required(wiphy, chandef, wdev->iftype) > 0) &&
++			    cfg80211_chandef_dfs_usable(wiphy, chandef) && wdev->cac_started) {
 +				rdev_skip_cac(rdev, wdev);
 +			}
 +		}
@@ -328,8 +329,8 @@
 +			chandef = &rdev->background_radar_chandef;
 +			chan = chandef->chan;
 +
-+			if ((chan->flags & IEEE80211_CHAN_RADAR) &&
-+			    chan->dfs_state == NL80211_DFS_USABLE &&
++			if ((cfg80211_chandef_dfs_required(wiphy, chandef, wdev->iftype) > 0) &&
++			    cfg80211_chandef_dfs_usable(wiphy, chandef) &&
 +			    rdev->background_cac_started) {
 +				// Let current jiffies > dfs_state_entered_jiffies + CAC time
 +				cac_time = rdev->background_cac_time_ms;
@@ -455,5 +456,5 @@
  
  #undef TRACE_INCLUDE_PATH
 -- 
-2.25.1
+2.18.0
 
diff --git a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch
new file mode 100644
index 0000000..0c4ec80
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch
@@ -0,0 +1,125 @@
+From 7dac751fa9d42920b3b62258bffd7e5dd143f284 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 1/2] mac80211: mtk: track obss color bitmap
+
+Track OBSS BSS color when receive their beacon.
+
+Adding 2 tracepoint for debug, usage:
+echo 1 > /sys/kernel/debug/tracing/events/mac80211/bss_color_bitmap/enable
+echo 1 > /sys/kernel/debug/tracing/events/mac80211/bss_color_collision/enable
+---
+ include/net/mac80211.h |  5 +++--
+ net/mac80211/cfg.c     |  4 ++--
+ net/mac80211/rx.c      |  9 +++++++--
+ net/mac80211/trace.h   | 21 +++++++++++++++++++++
+ 4 files changed, 33 insertions(+), 6 deletions(-)
+
+diff --git a/include/net/mac80211.h b/include/net/mac80211.h
+index 1de9fad..3cf1745 100644
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -729,6 +729,7 @@ struct ieee80211_bss_conf {
+ 	} he_oper;
+ 	struct ieee80211_he_obss_pd he_obss_pd;
+ 	struct cfg80211_he_bss_color he_bss_color;
++	u64 used_color_bitmap;
+ 	struct ieee80211_fils_discovery fils_discovery;
+ 	u32 unsol_bcast_probe_resp_interval;
+ 	struct cfg80211_bitrate_mask beacon_tx_rate;
+@@ -7250,7 +7251,7 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
+ 					  struct ieee80211_vif *vif);
+ 
+ /**
+- * ieeee80211_obss_color_collision_notify - notify userland about a BSS color
++ * ieee80211_obss_color_collision_notify - notify userland about a BSS color
+  * collision.
+  *
+  * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+@@ -7259,7 +7260,7 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
+  * @gfp: allocation flags
+  */
+ void
+-ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
++ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+ 				       u64 color_bitmap, gfp_t gfp);
+ 
+ /**
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
+index 3e35433..5c9dda1 100644
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4698,7 +4698,7 @@ void ieee80211_color_change_finish(struct ieee80211_vif *vif)
+ EXPORT_SYMBOL_GPL(ieee80211_color_change_finish);
+ 
+ void
+-ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
++ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+ 				       u64 color_bitmap, gfp_t gfp)
+ {
+ 	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+@@ -4708,7 +4708,7 @@ ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+ 
+ 	cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap, gfp);
+ }
+-EXPORT_SYMBOL_GPL(ieeee80211_obss_color_collision_notify);
++EXPORT_SYMBOL_GPL(ieee80211_obss_color_collision_notify);
+ 
+ static int
+ ieee80211_color_change(struct wiphy *wiphy, struct net_device *dev,
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index e99b8fd..fd2f650 100644
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -3338,9 +3338,14 @@ 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);
++
++		bss_conf->used_color_bitmap |= BIT_ULL(color);
++
++		trace_bss_color_bitmap(color, bss_conf->used_color_bitmap);
++
+ 		if (color == bss_conf->he_bss_color.color)
+-			ieeee80211_obss_color_collision_notify(&rx->sdata->vif,
+-							       BIT_ULL(color),
++			ieee80211_obss_color_collision_notify(&rx->sdata->vif,
++							       bss_conf->used_color_bitmap,
+ 							       GFP_ATOMIC);
+ 	}
+ }
+diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
+index 9f43775..71e312f 100644
+--- a/net/mac80211/trace.h
++++ b/net/mac80211/trace.h
+@@ -3026,6 +3026,27 @@ TRACE_EVENT(stop_queue,
+ 	)
+ );
+ 
++TRACE_EVENT(bss_color_bitmap,
++	TP_PROTO(u8 color,
++		u64 color_bitmap),
++
++	TP_ARGS(color, color_bitmap),
++
++	TP_STRUCT__entry(
++		__field(u8, color)
++		__field(u64, color_bitmap)
++	),
++
++	TP_fast_assign(
++		__entry->color = color;
++		__entry->color_bitmap = color_bitmap;
++	),
++
++	TP_printk(
++		"color=%u color_bitmap=0x%llx", __entry->color, __entry->color_bitmap
++	)
++);
++
+ #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
+ 
+ #undef TRACE_INCLUDE_PATH
+-- 
+2.39.0
+
diff --git a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0017-mac80211-mtk-aging-color-bitmap.patch b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0017-mac80211-mtk-aging-color-bitmap.patch
new file mode 100644
index 0000000..5413f5c
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/mtk-0017-mac80211-mtk-aging-color-bitmap.patch
@@ -0,0 +1,128 @@
+From 96d0335462d6762924800c7d90e378eebe590385 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 2/2] mac80211: mtk: ageout color bitmap
+
+Adding a periodic work which runs once per second to check BSS color.
+OBSS BSS Color will be ageout if not seen for 10 seconds.
+---
+ include/net/mac80211.h     |  1 +
+ net/mac80211/cfg.c         | 26 ++++++++++++++++++++++++++
+ net/mac80211/ieee80211_i.h |  6 ++++++
+ net/mac80211/iface.c       |  5 +++++
+ net/mac80211/rx.c          |  1 +
+ 5 files changed, 39 insertions(+)
+
+diff --git a/include/net/mac80211.h b/include/net/mac80211.h
+index 3cf1745..d044be5 100644
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -730,6 +730,7 @@ struct ieee80211_bss_conf {
+ 	struct ieee80211_he_obss_pd he_obss_pd;
+ 	struct cfg80211_he_bss_color he_bss_color;
+ 	u64 used_color_bitmap;
++	u64 color_last_seen[64];
+ 	struct ieee80211_fils_discovery fils_discovery;
+ 	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 5c9dda1..4bcb1d4 100644
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4755,6 +4755,32 @@ out:
+ 	return err;
+ }
+ 
++void
++ieee80211_color_aging_work(struct work_struct *work)
++{
++	struct ieee80211_sub_if_data *sdata =
++		container_of(work, struct ieee80211_sub_if_data,
++				color_aging_work.work);
++	struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
++	int i = 0;
++
++	sdata_lock(sdata);
++
++	for (i = 0; i < IEEE80211_BSS_COLOR_MAX; i++) {
++		/* ageout if not seen for a period */
++		if ((bss_conf->used_color_bitmap & BIT_ULL(i)) &&
++		     time_before(bss_conf->color_last_seen[i],
++				 jiffies - IEEE80211_BSS_COLOR_AGEOUT_TIME * HZ)) {
++			bss_conf->used_color_bitmap &= ~BIT_ULL(i);
++		}
++	}
++
++	ieee80211_queue_delayed_work(&sdata->local->hw,
++			&sdata->color_aging_work, HZ);
++
++	sdata_unlock(sdata);
++}
++
+ static int
+ 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 a10ef29..295f45b 100644
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1111,6 +1111,8 @@ struct ieee80211_sub_if_data {
+ 	} debugfs;
+ #endif
+ 
++	struct delayed_work color_aging_work;
++
+ 	/* must be last, dynamically sized area in this! */
+ 	struct ieee80211_vif vif;
+ };
+@@ -1930,8 +1932,12 @@ 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);
+ 
++#define IEEE80211_BSS_COLOR_AGEOUT_TIME        10
++#define IEEE80211_BSS_COLOR_MAX                64
++
+ /* color change handling */
+ void ieee80211_color_change_finalize_work(struct work_struct *work);
++void ieee80211_color_aging_work(struct work_struct *work);
+ 
+ /* 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 b80fb66..6d37adb 100644
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -541,6 +541,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
+ 	cancel_work_sync(&sdata->deflink.color_change_finalize_work);
+ 
+ 	cancel_delayed_work_sync(&sdata->deflink.dfs_cac_timer_work);
++	if (sdata->vif.type == NL80211_IFTYPE_AP)
++		cancel_delayed_work_sync(&sdata->color_aging_work);
+ 
+ 	if (sdata->wdev.cac_started) {
+ 		chandef = sdata->vif.bss_conf.chandef;
+@@ -1787,6 +1789,9 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
+ 		skb_queue_head_init(&sdata->u.ap.ps.bc_buf);
+ 		INIT_LIST_HEAD(&sdata->u.ap.vlans);
+ 		sdata->vif.bss_conf.bssid = sdata->vif.addr;
++		INIT_DELAYED_WORK(&sdata->color_aging_work, ieee80211_color_aging_work);
++		ieee80211_queue_delayed_work(&sdata->local->hw,
++					     &sdata->color_aging_work, 0);
+ 		break;
+ 	case NL80211_IFTYPE_P2P_CLIENT:
+ 		type = NL80211_IFTYPE_STATION;
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index fd2f650..67c768c 100644
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -3340,6 +3340,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);
++		bss_conf->color_last_seen[color] = jiffies;
+ 
+ 		trace_bss_color_bitmap(color, bss_conf->used_color_bitmap);
+ 
+-- 
+2.39.0
+
diff --git a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/subsys.inc b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/subsys.inc
index a2d8984..2762592 100644
--- a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/subsys.inc
+++ b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/subsys.inc
@@ -48,6 +48,8 @@
     file://mtk-0013-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch \
     file://mtk-0014-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch \
     file://mtk-0015-mac80211-mtk-fix-build-error-on-Linux-Kernel-5.4.patch \
+    file://mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch \
+    file://mtk-0017-mac80211-mtk-aging-color-bitmap.patch \
     file://mtk-0100-mac80211-mtk-add-EHT-BA1024-support.patch \
     file://mtk-0101-mac80211-mtk-add-rate-duration-for-EHT-rate.patch \
     "
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0010-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0010-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
index e2bfe16..575ed99 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0010-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0010-cfg80211-mtk-implement-DFS-status-show-cac-and-nop-s.patch
@@ -1,8 +1,8 @@
-From 316a7218dbbfa48fbd030cb64fb3693edf00e276 Mon Sep 17 00:00:00 2001
+From 8e2d3c2456fddf1d5a3fc015ff25c4d79e496bcd 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 909/915] cfg80211: mtk: implement DFS status show, cac and nop
- skip command via debugfs
+Subject: [PATCH] cfg80211: mtk: implement DFS status show, cac and nop skip
+ command via debugfs
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -77,7 +77,7 @@
  	struct work_struct background_cac_abort_wk;
  
 diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c
-index 0878b16..ea50cc7 100644
+index 0878b16..d3a0aae 100644
 --- a/net/wireless/debugfs.c
 +++ b/net/wireless/debugfs.c
 @@ -9,6 +9,7 @@
@@ -315,8 +315,8 @@
 +			chandef = &wdev->chandef;
 +			chan = chandef->chan;
 +
-+			if ((chan->flags & IEEE80211_CHAN_RADAR) &&
-+			    chan->dfs_state == NL80211_DFS_USABLE && wdev->cac_started) {
++			if ((cfg80211_chandef_dfs_required(wiphy, chandef, wdev->iftype) > 0) &&
++			    cfg80211_chandef_dfs_usable(wiphy, chandef) && wdev->cac_started) {
 +				rdev_skip_cac(rdev, wdev);
 +			}
 +		}
@@ -327,8 +327,8 @@
 +			chandef = &rdev->background_radar_chandef;
 +			chan = chandef->chan;
 +
-+			if ((chan->flags & IEEE80211_CHAN_RADAR) &&
-+			    chan->dfs_state == NL80211_DFS_USABLE &&
++			if ((cfg80211_chandef_dfs_required(wiphy, chandef, wdev->iftype) > 0) &&
++			    cfg80211_chandef_dfs_usable(wiphy, chandef) &&
 +			    rdev->background_cac_started) {
 +				// Let current jiffies > dfs_state_entered_jiffies + CAC time
 +				cac_time = rdev->background_cac_time_ms;
@@ -454,5 +454,5 @@
  
  #undef TRACE_INCLUDE_PATH
 -- 
-2.36.1
+2.18.0
 
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0014--mac80211-mtk-track-obss-color-bitmap.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0014--mac80211-mtk-track-obss-color-bitmap.patch
deleted file mode 100644
index 18d8aab..0000000
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0014--mac80211-mtk-track-obss-color-bitmap.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 40ceb2dcc486ddefb5e4cb69e4cd86906242872c Mon Sep 17 00:00:00 2001
-From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
-Date: Tue, 15 Nov 2022 06:35:48 +0800
-Subject: [PATCH] mac80211: mtk: track obss color bitmap
-
-Track OBSS BSS color when receive their beacon.
-
-Adding 2 tracepoint for debug, usage:
-echo 1 > /sys/kernel/debug/tracing/events/mac80211/bss_color_bitmap/enable
-echo 1 > /sys/kernel/debug/tracing/events/mac80211/bss_color_collision/enable
----
- include/net/cfg80211.h |  1 +
- net/mac80211/rx.c      | 14 ++++++++++++--
- net/mac80211/trace.h   | 35 +++++++++++++++++++++++++++++++++++
- 3 files changed, 48 insertions(+), 2 deletions(-)
-
-diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index c4c0926..e5175c2 100644
---- a/include/net/cfg80211.h
-+++ b/include/net/cfg80211.h
-@@ -307,6 +307,7 @@ struct cfg80211_he_bss_color {
- 	u8 color;
- 	bool enabled;
- 	bool partial;
-+	u64 used_color_bitmap;
- };
- 
- /**
-diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index eb16838..4a6491c 100644
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -3219,9 +3219,18 @@ 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);
--		if (color == bss_conf->he_bss_color.color)
-+
-+		bss_conf->he_bss_color.used_color_bitmap |= BIT_ULL(color);
-+
-+		trace_bss_color_bitmap(color,
-+				       bss_conf->he_bss_color.used_color_bitmap);
-+
-+		if (color == bss_conf->he_bss_color.color) {
-+			trace_bss_color_collision(color);
-+
- 			ieeee80211_obss_color_collision_notify(&rx->sdata->vif,
--							       BIT_ULL(color));
-+				bss_conf->he_bss_color.used_color_bitmap);
-+		}
- 	}
- }
- 
-diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
-index d91498f..013f5e4 100644
---- a/net/mac80211/trace.h
-+++ b/net/mac80211/trace.h
-@@ -2899,6 +2899,41 @@ DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
- 	TP_ARGS(local, sdata, sta)
- );
- 
-+TRACE_EVENT(bss_color_bitmap,
-+	TP_PROTO(u8 color,
-+		 u64 color_bitmap),
-+
-+	TP_ARGS(color, color_bitmap),
-+
-+	TP_STRUCT__entry(
-+		__field(u8, color)
-+		__field(u64, color_bitmap)
-+	),
-+
-+	TP_fast_assign(
-+		__entry->color = color;
-+		__entry->color_bitmap = color_bitmap;
-+	),
-+
-+	TP_printk(
-+		"color=%u color_bitmap=0x%llx", __entry->color, __entry->color_bitmap
-+	)
-+);
-+
-+TRACE_EVENT(bss_color_collision,
-+	TP_PROTO(u8 color),
-+
-+	TP_ARGS(color),
-+
-+	TP_STRUCT__entry(__field(u8, color)),
-+
-+	TP_fast_assign(
-+		__entry->color = color;
-+	),
-+
-+	TP_printk("collision detected on color %u", __entry->color)
-+);
-+
- #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
- 
- #undef TRACE_INCLUDE_PATH
--- 
-2.36.1
-
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch
new file mode 100644
index 0000000..3ddcb67
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch
@@ -0,0 +1,125 @@
+From eee41e0fa9bff506c8402b8cc86ae5e688fdc2c2 Mon Sep 17 00:00:00 2001
+From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
+Date: Wed, 8 Mar 2023 06:23:55 +0800
+Subject: [PATCH] mac80211: mtk: track obss color bitmap
+
+Track OBSS BSS color when receive their beacon.
+
+Adding 2 tracepoint for debug, usage:
+echo 1 > /sys/kernel/debug/tracing/events/mac80211/bss_color_bitmap/enable
+echo 1 > /sys/kernel/debug/tracing/events/mac80211/bss_color_collision/enable
+---
+ include/net/mac80211.h |  5 +++--
+ net/mac80211/cfg.c     |  4 ++--
+ net/mac80211/rx.c      |  9 +++++++--
+ net/mac80211/trace.h   | 21 +++++++++++++++++++++
+ 4 files changed, 33 insertions(+), 6 deletions(-)
+
+diff --git a/include/net/mac80211.h b/include/net/mac80211.h
+index 6419397..c6cadf7 100644
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -699,6 +699,7 @@ struct ieee80211_bss_conf {
+ 	} he_oper;
+ 	struct ieee80211_he_obss_pd he_obss_pd;
+ 	struct cfg80211_he_bss_color he_bss_color;
++	u64 used_color_bitmap;
+ 	struct ieee80211_fils_discovery fils_discovery;
+ 	u32 unsol_bcast_probe_resp_interval;
+ 	bool s1g;
+@@ -6875,7 +6876,7 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
+ 					  struct ieee80211_vif *vif);
+ 
+ /**
+- * ieeee80211_obss_color_collision_notify - notify userland about a BSS color
++ * ieee80211_obss_color_collision_notify - notify userland about a BSS color
+  * collision.
+  *
+  * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+@@ -6883,7 +6884,7 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
+  *	aware of.
+  */
+ void
+-ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
++ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+ 				       u64 color_bitmap);
+ 
+ /**
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
+index 0a6257d..86d231b 100644
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4435,7 +4435,7 @@ void ieee80211_color_change_finish(struct ieee80211_vif *vif)
+ EXPORT_SYMBOL_GPL(ieee80211_color_change_finish);
+ 
+ void
+-ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
++ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+ 				       u64 color_bitmap)
+ {
+ 	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+@@ -4445,7 +4445,7 @@ ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+ 
+ 	cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap);
+ }
+-EXPORT_SYMBOL_GPL(ieeee80211_obss_color_collision_notify);
++EXPORT_SYMBOL_GPL(ieee80211_obss_color_collision_notify);
+ 
+ static int
+ ieee80211_color_change(struct wiphy *wiphy, struct net_device *dev,
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index eb16838..36fcf97 100644
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -3219,9 +3219,14 @@ 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);
++
++		bss_conf->used_color_bitmap |= BIT_ULL(color);
++
++		trace_bss_color_bitmap(color, bss_conf->used_color_bitmap);
++
+ 		if (color == bss_conf->he_bss_color.color)
+-			ieeee80211_obss_color_collision_notify(&rx->sdata->vif,
+-							       BIT_ULL(color));
++			ieee80211_obss_color_collision_notify(&rx->sdata->vif,
++				bss_conf->used_color_bitmap);
+ 	}
+ }
+ 
+diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
+index bbda9e9..bd43aab 100644
+--- a/net/mac80211/trace.h
++++ b/net/mac80211/trace.h
+@@ -2901,6 +2901,27 @@ DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
+ );
+ #endif
+ 
++TRACE_EVENT(bss_color_bitmap,
++	TP_PROTO(u8 color,
++		 u64 color_bitmap),
++
++	TP_ARGS(color, color_bitmap),
++
++	TP_STRUCT__entry(
++		__field(u8, color)
++		__field(u64, color_bitmap)
++	),
++
++	TP_fast_assign(
++		__entry->color = color;
++		__entry->color_bitmap = color_bitmap;
++	),
++
++	TP_printk(
++		"color=%u color_bitmap=0x%llx", __entry->color, __entry->color_bitmap
++	)
++);
++
+ #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
+ 
+ #undef TRACE_INCLUDE_PATH
+-- 
+2.39.0
+
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0015-mac80211-mtk-aging-color-bitmap.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0017-mac80211-mtk-aging-color-bitmap.patch
similarity index 74%
rename from recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0015-mac80211-mtk-aging-color-bitmap.patch
rename to recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0017-mac80211-mtk-aging-color-bitmap.patch
index 4ed9142..3577abd 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0015-mac80211-mtk-aging-color-bitmap.patch
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0017-mac80211-mtk-aging-color-bitmap.patch
@@ -1,32 +1,32 @@
-From f6cd955e1c042a00691fa80d231495024cfcf7a5 Mon Sep 17 00:00:00 2001
+From 13c1f52aa61fe71335711e16216ba6abb33a8ead Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
-Date: Tue, 15 Nov 2022 11:03:22 +0800
+Date: Wed, 8 Mar 2023 06:32:42 +0800
 Subject: [PATCH] mac80211: mtk: ageout color bitmap
 
 Adding a periodic work which runs once per second to check BSS color.
 OBSS BSS Color will be ageout if not seen for 10 seconds.
 ---
- include/net/cfg80211.h     |  1 +
+ include/net/mac80211.h     |  1 +
  net/mac80211/cfg.c         | 25 +++++++++++++++++++++++++
- net/mac80211/ieee80211_i.h |  4 ++++
+ net/mac80211/ieee80211_i.h |  5 +++++
  net/mac80211/iface.c       |  5 +++++
  net/mac80211/rx.c          |  1 +
- 5 files changed, 36 insertions(+)
+ 5 files changed, 37 insertions(+)
 
-diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
-index e5175c2..3e826f0 100644
---- a/include/net/cfg80211.h
-+++ b/include/net/cfg80211.h
-@@ -308,6 +308,7 @@ struct cfg80211_he_bss_color {
- 	bool enabled;
- 	bool partial;
+diff --git a/include/net/mac80211.h b/include/net/mac80211.h
+index c6cadf7..6f8c661 100644
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -700,6 +700,7 @@ struct ieee80211_bss_conf {
+ 	struct ieee80211_he_obss_pd he_obss_pd;
+ 	struct cfg80211_he_bss_color he_bss_color;
  	u64 used_color_bitmap;
 +	u64 color_last_seen[64];
- };
- 
- /**
+ 	struct ieee80211_fils_discovery fils_discovery;
+ 	u32 unsol_bcast_probe_resp_interval;
+ 	bool s1g;
 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index a7b6284..f084912 100644
+index 86d231b..82e44d2 100644
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
 @@ -4425,6 +4425,31 @@ unlock:
@@ -38,17 +38,17 @@
 +	struct ieee80211_sub_if_data *sdata =
 +		container_of(work, struct ieee80211_sub_if_data,
 +			     color_aging_work.work);
-+	struct cfg80211_he_bss_color *he_bss_color = &sdata->vif.bss_conf.he_bss_color;
++	struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
 +	int i = 0;
 +
 +	sdata_lock(sdata);
 +
 +	for (i = 0; i < IEEE80211_BSS_COLOR_MAX; i++) {
 +		/* ageout if not seen for a period */
-+		if ((he_bss_color->used_color_bitmap & BIT_ULL(i)) &&
-+		    time_before(he_bss_color->color_last_seen[i],
++		if ((bss_conf->used_color_bitmap & BIT_ULL(i)) &&
++		    time_before(bss_conf->color_last_seen[i],
 +			jiffies - IEEE80211_BSS_COLOR_AGEOUT_TIME * HZ)) {
-+			he_bss_color->used_color_bitmap &= ~BIT_ULL(i);
++			bss_conf->used_color_bitmap &= ~BIT_ULL(i);
 +		}
 +	}
 +
@@ -62,7 +62,7 @@
  {
  	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
 diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index 6edabd8..415f202 100644
+index 6edabd8..2519c14 100644
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
 @@ -1033,6 +1033,8 @@ struct ieee80211_sub_if_data {
@@ -87,7 +87,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 43f6cb0..7f26828 100644
+index d314f39..ba25327 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
 @@ -466,6 +466,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
@@ -99,7 +99,7 @@
  
  	if (sdata->wdev.cac_started) {
  		chandef = sdata->vif.bss_conf.chandef;
-@@ -1804,6 +1806,9 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
+@@ -1758,6 +1760,9 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
  		skb_queue_head_init(&sdata->u.ap.ps.bc_buf);
  		INIT_LIST_HEAD(&sdata->u.ap.vlans);
  		sdata->vif.bss_conf.bssid = sdata->vif.addr;
@@ -110,17 +110,17 @@
  	case NL80211_IFTYPE_P2P_CLIENT:
  		type = NL80211_IFTYPE_STATION;
 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 789a41b..4a6491c 100644
+index 36fcf97..31d3bb4 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
 @@ -3221,6 +3221,7 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
  				      IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
  
- 		bss_conf->he_bss_color.used_color_bitmap |= BIT_ULL(color);
-+		bss_conf->he_bss_color.color_last_seen[color] = jiffies;
+ 		bss_conf->used_color_bitmap |= BIT_ULL(color);
++		bss_conf->color_last_seen[color] = jiffies;
+ 
+ 		trace_bss_color_bitmap(color, bss_conf->used_color_bitmap);
  
- 		trace_bss_color_bitmap(color,
- 				       bss_conf->he_bss_color.used_color_bitmap);
 -- 
 2.39.0
 
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc b/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
index dcebb38..70cea85 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
@@ -62,10 +62,10 @@
     file://mtk-0011-mac80211-mtk-Set-TWT-Information-Frame-Disabled-bit-.patch \
     file://mtk-0012-mac80211-mtk-check-the-control-channel-before-downgr.patch \
     file://mtk-0013-mac80211-mtk-fix-tx-amsdu-aggregation.patch \
-    file://mtk-0014--mac80211-mtk-track-obss-color-bitmap.patch \
     file://mtk-0014-mac80211-mtk-add-sta-assisted-DFS-state-update-mecha.patch \
-    file://mtk-0015-mac80211-mtk-aging-color-bitmap.patch \
     file://mtk-0015-nl80211-mtk-Mark-DFS-channel-as-available-for-CSA.patch \
+    file://mtk-0016-mac80211-mtk-track-obss-color-bitmap.patch \
+    file://mtk-0017-mac80211-mtk-aging-color-bitmap.patch \
     file://mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fil.patch \
     file://mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-i.patch \
     file://mtk-9902-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch \
diff --git a/recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch b/recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch
index f405a43..d88e542 100644
--- a/recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch
@@ -1,7 +1,7 @@
-From 5034a64c8d1905c639f2bb26f538f4d2d7703a21 Mon Sep 17 00:00:00 2001
+From 9f848ad3fee22fb9de2dce18ddc2a0f54a519b68 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Wed, 17 Aug 2022 13:40:24 +0800
-Subject: [PATCH 1009/1009] mt76: mt7915: add fw_version dump
+Subject: [PATCH] mt76: mt7915: add fw_version dump
 
 ---
  mt76.h               |  4 ++++
@@ -59,7 +59,7 @@
  		struct mt76_connac2_patch_sec *sec;
  		u32 len, addr, mode;
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 4662f46f..05dc7d5a 100644
+index 4662f46f..f222efe7 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -2799,6 +2799,22 @@ static int mt7915_agginfo_read_band1(struct seq_file *s, void *data)
@@ -70,7 +70,7 @@
 +{
 +	struct mt7915_dev *dev = dev_get_drvdata(s->private);
 +	struct mt76_dev *mdev = NULL;
-+	seq_printf(s, "Version: 2.2.8.0\n");
++	seq_printf(s, "Version: 2.2.10.0\n");
 +
 +	if (!test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state))
 +		return 0;
diff --git a/recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch b/recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
index ec25241..9718b76 100644
--- a/recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
@@ -47,7 +47,7 @@
 +
 +	if (nla_put_u64_64bit(skb,
 +	    MTK_VENDOR_ATTR_AVAL_BSS_COLOR_BMP,
-+	    ~bss_conf->he_bss_color.used_color_bitmap, NL80211_ATTR_PAD))
++	    ~bss_conf->used_color_bitmap, NL80211_ATTR_PAD))
 +		return -ENOMEM;
 +	len += 1;
 +
diff --git a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch b/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
index deab403..27f30fe 100644
--- a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
@@ -1,15 +1,16 @@
-From af605bd8d821cc9cd9dd4f3928c4632113574dc4 Mon Sep 17 00:00:00 2001
+From 8d299b6aeba33d46ff1abd15a3f37cc0dd649487 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Fri, 25 Nov 2022 10:38:53 +0800
-Subject: [PATCH 3001/3013] mt76: mt7915: wed: add wed tx support
+Subject: [PATCH] mt76: mt7915: wed: add wed tx support
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
- mt76_connac.h |  1 +
- mt7915/mac.c  | 11 +++++++----
- mt7915/main.c |  4 ++--
- mt7915/mmio.c |  5 +++--
- 4 files changed, 13 insertions(+), 8 deletions(-)
+ mt76_connac.h   |  1 +
+ mt7915/mac.c    | 11 +++++++----
+ mt7915/main.c   |  4 ++--
+ mt7915/mmio.c   |  5 +++--
+ mt7915/mt7915.h |  2 +-
+ 5 files changed, 14 insertions(+), 9 deletions(-)
 
 diff --git a/mt76_connac.h b/mt76_connac.h
 index b339c50b..323203df 100644
@@ -115,6 +116,19 @@
  
  	ret = dma_set_mask(wed->dev, DMA_BIT_MASK(32));
  	if (ret)
+diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
+index c14d13ae..fd31ee9f 100644
+--- a/mt7915/mt7915.h
++++ b/mt7915/mt7915.h
+@@ -55,7 +55,7 @@
+ #define MT7916_EEPROM_SIZE		4096
+ 
+ #define MT7915_EEPROM_BLOCK_SIZE	16
+-#define MT7915_HW_TOKEN_SIZE		4096
++#define MT7915_HW_TOKEN_SIZE		7168
+ #define MT7915_TOKEN_SIZE		8192
+ 
+ #define MT7915_CFEND_RATE_DEFAULT	0x49	/* OFDM 24M */
 -- 
 2.18.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
index 4e22353..bcb5b02 100644
--- a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
@@ -1,7 +1,7 @@
-From 72dda83ffb5d48393da817757f537770aeca4e40 Mon Sep 17 00:00:00 2001
+From 96b429c7da1a06920985887fbe522750b915dfa0 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Fri, 6 Jan 2023 18:18:50 +0800
-Subject: [PATCH 3006/3013] mt76: mt7915: wed: add rxwi for further in chip rro
+Subject: [PATCH] mt76: mt7915: wed: add rxwi for further in chip rro
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -438,12 +438,12 @@
  		.tx_complete_skb = mt76_connac_tx_complete_skb,
  		.rx_skb = mt7915_queue_rx_skb,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 0fbc1047..dd6b673b 100644
+index 1d906b78..f635ae2d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -57,6 +57,7 @@
  #define MT7915_EEPROM_BLOCK_SIZE	16
- #define MT7915_HW_TOKEN_SIZE		4096
+ #define MT7915_HW_TOKEN_SIZE		7168
  #define MT7915_TOKEN_SIZE		8192
 +#define MT7915_RX_TOKEN_SIZE		4096
  
diff --git a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_dsp.bin b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_dsp.bin
new file mode 100755
index 0000000..91fd282
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_dsp.bin
Binary files differ
diff --git a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_rom_patch.bin b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_rom_patch.bin
index 6a25364..d54f1af 100644
--- a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_rom_patch.bin
+++ b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_rom_patch.bin
Binary files differ
diff --git a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wa.bin b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wa.bin
index 3201bfc..65abe42 100644
--- a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wa.bin
+++ b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wa.bin
Binary files differ
diff --git a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm.bin b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm.bin
index 4375155..c171e57 100644
--- a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm.bin
+++ b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm.bin
Binary files differ
diff --git a/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm_tm.bin b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm_tm.bin
new file mode 100644
index 0000000..7de344f
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/src/firmware/mt7996/mt7996_wm_tm.bin
Binary files differ
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
similarity index 100%
rename from recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch
rename to recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
similarity index 100%
rename from recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch
rename to recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
index 5e6bf88..283b55c 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
@@ -78,11 +78,11 @@
     file://mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
     file://mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
     file://mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch \
-    file://mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch \
     file://mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch \
     file://mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch \
     file://mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch \
-    file://mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0100-hostapd-mtk-update-eht-operation-elem.patch \
     "
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
similarity index 100%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
similarity index 100%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
diff --git a/recipes-wifi/wpa-supplicant/files/patches/patches.inc b/recipes-wifi/wpa-supplicant/files/patches/patches.inc
index 48bd493..3ec1290 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/patches.inc
+++ b/recipes-wifi/wpa-supplicant/files/patches/patches.inc
@@ -78,10 +78,10 @@
     file://mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
     file://mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
     file://mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch \
-    file://mtk-0016-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch \
     file://mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch \
     file://mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch \
     file://mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch \
-    file://mtk-0020-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support.patch \
+    file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     "