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

[Description]
8719319c [MAC80211][hostapd][Fix wpa_supplicant configuration parsing error]
0ef5b371 [MAC80211][Rebase Patches][Fix WiFi6 build error]
4f47e260 [MAC80211][core][Fix kernel warning of cfg80211_bss_color_notify]
4b3f08e9 [MAC80211][Rebase Patches][Fix WiFi6 build error]
9d44e5de [MAC80211][mt76][Fix tlv length of mt7915_mcu_get_chan_mib_info]
b63d160d [MAC80211][misc][Remove duplicate group cipher setting in wpa_supplicant]
7a5de8c1 [MAC80211][mt76][Refactor txpower table dump and fix change channel not update]
a0e1acfa [MAC80211][app][Add atenl eeprom ibf cal sync command]
af3af140 [mac80211][mt76][Set station mode TXOP to 0]
9740ca99 [MAC80211][led][report tx and rx byte to tpt_led]
793674de [MAC80211][misc][Rebase hostapd patches]
25a39b5e [MAC80211][hostapd][Fix extender mode issues]
da19c3b2 [MAC80211][mt76][Add Eagle default bin for sku 404]
476c7e8d [MAC80211][mt76][Add mt7996_eeprom_dual_404.bin to mt76 makefile]
beeb6f42 [MT76][hostapd][add extension IE list for non-inherit IE]
5ef327e8 [MAC80211][Core][Enable RNR in 2.4G/5G by default]
10f3f90e [MAC80211][misc][Fix uci not set group cipher]
aa3efcbb [MAC80211][hostapd][Update MU EDCA Parameter update count]
d698fe08 [MAC80211][hnat][Add UL/DL HQoS support]
95f59a1a [MAC80211][misc][Add mediatek external reference release information]
e9c4b56d [mac80211][Rebase Patches][mt76 build fail]

[Release-log]

Change-Id: I2c9d4deafa9d865f40af64d75b9e56da74a88b11
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
index 27d4416..af79b24 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
@@ -1,8 +1,8 @@
-From 9444dedd3f8bd97887c9cf274587b4c76f94d621 Mon Sep 17 00:00:00 2001
+From ff273381d463d82898df70cb7b43341405e3d943 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 12 May 2023 05:21:28 +0800
-Subject: [PATCH 26/32] hostapd: mtk: avoid setting beacon after wpa_supplicant
- stop the AP
+Subject: [PATCH] hostapd: mtk: Avoid setting beacon after wpa_supplicant stop
+ the AP
 
 Add a new variable 'stopped_by_supplicant' to indicate the AP
 interface is currently stopped by co-locating STA interface.
@@ -10,16 +10,16 @@
 will reload the co-locating AP interfaces and marks the
 'stopped_by_supplicant' as 0.
 ---
- hostapd/ctrl_iface.c   | 4 ++++
- src/ap/beacon.c        | 4 ++++
- src/ap/bss_load.c      | 3 ++-
- src/ap/ctrl_iface_ap.c | 4 +++-
- src/ap/hostapd.c       | 2 ++
- src/ap/hostapd.h       | 1 +
- 6 files changed, 16 insertions(+), 2 deletions(-)
+ hostapd/ctrl_iface.c   |  4 ++++
+ src/ap/beacon.c        |  5 ++++-
+ src/ap/bss_load.c      | 10 +++++++---
+ src/ap/ctrl_iface_ap.c |  4 +++-
+ src/ap/hostapd.c       |  4 +++-
+ src/ap/hostapd.h       |  1 +
+ 6 files changed, 22 insertions(+), 6 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 9989a04ce..4952bef89 100644
+index 9989a04..4952bef 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
 @@ -194,11 +194,15 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
@@ -39,19 +39,20 @@
  
  	iface->interfaces->config_read_cb = config_read_cb;
 diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index f26e5254c..24144feff 100644
+index f26e525..1aaeaa8 100644
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
-@@ -2247,6 +2247,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
+@@ -2246,7 +2246,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
+ 			continue;
  
  		for (i = 0; i < other->num_bss; i++) {
- 			if (other->bss[i] && other->bss[i]->started)
+-			if (other->bss[i] && other->bss[i]->started)
 +			if (other->bss[i] && other->bss[i]->started &&
 +			    !other->bss[i]->stopped_by_supplicant)
  				__ieee802_11_set_beacon(other->bss[i]);
  		}
  	}
-@@ -2262,6 +2264,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
+@@ -2262,6 +2263,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
  
  	for (i = 0; i < iface->num_bss; i++) {
  		if (iface->bss[i]->started &&
@@ -59,7 +60,7 @@
  		    ieee802_11_set_beacon(iface->bss[i]) < 0)
  			ret = -1;
  	}
-@@ -2278,6 +2281,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
+@@ -2278,6 +2280,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
  
  	for (i = 0; i < iface->num_bss; i++) {
  		if (iface->bss[i]->beacon_set_done && iface->bss[i]->started &&
@@ -68,21 +69,42 @@
  			ret = -1;
  	}
 diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
-index 725d3cd34..ae5552140 100644
+index 725d3cd..f2a1a10 100644
 --- a/src/ap/bss_load.c
 +++ b/src/ap/bss_load.c
-@@ -46,7 +46,8 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
- 	int err;
- 	struct hostapd_iface *iface = hapd->iface;
- 
--	if (!(hapd->beacon_set_done && hapd->started))
-+	if (!(hapd->beacon_set_done && hapd->started &&
-+	      !hapd->stopped_by_supplicant))
+@@ -49,6 +49,9 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ 	if (!(hapd->beacon_set_done && hapd->started))
  		return;
  
++	if(hapd->stopped_by_supplicant)
++		goto skip_update;
++
  	err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
+ 	if (err) {
+ 		wpa_printf(MSG_ERROR, "BSS Load: Failed to get survey data");
+@@ -57,9 +60,6 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ 
+ 	ieee802_11_set_beacon(hapd);
+ 
+-	if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
+-		return;
+-
+ 	if (hapd->conf->chan_util_avg_period) {
+ 		iface->chan_util_samples_sum += iface->channel_utilization;
+ 		iface->chan_util_num_sample_periods +=
+@@ -75,6 +75,10 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ 		}
+ 	}
+ 
++skip_update:
++	if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
++		return;
++
+ 	eloop_register_timeout(sec, usec, update_channel_utilization, hapd,
+ 			       NULL);
+ }
 diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index aab8a4665..d52188bb7 100644
+index aab8a46..d52188b 100644
 --- a/src/ap/ctrl_iface_ap.c
 +++ b/src/ap/ctrl_iface_ap.c
 @@ -1028,8 +1028,10 @@ int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
@@ -98,7 +120,7 @@
  	return 0;
  }
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index abadd1ad0..6e6ae77d7 100644
+index abadd1a..afe0611 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -508,6 +508,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
@@ -117,8 +139,17 @@
  
  	if (!first || first == -1) {
  		u8 *addr = hapd->own_addr;
+@@ -4285,7 +4287,7 @@ void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap)
+ {
+ 	struct os_reltime now;
+ 
+-	if (hapd->cca_in_progress)
++	if (hapd->cca_in_progress || hapd->stopped_by_supplicant)
+ 		return;
+ 
+ 	if (os_get_reltime(&now))
 diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
-index 072205c3c..4f1f98824 100644
+index 072205c..4f1f988 100644
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
 @@ -191,6 +191,7 @@ struct hostapd_data {
@@ -130,5 +161,5 @@
  	u8 own_addr[ETH_ALEN];
  	u8 mld_addr[ETH_ALEN];
 -- 
-2.39.2
+2.25.1
 
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
new file mode 100644
index 0000000..295ce2b
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
@@ -0,0 +1,28 @@
+From 11c7b9e7b7d4dfef23b2f8f2d72591c1c3590fd5 Mon Sep 17 00:00:00 2001
+From: MeiChia Chiu <meichia.chiu@mediatek.com>
+Date: Fri, 14 Jul 2023 17:19:13 +0800
+Subject: [PATCH] hostapd: mtk: Update parameter_set_count in MU EDCA IE
+
+without this patch, MU EDCA Parameter update count not equal to
+WMM Parameter set count.
+---
+ src/ap/ieee802_11_he.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
+index 9407dd6..353e815 100644
+--- a/src/ap/ieee802_11_he.c
++++ b/src/ap/ieee802_11_he.c
+@@ -316,6 +316,9 @@ u8 * hostapd_eid_he_mu_edca_parameter_set(struct hostapd_data *hapd, u8 *eid)
+ 	edca = (struct ieee80211_he_mu_edca_parameter_set *) pos;
+ 	os_memcpy(edca, &hapd->iface->conf->he_mu_edca, sizeof(*edca));
+ 
++	if (hapd->conf->wmm_enabled)
++		edca->he_qos_info = hapd->parameter_set_count % 0xf;
++
+ 	wpa_hexdump(MSG_DEBUG, "HE: MU EDCA Parameter Set element",
+ 		    pos, sizeof(*edca));
+ 
+-- 
+2.39.0
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch
new file mode 100644
index 0000000..45a340d
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch
@@ -0,0 +1,53 @@
+From d65c803ab5583dddc6574b09fee47ccfb39cb99b Mon Sep 17 00:00:00 2001
+From: mtk20656 <chank.chen@mediatek.com>
+Date: Mon, 24 Jul 2023 11:30:27 +0800
+Subject: [PATCH] hostapd: mtk: add extension IE list for non-inherit IE in
+ mbssid
+
+Certain clients do not scan all non tx profiles due to absence of
+element ID extension list which is mandatory field in non inheritance
+IE. Non inheritance Element ID is followed by extension element ID.
+Length is expected to be mentioned. Currently we do not support any
+extension element and hence filling length as 0.
+
+Signed-off-by: mtk20656 <chank.chen@mediatek.com>
+---
+ src/ap/ieee802_11.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+old mode 100644
+new mode 100755
+index 1bf5bea..d36798e
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -7639,7 +7639,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
+ 		else if (hapd->conf->xrates_supported)
+ 			ie_count++;
+ 		if (ie_count)
+-			nontx_profile_len += 4 + ie_count;
++			nontx_profile_len += 5 + ie_count;
+ 
+ 		if (len + nontx_profile_len > 255)
+ 			break;
+@@ -7780,11 +7780,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
+ 			non_inherit_ie[ie_count++] = WLAN_EID_EXT_SUPP_RATES;
+ 		if (ie_count) {
+ 			*eid++ = WLAN_EID_EXTENSION;
+-			*eid++ = 2 + ie_count;
++			*eid++ = 3 + ie_count;
+ 			*eid++ = WLAN_EID_EXT_NON_INHERITANCE;
+ 			*eid++ = ie_count;
+ 			os_memcpy(eid, non_inherit_ie, ie_count);
+ 			eid += ie_count;
++			/* Element ID extension list is mandatory part of non inheritance IE.
++			 * It has a length field followed by extension IEs. Currently no
++			 * extension IEs are supported so filling length as 0.
++			 */
++			*eid++ = 0;
+ 		}
+ 
+ 		*eid_len_pos = (eid - eid_len_pos) - 1;
+-- 
+2.18.0
+
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 e11b91d..78dae59 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
@@ -92,6 +92,8 @@
     file://mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch \
     file://mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch \
     file://mtk-0035-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch \
+    file://mtk-0036-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch \
+    file://mtk-0037-hostapd-mtk-Add-extension-IE-list-for-non-inherit-IE.patch \
     file://mtk-1000-hostapd-mtk-update-eht-operation-element.patch \
     file://mtk-1001-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch \
     "
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
index edab139..6d9f728 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
@@ -1,7 +1,7 @@
-From 6e4d4d6feafd223615cddf334b6c3beb6e5191cc Mon Sep 17 00:00:00 2001
+From 046a0312fb59b3658f8fdec314cdfb73a8d6fca4 Mon Sep 17 00:00:00 2001
 From: "howard.hsu" <howard-yh.hsu@mediatek.com>
 Date: Wed, 19 Jan 2022 19:18:07 +0800
-Subject: [PATCH 01/29] hostapd: mtk: Add neighbor report and BSS Termination
+Subject: [PATCH 01/35] hostapd: mtk: Add neighbor report and BSS Termination
  for MBO certification
 
 1. Add hostapd_neighbor_count() and hostapd_neighbor_insert_buffer ()
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
index b4ce65c..3459c19 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
@@ -1,7 +1,7 @@
-From 1320c3e6d39c08371da1a80ffa1ae3ecb711c742 Mon Sep 17 00:00:00 2001
+From d927ebf4a9373eabd383514bad580dc9d7fba3a4 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Tue, 20 Sep 2022 19:33:45 +0800
-Subject: [PATCH 02/29] hostapd: mtk: print sae groups by hostapd ctrl
+Subject: [PATCH 02/35] hostapd: mtk: print sae groups by hostapd ctrl
 
 ---
  hostapd/ctrl_iface.c | 13 +++++++++++++
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
index 8a2ed4d..dde876a 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
@@ -1,7 +1,7 @@
-From 11a3a8dcba0e17a032bf8445c6bb50835cbe8e85 Mon Sep 17 00:00:00 2001
+From 33afb892c534b88aea9206740c53a3da0966861f Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Tue, 31 May 2022 21:15:54 +0800
-Subject: [PATCH 03/29] hostapd: mtk: add support for runtime set in-band
+Subject: [PATCH 03/35] hostapd: mtk: add support for runtime set in-band
  discovery
 
 Usage:
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
index 0490689..a5d2898 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
@@ -1,7 +1,7 @@
-From f05288a19fe295685de4cb419c31f4bd11a774df Mon Sep 17 00:00:00 2001
+From 258ca680978d344390c79db8cc9431d89e794c3b Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Mon, 30 May 2022 15:04:57 +0800
-Subject: [PATCH 04/29] hostapd: mtk: Add mtk_vendor.h
+Subject: [PATCH 04/35] hostapd: mtk: Add mtk_vendor.h
 
 ---
  src/common/mtk_vendor.h | 195 ++++++++++++++++++++++++++++++++++++++++
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index ade6b9d..818f367 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
@@ -1,7 +1,7 @@
-From c69f15f922f2095b6f36a5bbd5186e4ff5e44021 Mon Sep 17 00:00:00 2001
+From fd2d3a61e36bff90a1fcd88e208da9278e5e3e18 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Mon, 30 May 2022 16:31:34 +0800
-Subject: [PATCH 05/29] hostapd: mtk: Support EDCCA hostapd configuration
+Subject: [PATCH 05/35] hostapd: mtk: Support EDCCA hostapd configuration
 
 edcca_enable and edcca_compensation and implement edcca related handlers.
 ---
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
index 026b4fd..f51b42f 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
@@ -1,7 +1,7 @@
-From f27bf939f8e2815e2f65790e538fba3bfc46a9c3 Mon Sep 17 00:00:00 2001
+From e063e89785d74506976e34a0a3cbb14836d6b8e3 Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Tue, 9 Aug 2022 10:23:44 -0700
-Subject: [PATCH 06/29] hostapd: mtk: Add hostapd MU SET/GET control
+Subject: [PATCH 06/35] hostapd: mtk: Add hostapd MU SET/GET control
 
 ---
  hostapd/config_file.c             |   9 +++
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
index b8d1836..cba0282 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
@@ -1,7 +1,7 @@
-From 94c7af6787585f1d063ce90c33208aa7e4f5730e Mon Sep 17 00:00:00 2001
+From 4a1abf37db598ee0965923ab579078baffabf73c Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Fri, 2 Sep 2022 01:03:23 +0800
-Subject: [PATCH 07/29] hostapd: mtk: Add three wire PTA ctrl hostapd vendor
+Subject: [PATCH 07/35] hostapd: mtk: Add three wire PTA ctrl hostapd vendor
  command
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
index acefdee..031e6b4 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
@@ -1,7 +1,7 @@
-From a75dc659e600dc2d6f7eda2dc9886747b6c55254 Mon Sep 17 00:00:00 2001
+From 579573f2b64970fab71640fce57cbacfdced8d22 Mon Sep 17 00:00:00 2001
 From: mtk27835 <shurong.wen@mediatek.com>
 Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 08/29] hostapd: mtk: Add hostapd iBF control
+Subject: [PATCH 08/35] hostapd: mtk: Add hostapd iBF control
 
 Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
 ---
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
index d96423d..96c0af7 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
@@ -1,7 +1,7 @@
-From 0c960d33f909f8c119d533cc57b1585d77e319e1 Mon Sep 17 00:00:00 2001
+From 250d224a1cff6bed4cd51c2c5eeb3e9bd7ef8e49 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Thu, 22 Sep 2022 16:08:09 +0800
-Subject: [PATCH 09/29] hostapd: mtk: Do not include HE capab IE if associated
+Subject: [PATCH 09/35] hostapd: mtk: Do not include HE capab IE if associated
  sta's HE capab IE is invalid
 
 ---
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
index ffe0426..135ba9a 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
@@ -1,7 +1,7 @@
-From f57c471059e4e9909b7fc6cbd351343cd2628e2c Mon Sep 17 00:00:00 2001
+From 31eb9b93e4bc7006eb96fbfc8201ad22d3faf061 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Feb 2023 14:55:49 +0800
-Subject: [PATCH 10/29] hostapd: mtk: Add DFS detection mode
+Subject: [PATCH 10/35] hostapd: mtk: Add DFS detection mode
 
 Add DFS detection mode for testing radar detection rate.
 If DFS detection mode is on, AP will not switch channels when receiving
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
index 187f804..69f3fa2 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
@@ -1,7 +1,7 @@
-From 43e5bfa91c67528eb2a37071e0e4a6f32807ad8f Mon Sep 17 00:00:00 2001
+From b087dbc78f6911b16c9c00ac0a9246a89871225f Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Feb 2023 14:56:55 +0800
-Subject: [PATCH 11/29] hostapd: mtk: Add DFS offchan channel switch
+Subject: [PATCH 11/35] hostapd: mtk: Add DFS offchan channel switch
 
 Add DFS background chain channel switch command for testing purpose.
 This feature is implemented via hostapd_cli command.
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
index 53936b2..aa72f2a 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
@@ -1,7 +1,7 @@
-From 8dee72b3608710a9cb6e9694c3d6535be000e104 Mon Sep 17 00:00:00 2001
+From 9b82b5966b57403f389759b6dfb8318dd862b480 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 16 Dec 2022 03:57:11 +0800
-Subject: [PATCH 12/29] hostapd: mtk: Add amsdu set get ctrl
+Subject: [PATCH 12/35] hostapd: mtk: Add amsdu set get ctrl
 
 ---
  hostapd/config_file.c             |   9 +++
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
index 094e102..84c1221 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
@@ -1,7 +1,7 @@
-From 858e23d3ff04d156a6391168d2554796962b294c Mon Sep 17 00:00:00 2001
+From cbec0a6786a799da0411d5b11f22151a7a66c51c Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Thu, 12 Jan 2023 15:18:19 +0800
-Subject: [PATCH 13/29] hostapd: mtk: Add he_ldpc configuration
+Subject: [PATCH 13/35] hostapd: mtk: Add he_ldpc configuration
 
 ---
  hostapd/config_file.c        | 2 ++
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
index abca258..8805a45 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0014-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
@@ -1,7 +1,7 @@
-From d45d0c40a81b1196b0dc4cc8da08fe736f04022f Mon Sep 17 00:00:00 2001
+From ad503bc69ccedcc7272d85ad9ebb2a5653853a15 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Tue, 17 Jan 2023 13:25:18 +0800
-Subject: [PATCH 14/29] hostapd: mtk: Add the broadcast destination address of
+Subject: [PATCH 14/35] hostapd: mtk: Add the broadcast destination address of
  Probe Response frame on 6 GHz
 
 According to IEEE 802.11ax 26.17.2.3.2,
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
index a74780c..e3e0611 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0015-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
@@ -1,7 +1,7 @@
-From a0cc42414bd6abd0342f2fd06c09650c366c959c Mon Sep 17 00:00:00 2001
+From c585424eaba09fcce7a17250fc7eef84c63f7a3a Mon Sep 17 00:00:00 2001
 From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
 Date: Tue, 24 Jan 2023 19:06:44 +0800
-Subject: [PATCH 15/29] hostapd: mtk: Add vendor command attribute for RTS BW
+Subject: [PATCH 15/35] hostapd: mtk: Add vendor command attribute for RTS BW
  signaling.
 
 Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch
index 30cc7eb..26fd1de 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0016-hostapd-mtk-6G-band-does-not-require-DFS.patch
@@ -1,7 +1,7 @@
-From 08a909a1a06a2231fda12b34aad68c6361c45e6b Mon Sep 17 00:00:00 2001
+From 2598c3fce61bdca1c3b5684e39cbfa368aea9011 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Mon, 13 Feb 2023 11:03:53 +0800
-Subject: [PATCH 16/29] hostapd: mtk: 6G band does not require DFS
+Subject: [PATCH 16/35] hostapd: mtk: 6G band does not require DFS
 
 ---
  src/ap/dfs.c | 1 +
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
index 81e22a2..fe049e9 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0017-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
@@ -1,7 +1,7 @@
-From 4c7054d6a1d7e373d93b6abf309c41c0151e523f Mon Sep 17 00:00:00 2001
+From 6acc166aa7873e91da230047d6ae15a5edf9ada3 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Feb 2023 11:01:18 +0800
-Subject: [PATCH 17/29] hostapd: mtk: Fix sending wrong VHT operation IE in CSA
+Subject: [PATCH 17/35] hostapd: mtk: Fix sending wrong VHT operation IE in CSA
  while using ZWDFS
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
index 059ded9..890198f 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0018-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
@@ -1,7 +1,7 @@
-From d851c49cd0afb0e86676670f8b49170bb0386cba Mon Sep 17 00:00:00 2001
+From 041170e5089b0ec71074ebb0474ac2972e8a2323 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Feb 2023 10:51:47 +0800
-Subject: [PATCH 18/29] hostapd: mtk: Add sta-assisted DFS state update
+Subject: [PATCH 18/35] hostapd: mtk: Add sta-assisted DFS state update
  mechanism
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch
index d5f0dac..07a8510 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0019-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch
@@ -1,7 +1,8 @@
-From a71a78bc51b74d331aeb3f900c03480d058d5233 Mon Sep 17 00:00:00 2001
+From f175ec97644841fb3a07cfbd965994bb7b09683c Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Feb 2023 16:58:20 +0800
-Subject: [PATCH] hostapd: mtk: Fix auto ht issue when switching to DFS channel
+Subject: [PATCH 19/35] hostapd: mtk: Fix auto ht issue when switching to DFS
+ channel
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
index 5b14a77..7aea2dc 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0020-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
@@ -1,7 +1,7 @@
-From c229d874452a61f58b65473d26b89c64b4693908 Mon Sep 17 00:00:00 2001
+From 34fb887dc4a6b88b0eaff76ede9fdd024893b2f9 Mon Sep 17 00:00:00 2001
 From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
 Date: Sat, 29 Apr 2023 06:57:36 +0800
-Subject: [PATCH 20/29] hostapd: mtk: Mark DFS channel as available for CSA.
+Subject: [PATCH 20/35] hostapd: mtk: Mark DFS channel as available for CSA.
 
 ---
  hostapd/ctrl_iface.c   | 10 ++++++++++
@@ -10,11 +10,11 @@
  3 files changed, 12 insertions(+), 1 deletion(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 06cbea1..7b59bb5 100644
+index c33b7a4..9ba6992 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -2705,6 +2705,16 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
- 		settings.freq_params.eht_enabled = iface->conf->ieee80211be;
+@@ -2704,6 +2704,16 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
+ 		settings.freq_params.he_enabled = iface->conf->ieee80211ax;
  	}
  
 +	if (settings.freq_params.radar_background) {
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
index c9b8ea9..e6354bd 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
@@ -1,7 +1,7 @@
-From bed7e913c79fcd0f2d7d686b7d1da0ec8bf4d23f Mon Sep 17 00:00:00 2001
+From 6bcb8ed50638aeecd32cc43287a49e3caecd4b3e Mon Sep 17 00:00:00 2001
 From: mtk20656 <chank.chen@mediatek.com>
 Date: Thu, 2 Mar 2023 10:51:43 +0800
-Subject: [PATCH 21/29] hostapd: mtk: add 11v_mbss and ema support for hostapd
+Subject: [PATCH 21/35] hostapd: mtk: add 11v_mbss and ema support for hostapd
 
 Signed-off-by: mtk20656 <chank.chen@mediatek.com>
 ---
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
index 544ab11..1b23579 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch
@@ -1,7 +1,7 @@
-From 93880afd007b74cb7b56f9711bb0ab07b9858ac1 Mon Sep 17 00:00:00 2001
+From 9b40b6ccf6fd2f4463b389df46d38610001df04e Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Thu, 26 Jan 2023 09:16:00 +0800
-Subject: [PATCH 22/29] hostapd: mtk: Add available color bitmap
+Subject: [PATCH 22/35] hostapd: mtk: Add available color bitmap
 
 Signed-off-by: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 ---
@@ -17,10 +17,10 @@
  9 files changed, 192 insertions(+), 1 deletion(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 7b59bb5..78179aa 100644
+index 9ba6992..e1e9270 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3646,6 +3646,76 @@ hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
+@@ -3645,6 +3645,76 @@ hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
  	return ret;
  }
  
@@ -97,7 +97,7 @@
  
  static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  					      char *buf, char *reply,
-@@ -4213,6 +4283,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4212,6 +4282,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  		reply_len = hostapd_ctrl_iface_set_offchan_ctrl(hapd, buf + 16, reply, reply_size);
  	} else if (os_strncmp(buf, "GET_AMSDU", 9) == 0) {
  		reply_len = hostapd_ctrl_iface_get_amsdu(hapd, reply, reply_size);
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
index 5df63b2..6f8fa7f 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
@@ -1,7 +1,7 @@
-From a2d6ad8b3330feca1ea3f7fc8539a964145371a9 Mon Sep 17 00:00:00 2001
+From add7a84a8a3d33c120c47ff7662134cacbab858e Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Wed, 22 Mar 2023 13:59:29 +0800
-Subject: [PATCH 23/29] hostapd: mtk: Add channel information for hostapd
+Subject: [PATCH 23/35] hostapd: mtk: Add channel information for hostapd
  reload
 
 Add center channel, operating class, and bandwidth into the UPDATE
@@ -15,7 +15,7 @@
  2 files changed, 25 insertions(+), 3 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 78179aa..87448e7 100644
+index e1e9270..4c5d494 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
 @@ -170,6 +170,17 @@ static struct hostapd_config *hostapd_ctrl_iface_config_read(const char *fname)
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
index 57e8b9b..fa0cda1 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
@@ -1,7 +1,7 @@
-From 87dbbd2f6e02272e2ceee1e30dce60828bf0cc1c Mon Sep 17 00:00:00 2001
+From 66398037524443e229ab0ee666237d0bc3d20791 Mon Sep 17 00:00:00 2001
 From: Amit Khatri <amit.khatri@mediatek.com>
 Date: Thu, 23 Mar 2023 14:26:46 +0800
-Subject: [PATCH 24/29] hostapd: mtk: Add support for masking EHT capabilities.
+Subject: [PATCH 24/35] hostapd: mtk: Add support for masking EHT capabilities.
 
 If STA want to disable EHT mode connection.
 STA can set
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0025-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0025-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
index 5eb131b..3d87b10 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0025-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0025-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
@@ -1,7 +1,7 @@
-From 2d97fca26e0c3cd46d1c21cc18d6adc68be60f52 Mon Sep 17 00:00:00 2001
+From f723f9502240a9a7df4cc05eab5f5e9dc3b05c4a Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 20 Mar 2023 16:08:30 +0800
-Subject: [PATCH 25/29] hostapd: mtk: Fix ZWDFS issue in BW 160
+Subject: [PATCH 25/35] hostapd: mtk: Fix ZWDFS issue in BW 160
 
 When background radar is enabled and bandwidth is set to 160, AP will
 fail to startup due to the lack of non-DFS channel.
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0026-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0026-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
index 5872b47..f0e881f 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0026-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0026-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
@@ -1,7 +1,7 @@
-From 4c6d148fea7cd1ea380a792d83d2dabe61e9c869 Mon Sep 17 00:00:00 2001
+From 30d8ea36c092540f7ba29f0b8bd7b6876c427ae0 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 17 Mar 2023 16:17:14 +0800
-Subject: [PATCH 26/29] hostapd: mtk: Add vendor for CAPI certification
+Subject: [PATCH 26/35] hostapd: mtk: Add vendor for CAPI certification
  commands
 
 ---
@@ -16,7 +16,7 @@
  8 files changed, 332 insertions(+), 30 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 87448e7..b0323e7 100644
+index 4c5d494..f338d0f 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
 @@ -38,6 +38,7 @@
@@ -27,7 +27,7 @@
  #include "crypto/tls.h"
  #include "drivers/driver.h"
  #include "eapol_auth/eapol_auth_sm.h"
-@@ -3727,6 +3728,96 @@ hostapd_ctrl_iface_get_aval_color_bmp(struct hostapd_data *hapd, char *buf,
+@@ -3726,6 +3727,96 @@ hostapd_ctrl_iface_get_aval_color_bmp(struct hostapd_data *hapd, char *buf,
  	return pos - buf;
  }
  
@@ -124,7 +124,7 @@
  
  static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  					      char *buf, char *reply,
-@@ -4298,6 +4389,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4297,6 +4388,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  		reply_len = hostapd_ctrl_iface_get_bss_color(hapd, reply, reply_size);
  	} else if (os_strncmp(buf, "AVAL_COLOR_BMP", 14) == 0) {
  		reply_len = hostapd_ctrl_iface_get_aval_color_bmp(hapd, reply, reply_size);
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0027-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0027-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
index eb17c61..1e36006 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0027-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0027-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
@@ -1,7 +1,7 @@
-From 11fefdfadbc5bbdf0fcb4d890ea24906a286db43 Mon Sep 17 00:00:00 2001
+From 2e7059246e059c0ed4cb53906467d4f55df3b664 Mon Sep 17 00:00:00 2001
 From: mtk23888 <dipanshu.mittal@mediatek.com>
 Date: Tue, 4 Apr 2023 13:06:41 +0800
-Subject: [PATCH 27/29] hostapd: mtk: Air Monitor support in hostapd by vendor
+Subject: [PATCH 27/35] hostapd: mtk: Air Monitor support in hostapd by vendor
  NL
 
 Signed-off-by: mtk23888 <dipanshu.mittal@mediatek.com>
@@ -18,10 +18,10 @@
  9 files changed, 352 insertions(+)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index b0323e7..056583c 100644
+index f338d0f..7f91cb6 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3766,6 +3766,44 @@ hostapd_ctrl_iface_ap_wireless(struct hostapd_data *hapd, char *cmd,
+@@ -3765,6 +3765,44 @@ hostapd_ctrl_iface_ap_wireless(struct hostapd_data *hapd, char *cmd,
  
  	if (hostapd_drv_ap_wireless(hapd, (u8) sub_cmd, atoi(value)) != 0)
  		return -1;
@@ -66,7 +66,7 @@
  
  	return os_snprintf(buf, buflen, "OK\n");
  }
-@@ -3819,6 +3857,75 @@ exit:
+@@ -3818,6 +3856,75 @@ exit:
  	return os_snprintf(buf, buflen, "OK\n");
  }
  
@@ -142,7 +142,7 @@
  static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  					      char *buf, char *reply,
  					      int reply_size,
-@@ -4393,6 +4500,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4392,6 +4499,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
  		reply_len = hostapd_ctrl_iface_ap_wireless(hapd, buf + 12, reply, reply_size);
  	} else if (os_strncmp(buf, "ap_rfeatures ", 13) == 0) {
  		reply_len = hostapd_ctrl_iface_ap_rfeatures(hapd, buf + 13, reply, reply_size);
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-Avoid-setting-beacon-after-wpa_supplican.patch
similarity index 67%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-Avoid-setting-beacon-after-wpa_supplican.patch
index e9e12e9..6abcc52 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-Avoid-setting-beacon-after-wpa_supplican.patch
@@ -1,8 +1,8 @@
-From 38507640ec424ff6c9c552b0f3c2d068a6192146 Mon Sep 17 00:00:00 2001
+From 203fe076218129d727229a0eb71b6f5fb4c6e8a9 Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Fri, 28 Apr 2023 10:22:58 +0800
-Subject: [PATCH] hostapd: mtk: avoid setting beacon after wpa_supplicant stop
- the AP
+Subject: [PATCH 28/35] hostapd: mtk: Avoid setting beacon after wpa_supplicant
+ stop the AP
 
 Add a new variable 'stopped_by_supplicant' to indicate the AP
 interface is currently stopped by co-locating STA interface.
@@ -10,19 +10,19 @@
 will reload the co-locating AP interfaces and marks the
 'stopped_by_supplicant' as 0.
 ---
- hostapd/ctrl_iface.c   | 4 ++++
- src/ap/beacon.c        | 5 ++++-
- src/ap/bss_load.c      | 3 ++-
- src/ap/ctrl_iface_ap.c | 4 +++-
- src/ap/hostapd.c       | 2 ++
- src/ap/hostapd.h       | 1 +
- 6 files changed, 16 insertions(+), 3 deletions(-)
+ hostapd/ctrl_iface.c   |  4 ++++
+ src/ap/beacon.c        |  5 ++++-
+ src/ap/bss_load.c      | 10 +++++++---
+ src/ap/ctrl_iface_ap.c |  4 +++-
+ src/ap/hostapd.c       |  4 +++-
+ src/ap/hostapd.h       |  1 +
+ 6 files changed, 22 insertions(+), 6 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 4c5d494..07c97b5 100644
+index 7f91cb6..8c48d8f 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -192,11 +192,15 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
+@@ -193,11 +193,15 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
  {
  	struct hostapd_config * (*config_read_cb)(const char *config_fname);
  	struct hostapd_iface *iface = hapd->iface;
@@ -39,7 +39,7 @@
  
  	iface->interfaces->config_read_cb = config_read_cb;
 diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 51db23a..187e314 100644
+index ad56046..c67d08b 100644
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
 @@ -2125,7 +2125,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
@@ -69,19 +69,40 @@
  			ret = -1;
  	}
 diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
-index 725d3cd..ae55521 100644
+index 725d3cd..78fd9d8 100644
 --- a/src/ap/bss_load.c
 +++ b/src/ap/bss_load.c
-@@ -46,7 +46,8 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
- 	int err;
- 	struct hostapd_iface *iface = hapd->iface;
- 
--	if (!(hapd->beacon_set_done && hapd->started))
-+	if (!(hapd->beacon_set_done && hapd->started &&
-+	      !hapd->stopped_by_supplicant))
+@@ -49,6 +49,9 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ 	if (!(hapd->beacon_set_done && hapd->started))
  		return;
  
++	if(hapd->stopped_by_supplicant)
++		goto skip_update;
++
  	err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
+ 	if (err) {
+ 		wpa_printf(MSG_ERROR, "BSS Load: Failed to get survey data");
+@@ -57,9 +60,6 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ 
+ 	ieee802_11_set_beacon(hapd);
+ 
+-	if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
+-		return;
+-
+ 	if (hapd->conf->chan_util_avg_period) {
+ 		iface->chan_util_samples_sum += iface->channel_utilization;
+ 		iface->chan_util_num_sample_periods +=
+@@ -75,6 +75,10 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ 		}
+ 	}
+ 
++skip_update:
++	if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
++		return;
++
+ 	eloop_register_timeout(sec, usec, update_channel_utilization, hapd,
+ 			       NULL);
+ }
 diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
 index 2fae590..1ad37c5 100644
 --- a/src/ap/ctrl_iface_ap.c
@@ -99,7 +120,7 @@
  	return 0;
  }
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index ef0d6db..b2fd9b9 100644
+index ef0d6db..b372977 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -477,6 +477,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
@@ -118,6 +139,15 @@
  
  	if (!first || first == -1) {
  		u8 *addr = hapd->own_addr;
+@@ -4015,7 +4017,7 @@ void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap)
+ {
+ 	struct os_reltime now;
+ 
+-	if (hapd->cca_in_progress)
++	if (hapd->cca_in_progress || hapd->stopped_by_supplicant)
+ 		return;
+ 
+ 	if (os_get_reltime(&now))
 diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
 index 093c28a..3b51050 100644
 --- a/src/ap/hostapd.h
@@ -131,5 +161,5 @@
  	u8 own_addr[ETH_ALEN];
  
 -- 
-2.25.1
+2.18.0
 
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-Fix-scan-result-updating-issue.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0029-hostapd-mtk-Fix-scan-result-updating-issue.patch
similarity index 87%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-Fix-scan-result-updating-issue.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0029-hostapd-mtk-Fix-scan-result-updating-issue.patch
index 05f6dc8..c06f45e 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0028-hostapd-mtk-Fix-scan-result-updating-issue.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0029-hostapd-mtk-Fix-scan-result-updating-issue.patch
@@ -1,7 +1,7 @@
-From 38a7f0f985e33f24f0da234966f560e7136868cf Mon Sep 17 00:00:00 2001
+From a5f55beb2941f062a804f9185a0f13fda5d9196e Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Wed, 19 Apr 2023 17:18:33 +0800
-Subject: [PATCH 28/29] hostapd: mtk: Fix scan result updating issue
+Subject: [PATCH 29/35] hostapd: mtk: Fix scan result updating issue
 
 There are no HT capability and operation in beacon of AP operating in
 NOHT.
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0029-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0030-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
similarity index 87%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0029-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0030-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
index c2ef3f7..5cf0a25 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0029-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0030-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
@@ -1,7 +1,7 @@
-From 1814fca214ecf2a876734af789906e2316172ba8 Mon Sep 17 00:00:00 2001
+From d35d35ed5575bb31d614a7dee8afd24bc2b1fcfa Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 30 Mar 2023 17:03:03 +0800
-Subject: [PATCH 29/29] hostapd: mtk: Fix setting wrong seg0 index for 5G
+Subject: [PATCH 30/35] hostapd: mtk: Fix setting wrong seg0 index for 5G
  center chan 159 BW40
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0030-hostapd-mtk-Add-muru-user-number-debug-command.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0031-hostapd-mtk-Add-muru-user-number-debug-command.patch
similarity index 95%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0030-hostapd-mtk-Add-muru-user-number-debug-command.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0031-hostapd-mtk-Add-muru-user-number-debug-command.patch
index c405a4d..0877ded 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0030-hostapd-mtk-Add-muru-user-number-debug-command.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0031-hostapd-mtk-Add-muru-user-number-debug-command.patch
@@ -1,7 +1,7 @@
-From 985f076026a2e4d7083272da975601be9b74d806 Mon Sep 17 00:00:00 2001
+From e947f264269a21994803aa324ef331bc696090c9 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Thu, 27 Apr 2023 15:28:43 +0800
-Subject: [PATCH] hostapd: mtk: Add muru user number debug command
+Subject: [PATCH 31/35] hostapd: mtk: Add muru user number debug command
 
 ---
  hostapd/ctrl_iface.c         | 11 ++++++++++-
@@ -14,10 +14,10 @@
  7 files changed, 53 insertions(+), 16 deletions(-)
 
 diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index becb09c..3391015 100644
+index 8c48d8f..bf5eeb7 100644
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3473,6 +3473,8 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3472,6 +3472,8 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
  					 char *buf, size_t buflen)
  {
  	char *pos, *config, *value;
@@ -26,7 +26,7 @@
  	config = cmd;
  	pos = os_strchr(config, ' ');
  	if (pos == NULL)
-@@ -3490,13 +3492,20 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3489,13 +3491,20 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
  			return -1;
  		}
  		hapd->iconf->mu_onoff = (u8) mu;
@@ -80,7 +80,7 @@
  int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
  int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index b2fd9b9..49a1d30 100644
+index b372977..b1a7196 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -55,7 +55,7 @@
@@ -216,5 +216,5 @@
  #ifdef CONFIG_DPP
  	.dpp_listen = nl80211_dpp_listen,
 -- 
-2.39.0
+2.18.0
 
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0031-hostapd-mtk-Fix-CCA-issue.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0032-hostapd-mtk-Fix-CCA-issue.patch
similarity index 96%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0031-hostapd-mtk-Fix-CCA-issue.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0032-hostapd-mtk-Fix-CCA-issue.patch
index 35a0b4d..35d4eeb 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0031-hostapd-mtk-Fix-CCA-issue.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0032-hostapd-mtk-Fix-CCA-issue.patch
@@ -1,7 +1,7 @@
-From 7bd78e612a73df62599a3826eafd49fbc4138d10 Mon Sep 17 00:00:00 2001
+From f649b398a58e34fa2d299c454bf253bcceb9f1e9 Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Wed, 3 May 2023 14:55:18 +0800
-Subject: [PATCH] hostapd: mtk: Fix CCA issue
+Subject: [PATCH 32/35] hostapd: mtk: Fix CCA issue
 
 When receiving CCA-related nl80211 commands, hostapd used to work on
 struct wpa_driver_nl80211_data, whose ctx always points to
@@ -93,5 +93,5 @@
  #endif /* CONFIG_IEEE80211AX */
  	default:
 -- 
-2.25.1
+2.18.0
 
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0032-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
similarity index 81%
rename from recipes-wifi/wpa-supplicant/files/patches/mtk-0032-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
rename to recipes-wifi/wpa-supplicant/files/patches/mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
index d3c7b26..060cd1d 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0032-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
@@ -1,7 +1,7 @@
-From f5e235b80b57583caf590c3745022327493675a6 Mon Sep 17 00:00:00 2001
+From 5ae87796b8e9d6836693ec0c70a5eba063b606b9 Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Wed, 3 May 2023 16:10:57 +0800
-Subject: [PATCH] hostapd: mtk: Fix unexpected AP beacon state transition
+Subject: [PATCH 33/35] hostapd: mtk: Fix unexpected AP beacon state transition
 
 When AP fails to set the beacon, it assigns bss->beacon_set to 0 no
 matter what the error number is.
@@ -18,10 +18,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 945ce3e..89c7d20 100644
+index 3d71405..e744a18 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -4912,7 +4912,8 @@ static int wpa_driver_nl80211_set_ap(void *priv,
+@@ -4976,7 +4976,8 @@ static int wpa_driver_nl80211_set_ap(void *priv,
  			   ret, strerror(-ret));
  		if (!bss->beacon_set)
  			ret = 0;
@@ -32,5 +32,5 @@
  		bss->beacon_set = 1;
  		nl80211_set_bss(bss, params->cts_protect, params->preamble,
 -- 
-2.25.1
+2.18.0
 
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch
deleted file mode 100644
index c4172bb..0000000
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 627b60aab19db40260366fae5c711adb2b09554e Mon Sep 17 00:00:00 2001
-From: Michael Lee <michael-cy.lee@mediatek.com>
-Date: Wed, 28 Jun 2023 11:08:12 +0800
-Subject: [PATCH] hostapd: mtk: register update_channel_utilization again
-
-The update_channel_utilization might be called when the bss is currently
-stopped by wpa_supplicant.
-In the original flow, the update_channel_utilization returns without
-register itself again, and channel utilization will not be updated for
-this bss anymore.
-This patch re-registers the update_channel_utilization again when the
-bss is stopped by wpa_supplicant.
-
-Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
----
- src/ap/bss_load.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
-index ae55521..f2a1a10 100644
---- a/src/ap/bss_load.c
-+++ b/src/ap/bss_load.c
-@@ -46,10 +46,12 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
- 	int err;
- 	struct hostapd_iface *iface = hapd->iface;
- 
--	if (!(hapd->beacon_set_done && hapd->started &&
--	      !hapd->stopped_by_supplicant))
-+	if (!(hapd->beacon_set_done && hapd->started))
- 		return;
- 
-+	if(!hapd->stopped_by_supplicant)
-+		goto skip_update;
-+
- 	err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
- 	if (err) {
- 		wpa_printf(MSG_ERROR, "BSS Load: Failed to get survey data");
-@@ -58,9 +60,6 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
- 
- 	ieee802_11_set_beacon(hapd);
- 
--	if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
--		return;
--
- 	if (hapd->conf->chan_util_avg_period) {
- 		iface->chan_util_samples_sum += iface->channel_utilization;
- 		iface->chan_util_num_sample_periods +=
-@@ -76,6 +75,10 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
- 		}
- 	}
- 
-+skip_update:
-+	if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
-+		return;
-+
- 	eloop_register_timeout(sec, usec, update_channel_utilization, hapd,
- 			       NULL);
- }
--- 
-2.25.1
-
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
index 96522dd..2a44a8f 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
@@ -1,7 +1,7 @@
-From fba1094daa7efaea9e2e3e9342b6eb6bd00ca174 Mon Sep 17 00:00:00 2001
+From 3f674a6f2414a7c3e2e06ea561c04137355603a3 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 5 Jul 2023 10:47:20 +0800
-Subject: [PATCH 34/34] hostapd: mtk: Fix hostapd_dfs_start_cac log
+Subject: [PATCH 34/35] hostapd: mtk: Fix hostapd_dfs_start_cac log
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -9,10 +9,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 6506d7a..c255978 100644
+index d688ecb..db8375e 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1655,9 +1655,11 @@ int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
+@@ -1627,9 +1627,11 @@ int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
  	/* TODO: How to check CAC time for ETSI weather channels? */
  	iface->dfs_cac_ms = 60000;
  	wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
new file mode 100644
index 0000000..160d146
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
@@ -0,0 +1,51 @@
+From fb967d41b610096ef179b45cf85123de39c5665e Mon Sep 17 00:00:00 2001
+From: mtk20656 <chank.chen@mediatek.com>
+Date: Mon, 24 Jul 2023 11:30:27 +0800
+Subject: [PATCH 35/35] hostapd: mtk: add extension IE list for non-inherit IE
+ in mbssid
+
+Certain clients do not scan all non tx profiles due to absence of
+element ID extension list which is mandatory field in non inheritance
+IE. Non inheritance Element ID is followed by extension element ID.
+Length is expected to be mentioned. Currently we do not support any
+extension element and hence filling length as 0.
+
+Signed-off-by: mtk20656 <chank.chen@mediatek.com>
+---
+ src/ap/ieee802_11.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index 30bfa30..f866b8a 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -7657,7 +7657,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
+ 		else if (hapd->conf->xrates_supported)
+ 			ie_count++;
+ 		if (ie_count)
+-			nontx_profile_len += (4 + ie_count);
++			nontx_profile_len += (5 + ie_count);
+ 
+ 		if ((len + nontx_profile_len) > 255)
+ 			goto mbssid_too_big;
+@@ -7792,11 +7792,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
+ 		}
+ 		if (ie_count) {
+ 			*eid++ = WLAN_EID_EXTENSION;
+-			*eid++ = 2 + ie_count;
++			*eid++ = 3 + ie_count;
+ 			*eid++ = WLAN_EID_EXT_NON_INHERITANCE;
+ 			*eid++ = ie_count;
+ 			os_memcpy(eid, non_inherit_ie, ie_count);
+ 			eid += ie_count;
++			/* Element ID extension list is mandatory part of non inheritance IE.
++			 * It has a length field followed by extension IEs. Currently no
++			 * extension IEs are supported so filling length as 0.
++			 */
++			*eid++ = 0;
+ 		}
+ 
+ 		*eid_len_pos = (eid - eid_len_pos) - 1;
+-- 
+2.18.0
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0036-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0036-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch
new file mode 100644
index 0000000..fedc16d
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0036-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch
@@ -0,0 +1,32 @@
+From 401ff1eae9089808df328dd588d1ee01886abaa9 Mon Sep 17 00:00:00 2001
+From: Michael Lee <michael-cy.lee@mediatek.com>
+Date: Fri, 7 Jul 2023 17:14:40 +0800
+Subject: [PATCH] hostapd: mtk: Fix wpa_supplicant configuration parsing error
+
+In the original flow, after hostapd_config_tx_queue successfully
+parses a tx_queue variable, it would not return immediately. Then it
+would print out "unknow global field" later and set return val to -1.
+
+This patch returns immediately after hostapd_config_tx_queue
+successfully parses a tx_queue variable.
+
+Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
+---
+ wpa_supplicant/config.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index 994ee5e..0186011 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -5575,6 +5575,7 @@ int wpa_config_process_global(struct wpa_config *config, char *pos, int line)
+ 					   line);
+ 				return -1;
+ 			}
++			return ret;
+ 		}
+ 
+ 		if (os_strncmp(pos, "wmm_ac_", 7) == 0) {
+-- 
+2.25.1
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches/patches.inc b/recipes-wifi/wpa-supplicant/files/patches/patches.inc
index cd5f8de..6078a05 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/patches.inc
+++ b/recipes-wifi/wpa-supplicant/files/patches/patches.inc
@@ -89,12 +89,13 @@
     file://mtk-0025-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch \
     file://mtk-0026-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch \
     file://mtk-0027-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch \
-    file://mtk-0028-hostapd-mtk-Fix-scan-result-updating-issue.patch \
-    file://mtk-0028-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch \
-    file://mtk-0029-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch \
-    file://mtk-0030-hostapd-mtk-Add-muru-user-number-debug-command.patch \
-    file://mtk-0031-hostapd-mtk-Fix-CCA-issue.patch \
-    file://mtk-0032-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch \
-    file://mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch \
+    file://mtk-0028-hostapd-mtk-Avoid-setting-beacon-after-wpa_supplican.patch \
+    file://mtk-0029-hostapd-mtk-Fix-scan-result-updating-issue.patch \
+    file://mtk-0030-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch \
+    file://mtk-0031-hostapd-mtk-Add-muru-user-number-debug-command.patch \
+    file://mtk-0032-hostapd-mtk-Fix-CCA-issue.patch \
+    file://mtk-0033-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch \
     file://mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch \
+    file://mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch \
+    file://mtk-0036-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch \
     "