Revert "[rdkb][common][bsp][Refactor and sync wif..."

Revert submission 8048803

Reason for revert: <wifi 7 not stable>

Reverted changes: /q/submissionid:8048803

Change-Id: Ic1b9f9d5e28fbbb92831ad9059dea73768200f17
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch b/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch
index 07b7a59..9b11f0e 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch
@@ -29,7 +29,7 @@
  
  
  enum dfs_channel_type {
-@@ -526,9 +527,14 @@ dfs_get_valid_channel(struct hostapd_ifa
+@@ -521,9 +522,14 @@ dfs_get_valid_channel(struct hostapd_ifa
  	int num_available_chandefs;
  	int chan_idx, chan_idx2;
  	int sec_chan_idx_80p80 = -1;
@@ -44,7 +44,7 @@
  	wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
  	*secondary_channel = 0;
  	*oper_centr_freq_seg0_idx = 0;
-@@ -548,8 +554,20 @@ dfs_get_valid_channel(struct hostapd_ifa
+@@ -543,8 +549,20 @@ dfs_get_valid_channel(struct hostapd_ifa
  	if (num_available_chandefs == 0)
  		return NULL;
  
@@ -68,7 +68,7 @@
  	if (!chan) {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11017,6 +11017,10 @@ static int nl80211_switch_channel(void *
+@@ -10977,6 +10977,10 @@ static int nl80211_switch_channel(void *
  	if (ret)
  		goto error;
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch b/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch
index edf599e..4ee43b5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch
@@ -1,6 +1,6 @@
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -4621,6 +4621,13 @@ static int add_associated_sta(struct hos
+@@ -4601,6 +4601,13 @@ static int add_associated_sta(struct hos
  	 * drivers to accept the STA parameter configuration. Since this is
  	 * after a new FT-over-DS exchange, a new TK has been derived, so key
  	 * reinstallation is not a concern for this case.
@@ -14,7 +14,7 @@
  	 */
  	wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
  		   " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
-@@ -4634,7 +4641,8 @@ static int add_associated_sta(struct hos
+@@ -4614,7 +4621,8 @@ static int add_associated_sta(struct hos
  	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
  	     (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
  	     (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch b/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
index ef2bb40..19248e8 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
@@ -92,7 +92,7 @@
  
  	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
  		wpa_printf(MSG_DEBUG,
-@@ -11883,13 +11880,14 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -11843,13 +11840,14 @@ static int wpa_driver_br_add_ip_neigh(vo
  				      const u8 *ipaddr, int prefixlen,
  				      const u8 *addr)
  {
@@ -112,7 +112,7 @@
  	int res;
  
  	if (!ipaddr || prefixlen == 0 || !addr)
-@@ -11908,85 +11906,66 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -11868,85 +11866,66 @@ static int wpa_driver_br_add_ip_neigh(vo
  	}
  
  	if (version == 4) {
@@ -220,7 +220,7 @@
  		addrsize = 16;
  	} else {
  		return -EINVAL;
-@@ -12004,41 +11983,30 @@ static int wpa_driver_br_delete_ip_neigh
+@@ -11964,41 +11943,30 @@ static int wpa_driver_br_delete_ip_neigh
  		return -1;
  	}
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch b/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch
index b7bf9e3..f98d380 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch
@@ -16,7 +16,7 @@
 
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -3020,15 +3020,6 @@ static void handle_auth(struct hostapd_d
+@@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d
  				       seq_ctrl);
  			return;
  		}
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch b/recipes-wifi/hostapd/files/patches-2.10.3/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
index e967cff..148c268 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
@@ -903,7 +903,7 @@
      for exp, flags in tests:
          hapd.disable()
          hapd.set("tls_flags", flags)
-@@ -7138,6 +7196,7 @@ def test_ap_wpa2_eap_assoc_rsn(dev, apde
+@@ -7115,6 +7173,7 @@ def test_ap_wpa2_eap_assoc_rsn(dev, apde
  def test_eap_tls_ext_cert_check(dev, apdev):
      """EAP-TLS and external server certification validation"""
      # With internal server certificate chain validation
@@ -911,7 +911,7 @@
      id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TLS",
                          identity="tls user",
                          ca_cert="auth_serv/ca.pem",
-@@ -7150,6 +7209,7 @@ def test_eap_tls_ext_cert_check(dev, apd
+@@ -7127,6 +7186,7 @@ def test_eap_tls_ext_cert_check(dev, apd
  def test_eap_ttls_ext_cert_check(dev, apdev):
      """EAP-TTLS and external server certification validation"""
      # Without internal server certificate chain validation
@@ -919,7 +919,7 @@
      id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
                          identity="pap user", anonymous_identity="ttls",
                          password="password", phase2="auth=PAP",
-@@ -7160,6 +7220,7 @@ def test_eap_ttls_ext_cert_check(dev, ap
+@@ -7137,6 +7197,7 @@ def test_eap_ttls_ext_cert_check(dev, ap
  def test_eap_peap_ext_cert_check(dev, apdev):
      """EAP-PEAP and external server certification validation"""
      # With internal server certificate chain validation
@@ -927,7 +927,7 @@
      id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="PEAP",
                          identity="user", anonymous_identity="peap",
                          ca_cert="auth_serv/ca.pem",
-@@ -7170,6 +7231,7 @@ def test_eap_peap_ext_cert_check(dev, ap
+@@ -7147,6 +7208,7 @@ def test_eap_peap_ext_cert_check(dev, ap
  
  def test_eap_fast_ext_cert_check(dev, apdev):
      """EAP-FAST and external server certification validation"""
@@ -935,7 +935,7 @@
      check_eap_capa(dev[0], "FAST")
      # With internal server certificate chain validation
      dev[0].request("SET blob fast_pac_auth_ext ")
-@@ -7184,10 +7246,6 @@ def test_eap_fast_ext_cert_check(dev, ap
+@@ -7161,10 +7223,6 @@ def test_eap_fast_ext_cert_check(dev, ap
      run_ext_cert_check(dev, apdev, id)
  
  def run_ext_cert_check(dev, apdev, net_id):
@@ -948,7 +948,7 @@
  
 --- a/tests/hwsim/test_ap_ft.py
 +++ b/tests/hwsim/test_ap_ft.py
-@@ -2474,11 +2474,11 @@ def test_ap_ft_ap_oom5(dev, apdev):
+@@ -2471,11 +2471,11 @@ def test_ap_ft_ap_oom5(dev, apdev):
          # This will fail to roam
          dev[0].roam(bssid1, check_bssid=False)
  
@@ -1138,7 +1138,7 @@
      heavy_groups = [14, 15, 16]
      suitable_groups = [15, 16, 17, 18, 19, 20, 21]
      groups = [str(g) for g in sae_groups]
-@@ -2193,6 +2198,8 @@ def run_sae_pwe_group(dev, apdev, group)
+@@ -2188,6 +2193,8 @@ def run_sae_pwe_group(dev, apdev, group)
              logger.info("Add Brainpool EC groups since OpenSSL is new enough")
          elif tls.startswith("wolfSSL"):
              logger.info("Make sure Brainpool EC groups were enabled when compiling wolfSSL")
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch b/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
index b0151b0..710a3c8 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
@@ -120,7 +120,7 @@
  		 * Convert 80+80 MHz channel width to new style as interop
 --- a/src/common/hw_features_common.c
 +++ b/src/common/hw_features_common.c
-@@ -811,6 +811,7 @@ int ieee80211ac_cap_check(u32 hw, u32 co
+@@ -808,6 +808,7 @@ int ieee80211ac_cap_check(u32 hw, u32 co
  	VHT_CAP_CHECK(VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB);
  	VHT_CAP_CHECK(VHT_CAP_RX_ANTENNA_PATTERN);
  	VHT_CAP_CHECK(VHT_CAP_TX_ANTENNA_PATTERN);
@@ -130,7 +130,7 @@
  #undef VHT_CAP_CHECK_MAX
 --- a/src/common/ieee802_11_defs.h
 +++ b/src/common/ieee802_11_defs.h
-@@ -1349,6 +1349,8 @@ struct ieee80211_ampe_ie {
+@@ -1348,6 +1348,8 @@ struct ieee80211_ampe_ie {
  #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB     ((u32) BIT(26) | BIT(27))
  #define VHT_CAP_RX_ANTENNA_PATTERN                  ((u32) BIT(28))
  #define VHT_CAP_TX_ANTENNA_PATTERN                  ((u32) BIT(29))
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/180-BSS-coloring-fix-CCA-with-multiple-BSS.patch b/recipes-wifi/hostapd/files/patches-2.10.3/180-BSS-coloring-fix-CCA-with-multiple-BSS.patch
new file mode 100644
index 0000000..7b0435a
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/180-BSS-coloring-fix-CCA-with-multiple-BSS.patch
@@ -0,0 +1,103 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Mon, 7 Aug 2023 21:55:57 +0200
+Subject: [PATCH] BSS coloring: fix CCA with multiple BSS
+
+Pass bss->ctx instead of drv->ctx in order to avoid multiple reports for
+the first bss. The first report would otherwise clear hapd->cca_color and
+subsequent reports would cause the iface bss color to be set to 0.
+In order to avoid any issues with cancellations, only overwrite the color
+based on hapd->cca_color if it was actually set.
+
+Fixes: 33c4dd26cd11 ("BSS coloring: Handle the collision and CCA events coming from the kernel")
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/src/ap/drv_callbacks.c
++++ b/src/ap/drv_callbacks.c
+@@ -2260,7 +2260,8 @@ void wpa_supplicant_event(void *ctx, enu
+ 	case EVENT_CCA_NOTIFY:
+ 		wpa_printf(MSG_DEBUG, "CCA finished on on %s",
+ 			   hapd->conf->iface);
+-		hapd->iface->conf->he_op.he_bss_color = hapd->cca_color;
++		if (hapd->cca_color)
++			hapd->iface->conf->he_op.he_bss_color = hapd->cca_color;
+ 		hostapd_cleanup_cca_params(hapd);
+ 		break;
+ #endif /* CONFIG_IEEE80211AX */
+--- a/src/drivers/driver_nl80211_event.c
++++ b/src/drivers/driver_nl80211_event.c
+@@ -3653,7 +3653,7 @@ static void nl80211_assoc_comeback(struc
+ 
+ #ifdef CONFIG_IEEE80211AX
+ 
+-static void nl80211_obss_color_collision(struct wpa_driver_nl80211_data *drv,
++static void nl80211_obss_color_collision(struct i802_bss *bss,
+ 					 struct nlattr *tb[])
+ {
+ 	union wpa_event_data data;
+@@ -3667,37 +3667,37 @@ static void nl80211_obss_color_collision
+ 
+ 	wpa_printf(MSG_DEBUG, "nl80211: BSS color collision - bitmap %08llx",
+ 		   (long long unsigned int) data.bss_color_collision.bitmap);
+-	wpa_supplicant_event(drv->ctx, EVENT_BSS_COLOR_COLLISION, &data);
++	wpa_supplicant_event(bss->ctx, EVENT_BSS_COLOR_COLLISION, &data);
+ }
+ 
+ 
+ static void
+-nl80211_color_change_announcement_started(struct wpa_driver_nl80211_data *drv)
++nl80211_color_change_announcement_started(struct i802_bss *bss)
+ {
+ 	union wpa_event_data data = {};
+ 
+ 	wpa_printf(MSG_DEBUG, "nl80211: CCA started");
+-	wpa_supplicant_event(drv->ctx, EVENT_CCA_STARTED_NOTIFY, &data);
++	wpa_supplicant_event(bss->ctx, EVENT_CCA_STARTED_NOTIFY, &data);
+ }
+ 
+ 
+ static void
+-nl80211_color_change_announcement_aborted(struct wpa_driver_nl80211_data *drv)
++nl80211_color_change_announcement_aborted(struct i802_bss *bss)
+ {
+ 	union wpa_event_data data = {};
+ 
+ 	wpa_printf(MSG_DEBUG, "nl80211: CCA aborted");
+-	wpa_supplicant_event(drv->ctx, EVENT_CCA_ABORTED_NOTIFY, &data);
++	wpa_supplicant_event(bss->ctx, EVENT_CCA_ABORTED_NOTIFY, &data);
+ }
+ 
+ 
+ static void
+-nl80211_color_change_announcement_completed(struct wpa_driver_nl80211_data *drv)
++nl80211_color_change_announcement_completed(struct i802_bss *bss)
+ {
+ 	union wpa_event_data data = {};
+ 
+ 	wpa_printf(MSG_DEBUG, "nl80211: CCA completed");
+-	wpa_supplicant_event(drv->ctx, EVENT_CCA_NOTIFY, &data);
++	wpa_supplicant_event(bss->ctx, EVENT_CCA_NOTIFY, &data);
+ }
+ 
+ #endif /* CONFIG_IEEE80211AX */
+@@ -3957,16 +3957,16 @@ static void do_process_drv_event(struct
+ 		break;
+ #ifdef CONFIG_IEEE80211AX
+ 	case NL80211_CMD_OBSS_COLOR_COLLISION:
+-		nl80211_obss_color_collision(drv, tb);
++		nl80211_obss_color_collision(bss, tb);
+ 		break;
+ 	case NL80211_CMD_COLOR_CHANGE_STARTED:
+-		nl80211_color_change_announcement_started(drv);
++		nl80211_color_change_announcement_started(bss);
+ 		break;
+ 	case NL80211_CMD_COLOR_CHANGE_ABORTED:
+-		nl80211_color_change_announcement_aborted(drv);
++		nl80211_color_change_announcement_aborted(bss);
+ 		break;
+ 	case NL80211_CMD_COLOR_CHANGE_COMPLETED:
+-		nl80211_color_change_announcement_completed(drv);
++		nl80211_color_change_announcement_completed(bss);
+ 		break;
+ #endif /* CONFIG_IEEE80211AX */
+ 	default:
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch b/recipes-wifi/hostapd/files/patches-2.10.3/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
deleted file mode 100644
index 4929c58..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Thu, 14 Sep 2023 10:53:50 +0200
-Subject: [PATCH] driver_nl80211: fix setting QoS map on secondary BSSs
-
-The setting is per-BSS, not per PHY
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -11341,7 +11341,7 @@ static int nl80211_set_qos_map(void *pri
- 	wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
- 		    qos_map_set, qos_map_set_len);
- 
--	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_SET_QOS_MAP)) ||
-+	if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_QOS_MAP)) ||
- 	    nla_put(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set)) {
- 		nlmsg_free(msg);
- 		return -ENOBUFS;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch b/recipes-wifi/hostapd/files/patches-2.10.3/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
deleted file mode 100644
index adfb21f..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Thu, 14 Sep 2023 11:28:03 +0200
-Subject: [PATCH] driver_nl80211: update drv->ifindex on removing the first
- BSS
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -8867,6 +8867,7 @@ static int wpa_driver_nl80211_if_remove(
- 		if (drv->first_bss->next) {
- 			drv->first_bss = drv->first_bss->next;
- 			drv->ctx = drv->first_bss->ctx;
-+			drv->ifindex = drv->first_bss->ifindex;
- 			os_free(bss);
- 		} else {
- 			wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to");
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch b/recipes-wifi/hostapd/files/patches-2.10.3/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch
deleted file mode 100644
index 395c645..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Mon, 18 Sep 2023 16:47:41 +0200
-Subject: [PATCH] nl80211: move nl80211_put_freq_params call outside of
- 802.11ax #ifdef
-
-The relevance of this call is not specific to 802.11ax, so it should be done
-even with CONFIG_IEEE80211AX disabled.
-
-Fixes: b3921db426ea ("nl80211: Add frequency info in start AP command")
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -5226,6 +5226,9 @@ static int wpa_driver_nl80211_set_ap(voi
- 		nla_nest_end(msg, ftm);
- 	}
- 
-+	if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
-+		goto fail;
-+
- #ifdef CONFIG_IEEE80211AX
- 	if (params->he_spr_ctrl) {
- 		struct nlattr *spr;
-@@ -5260,9 +5263,6 @@ static int wpa_driver_nl80211_set_ap(voi
- 		nla_nest_end(msg, spr);
- 	}
- 
--	if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
--		goto fail;
--
- 	if (params->freq && params->freq->he_enabled) {
- 		struct nlattr *bss_color;
- 
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch b/recipes-wifi/hostapd/files/patches-2.10.3/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch
deleted file mode 100644
index fe81318..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Wed, 20 Sep 2023 13:41:10 +0200
-Subject: [PATCH] hostapd: cancel channel_list_update_timeout in
- hostapd_cleanup_iface_partial
-
-Fixes a crash when disabling an interface during channel list update
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -569,6 +569,7 @@ static void sta_track_deinit(struct host
- void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
- {
- 	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
-+	eloop_cancel_timeout(channel_list_update_timeout, iface, NULL);
- #ifdef NEED_AP_MLME
- 	hostapd_stop_setup_timers(iface);
- #endif /* NEED_AP_MLME */
-@@ -598,7 +599,6 @@ void hostapd_cleanup_iface_partial(struc
- static void hostapd_cleanup_iface(struct hostapd_iface *iface)
- {
- 	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
--	eloop_cancel_timeout(channel_list_update_timeout, iface, NULL);
- 	eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface,
- 			     NULL);
- 
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch b/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch
index e3ed00f..8ebbed0 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch
@@ -156,7 +156,7 @@
  wpa_cli.exe: wpa_cli
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -6667,8 +6667,8 @@ union wpa_event_data {
+@@ -6651,8 +6651,8 @@ union wpa_event_data {
   * Driver wrapper code should call this function whenever an event is received
   * from the driver.
   */
@@ -167,7 +167,7 @@
  
  /**
   * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -6680,7 +6680,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6664,7 +6664,7 @@ void wpa_supplicant_event(void *ctx, enu
   * Same as wpa_supplicant_event(), but we search for the interface in
   * wpa_global.
   */
@@ -178,7 +178,7 @@
  /*
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -2184,8 +2184,8 @@ err:
+@@ -1994,8 +1994,8 @@ err:
  #endif /* CONFIG_OWE */
  
  
@@ -189,7 +189,7 @@
  {
  	struct hostapd_data *hapd = ctx;
  #ifndef CONFIG_NO_STDOUT_DEBUG
-@@ -2489,7 +2489,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -2272,7 +2272,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
@@ -231,7 +231,7 @@
  	os_memset(&global, 0, sizeof(global));
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5353,8 +5353,8 @@ static void wpas_link_reconfig(struct wp
+@@ -5345,8 +5345,8 @@ static void wpas_link_reconfig(struct wp
  }
  
  
@@ -242,7 +242,7 @@
  {
  	struct wpa_supplicant *wpa_s = ctx;
  	int resched;
-@@ -6272,7 +6272,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6264,7 +6264,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
@@ -253,7 +253,7 @@
  	struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7462,7 +7462,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -7435,7 +7435,6 @@ struct wpa_interface * wpa_supplicant_ma
  	return NULL;
  }
  
@@ -261,7 +261,7 @@
  /**
   * wpa_supplicant_match_existing - Match existing interfaces
   * @global: Pointer to global data from wpa_supplicant_init()
-@@ -7497,6 +7496,11 @@ static int wpa_supplicant_match_existing
+@@ -7470,6 +7469,11 @@ static int wpa_supplicant_match_existing
  
  #endif /* CONFIG_MATCH_IFACE */
  
@@ -273,7 +273,7 @@
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -7753,6 +7757,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -7726,6 +7730,8 @@ struct wpa_global * wpa_supplicant_init(
  #ifndef CONFIG_NO_WPA_MSG
  	wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
@@ -284,7 +284,7 @@
  		wpa_debug_open_file(params->wpa_debug_file_path);
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -698,6 +698,11 @@ fail:
+@@ -685,6 +685,11 @@ fail:
  	return -1;
  }
  
@@ -296,7 +296,7 @@
  
  #ifdef CONFIG_WPS
  static int gen_uuid(const char *txt_addr)
-@@ -791,6 +796,8 @@ int main(int argc, char *argv[])
+@@ -778,6 +783,8 @@ int main(int argc, char *argv[])
  		return -1;
  #endif /* CONFIG_DPP */
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch b/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch
index 3b5f432..1ea8904 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch
@@ -13,7 +13,7 @@
  	} else if (os_strcmp(buf, "ht_capab") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1075,6 +1075,8 @@ struct hostapd_config {
+@@ -1072,6 +1072,8 @@ struct hostapd_config {
  
  	int ht_op_mode_fixed;
  	u16 ht_capab;
@@ -24,7 +24,7 @@
  	int no_pri_sec_switch;
 --- a/src/ap/hw_features.c
 +++ b/src/ap/hw_features.c
-@@ -546,7 +546,8 @@ static int ieee80211n_check_40mhz(struct
+@@ -517,7 +517,8 @@ static int ieee80211n_check_40mhz(struct
  	int ret;
  
  	/* Check that HT40 is used and PRI / SEC switch is allowed */
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch b/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch
index e12b205..a47546d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -5767,7 +5767,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -5740,7 +5740,7 @@ wpa_supplicant_alloc(struct wpa_supplica
  	if (wpa_s == NULL)
  		return NULL;
  	wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch b/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch
index f7720fc..54a736f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch
@@ -51,7 +51,7 @@
  		if (wpa_s->ap_iface) {
  			pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
  							    end - pos,
-@@ -12087,6 +12087,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -11964,6 +11964,7 @@ char * wpa_supplicant_ctrl_iface_process
  			reply_len = -1;
  	} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
  		wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
@@ -59,7 +59,7 @@
  	} else if (os_strcmp(buf, "MIB") == 0) {
  		reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
  		if (reply_len >= 0) {
-@@ -12099,6 +12100,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -11976,6 +11977,7 @@ char * wpa_supplicant_ctrl_iface_process
  				reply_size - reply_len);
  #endif /* CONFIG_MACSEC */
  		}
@@ -67,7 +67,7 @@
  	} else if (os_strncmp(buf, "STATUS", 6) == 0) {
  		reply_len = wpa_supplicant_ctrl_iface_status(
  			wpa_s, buf + 6, reply, reply_size);
-@@ -12587,6 +12589,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -12464,6 +12466,7 @@ char * wpa_supplicant_ctrl_iface_process
  		reply_len = wpa_supplicant_ctrl_iface_bss(
  			wpa_s, buf + 4, reply, reply_size);
  #ifdef CONFIG_AP
@@ -75,7 +75,7 @@
  	} else if (os_strcmp(buf, "STA-FIRST") == 0) {
  		reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
  	} else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -12595,12 +12598,15 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -12472,12 +12475,15 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
  		reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
  						   reply_size);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/390-wpa_ie_cap_workaround.patch b/recipes-wifi/hostapd/files/patches-2.10.3/390-wpa_ie_cap_workaround.patch
index 4592c34..40c39ff 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/390-wpa_ie_cap_workaround.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/390-wpa_ie_cap_workaround.patch
@@ -1,6 +1,6 @@
 --- a/src/common/wpa_common.c
 +++ b/src/common/wpa_common.c
-@@ -2841,6 +2841,31 @@ u32 wpa_akm_to_suite(int akm)
+@@ -2719,6 +2719,31 @@ u32 wpa_akm_to_suite(int akm)
  }
  
  
@@ -32,7 +32,7 @@
  int wpa_compare_rsn_ie(int ft_initial_assoc,
  		       const u8 *ie1, size_t ie1len,
  		       const u8 *ie2, size_t ie2len)
-@@ -2848,8 +2873,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
+@@ -2726,8 +2751,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
  	if (ie1 == NULL || ie2 == NULL)
  		return -1;
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch b/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch
index 07df8e5..3b28b6e 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch
@@ -9,7 +9,7 @@
  
  struct hapd_global {
  	void **drv_priv;
-@@ -799,7 +799,7 @@ int main(int argc, char *argv[])
+@@ -786,7 +786,7 @@ int main(int argc, char *argv[])
  	wpa_supplicant_event = hostapd_wpa_event;
  	wpa_supplicant_event_global = hostapd_wpa_event_global;
  	for (;;) {
@@ -18,7 +18,7 @@
  		if (c < 0)
  			break;
  		switch (c) {
-@@ -836,6 +836,8 @@ int main(int argc, char *argv[])
+@@ -823,6 +823,8 @@ int main(int argc, char *argv[])
  			break;
  #endif /* CONFIG_DEBUG_LINUX_TRACING */
  		case 'v':
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index c6fe54e..e50c609 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -174,7 +174,7 @@
  	 * macsec_policy - Determines the policy for MACsec secure session
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4175,6 +4175,12 @@ static void wpas_start_assoc_cb(struct w
+@@ -4149,6 +4149,12 @@ static void wpas_start_assoc_cb(struct w
  			params.beacon_int = ssid->beacon_int;
  		else
  			params.beacon_int = wpa_s->conf->beacon_int;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch b/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch
index daa36c2..be9e050 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch
@@ -29,7 +29,7 @@
  struct wpa_driver_set_key_params {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11667,6 +11667,18 @@ static int nl80211_put_mesh_id(struct nl
+@@ -11626,6 +11626,18 @@ static int nl80211_put_mesh_id(struct nl
  }
  
  
@@ -48,7 +48,7 @@
  static int nl80211_put_mesh_config(struct nl_msg *msg,
  				   struct wpa_driver_mesh_bss_params *params)
  {
-@@ -11728,6 +11740,7 @@ static int nl80211_join_mesh(struct i802
+@@ -11687,6 +11699,7 @@ static int nl80211_join_mesh(struct i802
  	    nl80211_put_basic_rates(msg, params->basic_rates) ||
  	    nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
  	    nl80211_put_beacon_int(msg, params->beacon_int) ||
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch
index bc80ef0..5b2745a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch
@@ -84,7 +84,7 @@
  		   __func__, driver, drv_priv);
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -2786,7 +2786,7 @@ static void handle_auth(struct hostapd_d
+@@ -2778,7 +2778,7 @@ static void handle_auth(struct hostapd_d
  	u16 auth_alg, auth_transaction, status_code;
  	u16 resp = WLAN_STATUS_SUCCESS;
  	struct sta_info *sta = NULL;
@@ -93,7 +93,7 @@
  	u16 fc;
  	const u8 *challenge = NULL;
  	u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
-@@ -2795,6 +2795,11 @@ static void handle_auth(struct hostapd_d
+@@ -2787,6 +2787,11 @@ static void handle_auth(struct hostapd_d
  	struct radius_sta rad_info;
  	const u8 *dst, *sa, *bssid;
  	bool mld_sta = false;
@@ -105,7 +105,7 @@
  
  	if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
  		wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
-@@ -2986,6 +2991,13 @@ static void handle_auth(struct hostapd_d
+@@ -2978,6 +2983,13 @@ static void handle_auth(struct hostapd_d
  		resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
  		goto fail;
  	}
@@ -119,7 +119,7 @@
  	if (res == HOSTAPD_ACL_PENDING)
  		return;
  
-@@ -5161,7 +5173,7 @@ static void handle_assoc(struct hostapd_
+@@ -5141,7 +5153,7 @@ static void handle_assoc(struct hostapd_
  	int resp = WLAN_STATUS_SUCCESS;
  	u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
  	const u8 *pos;
@@ -128,7 +128,7 @@
  	struct sta_info *sta;
  	u8 *tmp = NULL;
  #ifdef CONFIG_FILS
-@@ -5374,6 +5386,11 @@ static void handle_assoc(struct hostapd_
+@@ -5354,6 +5366,11 @@ static void handle_assoc(struct hostapd_
  		left = res;
  	}
  #endif /* CONFIG_FILS */
@@ -140,7 +140,7 @@
  
  	/* followed by SSID and Supported rates; and HT capabilities if 802.11n
  	 * is used */
-@@ -5472,6 +5489,13 @@ static void handle_assoc(struct hostapd_
+@@ -5452,6 +5469,13 @@ static void handle_assoc(struct hostapd_
  	}
  #endif /* CONFIG_FILS */
  
@@ -154,7 +154,7 @@
   fail:
  
  	/*
-@@ -5753,6 +5777,7 @@ static void handle_disassoc(struct hosta
+@@ -5733,6 +5757,7 @@ static void handle_disassoc(struct hosta
  			   (unsigned long) len);
  		return;
  	}
@@ -162,7 +162,7 @@
  
  	sta = ap_get_sta(hapd, mgmt->sa);
  	if (!sta) {
-@@ -5784,6 +5809,8 @@ static void handle_deauth(struct hostapd
+@@ -5764,6 +5789,8 @@ static void handle_deauth(struct hostapd
  	/* Clear the PTKSA cache entries for PASN */
  	ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
  
@@ -201,7 +201,7 @@
  
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -260,6 +260,10 @@ int hostapd_notif_assoc(struct hostapd_d
+@@ -145,6 +145,10 @@ int hostapd_notif_assoc(struct hostapd_d
  	u16 reason = WLAN_REASON_UNSPECIFIED;
  	int status = WLAN_STATUS_SUCCESS;
  	const u8 *p2p_dev_addr = NULL;
@@ -212,7 +212,7 @@
  
  	if (addr == NULL) {
  		/*
-@@ -396,6 +400,12 @@ int hostapd_notif_assoc(struct hostapd_d
+@@ -237,6 +241,12 @@ int hostapd_notif_assoc(struct hostapd_d
  		goto fail;
  	}
  
@@ -348,7 +348,7 @@
  CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7593,6 +7593,8 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -7566,6 +7566,8 @@ struct wpa_supplicant * wpa_supplicant_a
  	}
  #endif /* CONFIG_P2P */
  
@@ -357,7 +357,7 @@
  	return wpa_s;
  }
  
-@@ -7619,6 +7621,8 @@ int wpa_supplicant_remove_iface(struct w
+@@ -7592,6 +7594,8 @@ int wpa_supplicant_remove_iface(struct w
  	struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
@@ -366,7 +366,7 @@
  	/* Remove interface from the global list of interfaces */
  	prev = global->ifaces;
  	if (prev == wpa_s) {
-@@ -7965,8 +7969,12 @@ int wpa_supplicant_run(struct wpa_global
+@@ -7938,8 +7942,12 @@ int wpa_supplicant_run(struct wpa_global
  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
@@ -398,7 +398,7 @@
  };
  
  
-@@ -685,6 +688,7 @@ struct wpa_supplicant {
+@@ -650,6 +653,7 @@ struct wpa_supplicant {
  	unsigned char own_addr[ETH_ALEN];
  	unsigned char perm_addr[ETH_ALEN];
  	char ifname[100];
@@ -508,7 +508,7 @@
  
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1216,6 +1216,8 @@ int hostapd_dfs_pre_cac_expired(struct h
+@@ -1211,6 +1211,8 @@ int hostapd_dfs_pre_cac_expired(struct h
  		"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
  		freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/601-ucode_support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/601-ucode_support.patch
index de182b9..e0bbf13 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/601-ucode_support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/601-ucode_support.patch
@@ -26,7 +26,7 @@
  ifdef CONFIG_CODE_COVERAGE
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -1007,6 +1007,7 @@ int main(int argc, char *argv[])
+@@ -994,6 +994,7 @@ int main(int argc, char *argv[])
  	}
  
  	hostapd_global_ctrl_iface_init(&interfaces);
@@ -34,7 +34,7 @@
  
  	if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
  		wpa_printf(MSG_ERROR, "Failed to start eloop");
-@@ -1016,6 +1017,7 @@ int main(int argc, char *argv[])
+@@ -1003,6 +1004,7 @@ int main(int argc, char *argv[])
  	ret = 0;
  
   out:
@@ -107,14 +107,14 @@
  	hostapd_ubus_free_bss(hapd);
  	accounting_deinit(hapd);
  	hostapd_deinit_wpa(hapd);
-@@ -600,6 +603,7 @@ void hostapd_cleanup_iface_partial(struc
+@@ -599,6 +602,7 @@ void hostapd_cleanup_iface_partial(struc
  static void hostapd_cleanup_iface(struct hostapd_iface *iface)
  {
  	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
 +	hostapd_ucode_free_iface(iface);
+ 	eloop_cancel_timeout(channel_list_update_timeout, iface, NULL);
  	eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface,
  			     NULL);
- 
 @@ -1189,6 +1193,7 @@ static int hostapd_start_beacon(struct h
  		hapd->driver->set_operstate(hapd->drv_priv, 1);
  
@@ -142,16 +142,6 @@
  {
  	if (!hapd)
  		return;
-@@ -3491,7 +3495,8 @@ int hostapd_remove_iface(struct hapd_int
- 		hapd_iface = interfaces->iface[i];
- 		if (hapd_iface == NULL)
- 			return -1;
--		if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
-+		if (!os_strcmp(hapd_iface->phy, buf) ||
-+		    !os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
- 			wpa_printf(MSG_INFO, "Remove interface '%s'", buf);
- 			hapd_iface->driver_ap_teardown =
- 				!!(hapd_iface->drv_flags &
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
 @@ -195,8 +195,20 @@ endif
@@ -196,7 +186,7 @@
  
  #ifdef CONFIG_BGSCAN
  	if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
-@@ -7594,6 +7595,7 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -7567,6 +7568,7 @@ struct wpa_supplicant * wpa_supplicant_a
  #endif /* CONFIG_P2P */
  
  	wpas_ubus_add_bss(wpa_s);
@@ -204,7 +194,7 @@
  
  	return wpa_s;
  }
-@@ -7621,6 +7623,7 @@ int wpa_supplicant_remove_iface(struct w
+@@ -7594,6 +7596,7 @@ int wpa_supplicant_remove_iface(struct w
  	struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
@@ -212,7 +202,7 @@
  	wpas_ubus_free_bss(wpa_s);
  
  	/* Remove interface from the global list of interfaces */
-@@ -7931,6 +7934,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -7904,6 +7907,7 @@ struct wpa_global * wpa_supplicant_init(
  
  	eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
  			       wpas_periodic, global, NULL);
@@ -220,7 +210,7 @@
  
  	return global;
  }
-@@ -7969,12 +7973,8 @@ int wpa_supplicant_run(struct wpa_global
+@@ -7942,12 +7946,8 @@ int wpa_supplicant_run(struct wpa_global
  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
@@ -233,7 +223,7 @@
  	return 0;
  }
  
-@@ -8007,6 +8007,8 @@ void wpa_supplicant_deinit(struct wpa_gl
+@@ -7980,6 +7980,8 @@ void wpa_supplicant_deinit(struct wpa_gl
  
  	wpas_notify_supplicant_deinitialized(global);
  
@@ -252,7 +242,7 @@
  
  extern const char *const wpa_supplicant_version;
  extern const char *const wpa_supplicant_license;
-@@ -689,6 +690,7 @@ struct wpa_supplicant {
+@@ -654,6 +655,7 @@ struct wpa_supplicant {
  	unsigned char perm_addr[ETH_ALEN];
  	char ifname[100];
  	struct wpas_ubus_bss ubus;
@@ -280,33 +270,7 @@
  
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -3787,6 +3787,25 @@ struct wpa_driver_ops {
- 			 const char *ifname);
- 
- 	/**
-+	 * if_rename - Rename a virtual interface
-+	 * @priv: Private driver interface data
-+	 * @type: Interface type
-+	 * @ifname: Interface name of the virtual interface to be renamed
-+	 *	    (NULL when renaming the AP BSS interface)
-+	 * @new_name: New interface name of the virtual interface
-+	 * Returns: 0 on success, -1 on failure
-+	 */
-+	int (*if_rename)(void *priv, enum wpa_driver_if_type type,
-+			 const char *ifname, const char *new_name);
-+
-+	/**
-+	 * set_first_bss - Make a virtual interface the first (primary) bss
-+	 * @priv: Private driver interface data
-+	 * Returns: 0 on success, -1 on failure
-+	 */
-+	int (*set_first_bss)(void *priv);
-+
-+	/**
- 	 * set_sta_vlan - Bind a station into a specific interface (AP only)
- 	 * @priv: Private driver interface data
- 	 * @ifname: Interface (main or virtual BSS or VLAN)
-@@ -6440,6 +6459,7 @@ union wpa_event_data {
+@@ -6426,6 +6426,7 @@ union wpa_event_data {
  
  	/**
  	 * struct ch_switch
@@ -314,7 +278,7 @@
  	 * @freq: Frequency of new channel in MHz
  	 * @ht_enabled: Whether this is an HT channel
  	 * @ch_offset: Secondary channel offset
-@@ -6450,6 +6470,7 @@ union wpa_event_data {
+@@ -6436,6 +6437,7 @@ union wpa_event_data {
  	 * @punct_bitmap: Puncturing bitmap
  	 */
  	struct ch_switch {
@@ -341,7 +305,7 @@
  
  	if (finished)
  		bss->flink->freq = data.ch_switch.freq;
-@@ -3912,6 +3915,7 @@ static void do_process_drv_event(struct
+@@ -3848,6 +3851,7 @@ static void do_process_drv_event(struct
  				     tb[NL80211_ATTR_CENTER_FREQ1],
  				     tb[NL80211_ATTR_CENTER_FREQ2],
  				     tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -349,7 +313,7 @@
  				     0);
  		break;
  	case NL80211_CMD_CH_SWITCH_NOTIFY:
-@@ -3924,6 +3928,7 @@ static void do_process_drv_event(struct
+@@ -3860,6 +3864,7 @@ static void do_process_drv_event(struct
  				     tb[NL80211_ATTR_CENTER_FREQ1],
  				     tb[NL80211_ATTR_CENTER_FREQ2],
  				     tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -359,7 +323,7 @@
  	case NL80211_CMD_DISCONNECT:
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5389,6 +5389,7 @@ void supplicant_event(void *ctx, enum wp
+@@ -5381,6 +5381,7 @@ void supplicant_event(void *ctx, enum wp
  		event_to_string(event), event);
  #endif /* CONFIG_NO_STDOUT_DEBUG */
  
@@ -367,187 +331,3 @@
  	switch (event) {
  	case EVENT_AUTH:
  #ifdef CONFIG_FST
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -393,6 +393,23 @@ static inline int hostapd_drv_stop_ap(st
- 	return hapd->driver->stop_ap(hapd->drv_priv);
- }
- 
-+static inline int hostapd_drv_if_rename(struct hostapd_data *hapd,
-+					enum wpa_driver_if_type type,
-+					const char *ifname,
-+					const char *new_name)
-+{
-+	if (!hapd->driver || !hapd->driver->if_rename || !hapd->drv_priv)
-+		return -1;
-+	return hapd->driver->if_rename(hapd->drv_priv, type, ifname, new_name);
-+}
-+
-+static inline int hostapd_drv_set_first_bss(struct hostapd_data *hapd)
-+{
-+	if (!hapd->driver || !hapd->driver->set_first_bss || !hapd->drv_priv)
-+		return 0;
-+	return hapd->driver->set_first_bss(hapd->drv_priv);
-+}
-+
- static inline int hostapd_drv_channel_info(struct hostapd_data *hapd,
- 					   struct wpa_channel_info *ci)
- {
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -1333,7 +1333,7 @@ static void wpa_driver_nl80211_event_rtm
- 		}
- 		wpa_printf(MSG_DEBUG, "nl80211: Interface down (%s/%s)",
- 			   namebuf, ifname);
--		if (os_strcmp(drv->first_bss->ifname, ifname) != 0) {
-+		if (drv->first_bss->ifindex != ifi->ifi_index) {
- 			wpa_printf(MSG_DEBUG,
- 				   "nl80211: Not the main interface (%s) - do not indicate interface down",
- 				   drv->first_bss->ifname);
-@@ -1369,7 +1369,7 @@ static void wpa_driver_nl80211_event_rtm
- 		}
- 		wpa_printf(MSG_DEBUG, "nl80211: Interface up (%s/%s)",
- 			   namebuf, ifname);
--		if (os_strcmp(drv->first_bss->ifname, ifname) != 0) {
-+		if (drv->first_bss->ifindex != ifi->ifi_index) {
- 			wpa_printf(MSG_DEBUG,
- 				   "nl80211: Not the main interface (%s) - do not indicate interface up",
- 				   drv->first_bss->ifname);
-@@ -8432,6 +8432,7 @@ static void *i802_init(struct hostapd_da
- 	char master_ifname[IFNAMSIZ];
- 	int ifindex, br_ifindex = 0;
- 	int br_added = 0;
-+	int err;
- 
- 	bss = wpa_driver_nl80211_drv_init(hapd, params->ifname,
- 					  params->global_priv, 1,
-@@ -8491,21 +8492,17 @@ static void *i802_init(struct hostapd_da
- 	    (params->num_bridge == 0 || !params->bridge[0]))
- 		add_ifidx(drv, br_ifindex, drv->ifindex);
- 
--	if (bss->added_if_into_bridge || bss->already_in_bridge) {
--		int err;
--
--		drv->rtnl_sk = nl_socket_alloc();
--		if (drv->rtnl_sk == NULL) {
--			wpa_printf(MSG_ERROR, "nl80211: Failed to allocate nl_sock");
--			goto failed;
--		}
-+	drv->rtnl_sk = nl_socket_alloc();
-+	if (drv->rtnl_sk == NULL) {
-+		wpa_printf(MSG_ERROR, "nl80211: Failed to allocate nl_sock");
-+		goto failed;
-+	}
- 
--		err = nl_connect(drv->rtnl_sk, NETLINK_ROUTE);
--		if (err) {
--			wpa_printf(MSG_ERROR, "nl80211: Failed to connect nl_sock to NETLINK_ROUTE: %s",
--				   nl_geterror(err));
--			goto failed;
--		}
-+	err = nl_connect(drv->rtnl_sk, NETLINK_ROUTE);
-+	if (err) {
-+		wpa_printf(MSG_ERROR, "nl80211: Failed to connect nl_sock to NETLINK_ROUTE: %s",
-+			   nl_geterror(err));
-+		goto failed;
- 	}
- 
- 	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
-@@ -8875,6 +8872,50 @@ static int wpa_driver_nl80211_if_remove(
- 	return 0;
- }
- 
-+static int wpa_driver_nl80211_if_rename(struct i802_bss *bss,
-+					enum wpa_driver_if_type type,
-+					const char *ifname, const char *new_name)
-+{
-+	struct wpa_driver_nl80211_data *drv = bss->drv;
-+	struct ifinfomsg ifi = {
-+		.ifi_family = AF_UNSPEC,
-+		.ifi_index = bss->ifindex,
-+	};
-+	struct nl_msg *msg;
-+	int res = -ENOMEM;
-+
-+	if (ifname)
-+		ifi.ifi_index = if_nametoindex(ifname);
-+
-+	msg = nlmsg_alloc_simple(RTM_SETLINK, 0);
-+	if (!msg)
-+		return res;
-+
-+	if (nlmsg_append(msg, &ifi, sizeof(ifi), NLMSG_ALIGNTO) < 0)
-+		goto out;
-+
-+	if (nla_put_string(msg, IFLA_IFNAME, new_name))
-+		goto out;
-+
-+	res = nl_send_auto_complete(drv->rtnl_sk, msg);
-+	if (res < 0)
-+		goto out;
-+
-+	res = nl_wait_for_ack(drv->rtnl_sk);
-+	if (res) {
-+		wpa_printf(MSG_INFO,
-+			   "nl80211: Renaming device %s to %s failed: %s",
-+			   ifname ? ifname : bss->ifname, new_name, nl_geterror(res));
-+		goto out;
-+	}
-+
-+	if (type == WPA_IF_AP_BSS && !ifname)
-+		os_strlcpy(bss->ifname, new_name, sizeof(bss->ifname));
-+
-+out:
-+	nlmsg_free(msg);
-+	return res;
-+}
- 
- static int cookie_handler(struct nl_msg *msg, void *arg)
- {
-@@ -10513,6 +10554,37 @@ static int driver_nl80211_if_remove(void
- }
- 
- 
-+static int driver_nl80211_if_rename(void *priv, enum wpa_driver_if_type type,
-+				    const char *ifname, const char *new_name)
-+{
-+	struct i802_bss *bss = priv;
-+	return wpa_driver_nl80211_if_rename(bss, type, ifname, new_name);
-+}
-+
-+
-+static int driver_nl80211_set_first_bss(void *priv)
-+{
-+	struct i802_bss *bss = priv, *tbss;
-+	struct wpa_driver_nl80211_data *drv = bss->drv;
-+
-+	if (drv->first_bss == bss)
-+		return 0;
-+
-+	for (tbss = drv->first_bss; tbss; tbss = tbss->next) {
-+		if (tbss->next != bss)
-+			continue;
-+
-+		tbss->next = bss->next;
-+		bss->next = drv->first_bss;
-+		drv->first_bss = bss;
-+		drv->ctx = bss->ctx;
-+		return 0;
-+	}
-+
-+	return -1;
-+}
-+
-+
- static int driver_nl80211_send_mlme(void *priv, const u8 *data,
- 				    size_t data_len, int noack,
- 				    unsigned int freq,
-@@ -13697,6 +13769,8 @@ const struct wpa_driver_ops wpa_driver_n
- 	.set_acl = wpa_driver_nl80211_set_acl,
- 	.if_add = wpa_driver_nl80211_if_add,
- 	.if_remove = driver_nl80211_if_remove,
-+	.if_rename = driver_nl80211_if_rename,
-+	.set_first_bss = driver_nl80211_set_first_bss,
- 	.send_mlme = driver_nl80211_send_mlme,
- 	.get_hw_feature_data = nl80211_get_hw_feature_data,
- 	.sta_add = wpa_driver_nl80211_sta_add,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/701-reload_config_inline.patch b/recipes-wifi/hostapd/files/patches-2.10.3/701-reload_config_inline.patch
index 3c62bf6..44c8892 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/701-reload_config_inline.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/701-reload_config_inline.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4816,7 +4816,12 @@ struct hostapd_config * hostapd_config_r
+@@ -4810,7 +4810,12 @@ struct hostapd_config * hostapd_config_r
  	int errors = 0;
  	size_t i;
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch b/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch
index 089c1dd..1aa4456 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch
@@ -70,7 +70,7 @@
  			   " since no room for additional STA",
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1039,6 +1039,8 @@ struct hostapd_config {
+@@ -1036,6 +1036,8 @@ struct hostapd_config {
  	unsigned int track_sta_max_num;
  	unsigned int track_sta_max_age;
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch b/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch
index ce64513..6b6cc0f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch
@@ -10,7 +10,7 @@
  	int bridge_hairpin; /* hairpin_mode on bridge members */
 --- a/src/ap/x_snoop.c
 +++ b/src/ap/x_snoop.c
-@@ -33,28 +33,31 @@ int x_snoop_init(struct hostapd_data *ha
+@@ -33,14 +33,16 @@ int x_snoop_init(struct hostapd_data *ha
  
  	hapd->x_snoop_initialized = true;
  
@@ -29,20 +29,13 @@
  		wpa_printf(MSG_DEBUG,
  			   "x_snoop: Failed to enable proxyarp on the bridge port");
  		return -1;
+@@ -54,7 +56,8 @@ int x_snoop_init(struct hostapd_data *ha
  	}
  
- 	if (hostapd_drv_br_set_net_param(hapd, DRV_BR_NET_PARAM_GARP_ACCEPT,
--					 1)) {
-+					 conf->snoop_iface[0] ? conf->snoop_iface : NULL, 1)) {
- 		wpa_printf(MSG_DEBUG,
- 			   "x_snoop: Failed to enable accepting gratuitous ARP on the bridge");
- 		return -1;
- 	}
- 
  #ifdef CONFIG_IPV6
 -	if (hostapd_drv_br_set_net_param(hapd, DRV_BR_MULTICAST_SNOOPING, 1)) {
 +	if (!conf->snoop_iface[0] &&
-+	    hostapd_drv_br_set_net_param(hapd, DRV_BR_MULTICAST_SNOOPING, NULL, 1)) {
++	    hostapd_drv_br_set_net_param(hapd, DRV_BR_MULTICAST_SNOOPING, 1)) {
  		wpa_printf(MSG_DEBUG,
  			   "x_snoop: Failed to enable multicast snooping on the bridge");
  		return -1;
@@ -51,29 +44,15 @@
  	struct hostapd_bss_config *conf = hapd->conf;
  	struct l2_packet_data *l2;
 +	const char *ifname = conf->bridge;
-+
-+	if (conf->snoop_iface[0])
-+		ifname = conf->snoop_iface;
  
 -	l2 = l2_packet_init(conf->bridge, NULL, ETH_P_ALL, handler, hapd, 1);
++	if (conf->snoop_iface[0])
++		ifname = conf->snoop_iface;
++
 +	l2 = l2_packet_init(ifname, NULL, ETH_P_ALL, handler, hapd, 1);
  	if (l2 == NULL) {
  		wpa_printf(MSG_DEBUG,
  			   "x_snoop: Failed to initialize L2 packet processing %s",
-@@ -127,9 +134,12 @@ void x_snoop_mcast_to_ucast_convert_send
- 
- void x_snoop_deinit(struct hostapd_data *hapd)
- {
-+	struct hostapd_bss_config *conf = hapd->conf;
-+
- 	if (!hapd->x_snoop_initialized)
- 		return;
--	hostapd_drv_br_set_net_param(hapd, DRV_BR_NET_PARAM_GARP_ACCEPT, 0);
-+	hostapd_drv_br_set_net_param(hapd, DRV_BR_NET_PARAM_GARP_ACCEPT,
-+				     conf->snoop_iface[0] ? conf->snoop_iface : NULL, 0);
- 	hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_PROXYARP, 0);
- 	hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE, 0);
- 	hapd->x_snoop_initialized = false;
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -2322,6 +2322,8 @@ static int hostapd_config_fill(struct ho
@@ -85,55 +64,3 @@
  	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
  		os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
  	} else if (os_strcmp(buf, "wds_bridge") == 0) {
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -366,12 +366,12 @@ static inline int hostapd_drv_br_port_se
- 
- static inline int hostapd_drv_br_set_net_param(struct hostapd_data *hapd,
- 					       enum drv_br_net_param param,
--					       unsigned int val)
-+					       const char *ifname, unsigned int val)
- {
- 	if (hapd->driver == NULL || hapd->drv_priv == NULL ||
- 	    hapd->driver->br_set_net_param == NULL)
- 		return -1;
--	return hapd->driver->br_set_net_param(hapd->drv_priv, param, val);
-+	return hapd->driver->br_set_net_param(hapd->drv_priv, param, ifname, val);
- }
- 
- static inline int hostapd_drv_vendor_cmd(struct hostapd_data *hapd,
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -4209,7 +4209,7 @@ struct wpa_driver_ops {
- 	 * Returns: 0 on success, negative (<0) on failure
- 	 */
- 	int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
--				unsigned int val);
-+				const char *ifname, unsigned int val);
- 
- 	/**
- 	 * get_wowlan - Get wake-on-wireless status
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -12168,7 +12168,7 @@ static const char * drv_br_net_param_str
- 
- 
- static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param,
--				       unsigned int val)
-+				       const char *ifname, unsigned int val)
- {
- 	struct i802_bss *bss = priv;
- 	char path[128];
-@@ -12194,8 +12194,11 @@ static int wpa_driver_br_set_net_param(v
- 			return -EINVAL;
- 	}
- 
-+	if (!ifname)
-+		ifname = bss->brname;
-+
- 	os_snprintf(path, sizeof(path), "/proc/sys/net/ipv%d/conf/%s/%s",
--		    ip_version, bss->brname, param_txt);
-+		    ip_version, ifname, param_txt);
- 
- set_val:
- 	if (linux_write_system_file(path, val))
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/770-radius_server.patch b/recipes-wifi/hostapd/files/patches-2.10.3/770-radius_server.patch
index 8837a26..e4690c7 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/770-radius_server.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/770-radius_server.patch
@@ -21,7 +21,7 @@
  
  #ifndef CONFIG_NO_HOSTAPD_LOGGER
  static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
-@@ -771,6 +772,11 @@ int main(int argc, char *argv[])
+@@ -758,6 +759,11 @@ int main(int argc, char *argv[])
  	if (os_program_init())
  		return -1;
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch b/recipes-wifi/hostapd/files/patches-2.10.3/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
index 5809a3b..51690de 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
@@ -13,7 +13,7 @@
 
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
-@@ -12763,7 +12763,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -12640,7 +12640,7 @@ char * wpa_supplicant_ctrl_iface_process
  		if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
  			reply_len = -1;
  #endif /* CONFIG_WNM */
@@ -22,7 +22,7 @@
  	} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
  		if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
  			reply_len = -1;
-@@ -12773,7 +12773,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -12650,7 +12650,7 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
  		if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
  			reply_len = -1;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/991-Fix-OpenWrt-13156.patch b/recipes-wifi/hostapd/files/patches-2.10.3/991-Fix-OpenWrt-13156.patch
index 097d62a..3f10fb1 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/991-Fix-OpenWrt-13156.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/991-Fix-OpenWrt-13156.patch
@@ -20,7 +20,7 @@
 
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -3564,6 +3564,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -3563,6 +3563,8 @@ int hostapd_remove_iface(struct hapd_int
  void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
  			   int reassoc)
  {
@@ -29,7 +29,7 @@
  	if (hapd->tkip_countermeasures) {
  		hostapd_drv_sta_deauth(hapd, sta->addr,
  				       WLAN_REASON_MICHAEL_MIC_FAILURE);
-@@ -3571,10 +3573,16 @@ void hostapd_new_assoc_sta(struct hostap
+@@ -3570,10 +3572,16 @@ void hostapd_new_assoc_sta(struct hostap
  	}
  
  #ifdef CONFIG_IEEE80211BE
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
index 7c00526..ebd951f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
@@ -1,7 +1,7 @@
-From 9ae2d23b69518792f81ec574c3d6e9000deb1b5d Mon Sep 17 00:00:00 2001
+From 66102db35a595a1b2754e13a95123e55d378332e 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/38] hostapd: mtk: Add neighbor report and BSS Termination
+Subject: [PATCH 01/40] hostapd: mtk: Add neighbor report and BSS Termination
  for MBO certification
 
 1. Add hostapd_neighbor_count() and hostapd_neighbor_insert_buffer ()
@@ -59,7 +59,7 @@
  
  
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 0790478..82338e2 100644
+index 44b62f8..774f64e 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
 @@ -558,6 +558,7 @@ struct hostapd_bss_config {
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
index d9b0cba..70486da 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
@@ -1,7 +1,7 @@
-From b76669952a1971105f1de99b69e9711ab71e9c63 Mon Sep 17 00:00:00 2001
+From a915b2e10f342705ab26158efebaa7a7024042ae 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/38] hostapd: mtk: print sae groups by hostapd ctrl
+Subject: [PATCH 02/40] hostapd: mtk: print sae groups by hostapd ctrl
 
 ---
  hostapd/ctrl_iface.c | 13 +++++++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
index 85ffb3b..377b04a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
@@ -1,7 +1,7 @@
-From 9aaf05a3b4ec0cf420a20cbb5b2dc65b66eacb49 Mon Sep 17 00:00:00 2001
+From e2ecc047a72c3069c9f05975e612a37864da5885 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/38] hostapd: mtk: add support for runtime set in-band
+Subject: [PATCH 03/40] hostapd: mtk: add support for runtime set in-band
  discovery
 
 Usage:
@@ -143,7 +143,7 @@
  };
  
 diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 6366d77..d160675 100644
+index 9454cdf..3dc217f 100644
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
 @@ -1648,6 +1648,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
@@ -166,7 +166,7 @@
  						  &params->fd_frame_tmpl_len);
  
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index f6c5df9..c7745b6 100644
+index 99870a6..7867e69 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -4686,9 +4686,10 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
index 13a7d1d..11971cd 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
@@ -1,7 +1,7 @@
-From 86553b9434ad98e4ec3dd19fbc5589ca24501f4d Mon Sep 17 00:00:00 2001
+From bb0f79fb5a04b7ba10bf3ff03634110dd25aa31f 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/38] hostapd: mtk: Add mtk_vendor.h
+Subject: [PATCH 04/40] hostapd: mtk: Add mtk_vendor.h
 
 ---
  src/common/mtk_vendor.h | 197 ++++++++++++++++++++++++++++++++++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index 868adca..272ebf8 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
@@ -1,7 +1,7 @@
-From 906a70c7df5918c40c9552e078690ab7305ed40e Mon Sep 17 00:00:00 2001
+From 6b321709940a2feaa79a5e6d63f19a83bde83bb7 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/38] hostapd: mtk: Support EDCCA hostapd configuration
+Subject: [PATCH 05/40] hostapd: mtk: Support EDCCA hostapd configuration
 
 edcca_enable and edcca_compensation and implement edcca related handlers.
 ---
@@ -20,12 +20,12 @@
  12 files changed, 428 insertions(+), 6 deletions(-)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 4b0f99f..d281026 100644
+index 3557bef..1fc6456 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4809,6 +4809,40 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- 			return 1;
- 		}
+@@ -4803,6 +4803,40 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ 	} else if (os_strcmp(buf, "mld_id") == 0) {
+ 		bss->mld_id = atoi(pos);
  #endif /* CONFIG_IEEE80211BE */
 +	} else if (os_strcmp(buf, "edcca_threshold") == 0) {
 +		if (hostapd_parse_intlist(&conf->edcca_threshold, pos) ||
@@ -237,10 +237,10 @@
  	wpabuf_free(conf->civic);
  
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 82338e2..24d540d 100644
+index 774f64e..0e829c0 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1193,8 +1193,38 @@ struct hostapd_config {
+@@ -1190,8 +1190,38 @@ struct hostapd_config {
  		MBSSID_ENABLED = 1,
  		ENHANCED_MBSSID_ENABLED = 2,
  	} mbssid;
@@ -312,7 +312,7 @@
 +	return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 96c8c4e..6ca693b 100644
+index 331b0ea..8806217 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -144,6 +144,10 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
@@ -327,7 +327,7 @@
  #include "drivers/driver.h"
  
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 6746de2..1b9ce6f 100644
+index 96ab02b..b34c9d2 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -2511,6 +2511,13 @@ dfs_offload:
@@ -378,10 +378,10 @@
  	[MTK_VENDOR_ATTR_EDCCA_CTRL_MODE] = { .type = NLA_U8 },
  	[MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL] = { .type = NLA_U8 },
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index cc49011..fca2035 100644
+index 969cbda..443c4a7 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5102,6 +5102,10 @@ struct wpa_driver_ops {
+@@ -5080,6 +5080,10 @@ struct wpa_driver_ops {
  			      const u8 *match, size_t match_len,
  			      bool multicast);
  #endif /* CONFIG_TESTING_OPTIONS */
@@ -393,7 +393,7 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index c7745b6..0a159d5 100644
+index 7867e69..5a3e208 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -37,6 +37,8 @@
@@ -405,7 +405,7 @@
  
  
  #ifndef NETLINK_CAP_ACK
-@@ -13748,6 +13750,174 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
+@@ -13632,6 +13634,174 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
  
  #endif /* CONFIG_TESTING_OPTIONS */
  
@@ -580,7 +580,7 @@
  
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
-@@ -13904,4 +14074,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -13786,4 +13956,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.register_frame = testing_nl80211_register_frame,
  	.radio_disable = testing_nl80211_radio_disable,
  #endif /* CONFIG_TESTING_OPTIONS */
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
index 43f214c..7ae38e3 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
@@ -1,7 +1,7 @@
-From f868636d86170f6ebe9dba785f22195b06177af1 Mon Sep 17 00:00:00 2001
+From 2ae0d6fb6b676f76081a9edd3416d93b26091400 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/38] hostapd: mtk: Add hostapd MU SET/GET control
+Subject: [PATCH 06/40] hostapd: mtk: Add hostapd MU SET/GET control
 
 ---
  hostapd/config_file.c             |   9 +++
@@ -20,7 +20,7 @@
  13 files changed, 251 insertions(+)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index d281026..ec3b41a 100644
+index 1fc6456..0e67796 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -3677,6 +3677,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
@@ -168,10 +168,10 @@
  
  	/* The third octet of the country string uses an ASCII space character
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 24d540d..421e6a6 100644
+index 0e829c0..0bd6254 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1146,6 +1146,7 @@ struct hostapd_config {
+@@ -1143,6 +1143,7 @@ struct hostapd_config {
  	u8 he_6ghz_tx_ant_pat;
  	u8 he_6ghz_reg_pwr_type;
  	bool require_he;
@@ -202,7 +202,7 @@
 +	return hapd->driver->mu_dump(hapd->drv_priv, mu_onoff);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 6ca693b..8a7d981 100644
+index 8806217..6e0cf81 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -148,6 +148,8 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -215,7 +215,7 @@
  #include "drivers/driver.h"
  
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 1b9ce6f..865991e 100644
+index b34c9d2..4251699 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -2517,6 +2517,8 @@ dfs_offload:
@@ -261,7 +261,7 @@
  #define ETH_ALEN 6
  
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index fca2035..542dd45 100644
+index 443c4a7..1471ba2 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
 @@ -176,6 +176,11 @@ struct hostapd_channel_data {
@@ -276,7 +276,7 @@
  };
  
  #define HE_MAC_CAPAB_0		0
-@@ -5106,6 +5111,14 @@ struct wpa_driver_ops {
+@@ -5084,6 +5089,14 @@ struct wpa_driver_ops {
  				  const s8 edcca_compensation);
  	int (*configure_edcca_threshold)(void *priv, const int *threshold);
  	int (*get_edcca)(void *priv, const u8 mode, u8 *value);
@@ -292,10 +292,10 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 0a159d5..07c72f5 100644
+index 5a3e208..8e8a4fd 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -13613,6 +13613,114 @@ fail:
+@@ -13497,6 +13497,114 @@ fail:
  }
  
  
@@ -410,7 +410,7 @@
  #ifdef CONFIG_DPP
  static int nl80211_dpp_listen(void *priv, bool enable)
  {
-@@ -14065,6 +14173,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -13947,6 +14055,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.update_connect_params = nl80211_update_connection_params,
  	.send_external_auth_status = nl80211_send_external_auth_status,
  	.set_4addr_mode = nl80211_set_4addr_mode,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
index 5967879..0488ba3 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
@@ -1,7 +1,7 @@
-From f02858d395fd60a2b5b772ceaccf883455605af4 Mon Sep 17 00:00:00 2001
+From 74fde855e7d167f93908a70b50b029c42b796be8 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/38] hostapd: mtk: Add three wire PTA ctrl hostapd vendor
+Subject: [PATCH 07/40] hostapd: mtk: Add three wire PTA ctrl hostapd vendor
  command
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -20,10 +20,10 @@
  11 files changed, 93 insertions(+)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index ec3b41a..d515b6e 100644
+index 0e67796..c716630 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4852,6 +4852,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4846,6 +4846,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
  			return 1;
  		}
  		conf->edcca_compensation = (s8) val;
@@ -47,10 +47,10 @@
  	return conf;
  }
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 421e6a6..52df2e0 100644
+index 0bd6254..8f4f79e 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1198,6 +1198,19 @@ struct hostapd_config {
+@@ -1195,6 +1195,19 @@ struct hostapd_config {
  	u8 edcca_enable;
  	s8 edcca_compensation;
  	int *edcca_threshold;
@@ -90,7 +90,7 @@
 +	return hapd->driver->three_wire_ctrl(hapd->drv_priv, hapd->iconf->three_wire_enable);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 8a7d981..ed3b4cf 100644
+index 6e0cf81..960a110 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -150,6 +150,7 @@ int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
@@ -102,7 +102,7 @@
  #include "drivers/driver.h"
  
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 865991e..cad5d67 100644
+index 4251699..798852e 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -2519,6 +2519,8 @@ dfs_offload:
@@ -149,10 +149,10 @@
  	MTK_VENDOR_ATTR_CSI_CTRL_UNSPEC,
  
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 542dd45..07af191 100644
+index 1471ba2..cd7afef 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5119,6 +5119,14 @@ struct wpa_driver_ops {
+@@ -5097,6 +5097,14 @@ struct wpa_driver_ops {
  	 */
  	 int (*mu_ctrl)(void *priv, u8 mu_onoff);
  	 int (*mu_dump)(void *priv, u8 *mu_onoff);
@@ -168,10 +168,10 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 07c72f5..cf1f2d0 100644
+index 8e8a4fd..621515d 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -14026,6 +14026,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
+@@ -13910,6 +13910,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
  	return ret;
  }
  
@@ -210,7 +210,7 @@
  
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
-@@ -14188,4 +14220,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14070,4 +14102,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.configure_edcca_enable = nl80211_configure_edcca_enable,
  	.configure_edcca_threshold = nl80211_configure_edcca_threshold,
  	.get_edcca = nl80211_get_edcca,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
index de3e848..6d807ee 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
@@ -1,7 +1,7 @@
-From 59a1d486171bd4976b39bcf076d7a5b50237de58 Mon Sep 17 00:00:00 2001
+From a527e4f9a557f751fa0b3ef8b3d40e5edef56d38 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/38] hostapd: mtk: Add hostapd iBF control
+Subject: [PATCH 08/40] hostapd: mtk: Add hostapd iBF control
 
 Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
 ---
@@ -21,10 +21,10 @@
  13 files changed, 224 insertions(+), 1 deletion(-)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index d515b6e..f8560a7 100644
+index c716630..dea124a 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4856,6 +4856,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4850,6 +4850,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
  		u8 en = atoi(pos);
  
  		conf->three_wire_enable = en;
@@ -118,10 +118,10 @@
  	return conf;
  }
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 52df2e0..ffbc4fb 100644
+index 8f4f79e..9758439 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1199,6 +1199,7 @@ struct hostapd_config {
+@@ -1196,6 +1196,7 @@ struct hostapd_config {
  	s8 edcca_compensation;
  	int *edcca_threshold;
  	u8 three_wire_enable;
@@ -129,7 +129,7 @@
  };
  
  enum three_wire_mode {
-@@ -1324,6 +1325,7 @@ hostapd_set_oper_centr_freq_seg1_idx(struct hostapd_config *conf,
+@@ -1321,6 +1322,7 @@ hostapd_set_oper_centr_freq_seg1_idx(struct hostapd_config *conf,
  	conf->vht_oper_centr_freq_seg1_idx = oper_centr_freq_seg1_idx;
  }
  
@@ -161,7 +161,7 @@
 +}
 \ No newline at end of file
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index ed3b4cf..2958661 100644
+index 960a110..3f1df5d 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -151,6 +151,8 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
@@ -174,7 +174,7 @@
  #include "drivers/driver.h"
  
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index cad5d67..227580e 100644
+index 798852e..a513236 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -2521,6 +2521,8 @@ dfs_offload:
@@ -240,7 +240,7 @@
  #define CSI_MAX_COUNT 256
  #define ETH_ALEN 6
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 07af191..0a99078 100644
+index cd7afef..7ac0284 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
 @@ -181,6 +181,11 @@ struct hostapd_channel_data {
@@ -255,7 +255,7 @@
  };
  
  #define HE_MAC_CAPAB_0		0
-@@ -5127,6 +5132,20 @@ struct wpa_driver_ops {
+@@ -5105,6 +5110,20 @@ struct wpa_driver_ops {
  	 *
  	 */
  	 int (*three_wire_ctrl)(void *priv, u8 three_wire_enable);
@@ -277,10 +277,10 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index cf1f2d0..a05e047 100644
+index 621515d..936a4f8 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -14059,6 +14059,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
+@@ -13943,6 +13943,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
  	return ret;
  }
  
@@ -393,7 +393,7 @@
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
  	.desc = "Linux nl80211/cfg80211",
-@@ -14221,4 +14327,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14103,4 +14209,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.configure_edcca_threshold = nl80211_configure_edcca_threshold,
  	.get_edcca = nl80211_get_edcca,
  	.three_wire_ctrl = nl80211_enable_three_wire,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
index ba1aa44..40fccf5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
@@ -1,7 +1,7 @@
-From ddca5f55f8f0468f23d4e531b3b40d0ef7d63485 Mon Sep 17 00:00:00 2001
+From 46e29c26ddaa503b6af4dc33784a2998c453d6c9 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/38] hostapd: mtk: Do not include HE capab IE if associated
+Subject: [PATCH 09/40] hostapd: mtk: Do not include HE capab IE if associated
  sta's HE capab IE is invalid
 
 ---
@@ -9,10 +9,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-index db404a6..110ad8c 100644
+index db48b7c..1bf5bea 100644
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -4863,7 +4863,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
+@@ -4843,7 +4843,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
  #endif /* CONFIG_IEEE80211AC */
  
  #ifdef CONFIG_IEEE80211AX
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
index 3049a6b..1b4dadf 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
@@ -1,7 +1,7 @@
-From e825b01701aeb6536321a9bf1bd5b4760a0cdc04 Mon Sep 17 00:00:00 2001
+From a257091386c0bf12de2934730b874d240f34d1bb 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/38] hostapd: mtk: Add DFS detection mode
+Subject: [PATCH 10/40] 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
@@ -17,10 +17,10 @@
  4 files changed, 50 insertions(+)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index f8560a7..50e2993 100644
+index dea124a..a4a8e71 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4859,6 +4859,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4853,6 +4853,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
  	} else if (os_strcmp(buf, "ibf_enable") == 0) { /*ibf setting is per device*/
  		int val = atoi(pos);
  		conf->ibf_enable = !!val;
@@ -73,10 +73,10 @@
  		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
  		reply_len = 16;
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index ffbc4fb..6576d79 100644
+index 9758439..c50c2e2 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1200,6 +1200,7 @@ struct hostapd_config {
+@@ -1197,6 +1197,7 @@ struct hostapd_config {
  	int *edcca_threshold;
  	u8 three_wire_enable;
  	u8 ibf_enable;
@@ -84,7 +84,7 @@
  };
  
  enum three_wire_mode {
-@@ -1214,6 +1215,18 @@ enum three_wire_mode {
+@@ -1211,6 +1212,18 @@ enum three_wire_mode {
  		NUM_THREE_WIRE_MODE - 1
  };
  
@@ -104,10 +104,10 @@
  	EDCCA_MODE_FORCE_DISABLE = 0,
  	EDCCA_MODE_AUTO = 1,
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 29d2683..2e138e2 100644
+index a19afb0..644a7ea 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1327,6 +1327,11 @@ hostapd_dfs_background_start_channel_switch(struct hostapd_iface *iface,
+@@ -1322,6 +1322,11 @@ hostapd_dfs_background_start_channel_switch(struct hostapd_iface *iface,
  		   __func__, iface->radar_background.cac_started ? "yes" : "no",
  		   hostapd_csa_in_progress(iface) ? "yes" : "no");
  
@@ -119,7 +119,7 @@
  	/* Check if CSA in progress */
  	if (hostapd_csa_in_progress(iface))
  		return 0;
-@@ -1375,6 +1380,11 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
+@@ -1370,6 +1375,11 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
  		   __func__, iface->cac_started ? "yes" : "no",
  		   hostapd_csa_in_progress(iface) ? "yes" : "no");
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
index 39cb7f2..11b11fc 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
@@ -1,7 +1,7 @@
-From 34d1517322d42ea45b6b2a792b9d7f7dd256bef6 Mon Sep 17 00:00:00 2001
+From 4802aabaad0a2e7a02d32a365f6d8fec344d264c 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/38] hostapd: mtk: Add DFS offchan channel switch
+Subject: [PATCH 11/40] 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.
@@ -106,7 +106,7 @@
  		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
  		reply_len = 16;
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 2e138e2..23e6527 100644
+index 644a7ea..48c5fc9 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
 @@ -19,13 +19,6 @@
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
index de63341..aa32d0f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
@@ -1,7 +1,7 @@
-From 2c3c314405d088440feccf8fb596849d99cce6f8 Mon Sep 17 00:00:00 2001
+From 4f54451e436ca42946b3f0f294b6e784d2f61862 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/38] hostapd: mtk: Add amsdu set get ctrl
+Subject: [PATCH 12/40] hostapd: mtk: Add amsdu set get ctrl
 
 ---
  hostapd/config_file.c             |   9 +++
@@ -20,10 +20,10 @@
  13 files changed, 207 insertions(+), 1 deletion(-)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 50e2993..0b2f3dc 100644
+index a4a8e71..d17e50e 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4863,6 +4863,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4857,6 +4857,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
  		u8 en = strtol(pos, NULL, 10);
  
  		conf->dfs_detect_mode = en;
@@ -123,10 +123,10 @@
  	return conf;
  }
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 6576d79..9f3cea2 100644
+index c50c2e2..b8f6680 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1201,6 +1201,7 @@ struct hostapd_config {
+@@ -1198,6 +1198,7 @@ struct hostapd_config {
  	u8 three_wire_enable;
  	u8 ibf_enable;
  	u8 dfs_detect_mode;
@@ -159,7 +159,7 @@
  }
 \ No newline at end of file
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 2958661..88bc430 100644
+index 3f1df5d..422cb52 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -153,6 +153,8 @@ int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff);
@@ -172,7 +172,7 @@
  #include "drivers/driver.h"
  
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 227580e..a166de4 100644
+index a513236..24e5df8 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -2523,6 +2523,8 @@ dfs_offload:
@@ -220,10 +220,10 @@
  	MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
  
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 0a99078..38f6e8b 100644
+index 7ac0284..87a5a9b 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5146,6 +5146,15 @@ struct wpa_driver_ops {
+@@ -5124,6 +5124,15 @@ struct wpa_driver_ops {
  	 *
  	 */
  	int (*ibf_dump)(void *priv, u8 *ibf_enable);
@@ -240,10 +240,10 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index a05e047..808db17 100644
+index 936a4f8..ce09d9f 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -14165,6 +14165,118 @@ fail:
+@@ -14049,6 +14049,118 @@ fail:
  	return -ENOBUFS;
  }
  
@@ -362,7 +362,7 @@
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
  	.desc = "Linux nl80211/cfg80211",
-@@ -14329,4 +14441,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14211,4 +14323,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.three_wire_ctrl = nl80211_enable_three_wire,
  	.ibf_ctrl = nl80211_ibf_enable,
  	.ibf_dump = nl80211_ibf_dump,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
index 2182cc1..dd96623 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
@@ -1,7 +1,7 @@
-From 29d69687f1ef2150b1c81dc9a778755aa7095f2f Mon Sep 17 00:00:00 2001
+From ea7da2297d396febe75de0d7cf77cba9d2eab778 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/38] hostapd: mtk: Add he_ldpc configuration
+Subject: [PATCH 13/40] hostapd: mtk: Add he_ldpc configuration
 
 ---
  hostapd/config_file.c        | 2 ++
@@ -13,7 +13,7 @@
  6 files changed, 19 insertions(+)
 
 diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 0b2f3dc..9e3dbb2 100644
+index d17e50e..04ca433 100644
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -3515,6 +3515,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
@@ -26,7 +26,7 @@
  		conf->he_op.he_bss_color = atoi(pos) & 0x3f;
  		conf->he_op.he_bss_color_disabled = 0;
 diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
-index bafc923..f16e3b0 100644
+index 30fb06d..fd42c50 100644
 --- a/hostapd/hostapd.conf
 +++ b/hostapd/hostapd.conf
 @@ -833,6 +833,11 @@ wmm_ac_vo_acm=0
@@ -54,10 +54,10 @@
  		HE_OPERATION_RTS_THRESHOLD_OFFSET;
  	/* Set default basic MCS/NSS set to single stream MCS 0-7 */
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 9f3cea2..d0e27b2 100644
+index b8f6680..5b2dbff 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -959,6 +959,7 @@ struct hostapd_bss_config {
+@@ -956,6 +956,7 @@ struct hostapd_bss_config {
   * struct he_phy_capabilities_info - HE PHY capabilities
   */
  struct he_phy_capabilities_info {
@@ -84,10 +84,10 @@
  		cap->he_phy_capab_info[HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX] |=
  			HE_PHYCAP_SU_BEAMFORMER_CAPAB;
 diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
-index e7c3f17..69f1591 100644
+index 0b7b776..cf3ef98 100644
 --- a/src/common/ieee802_11_defs.h
 +++ b/src/common/ieee802_11_defs.h
-@@ -2358,6 +2358,9 @@ struct ieee80211_spatial_reuse {
+@@ -2357,6 +2357,9 @@ struct ieee80211_spatial_reuse {
  #define HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G	((u8) BIT(3))
  #define HE_PHYCAP_CHANNEL_WIDTH_SET_80PLUS80MHZ_IN_5G	((u8) BIT(4))
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
index eac9292..6003cfb 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
@@ -1,7 +1,7 @@
-From 318e4a89d2f1ab49916820cda2795aa1d9b719b9 Mon Sep 17 00:00:00 2001
+From 41ccc468e3ce6727b237390bcedf1ab734d749e4 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 14/38] hostapd: mtk: Add vendor command attribute for RTS BW
+Subject: [PATCH 14/40] hostapd: mtk: Add vendor command attribute for RTS BW
  signaling.
 
 Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
index a955f11..3b19e78 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
@@ -1,17 +1,17 @@
-From 38302b0ff51f0e666a2f47ef8851d0fe6e03daad Mon Sep 17 00:00:00 2001
+From 0381565e342ecf407ffb6a32212c6d7123417c73 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 15/38] hostapd: mtk: 6G band does not require DFS
+Subject: [PATCH 15/40] hostapd: mtk: 6G band does not require DFS
 
 ---
  src/ap/dfs.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 23e6527..0a8486a 100644
+index 48c5fc9..dcf89ce 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1516,6 +1516,7 @@ int hostapd_is_dfs_required(struct hostapd_iface *iface)
+@@ -1511,6 +1511,7 @@ int hostapd_is_dfs_required(struct hostapd_iface *iface)
  	if ((!(iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD) &&
  	     !iface->conf->ieee80211h) ||
  	    !iface->current_mode ||
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
index 76d6e0b..206a8d3 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
@@ -1,7 +1,7 @@
-From f0e980941ebf54811c89881ac1ea21f318751401 Mon Sep 17 00:00:00 2001
+From b810754f20e0bad1b1be74bd71fc96f6b74b8c4d 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 16/38] hostapd: mtk: Fix sending wrong VHT operation IE in CSA
+Subject: [PATCH 16/40] hostapd: mtk: Fix sending wrong VHT operation IE in CSA
  while using ZWDFS
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -10,10 +10,10 @@
  1 file changed, 9 insertions(+), 5 deletions(-)
 
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 0a8486a..cfc3508 100644
+index dcf89ce..e5ed645 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1120,6 +1120,14 @@ static int
+@@ -1115,6 +1115,14 @@ static int
  hostapd_dfs_start_channel_switch_background(struct hostapd_iface *iface)
  {
  	u8 current_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
@@ -28,7 +28,7 @@
  
  	iface->conf->channel = iface->radar_background.channel;
  	iface->freq = iface->radar_background.freq;
-@@ -1132,11 +1140,7 @@ hostapd_dfs_start_channel_switch_background(struct hostapd_iface *iface)
+@@ -1127,11 +1135,7 @@ hostapd_dfs_start_channel_switch_background(struct hostapd_iface *iface)
  
  	hostpad_dfs_update_background_chain(iface);
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
index e29ecce..f2e966a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
@@ -1,7 +1,7 @@
-From aa33ef52222963f20b152120ad84b6614b8421a1 Mon Sep 17 00:00:00 2001
+From 20f21e3ff3c5d5db5daea650e22c6fa8ca6071a4 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 17/38] hostapd: mtk: Add sta-assisted DFS state update
+Subject: [PATCH 17/40] hostapd: mtk: Add sta-assisted DFS state update
  mechanism
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -16,10 +16,10 @@
  7 files changed, 78 insertions(+)
 
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index cfc3508..9d002cf 100644
+index e5ed645..d52a60e 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1513,6 +1513,26 @@ int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
+@@ -1508,6 +1508,26 @@ int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
  }
  
  
@@ -61,10 +61,10 @@
  int hostapd_is_dfs_chan_available(struct hostapd_iface *iface);
  int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
 diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
-index f6093c1..e7f1f19 100644
+index 903eab3..c3fc419 100644
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -2086,6 +2086,24 @@ static void hostapd_event_dfs_cac_started(struct hostapd_data *hapd,
+@@ -1912,6 +1912,24 @@ static void hostapd_event_dfs_cac_started(struct hostapd_data *hapd,
  			      radar->cf1, radar->cf2);
  }
  
@@ -89,7 +89,7 @@
  #endif /* NEED_AP_MLME */
  
  
-@@ -2407,6 +2425,16 @@ void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
+@@ -2190,6 +2208,16 @@ void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
  			break;
  		hostapd_event_dfs_nop_finished(hapd, &data->dfs_event);
  		break;
@@ -107,7 +107,7 @@
  		/* channel list changed (regulatory?), update channel list */
  		/* TODO: check this. hostapd_get_hw_features() initializes
 diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
-index 416e0d6..62f042e 100644
+index ccff0ee..e209ac6 100644
 --- a/src/common/wpa_ctrl.h
 +++ b/src/common/wpa_ctrl.h
 @@ -374,6 +374,7 @@ extern "C" {
@@ -119,10 +119,10 @@
  #define AP_CSA_FINISHED "AP-CSA-FINISHED "
  
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 38f6e8b..0469694 100644
+index 87a5a9b..592f506 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5782,6 +5782,20 @@ enum wpa_event_type {
+@@ -5760,6 +5760,20 @@ enum wpa_event_type {
  	 * EVENT_LINK_RECONFIG - Notification that AP links removed
  	 */
  	EVENT_LINK_RECONFIG,
@@ -144,10 +144,10 @@
  
  
 diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
-index 701c32e..63d4401 100644
+index 8566b2a..ab988fa 100644
 --- a/src/drivers/driver_nl80211_event.c
 +++ b/src/drivers/driver_nl80211_event.c
-@@ -2514,6 +2514,12 @@ static void nl80211_radar_event(struct wpa_driver_nl80211_data *drv,
+@@ -2447,6 +2447,12 @@ static void nl80211_radar_event(struct wpa_driver_nl80211_data *drv,
  	case NL80211_RADAR_CAC_STARTED:
  		wpa_supplicant_event(drv->ctx, EVENT_DFS_CAC_STARTED, &data);
  		break;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
index c2296fb..a9c1842 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
@@ -1,7 +1,7 @@
-From f3a98bc033de56fee900d0da3a33775165b714ad Mon Sep 17 00:00:00 2001
+From 2471c86d25da6898dd8840b7267211a5dba036b1 Mon Sep 17 00:00:00 2001
 From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
 Date: Fri, 3 Mar 2023 12:45:42 +0800
-Subject: [PATCH 18/38] hostapd: mtk: Mark DFS channel as available for CSA.
+Subject: [PATCH 18/40] hostapd: mtk: Mark DFS channel as available for CSA.
 
 ---
  hostapd/ctrl_iface.c   | 10 ++++++++++
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Add-available-color-bitmap.patch
index d4ce7cc..01aa4d5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Add-available-color-bitmap.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Add-available-color-bitmap.patch
@@ -1,7 +1,7 @@
-From d77b2e1d3821e51f557f1292a0ccaa0a211ea11f Mon Sep 17 00:00:00 2001
+From 236e82d01cd015135468166e6d00b05b16e4c5f8 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 19/38] hostapd: mtk: Add available color bitmap
+Subject: [PATCH 19/40] hostapd: mtk: Add available color bitmap
 
 Signed-off-by: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 ---
@@ -164,7 +164,7 @@
 +	return hapd->driver->get_aval_color_bmp(hapd->drv_priv, aval_color_bmp);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 88bc430..ecaa71f 100644
+index 422cb52..136ea23 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -155,6 +155,8 @@ int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
@@ -206,10 +206,10 @@
  #define CSI_MAX_COUNT 256
  #define ETH_ALEN 6
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 0469694..130143e 100644
+index 592f506..91cb475 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5155,6 +5155,14 @@ struct wpa_driver_ops {
+@@ -5133,6 +5133,14 @@ struct wpa_driver_ops {
  	 */
  	int (*amsdu_ctrl)(void *priv, u8 amsdu);
  	int (*amsdu_dump)(void *priv, u8 *amsdu);
@@ -225,10 +225,10 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 808db17..ee0912f 100644
+index ce09d9f..8b8ddfa 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -12849,7 +12849,6 @@ static void nl80211_parse_btm_candidate_info(struct candidate_list *candidate,
+@@ -12733,7 +12733,6 @@ static void nl80211_parse_btm_candidate_info(struct candidate_list *candidate,
  		   num, MAC2STR(candidate->bssid), buf);
  }
  
@@ -236,7 +236,7 @@
  static int
  nl80211_get_bss_transition_status_handler(struct nl_msg *msg, void *arg)
  {
-@@ -14277,6 +14276,203 @@ fail:
+@@ -14161,6 +14160,203 @@ fail:
  	return -ENOBUFS;
  }
  
@@ -440,7 +440,7 @@
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
  	.desc = "Linux nl80211/cfg80211",
-@@ -14443,4 +14639,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14325,4 +14521,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.ibf_dump = nl80211_ibf_dump,
  	.amsdu_ctrl = nl80211_enable_amsdu,
  	.amsdu_dump = nl80211_dump_amsdu,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
index 84087de..67950bf 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
@@ -1,7 +1,7 @@
-From 181312213a4e8a04be652734ae3ffad12c45b8ae Mon Sep 17 00:00:00 2001
+From 4518e45497260d319663621eca8cea4c0f79b668 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 20/38] hostapd: mtk: Fix ZWDFS issue in BW 160
+Subject: [PATCH 20/40] 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.
@@ -14,7 +14,7 @@
  1 file changed, 79 insertions(+), 19 deletions(-)
 
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 9d002cf..3b1df6d 100644
+index d52a60e..2f5c86e 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
 @@ -69,15 +69,22 @@ static int dfs_get_used_n_chans(struct hostapd_iface *iface, int *seg1)
@@ -96,7 +96,7 @@
  }
  
  
-@@ -836,8 +844,12 @@ static unsigned int dfs_get_cac_time(struct hostapd_iface *iface,
+@@ -831,8 +839,12 @@ static unsigned int dfs_get_cac_time(struct hostapd_iface *iface,
   */
  int hostapd_handle_dfs(struct hostapd_iface *iface)
  {
@@ -110,7 +110,7 @@
  
  	if (is_6ghz_freq(iface->freq))
  		return 1;
-@@ -900,7 +912,7 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
+@@ -895,7 +907,7 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
  	/* Finally start CAC */
  	hostapd_set_state(iface, HAPD_IFACE_DFS);
  	wpa_printf(MSG_DEBUG, "DFS start CAC on %d MHz%s", iface->freq,
@@ -119,7 +119,7 @@
  	wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
  		"freq=%d chan=%d sec_chan=%d, width=%d, seg0=%d, seg1=%d, cac_time=%ds",
  		iface->freq,
-@@ -910,6 +922,16 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
+@@ -905,6 +917,16 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
  		hostapd_get_oper_centr_freq_seg1_idx(iface->conf),
  		iface->dfs_cac_ms / 1000);
  
@@ -136,7 +136,7 @@
  	res = hostapd_start_dfs_cac(
  		iface, iface->conf->hw_mode, iface->freq, iface->conf->channel,
  		iface->conf->ieee80211n, iface->conf->ieee80211ac,
-@@ -918,14 +940,14 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
+@@ -913,14 +935,14 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
  		hostapd_get_oper_chwidth(iface->conf),
  		hostapd_get_oper_centr_freq_seg0_idx(iface->conf),
  		hostapd_get_oper_centr_freq_seg1_idx(iface->conf),
@@ -153,7 +153,7 @@
  		/* Cache background radar parameters. */
  		iface->radar_background.channel = iface->conf->channel;
  		iface->radar_background.secondary_channel =
-@@ -946,6 +968,35 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
+@@ -941,6 +963,35 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
  
  		iface->radar_background.temp_ch = 1;
  		return 1;
@@ -189,7 +189,7 @@
  	}
  
  	return 0;
-@@ -1195,6 +1246,15 @@ int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
+@@ -1190,6 +1241,15 @@ int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
  				hostapd_setup_interface_complete(iface, 0);
  				iface->cac_started = 0;
  			}
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
index c6c039e..43905c6 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
@@ -1,7 +1,7 @@
-From 3e51ee9efe44904b7b41402fd40a25d5e34614f3 Mon Sep 17 00:00:00 2001
+From 014cf359542aeefc995d936ab4843491c4a3b8b6 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 21/38] hostapd: mtk: Add vendor for CAPI certification
+Subject: [PATCH 21/40] hostapd: mtk: Add vendor for CAPI certification
  commands
 
 ---
@@ -167,7 +167,7 @@
 +	return hapd->driver->ap_trigtype(hapd->drv_priv, enable, type);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index ecaa71f..32e6fc1 100644
+index 136ea23..946ee2d 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -157,6 +157,9 @@ int hostapd_drv_amsdu_ctrl(struct hostapd_data *hapd);
@@ -260,10 +260,10 @@
  	MTK_VENDOR_ATTR_BSS_COLOR_CTRL_UNSPEC,
  
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 130143e..91aa9b1 100644
+index 91cb475..3efea9f 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5163,6 +5163,28 @@ struct wpa_driver_ops {
+@@ -5141,6 +5141,28 @@ struct wpa_driver_ops {
  	 *
  	 */
  	int (*get_aval_color_bmp)(void *priv, u64 *aval_color_bmp);
@@ -293,7 +293,7 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index ee0912f..592435c 100644
+index 8b8ddfa..6a42633 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -76,6 +76,58 @@ enum nlmsgerr_attrs {
@@ -355,7 +355,7 @@
  static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
  {
  	struct nl_sock *handle;
-@@ -14640,4 +14692,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14522,4 +14574,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.amsdu_ctrl = nl80211_enable_amsdu,
  	.amsdu_dump = nl80211_dump_amsdu,
  	.get_aval_color_bmp = nl80211_get_aval_color_bmp,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
index 7808d50..90f9965 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
@@ -1,7 +1,7 @@
-From 8fe238bed8756a0015567c41b9c31577755d1015 Mon Sep 17 00:00:00 2001
+From 7e2055111b854c61eaa7ad485ebd3bf171b93df5 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 12 May 2023 05:18:48 +0800
-Subject: [PATCH 22/38] hostapd: mtk: Air Monitor support in hostapd by vendor
+Subject: [PATCH 22/40] hostapd: mtk: Air Monitor support in hostapd by vendor
 
 Signed-off-by: mtk23888 <dipanshu.mittal@mediatek.com>
 ---
@@ -210,7 +210,7 @@
 +	return hapd->driver->amnt_dump(hapd->drv_priv, amnt_idx, amnt_dump_buf);
 +}
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 32e6fc1..8a97e0f 100644
+index 946ee2d..1e2a92a 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -161,6 +161,9 @@ int hostapd_drv_ap_wireless(struct hostapd_data *hapd, u8 sub_vendor_id, int val
@@ -247,10 +247,10 @@
 +
  #endif /* MTK_VENDOR_H */
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 91aa9b1..8733bb5 100644
+index 3efea9f..5c70ec7 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5185,6 +5185,22 @@ struct wpa_driver_ops {
+@@ -5163,6 +5163,22 @@ struct wpa_driver_ops {
  	* @type: trigger type
  	*/
  	int (*ap_trigtype)(void *priv, u8 enable, u8 type);
@@ -274,7 +274,7 @@
  
  /**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 592435c..c55d034 100644
+index 6a42633..3d8cb95 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -128,6 +128,19 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -297,7 +297,7 @@
  static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
  {
  	struct nl_sock *handle;
-@@ -14525,6 +14538,171 @@ fail:
+@@ -14409,6 +14422,171 @@ fail:
  	return -ENOBUFS;
  }
  
@@ -469,7 +469,7 @@
  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.name = "nl80211",
  	.desc = "Linux nl80211/cfg80211",
-@@ -14695,4 +14873,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14577,4 +14755,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.ap_wireless = nl80211_ap_wireless,
  	.ap_rfeatures = nl80211_ap_rfeatures,
  	.ap_trigtype = nl80211_ap_trigtype,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
index 06ceae8..cd30f92 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
@@ -1,7 +1,7 @@
-From be727db37e753f0041b2789af3ecc1eff8c0f5db Mon Sep 17 00:00:00 2001
+From a397fa2ee7a72fafbfa5480adfacad75352d7d2a Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 12 May 2023 05:23:00 +0800
-Subject: [PATCH 23/38] hostapd: mtk: Fix setting wrong seg0 index for 5G
+Subject: [PATCH 23/40] hostapd: mtk: Fix setting wrong seg0 index for 5G
  center chan 159 BW40
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -10,10 +10,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index d0e27b2..f03a957 100644
+index 5b2dbff..b329e81 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1308,7 +1308,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
+@@ -1305,7 +1305,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
  #ifdef CONFIG_IEEE80211BE
  	if (conf->ieee80211be)
  		conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-muru-user-number-debug-command.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-muru-user-number-debug-command.patch
index 68d2e5b..95dae39 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-muru-user-number-debug-command.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-muru-user-number-debug-command.patch
@@ -1,7 +1,7 @@
-From 5644beb4dc1a11a236d909d4a8f8ad4aa86c6c34 Mon Sep 17 00:00:00 2001
+From de53629544ee0f9508554049bc5927ce2f04fcf9 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 12 May 2023 05:24:19 +0800
-Subject: [PATCH 24/38] hostapd: mtk: Add muru user number debug command
+Subject: [PATCH 24/40] hostapd: mtk: Add muru user number debug command
 
 ---
  hostapd/ctrl_iface.c         | 13 ++++++++++++-
@@ -76,7 +76,7 @@
  
  int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 8a97e0f..464efba 100644
+index 1e2a92a..5dd701e 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -148,7 +148,7 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -89,7 +89,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 a166de4..28482c6 100644
+index 24e5df8..25ae08f 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -57,6 +57,7 @@
@@ -133,10 +133,10 @@
 +};
  #endif /* MTK_VENDOR_H */
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 8733bb5..a29b6ff 100644
+index 5c70ec7..84387a6 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5118,11 +5118,11 @@ struct wpa_driver_ops {
+@@ -5096,11 +5096,11 @@ struct wpa_driver_ops {
  	int (*get_edcca)(void *priv, const u8 mode, u8 *value);
  
  	/**
@@ -151,10 +151,10 @@
  
  	/**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index c55d034..fce3ec9 100644
+index 3d8cb95..b682620 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -13678,13 +13678,13 @@ fail:
+@@ -13562,13 +13562,13 @@ fail:
  
  
  #ifdef CONFIG_IEEE80211AX
@@ -170,7 +170,7 @@
  
  	if (!drv->mtk_mu_vendor_cmd_avail) {
  		wpa_printf(MSG_INFO,
-@@ -13695,17 +13695,38 @@ static int nl80211_mu_onoff(void *priv, u8 mu_onoff)
+@@ -13579,17 +13579,38 @@ static int nl80211_mu_onoff(void *priv, u8 mu_onoff)
  	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
  		nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
  		nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_MU_CTRL) ||
@@ -214,7 +214,7 @@
  }
  
  
-@@ -14849,7 +14870,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14731,7 +14752,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
  	.update_connect_params = nl80211_update_connection_params,
  	.send_external_auth_status = nl80211_send_external_auth_status,
  	.set_4addr_mode = nl80211_set_4addr_mode,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
index 2a2a578..19a3c79 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
@@ -1,7 +1,7 @@
-From 033f4f509e60c698d9754057e194f4760af39845 Mon Sep 17 00:00:00 2001
+From 7f1a652729514a0f9a885be30185810c18110c4d Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Sat, 3 Jun 2023 17:12:15 +0800
-Subject: [PATCH 25/38] hostapd: mtk: add connac3 PHY MURU manual mode config
+Subject: [PATCH 25/40] hostapd: mtk: add connac3 PHY MURU manual mode config
  support
 
 This commit supports read the following two formats to set MU/RU manual
@@ -327,10 +327,10 @@
  		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
  		reply_len = 16;
 diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index f03a957..7c0d12a 100644
+index b329e81..d43f1a6 100644
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1203,6 +1203,7 @@ struct hostapd_config {
+@@ -1200,6 +1200,7 @@ struct hostapd_config {
  	u8 ibf_enable;
  	u8 dfs_detect_mode;
  	u8 amsdu;
@@ -357,7 +357,7 @@
  
  int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
 diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 464efba..1e7ae7a 100644
+index 5dd701e..741fdab 100644
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
 @@ -148,7 +148,7 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -370,7 +370,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 28482c6..3e184b5 100644
+index 25ae08f..0dc86bf 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -2518,7 +2518,7 @@ dfs_offload:
@@ -567,10 +567,10 @@
 +
  #endif /* MTK_VENDOR_H */
 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index a29b6ff..ebc1d27 100644
+index 84387a6..9ec0e96 100644
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -5122,7 +5122,7 @@ struct wpa_driver_ops {
+@@ -5100,7 +5100,7 @@ struct wpa_driver_ops {
  	 * @priv: Private driver interface data
  	 *
  	 */
@@ -580,10 +580,10 @@
  
  	/**
 diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index fce3ec9..25e5910 100644
+index b682620..22c56f9 100644
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -13678,12 +13678,13 @@ fail:
+@@ -13562,12 +13562,13 @@ fail:
  
  
  #ifdef CONFIG_IEEE80211AX
@@ -598,7 +598,7 @@
  	int ret = -ENOBUFS;
  
  	if (!drv->mtk_mu_vendor_cmd_avail) {
-@@ -13700,17 +13701,16 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
+@@ -13584,17 +13585,16 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
  
  	switch (mode) {
  	case MU_CTRL_ONOFF:
@@ -623,7 +623,7 @@
  		ret = -EINVAL;
  		goto fail;
  	}
-@@ -13718,9 +13718,8 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
+@@ -13602,9 +13602,8 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
  	nla_nest_end(msg, data);
  
  	ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-Add-HE-capabilities-check.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-Add-HE-capabilities-check.patch
index cc30d42..a93ae69 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-Add-HE-capabilities-check.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-Add-HE-capabilities-check.patch
@@ -1,7 +1,7 @@
-From fac968ec3565072058dc92aa2f12e0c145a963e2 Mon Sep 17 00:00:00 2001
+From 963b6800d4416d5a88053097128a33d8bdc8f56b Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Fri, 9 Jun 2023 09:03:05 +0800
-Subject: [PATCH 26/38] hostapd: mtk: Add HE capabilities check
+Subject: [PATCH 26/40] hostapd: mtk: Add HE capabilities check
 
 Add HE capabilities check.
 Since "HE capabilities" check has been removed by driver,
@@ -11,10 +11,10 @@
  1 file changed, 26 insertions(+)
 
 diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
-index 9d22725..9a36bcb 100644
+index 828b926..991af2c 100644
 --- a/src/ap/hw_features.c
 +++ b/src/ap/hw_features.c
-@@ -709,6 +709,32 @@ static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface)
+@@ -680,6 +680,32 @@ static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface)
  #ifdef CONFIG_IEEE80211AX
  static int ieee80211ax_supported_he_capab(struct hostapd_iface *iface)
  {
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch
index 0ba1a38..1134253 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch
@@ -1,7 +1,7 @@
-From c1687a93fb5b8d72f7d68ea761a1fbaf80bf1de4 Mon Sep 17 00:00:00 2001
+From b79b625e3790f0d9152f736629fbc0dcd826bf62 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 5 Jul 2023 10:44:15 +0800
-Subject: [PATCH 27/38] hostapd: mtk: Fix background channel overlapping
+Subject: [PATCH 27/40] hostapd: mtk: Fix background channel overlapping
  operating channel issue
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -10,10 +10,10 @@
  1 file changed, 18 insertions(+)
 
 diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 3b1df6d..6f76354 100644
+index 2f5c86e..c9a9c6c 100644
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -812,6 +812,20 @@ static int dfs_are_channels_overlapped(struct hostapd_iface *iface, int freq,
+@@ -807,6 +807,20 @@ static int dfs_are_channels_overlapped(struct hostapd_iface *iface, int freq,
  }
  
  
@@ -34,7 +34,7 @@
  static unsigned int dfs_get_cac_time(struct hostapd_iface *iface,
  				     int start_chan_idx, int n_chans)
  {
-@@ -1132,6 +1146,8 @@ static void hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
+@@ -1127,6 +1141,8 @@ static void hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
  						  &oper_centr_freq_seg1_idx,
  						  &channel_type);
  	if (!channel ||
@@ -43,7 +43,7 @@
  	    hostapd_start_dfs_cac(iface, iface->conf->hw_mode,
  				  channel->freq, channel->chan,
  				  iface->conf->ieee80211n,
-@@ -1366,6 +1382,7 @@ static int hostapd_dfs_start_channel_switch_cac(struct hostapd_iface *iface)
+@@ -1361,6 +1377,7 @@ static int hostapd_dfs_start_channel_switch_cac(struct hostapd_iface *iface)
  	hostapd_set_oper_centr_freq_seg1_idx(iface->conf,
  					     oper_centr_freq_seg1_idx);
  	err = 0;
@@ -51,7 +51,7 @@
  
  	hostapd_setup_interface_complete(iface, err);
  	return err;
-@@ -1493,6 +1510,7 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
+@@ -1488,6 +1505,7 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
  			hostapd_set_oper_centr_freq_seg1_idx(
  				iface->conf, oper_centr_freq_seg1_idx);
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
index 57395ca..b85fdca 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
@@ -1,7 +1,7 @@
-From 57fd7fc979251fd178175c506e64a724433c8d6d Mon Sep 17 00:00:00 2001
+From aeabc47685135ee69cdeca5f5753c4057ca0f608 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 28/38] hostapd: mtk: Fix hostapd_dfs_start_cac log
+Subject: [PATCH 28/40] 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 6f76354..95119a3 100644
+index c9a9c6c..593a468 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,
+@@ -1650,9 +1650,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/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch
index c247137..3d6f958 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch
@@ -1,7 +1,7 @@
-From 31d7b7fe98e3d5d0e2769bd7ea22e529a7f1295d Mon Sep 17 00:00:00 2001
+From 1bc32b7308d9460116954f048eca89f02204825c Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Thu, 13 Jul 2023 13:14:26 +0800
-Subject: [PATCH 29/38] hostapd: mtk: Check the bridge after ioctl SIOCBRADDIF
+Subject: [PATCH 29/40] hostapd: mtk: Check the bridge after ioctl SIOCBRADDIF
  failed
 
 If ioctl returns EBUSY on command SIOCBRADDIF, the interface might
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
index 50e4e63..8073974 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch
@@ -1,7 +1,7 @@
-From 65f2475fbf84a7b71e5dcba2b8f7ae77eee4f36d Mon Sep 17 00:00:00 2001
+From c6557f76857bc80128d2d02e615ce32de8a0c998 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 30/38] hostapd: mtk: Update parameter_set_count in MU EDCA IE
+Subject: [PATCH 30/40] 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.
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
index 2abbb0b..52deb06 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
@@ -1,7 +1,7 @@
-From 0b9d85b0e28ab0425d0c6742ce581efcfcad0ed6 Mon Sep 17 00:00:00 2001
+From de15bbc394a478d141e416114297213d4e4b027d Mon Sep 17 00:00:00 2001
 From: mtk20656 <chank.chen@mediatek.com>
 Date: Mon, 24 Jul 2023 11:30:27 +0800
-Subject: [PATCH 31/38] hostapd: mtk: add extension IE list for non-inherit IE
+Subject: [PATCH 31/40] 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
@@ -19,10 +19,10 @@
 diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
 old mode 100644
 new mode 100755
-index 110ad8c..e05a06b
+index 1bf5bea..d36798e
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -7659,7 +7659,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
+@@ -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)
@@ -31,7 +31,7 @@
  
  		if (len + nontx_profile_len > 255)
  			break;
-@@ -7800,11 +7800,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
+@@ -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;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Fix-11vmbss-aid-using-wrong-pool.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Fix-11vmbss-aid-using-wrong-pool.patch
new file mode 100644
index 0000000..7eb42ad
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Fix-11vmbss-aid-using-wrong-pool.patch
@@ -0,0 +1,30 @@
+From b99fd7f0b86a87fc82d63ec809fd9a73f308dd08 Mon Sep 17 00:00:00 2001
+From: "Allen.Ye" <allen.ye@mediatek.com>
+Date: Wed, 2 Aug 2023 18:33:31 +0800
+Subject: [PATCH 32/40] hostapd: mtk: Fix 11vmbss aid using wrong pool
+
+Fix 11vmbss aid using wrong pool.
+All STAs use the aid pool in transmitted bss.
+
+Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
+---
+ src/ap/ieee802_11.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index d36798e..f20073c 100755
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -3307,6 +3307,9 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
+ {
+ 	int i, j = 32, aid;
+ 
++	if (hapd->iconf->mbssid)
++		hapd = hostapd_mbssid_get_tx_bss(hapd);
++
+ 	/* get a unique AID */
+ 	if (sta->aid > 0) {
+ 		wpa_printf(MSG_DEBUG, "  old AID %d", sta->aid);
+-- 
+2.18.0
+
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0033-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch
similarity index 78%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0033-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch
index 52c74f9..c9df793 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0033-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch
@@ -1,7 +1,7 @@
-From e9f856156f861845c160538d2d5907bf338fa489 Mon Sep 17 00:00:00 2001
+From ee4aa23d0c87c8fe69f8ba28fe5faf95bf0103d8 Mon Sep 17 00:00:00 2001
 From: "Allen.Ye" <allen.ye@mediatek.com>
 Date: Mon, 7 Aug 2023 15:27:27 +0800
-Subject: [PATCH 32/38] hostapd: mtk: Fix rnr ie length when no need to report
+Subject: [PATCH 33/40] hostapd: mtk: Fix rnr ie length when no need to report
  bss
 
 Fix rnr ie length when no need to report bss. If we don't have content in
@@ -13,10 +13,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-index e05a06b..7b6aabb 100755
+index f20073c..ef520c8 100755
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -7511,8 +7511,10 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
+@@ -7494,8 +7494,10 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
  		}
  
  		start = i;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0033-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch
similarity index 91%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0033-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch
index 47e2970..80b7589 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0033-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch
@@ -1,7 +1,7 @@
-From 5b750f3f78cec3b64ebb9bb3b74def424c7d57fd Mon Sep 17 00:00:00 2001
+From 26e0cd2739dc56e02cc7e1b5582220d0fcde795b Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Tue, 8 Aug 2023 19:21:41 +0800
-Subject: [PATCH 33/38] hostapd: mtk: add back ht vht cap missing field before
+Subject: [PATCH 34/40] hostapd: mtk: add back ht vht cap missing field before
  dfs channel fallback
 
 hostapd_event_ch_switch would set / clear ht_capab and vht_capab, based
@@ -22,7 +22,7 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 3e184b5..b8ae8de 100644
+index 0dc86bf..2283b19 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -4111,6 +4111,13 @@ hostapd_switch_channel_fallback(struct hostapd_iface *iface,
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch
similarity index 74%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch
index 5412153..05b2121 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch
@@ -1,7 +1,7 @@
-From d46e85faec291f813d6b5578122cd267421e84fa Mon Sep 17 00:00:00 2001
+From ef5f744c72f2e6ec6b7d4ec1ce4f233470ff7689 Mon Sep 17 00:00:00 2001
 From: Michael-CY Lee <michael-cy.lee@mediatek.com>
 Date: Wed, 23 Aug 2023 17:44:50 +0800
-Subject: [PATCH 34/38] hostapd: mtk: update op_class when AP channel switching
+Subject: [PATCH 35/40] hostapd: mtk: update op_class when AP channel switching
 
 Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
 ---
@@ -9,10 +9,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
-index e7f1f19..f749b33 100644
+index c3fc419..1911f85 100644
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -1041,7 +1041,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
+@@ -873,7 +873,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
  {
  #ifdef NEED_AP_MLME
  	int channel, chwidth, is_dfs0, is_dfs;
@@ -21,7 +21,7 @@
  	size_t i;
  
  	hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
-@@ -1169,6 +1169,9 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
+@@ -995,6 +995,9 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
  		hapd->iconf->ht_capab &= ~HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
  
  	hapd->iconf->secondary_channel = offset;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0036-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
similarity index 90%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0036-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
index 4dad332..3dd5457 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0036-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
@@ -1,7 +1,7 @@
-From 4b58cd9fc60093a0f4e9fe56cf47f05e9b1287fb Mon Sep 17 00:00:00 2001
+From eaff9afb87f172b09eac63237b099f7c4e5def3c Mon Sep 17 00:00:00 2001
 From: mtk23510 <rudra.shahi@mediatek.com>
 Date: Fri, 26 May 2023 14:52:35 +0800
-Subject: [PATCH 35/38] hostapd: mtk: Add support for gtk rekeying in hostapd
+Subject: [PATCH 36/40] hostapd: mtk: Add support for gtk rekeying in hostapd
  cli
 
 Signed-off-by: mtk23510 <rudra.shahi@mediatek.com>
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0037-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0037-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch
new file mode 100644
index 0000000..f7f22d8
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0037-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch
@@ -0,0 +1,33 @@
+From a1fd2056b0e3820920778fd9252cec645cbb6389 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 37/40] 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 325ab8d..2652c8a 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -5715,6 +5715,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.18.0
+
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0036-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0038-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch
similarity index 93%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0036-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0038-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch
index 2b0f254..27beaf7 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0036-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0038-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch
@@ -1,7 +1,7 @@
-From bf06bdd4ba98cebdb21408fc7c85b9adc813a956 Mon Sep 17 00:00:00 2001
+From b52a1f04b4a897e88b5a14f61befd71f65cdc062 Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Tue, 11 Jul 2023 14:17:43 +0800
-Subject: [PATCH 36/38] hostapd: mtk: Set WMM and TX queue parameters for
+Subject: [PATCH 38/40] hostapd: mtk: Set WMM and TX queue parameters for
  wpa_supplicant
 
 Since most of the time, wpa_supplicant will be used to setup an STA
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0037-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0039-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch
similarity index 89%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0037-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0039-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch
index a6a86d8..9c8c63b 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0037-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0039-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch
@@ -1,7 +1,7 @@
-From 33cbd77949640d337e4e39d462bbb6b575792de3 Mon Sep 17 00:00:00 2001
+From 55837ad406c9af8a398d6073809151f7a3779b74 Mon Sep 17 00:00:00 2001
 From: Michael Lee <michael-cy.lee@mediatek.com>
 Date: Fri, 7 Jul 2023 17:16:11 +0800
-Subject: [PATCH 37/38] hostapd: mtk: Set STA TX queue parameters configuration
+Subject: [PATCH 39/40] hostapd: mtk: Set STA TX queue parameters configuration
  after association
 
 This patch adds the way for wpa_supplicant to set driver's TX queue
@@ -17,7 +17,7 @@
  2 files changed, 28 insertions(+)
 
 diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
-index dcf5764..36ff854 100644
+index 48953c1..0699689 100644
 --- a/wpa_supplicant/driver_i.h
 +++ b/wpa_supplicant/driver_i.h
 @@ -321,6 +321,18 @@ static inline int wpa_drv_set_country(struct wpa_supplicant *wpa_s,
@@ -40,10 +40,10 @@
  				    const u8 *data, size_t data_len, int noack,
  				    unsigned int freq, unsigned int wait)
 diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
-index 3b8596d..f5ac62e 100644
+index 03442f5..5eb5248 100644
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -3559,6 +3559,20 @@ out:
+@@ -3557,6 +3557,20 @@ out:
  	return wpa_sm_set_mlo_params(wpa_s->wpa, &wpa_mlo);
  }
  
@@ -64,7 +64,7 @@
  
  static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
  				       union wpa_event_data *data)
-@@ -3886,6 +3900,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
+@@ -3884,6 +3898,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
  
  	if (wpa_s->current_ssid && wpa_s->current_ssid->enable_4addr_mode)
  		wpa_supplicant_set_4addr_mode(wpa_s);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0038-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0040-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch
similarity index 79%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0038-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0040-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch
index e076eae..d31b6c2 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0038-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0040-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch
@@ -1,7 +1,7 @@
-From 7a2d1d5e7d43fbd7ecf008447e08118c10905d63 Mon Sep 17 00:00:00 2001
+From 100dae9224afa0c9dbd1117ab97b60e427657afc Mon Sep 17 00:00:00 2001
 From: Michael-CY Lee <michael-cy.lee@mediatek.com>
 Date: Fri, 1 Sep 2023 15:31:24 +0800
-Subject: [PATCH 38/38] hostapd: mtk: avoid color switch when beacon is not set
+Subject: [PATCH 40/40] hostapd: mtk: avoid color switch when beacon is not set
 
 Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
 ---
@@ -9,7 +9,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index b8ae8de..a4fffd9 100644
+index 2283b19..6d86993 100644
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -4249,7 +4249,7 @@ void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch
deleted file mode 100644
index 105e188..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d11dea1d3dee3577be404bfb6f7dc2460858242d Mon Sep 17 00:00:00 2001
-From: mtk20656 <chank.chen@mediatek.com>
-Date: Wed, 13 Sep 2023 19:29:51 +0800
-Subject: [PATCH] [hostapd][mt76]6g bss connect do not consider ht operation
-
-Signed-off-by: mtk20656 <chank.chen@mediatek.com>
----
- src/ap/ieee802_11.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-old mode 100755
-new mode 100644
-index ef520c8..904b1b5
---- a/src/ap/ieee802_11.c
-+++ b/src/ap/ieee802_11.c
-@@ -5434,7 +5434,8 @@ static void handle_assoc(struct hostapd_data *hapd,
- 			ieee802_11_set_beacons(hapd->iface);
- 	}
- 
--	update_ht_state(hapd, sta);
-+	if (!is_6ghz_op_class(hapd->iconf->op_class))
-+		update_ht_state(hapd, sta);
- 
- 	hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
- 		       HOSTAPD_LEVEL_DEBUG,
--- 
-2.18.0
-
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-update-eht-operation-element.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-update-eht-operation-element.patch
index 5092a61..e2c6d87 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-update-eht-operation-element.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-update-eht-operation-element.patch
@@ -1,7 +1,7 @@
-From eaf03e5841437d268c929bd8215d8499fbdbfbb0 Mon Sep 17 00:00:00 2001
+From 3b4b9812c97b0b75579829c96a19e8a8cc0bfa7b Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Wed, 10 May 2023 13:11:34 +0800
-Subject: [PATCH 1001/1005] hostapd: mtk: update eht operation element
+Subject: [PATCH 1001/1004] hostapd: mtk: update eht operation element
 
 ---
  src/ap/ieee802_11_eht.c | 6 +++---
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1002-hostapd-mtk-ucode-add-support-for-ucode-to-parse-BW3.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1002-hostapd-mtk-ucode-add-support-for-ucode-to-parse-BW3.patch
index 9c23287..1b51a28 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1002-hostapd-mtk-ucode-add-support-for-ucode-to-parse-BW3.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1002-hostapd-mtk-ucode-add-support-for-ucode-to-parse-BW3.patch
@@ -1,7 +1,7 @@
-From 5d04c65f6a625dea4b8ff7cfa35311dbfa2e4ae7 Mon Sep 17 00:00:00 2001
+From 5ed678c7562b1acf04f1b6c63ab25a5f3043325f Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Wed, 30 Aug 2023 04:23:37 +0800
-Subject: [PATCH 1002/1005] hostapd: mtk: ucode: add support for ucode to parse
+Subject: [PATCH 1002/1004] hostapd: mtk: ucode: add support for ucode to parse
  BW320MHz info
 
 ---
@@ -9,7 +9,7 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/src/utils/ucode.c b/src/utils/ucode.c
-index 2beeb9a..122c619 100644
+index 896ef46..4448738 100644
 --- a/src/utils/ucode.c
 +++ b/src/utils/ucode.c
 @@ -85,6 +85,10 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1003-hostapd-mtk-synchronize-bandwidth-in-AP-STA-support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1003-hostapd-mtk-synchronize-bandwidth-in-AP-STA-support.patch
index c6c6f80..74c685b 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1003-hostapd-mtk-synchronize-bandwidth-in-AP-STA-support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1003-hostapd-mtk-synchronize-bandwidth-in-AP-STA-support.patch
@@ -1,277 +1,61 @@
-From 6219efda5b74baf62086236cc7f368f4307b9869 Mon Sep 17 00:00:00 2001
+From 25b1c0f5e4f674ea2b72949bce83c05204d19653 Mon Sep 17 00:00:00 2001
 From: Michael-CY Lee <michael-cy.lee@mediatek.com>
-Date: Mon, 11 Sep 2023 10:16:35 +0800
+Date: Thu, 24 Aug 2023 16:44:30 +0800
 Subject: [PATCH] hostapd: mtk: synchronize bandwidth in AP/STA support
 
 Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
 ---
- src/ap/ucode.c         | 39 ++++++++++++++++++--
- src/utils/ucode.c      | 12 +++++--
- wpa_supplicant/ucode.c | 82 ++++++++++++++++++++++++++++++++++--------
- 3 files changed, 115 insertions(+), 18 deletions(-)
+ src/utils/ucode.c      |  1 +
+ wpa_supplicant/ucode.c | 10 ++++++++++
+ 2 files changed, 11 insertions(+)
 
-diff --git a/src/ap/ucode.c b/src/ap/ucode.c
-index 7bc797a..a3716ea 100644
---- a/src/ap/ucode.c
-+++ b/src/ap/ucode.c
-@@ -382,6 +382,9 @@ uc_hostapd_iface_stop(uc_vm_t *vm, size_t nargs)
- 	struct hostapd_iface *iface = uc_fn_thisval("hostapd.iface");
- 	int i;
- 
-+	wpa_printf(MSG_INFO, "ucode: mtk: stop iface for %s in state %s\n",
-+			iface->phy, hostapd_state_text(iface->state));
-+
- 	switch (iface->state) {
- 	case HAPD_IFACE_ENABLED:
- 	case HAPD_IFACE_DISABLED:
-@@ -420,6 +423,7 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs)
- 	uint64_t intval;
- 	int i;
- 
-+	wpa_printf(MSG_INFO, "ucode: mtk: start iface for %s\n", iface->phy);
- 	if (!iface)
- 		return NULL;
- 
-@@ -442,7 +446,13 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs)
- 	UPDATE_VAL(op_class, "op_class");
- 	UPDATE_VAL(hw_mode, "hw_mode");
- 	UPDATE_VAL(channel, "channel");
--	UPDATE_VAL(secondary_channel, "sec_channel");
-+
-+	intval = ucv_int64_get(ucv_object_get(info, "sec_channel", NULL));
-+	if (!errno) {
-+		conf->secondary_channel = intval;
-+		changed = true;
-+	}
-+
- 	if (!changed &&
- 	    (iface->bss[0]->beacon_set_done ||
- 	     iface->state == HAPD_IFACE_DFS))
-@@ -490,6 +500,18 @@ out:
- 		return ucv_boolean_new(true);
- 	}
- 
-+	wpa_printf(MSG_INFO, "ucode: mtk: updated channel information:\n");
-+	wpa_printf(MSG_INFO, "    * channel: %d\n", conf->channel);
-+	wpa_printf(MSG_INFO, "    * op_class: %d\n", conf->op_class);
-+	wpa_printf(MSG_INFO, "    * secondary channel: %d\n",
-+			conf->secondary_channel);
-+	wpa_printf(MSG_INFO, "    * seg0: %d\n",
-+			hostapd_get_oper_centr_freq_seg0_idx(conf));
-+	wpa_printf(MSG_INFO, "    * seg1: %d\n",
-+			hostapd_get_oper_centr_freq_seg0_idx(conf));
-+	wpa_printf(MSG_INFO, "    * oper_chwidth: %d\n",
-+			hostapd_get_oper_chwidth(conf));
-+
- 	for (i = 0; i < iface->num_bss; i++) {
- 		struct hostapd_data *hapd = iface->bss[i];
- 		int ret;
-@@ -524,6 +546,7 @@ uc_hostapd_iface_switch_channel(uc_vm_t *vm, size_t nargs)
- 	uint64_t intval;
- 	int i, ret = 0;
- 
-+	wpa_printf(MSG_INFO, "ucode: mtk: channel switch for %s\n", iface->phy);
- 	if (!iface || ucv_type(info) != UC_OBJECT)
- 		return NULL;
- 
-@@ -543,7 +566,8 @@ uc_hostapd_iface_switch_channel(uc_vm_t *vm, size_t nargs)
- 	if (errno)
- 		intval = hostapd_get_oper_chwidth(conf);
- 	if (intval)
--		csa.freq_params.bandwidth = 40 << intval;
-+		csa.freq_params.bandwidth = 40 <<
-+			(intval == CONF_OPER_CHWIDTH_320MHZ ? 3 : intval);
- 	else
- 		csa.freq_params.bandwidth = csa.freq_params.sec_channel_offset ? 40 : 20;
- 
-@@ -554,6 +578,17 @@ uc_hostapd_iface_switch_channel(uc_vm_t *vm, size_t nargs)
- 	if ((intval = ucv_int64_get(ucv_object_get(info, "center_freq2", NULL))) && !errno)
- 		csa.freq_params.center_freq2 = intval;
- 
-+	wpa_printf(MSG_INFO, "ucode: mtk: switch channel information:\n");
-+	wpa_printf(MSG_INFO, "    * freq is %d\n", csa.freq_params.freq);
-+	wpa_printf(MSG_INFO, "    * bandwidth is %d\n",
-+			csa.freq_params.bandwidth);
-+	wpa_printf(MSG_INFO, "    * sec_chan_offset is %d\n",
-+			csa.freq_params.sec_channel_offset);
-+	wpa_printf(MSG_INFO, "    * center_freq1 is %d\n",
-+			csa.freq_params.center_freq1);
-+	wpa_printf(MSG_INFO, "    * center_freq2 is %d\n",
-+			csa.freq_params.center_freq2);
-+
- 	for (i = 0; i < iface->num_bss; i++)
- 		ret = hostapd_switch_channel(iface->bss[i], &csa);
- 
 diff --git a/src/utils/ucode.c b/src/utils/ucode.c
-index 122c619..0990e7b 100644
+index 44169f0..41c19fb 100644
 --- a/src/utils/ucode.c
 +++ b/src/utils/ucode.c
-@@ -51,6 +51,7 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
- 	uc_value_t *freq = uc_fn_arg(0);
- 	uc_value_t *sec = uc_fn_arg(1);
- 	int width = ucv_uint64_get(uc_fn_arg(2));
-+	int bw320_offset = 1;
- 	int freq_val, center_idx, center_ofs;
- 	enum oper_chan_width chanwidth;
- 	enum hostapd_hw_mode hw_mode;
-@@ -88,6 +89,9 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
- 	case 9:
- 		width = 3;
- 		chanwidth = CONF_OPER_CHWIDTH_320MHZ;
-+
-+		/* bw320_offset is 1 for 320 MHz-1, and 2 for 320 MHz-2 */
-+		bw320_offset = ucv_uint64_get(uc_fn_arg(3));
- 		break;
- 	default:
- 		return NULL;
-@@ -119,12 +123,16 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
+@@ -115,6 +115,7 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
  	ucv_object_add(ret, "hw_mode_str", ucv_get(ucv_string_new(modestr)));
  	ucv_object_add(ret, "sec_channel", ucv_int64_new(sec_channel));
  	ucv_object_add(ret, "frequency", ucv_int64_new(freq_val));
 +	ucv_object_add(ret, "oper_chwidth", ucv_int64_new(chanwidth));
  
--	if (!sec_channel)
-+	if (chanwidth == CONF_OPER_CHWIDTH_USE_HT && !sec_channel) {
-+		ucv_object_add(ret, "center_seg0_idx", ucv_int64_new(channel));
-+		ucv_object_add(ret, "center_freq1", ucv_int64_new(freq_val));
+ 	if (!sec_channel)
  		return ret;
-+	}
- 
- 	if (freq_val >= 5900)
--		center_ofs = 0;
-+		center_ofs = 32 * (1 - bw320_offset);
- 	else if (freq_val >= 5745)
- 		center_ofs = 20;
- 	else
 diff --git a/wpa_supplicant/ucode.c b/wpa_supplicant/ucode.c
-index 55d2258..d8a19b8 100644
+index d0a78d1..dbf57fa 100644
 --- a/wpa_supplicant/ucode.c
 +++ b/wpa_supplicant/ucode.c
-@@ -7,6 +7,8 @@
+@@ -6,6 +6,7 @@
  #include "wps_supplicant.h"
  #include "bss.h"
  #include "ucode.h"
 +#include "driver_i.h"
-+#include "common/ieee802_11_common.h"
  
  static struct wpa_global *wpa_global;
  static uc_resource_type_t *global_type, *iface_type;
-@@ -96,6 +98,8 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d
- {
- 	const char *state;
- 	uc_value_t *val;
-+	enum oper_chan_width ch_width;
-+	int center_freq1, bw320_offset = 1;
- 
- 	if (event != EVENT_CH_SWITCH_STARTED)
- 		return;
-@@ -114,11 +118,42 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d
- 	uc_value_push(ucv_get(val));
- 
- 	if (event == EVENT_CH_SWITCH_STARTED) {
-+		center_freq1 = data->ch_switch.cf1;
-+
-+		switch (data->ch_switch.ch_width) {
-+		case CHAN_WIDTH_80:
-+			ch_width = CONF_OPER_CHWIDTH_80MHZ;
-+			break;
-+		case CHAN_WIDTH_80P80:
-+			ch_width = CONF_OPER_CHWIDTH_80P80MHZ;
-+			break;
-+		case CHAN_WIDTH_160:
-+			ch_width = CONF_OPER_CHWIDTH_160MHZ;
-+			break;
-+		case CHAN_WIDTH_320:
-+			ch_width = CONF_OPER_CHWIDTH_320MHZ;
-+			break;
-+		case CHAN_WIDTH_20_NOHT:
-+		case CHAN_WIDTH_20:
-+		case CHAN_WIDTH_40:
-+		default:
-+			ch_width = CONF_OPER_CHWIDTH_USE_HT;
-+			break;
-+		}
-+
-+		/* Check bandwidth 320 MHz-2 */
-+		if (ch_width == CONF_OPER_CHWIDTH_320MHZ &&
-+		    (center_freq1 == 6265) || center_freq1 == 6585 ||
-+		     center_freq1 == 6905)
-+			bw320_offset = 2;
-+
- 		ucv_object_add(val, "csa_count", ucv_int64_new(data->ch_switch.count));
- 		ucv_object_add(val, "frequency", ucv_int64_new(data->ch_switch.freq));
- 		ucv_object_add(val, "sec_chan_offset", ucv_int64_new(data->ch_switch.ch_offset));
--		ucv_object_add(val, "center_freq1", ucv_int64_new(data->ch_switch.cf1));
-+		ucv_object_add(val, "center_freq1", ucv_int64_new(center_freq1));
- 		ucv_object_add(val, "center_freq2", ucv_int64_new(data->ch_switch.cf2));
-+		ucv_object_add(val, "ch_width", ucv_int64_new(ch_width));
-+		ucv_object_add(val, "bw320_offset", ucv_int64_new(bw320_offset));
- 	}
- 
- 	ucv_put(wpa_ucode_call(4));
-@@ -195,6 +230,11 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs)
+@@ -194,6 +195,9 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs)
  	struct wpa_supplicant *wpa_s = uc_fn_thisval("wpas.iface");
  	struct wpa_bss *bss;
  	uc_value_t *ret, *val;
 +	struct wpa_channel_info ci;
 +	u8 op_class, channel;
 +	enum oper_chan_width ch_width;
-+	int center_freq1, bw320_offset = 1, is_24ghz;
-+	enum hostapd_hw_mode hw_mode;
  
  	if (!wpa_s)
  		return NULL;
-@@ -207,23 +247,37 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs)
- 	bss = wpa_s->current_bss;
- 	if (bss) {
- 		int sec_chan = 0;
--		const u8 *ie;
--
--		ie = wpa_bss_get_ie(bss, WLAN_EID_HT_OPERATION);
--		if (ie && ie[1] >= 2) {
--			const struct ieee80211_ht_operation *ht_oper;
--			int sec;
--
--			ht_oper = (const void *) (ie + 2);
--			sec = ht_oper->ht_param & HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK;
--			if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE)
--				sec_chan = 1;
--			else if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW)
--				sec_chan = -1;
-+
-+		hw_mode = ieee80211_freq_to_chan(bss->freq, &channel);
-+		is_24ghz = hw_mode == HOSTAPD_MODE_IEEE80211G ||
-+			hw_mode == HOSTAPD_MODE_IEEE80211B;
-+
-+		wpa_drv_channel_info(wpa_s, &ci);
-+		center_freq1 = ci.center_frq1;
-+
-+		if (bss->freq != center_freq1) {
-+			if (is_24ghz)
-+				sec_chan = (bss->freq < center_freq1) ? 1 : -1;
-+			else
-+				sec_chan = (bss->freq / 20) & 1 ? 1 : -1;
-+		}
-+
-+		if (ieee80211_chaninfo_to_channel(ci.frequency, ci.chanwidth,
-+						  sec_chan, &op_class, &channel))
-+			return NULL;
-+
-+		ch_width = op_class_to_ch_width(op_class);
-+		if (ch_width == CONF_OPER_CHWIDTH_320MHZ &&
-+		    (center_freq1 == 6265) || center_freq1 == 6585 ||
-+		     center_freq1 == 6905) {
-+			/* Bandwidth 320 MHz-2 */
-+			bw320_offset = 2;
- 		}
+@@ -222,6 +226,12 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs)
  
  		ucv_object_add(ret, "sec_chan_offset", ucv_int64_new(sec_chan));
  		ucv_object_add(ret, "frequency", ucv_int64_new(bss->freq));
++
++		wpa_drv_channel_info(wpa_s, &ci);
++		ieee80211_chaninfo_to_channel(ci.frequency, ci.chanwidth,
++					      sec_chan, &op_class, &channel);
++		ch_width = op_class_to_ch_width(op_class);
 +		ucv_object_add(ret, "ch_width", ucv_int64_new(ch_width));
-+		ucv_object_add(ret, "bw320_offset", ucv_int64_new(bw320_offset));
  	}
  
- #ifdef CONFIG_MESH
+ 	return ret;
 -- 
 2.25.1
 
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1004-hostapd-mtk-Add-support-for-updating-background-chan.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1004-hostapd-mtk-Add-support-for-updating-background-chan.patch
deleted file mode 100644
index 23aa563..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1004-hostapd-mtk-Add-support-for-updating-background-chan.patch
+++ /dev/null
@@ -1,339 +0,0 @@
-From 00555b91d4d25c64eb556fe1b8815e522970b130 Mon Sep 17 00:00:00 2001
-From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Date: Wed, 5 Jul 2023 10:25:01 +0800
-Subject: [PATCH 1004/1005] hostapd: mtk: Add support for updating background
- channel by driver
-
-Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
----
- src/ap/dfs.c                       | 107 ++++++++++++++++++++++++++++-
- src/ap/dfs.h                       |   3 +
- src/ap/drv_callbacks.c             |  22 ++++++
- src/ap/hostapd.h                   |   5 ++
- src/drivers/driver.h               |  12 ++++
- src/drivers/driver_nl80211_event.c |   6 ++
- src/drivers/nl80211_copy.h         |   6 ++
- 7 files changed, 160 insertions(+), 1 deletion(-)
-
-diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 95119a3..008596b 100644
---- a/src/ap/dfs.c
-+++ b/src/ap/dfs.c
-@@ -814,11 +814,14 @@ static int dfs_are_channels_overlapped(struct hostapd_iface *iface, int freq,
- 
- static void dfs_check_background_overlapped(struct hostapd_iface *iface)
- {
--	int width = hostapd_get_oper_chwidth(iface->conf);
-+	int width = iface->radar_background.new_chwidth;
- 
- 	if (!dfs_use_radar_background(iface))
- 		return;
- 
-+	if (!width)
-+		width = hostapd_get_oper_chwidth(iface->conf);
-+
- 	if (dfs_are_channels_overlapped(iface, iface->radar_background.freq,
- 					width, iface->radar_background.centr_freq_seg0_idx,
- 					iface->radar_background.centr_freq_seg1_idx))
-@@ -983,6 +986,15 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
- 		iface->radar_background.temp_ch = 1;
- 		return 1;
- 	} else if (dfs_use_radar_background(iface)) {
-+		/*
-+		 * AP is going to perform CAC, so reset temp_ch to 0,
-+		 * when dedicated rx has already started CAC.
-+		 */
-+		if (iface->radar_background.cac_started) {
-+			iface->radar_background.temp_ch = 0;
-+			return 0;
-+		}
-+
- 		if (iface->dfs_domain == HOSTAPD_DFS_REGION_ETSI)
- 			channel_type = DFS_ANY_CHANNEL;
- 
-@@ -1116,6 +1128,8 @@ static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
- 	 * ch_switch_notify event is received */
- 	wpa_printf(MSG_DEBUG, "DFS waiting channel switch event");
- 
-+	hostapd_set_oper_chwidth(iface->conf, new_vht_oper_chwidth);
-+
- 	return 0;
- }
- 
-@@ -1167,6 +1181,9 @@ static void hostpad_dfs_update_background_chain(struct hostapd_iface *iface)
- 	iface->radar_background.secondary_channel = sec;
- 	iface->radar_background.centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
- 	iface->radar_background.centr_freq_seg1_idx = oper_centr_freq_seg1_idx;
-+	/* if main channel do not require dfs, then set temp_ch = 1 */
-+	if (!hostapd_is_dfs_required(iface))
-+		iface->radar_background.temp_ch = 1;
- 
- 	wpa_printf(MSG_DEBUG,
- 		   "%s: setting background chain to chan %d (%d MHz)",
-@@ -1189,6 +1206,10 @@ hostapd_dfs_start_channel_switch_background(struct hostapd_iface *iface)
- 	u8 current_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
- 	int ret;
- 
-+	if (iface->radar_background.new_chwidth) {
-+		hostapd_set_oper_chwidth(iface->conf, iface->radar_background.new_chwidth);
-+		iface->radar_background.new_chwidth = 0;
-+	}
- 	ret = hostapd_dfs_request_channel_switch(iface, iface->radar_background.channel,
- 						 iface->radar_background.freq,
- 						 iface->radar_background.secondary_channel,
-@@ -1211,6 +1232,52 @@ hostapd_dfs_start_channel_switch_background(struct hostapd_iface *iface)
- }
- 
- 
-+static void
-+hostapd_dfs_background_expand(struct hostapd_iface *iface, int chan_width)
-+{
-+	struct hostapd_hw_modes *mode = iface->current_mode;
-+	struct hostapd_channel_data *chan;
-+	int i, channel, width = channel_width_to_int(chan_width);
-+
-+	if (iface->conf->channel - iface->radar_background.channel == width / 5)
-+		channel = iface->radar_background.channel;
-+	else if (iface->radar_background.channel - iface->conf->channel == width / 5)
-+		channel = iface->conf->channel;
-+	else
-+		return;
-+
-+	for (i = 0; i < mode->num_channels; i++) {
-+		chan = &mode->channels[i];
-+		if (chan->chan == channel)
-+			break;
-+	}
-+
-+	if (i == mode->num_channels || !dfs_is_chan_allowed(chan, width / 10))
-+		return;
-+
-+	switch (chan_width) {
-+	case CHAN_WIDTH_20_NOHT:
-+	case CHAN_WIDTH_20:
-+		iface->radar_background.new_chwidth = CONF_OPER_CHWIDTH_USE_HT;
-+		break;
-+	case CHAN_WIDTH_40:
-+		iface->radar_background.new_chwidth = CONF_OPER_CHWIDTH_80MHZ;
-+		break;
-+	case CHAN_WIDTH_80:
-+		iface->radar_background.new_chwidth = CONF_OPER_CHWIDTH_160MHZ;
-+		break;
-+	default:
-+		return;
-+	}
-+
-+	iface->radar_background.freq = channel * 5 + 5000;
-+	iface->radar_background.channel = channel;
-+	iface->radar_background.centr_freq_seg0_idx = channel + width / 5 - 2;
-+	iface->radar_background.secondary_channel = 1;
-+	iface->radar_background.expand_ch = 0;
-+}
-+
-+
- int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
- 			     int ht_enabled, int chan_offset, int chan_width,
- 			     int cf1, int cf2)
-@@ -1244,6 +1311,10 @@ int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
- 					return 0;
- 
- 				iface->radar_background.temp_ch = 0;
-+
-+				if (iface->radar_background.expand_ch)
-+					hostapd_dfs_background_expand(iface, chan_width);
-+
- 				return hostapd_dfs_start_channel_switch_background(iface);
- 			}
- 
-@@ -1274,6 +1345,8 @@ int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
- 		}
- 	} else if (hostapd_dfs_is_background_event(iface, freq)) {
- 		iface->radar_background.cac_started = 0;
-+		iface->radar_background.temp_ch = 0;
-+		iface->radar_background.expand_ch = 0;
- 		hostpad_dfs_update_background_chain(iface);
- 	}
- 
-@@ -1406,6 +1479,9 @@ hostapd_dfs_background_start_channel_switch(struct hostapd_iface *iface,
- 	    iface->conf->dfs_detect_mode == DFS_DETECT_MODE_ALL_ENABLE)
- 		return 0;
- 
-+	iface->radar_background.temp_ch = 0;
-+	iface->radar_background.expand_ch = 0;
-+
- 	/* Check if CSA in progress */
- 	if (hostapd_csa_in_progress(iface))
- 		return 0;
-@@ -1640,6 +1716,35 @@ int hostapd_is_dfs_required(struct hostapd_iface *iface)
- }
- 
- 
-+int hostapd_dfs_background_chan_update(struct hostapd_iface *iface, int freq,
-+				       int ht_enabled, int chan_offset, int chan_width,
-+				       int cf1, int cf2, bool expand)
-+{
-+	switch (chan_width) {
-+	case CHAN_WIDTH_80:
-+		iface->radar_background.new_chwidth = CONF_OPER_CHWIDTH_80MHZ;
-+		break;
-+	case CHAN_WIDTH_160:
-+		iface->radar_background.new_chwidth = CONF_OPER_CHWIDTH_160MHZ;
-+		break;
-+	default:
-+		iface->radar_background.new_chwidth = CONF_OPER_CHWIDTH_USE_HT;
-+		break;
-+	};
-+
-+	iface->radar_background.freq = freq;
-+	iface->radar_background.channel = (freq - 5000) / 5;
-+	iface->radar_background.centr_freq_seg0_idx = (cf1 - 5000) / 5;
-+	iface->radar_background.centr_freq_seg1_idx = cf2 ? (cf2 - 5000) / 5 : 0;
-+	if (expand) {
-+		iface->radar_background.temp_ch = 1;
-+		iface->radar_background.expand_ch = 1;
-+	}
-+
-+	return 0;
-+}
-+
-+
- int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
- 			  int ht_enabled, int chan_offset, int chan_width,
- 			  int cf1, int cf2)
-diff --git a/src/ap/dfs.h b/src/ap/dfs.h
-index 25ba29c..a1a2be5 100644
---- a/src/ap/dfs.h
-+++ b/src/ap/dfs.h
-@@ -30,6 +30,9 @@ int hostapd_dfs_radar_detected(struct hostapd_iface *iface, int freq,
- int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
- 			     int ht_enabled,
- 			     int chan_offset, int chan_width, int cf1, int cf2);
-+int hostapd_dfs_background_chan_update(struct hostapd_iface *iface, int freq,
-+				       int ht_enabled, int chan_offset, int chan_width,
-+				       int cf1, int cf2, bool expand);
- int hostapd_dfs_sta_update_state(struct hostapd_iface *iface, int freq,
- 				 int ht_enabled, int chan_offset, int chan_width,
- 				 int cf1, int cf2, u32 state);
-diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
-index f749b33..12419c6 100644
---- a/src/ap/drv_callbacks.c
-+++ b/src/ap/drv_callbacks.c
-@@ -2089,6 +2089,18 @@ static void hostapd_event_dfs_cac_started(struct hostapd_data *hapd,
- 			      radar->cf1, radar->cf2);
- }
- 
-+
-+static void hostapd_event_dfs_background_chan_update(struct hostapd_data *hapd,
-+						     struct dfs_event *radar, bool expand)
-+{
-+	wpa_printf(MSG_DEBUG, "DFS background channel %s to %d MHz",
-+		   expand ? "expand" : "update", radar->freq);
-+	hostapd_dfs_background_chan_update(hapd->iface, radar->freq, radar->ht_enabled,
-+					   radar->chan_offset, radar->chan_width,
-+					   radar->cf1, radar->cf2, expand);
-+}
-+
-+
- static void hostapd_event_dfs_sta_cac_skipped(struct hostapd_data *hapd,
- 					      struct dfs_event *radar)
- {
-@@ -2428,6 +2440,16 @@ void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
- 			break;
- 		hostapd_event_dfs_nop_finished(hapd, &data->dfs_event);
- 		break;
-+	case EVENT_DFS_BACKGROUND_CHAN_UPDATE:
-+		if (!data)
-+			break;
-+		hostapd_event_dfs_background_chan_update(hapd, &data->dfs_event, false);
-+		break;
-+	case EVENT_DFS_BACKGROUND_CHAN_EXPAND:
-+		if (!data)
-+			break;
-+		hostapd_event_dfs_background_chan_update(hapd, &data->dfs_event, true);
-+		break;
- 	case EVENT_DFS_STA_CAC_SKIPPED:
- 		if (!data)
- 			break;
-diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
-index 1849f38..ea8d725 100644
---- a/src/ap/hostapd.h
-+++ b/src/ap/hostapd.h
-@@ -602,6 +602,11 @@ struct hostapd_iface {
- 		unsigned int temp_ch:1;
- 		/* CAC started on radar offchain */
- 		unsigned int cac_started:1;
-+		/* Main chain should expand its width according to the
-+		 * current offchain channel after CAC detection on radar offchain.
-+		 */
-+		unsigned int expand_ch:1;
-+		int new_chwidth;
- 	} radar_background;
- 
- 	u16 hw_flags;
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index ebc1d27..a9f48a1 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -5842,6 +5842,18 @@ enum wpa_event_type {
- 	 * The channel in the notification is now marked as usable.
- 	 */
- 	EVENT_DFS_STA_CAC_EXPIRED,
-+
-+	/**
-+	 * EVENT_DFS_BACKGROUND_CHAN_UPDATE - Notification that background
-+	 * channel has been updated.
-+	 */
-+	EVENT_DFS_BACKGROUND_CHAN_UPDATE,
-+
-+	/**
-+	 * EVENT_DFS_BACKGROUND_CHAN_EXPAND - Notification that background
-+	 * channel has been updated and operating channel should expand its width.
-+	 */
-+	EVENT_DFS_BACKGROUND_CHAN_EXPAND,
- };
- 
- 
-diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
-index 63d4401..c1a65eb 100644
---- a/src/drivers/driver_nl80211_event.c
-+++ b/src/drivers/driver_nl80211_event.c
-@@ -2514,6 +2514,12 @@ static void nl80211_radar_event(struct wpa_driver_nl80211_data *drv,
- 	case NL80211_RADAR_CAC_STARTED:
- 		wpa_supplicant_event(drv->ctx, EVENT_DFS_CAC_STARTED, &data);
- 		break;
-+	case NL80211_RADAR_BACKGROUND_CHAN_UPDATE:
-+		wpa_supplicant_event(drv->ctx, EVENT_DFS_BACKGROUND_CHAN_UPDATE, &data);
-+		break;
-+	case NL80211_RADAR_BACKGROUND_CHAN_EXPAND:
-+		wpa_supplicant_event(drv->ctx, EVENT_DFS_BACKGROUND_CHAN_EXPAND, &data);
-+		break;
- 	case NL80211_RADAR_STA_CAC_SKIPPED:
- 		wpa_supplicant_event(drv->ctx, EVENT_DFS_STA_CAC_SKIPPED, &data);
- 		break;
-diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index 225864b..9b0a817 100644
---- a/src/drivers/nl80211_copy.h
-+++ b/src/drivers/nl80211_copy.h
-@@ -6643,6 +6643,10 @@ enum nl80211_smps_mode {
-  *	applicable for ETSI dfs domain where pre-CAC is valid for ever.
-  * @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started,
-  *	should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled.
-+ * @NL80211_RADAR_BACKGROUND_CHAN_UPDATE: background channel is updated by the
-+ *	driver.
-+ * @NL80211_RADAR_BACKGROUND_CHAN_EXPAND: background channel is updated by the
-+ *	driver and required to expand main operating channel.
-  * @NL80211_RADAR_STA_CAC_SKIPPED: STA set the DFS state to available
-  *	when receiving CSA/assoc resp
-  * @NL80211_RADAR_STA_CAC_EXPIRED: STA set the DFS state to usable
-@@ -6655,6 +6659,8 @@ enum nl80211_radar_event {
- 	NL80211_RADAR_NOP_FINISHED,
- 	NL80211_RADAR_PRE_CAC_EXPIRED,
- 	NL80211_RADAR_CAC_STARTED,
-+	NL80211_RADAR_BACKGROUND_CHAN_UPDATE,
-+	NL80211_RADAR_BACKGROUND_CHAN_EXPAND,
- 	NL80211_RADAR_STA_CAC_SKIPPED,
- 	NL80211_RADAR_STA_CAC_EXPIRED,
- };
--- 
-2.18.0
-
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1005-hostapd-mtk-add-zwdfs-mode-ctrl-for-eagle-efem-hwits.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1005-hostapd-mtk-add-zwdfs-mode-ctrl-for-eagle-efem-hwits.patch
deleted file mode 100644
index fcfd0bf..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1005-hostapd-mtk-add-zwdfs-mode-ctrl-for-eagle-efem-hwits.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-From 5bcd4472062750b192c98d944b74e07b14ab3af5 Mon Sep 17 00:00:00 2001
-From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Date: Wed, 2 Aug 2023 19:00:34 +0800
-Subject: [PATCH 1005/1005] hostapd: mtk: add zwdfs mode ctrl for eagle efem
- hwits
-
-Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
----
- hostapd/config_file.c             |  2 ++
- hostapd/ctrl_iface.c              | 30 +++++++++++++++++++++++++++
- src/ap/ap_config.h                |  6 ++++++
- src/ap/ap_drv_ops.c               | 14 +++++++++++++
- src/ap/dfs.c                      |  6 ++++++
- src/common/mtk_vendor.h           | 12 +++++++++++
- src/drivers/driver.h              |  7 +++++++
- src/drivers/driver_nl80211.c      | 34 +++++++++++++++++++++++++++++++
- src/drivers/driver_nl80211.h      |  1 +
- src/drivers/driver_nl80211_capa.c |  3 +++
- 10 files changed, 115 insertions(+)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 9e3dbb2..a751993 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -3183,6 +3183,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- 		conf->acs_exclude_6ghz_non_psc = atoi(pos);
- 	} else if (os_strcmp(buf, "enable_background_radar") == 0) {
- 		conf->enable_background_radar = atoi(pos);
-+	} else if (os_strcmp(buf, "background_radar_mode") == 0) {
-+		conf->background_radar_mode = atoi(pos);
- 	} else if (os_strcmp(buf, "min_tx_power") == 0) {
- 		int val = atoi(pos);
- 
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c288352..517ebd6 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -4156,6 +4156,33 @@ hostapd_ctrl_iface_dump_amnt(struct hostapd_data *hapd, char *cmd,
- 		return pos - buf;
- }
- 
-+static int
-+hostapd_ctrl_iface_set_background_radar_mode(struct hostapd_data *hapd, char *cmd,
-+					     char *buf, size_t buflen)
-+{
-+	struct hostapd_iface *iface = hapd->iface;
-+	char *pos, *param;
-+
-+	param = os_strchr(cmd, ' ');
-+	if (!param)
-+		return -1;
-+	*param++ = '\0';
-+
-+	pos = os_strstr(param, "mode=");
-+	if (!pos)
-+		return -1;
-+
-+	if (os_strncmp(pos + 5, "cert", 4) == 0)
-+		iface->conf->background_radar_mode = BACKGROUND_RADAR_CERT_MODE;
-+	else if (os_strncmp(pos + 5, "normal", 6) == 0)
-+		iface->conf->background_radar_mode = BACKGROUND_RADAR_NORMAL_MODE;
-+
-+	if (hostapd_drv_background_radar_mode(hapd) < 0)
-+		return -1;
-+
-+	return os_snprintf(buf, buflen, "OK\n");
-+}
-+
- static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- 					      char *buf, char *reply,
- 					      int reply_size,
-@@ -4750,6 +4777,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- 		if (pos)
- 			*pos = ' ';
- 		reply_len = hostapd_ctrl_iface_set_mu(hapd, buf + 23, reply, reply_size);
-+	} else if (os_strncmp(buf, "SET_BACKGROUND_RADAR_MODE", 25) == 0) {
-+		reply_len = hostapd_ctrl_iface_set_background_radar_mode(hapd, buf + 25,
-+									 reply, reply_size);
- 	} else {
- 		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
- 		reply_len = 16;
-diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 7c0d12a..b6f05e7 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1025,6 +1025,7 @@ struct hostapd_config {
- 	bool hw_mode_set;
- 	int acs_exclude_6ghz_non_psc;
- 	int enable_background_radar;
-+	int background_radar_mode;
- 	enum {
- 		LONG_PREAMBLE = 0,
- 		SHORT_PREAMBLE = 1
-@@ -1218,6 +1219,11 @@ enum three_wire_mode {
- 		NUM_THREE_WIRE_MODE - 1
- };
- 
-+enum background_radar_mode {
-+	BACKGROUND_RADAR_NORMAL_MODE,
-+	BACKGROUND_RADAR_CERT_MODE,
-+};
-+
- enum dfs_mode {
- 	DFS_DETECT_MODE_DISABLE,
- 	DFS_DETECT_MODE_AP_ENABLE,
-diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 721bfa0..5b93ea6 100644
---- a/src/ap/ap_drv_ops.c
-+++ b/src/ap/ap_drv_ops.c
-@@ -1257,3 +1257,17 @@ int hostapd_drv_amnt_dump(struct hostapd_data *hapd, u8 amnt_idx, u8 *amnt_dump_
- 		return 0;
- 	return hapd->driver->amnt_dump(hapd->drv_priv, amnt_idx, amnt_dump_buf);
- }
-+
-+int hostapd_drv_background_radar_mode(struct hostapd_data *hapd)
-+{
-+	if (!hapd->driver || !hapd->driver->background_radar_mode ||
-+	    !(hapd->iface->drv_flags2 & WPA_DRIVER_RADAR_BACKGROUND) ||
-+	    !hapd->iface->conf->enable_background_radar)
-+		return 0;
-+	if (hapd->iconf->background_radar_mode > BACKGROUND_RADAR_CERT_MODE) {
-+		wpa_printf(MSG_INFO, "Invalid value for background radar mode\n");
-+		return 0;
-+	}
-+	return hapd->driver->background_radar_mode(hapd->drv_priv,
-+						   hapd->iconf->background_radar_mode);
-+}
-diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 008596b..2564168 100644
---- a/src/ap/dfs.c
-+++ b/src/ap/dfs.c
-@@ -983,6 +983,9 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
- 		if (res < 0)
- 			return res;
- 
-+		if (hostapd_drv_background_radar_mode(iface->bss[0]) < 0)
-+			return -1;
-+
- 		iface->radar_background.temp_ch = 1;
- 		return 1;
- 	} else if (dfs_use_radar_background(iface)) {
-@@ -1023,6 +1026,9 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
- 		iface->radar_background.secondary_channel = sec;
- 		iface->radar_background.centr_freq_seg0_idx = cf1;
- 		iface->radar_background.centr_freq_seg1_idx = cf2;
-+
-+		if (hostapd_drv_background_radar_mode(iface->bss[0]) < 0)
-+			return -1;
- 	}
- 
- 	return 0;
-diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index e140de6..5bc1e04 100644
---- a/src/common/mtk_vendor.h
-+++ b/src/common/mtk_vendor.h
-@@ -16,6 +16,7 @@ enum mtk_nl80211_vendor_subcmds {
- 	MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL = 0xc8,
- 	MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL = 0xc9,
- 	MTK_NL80211_VENDOR_SUBCMD_BSS_COLOR_CTRL = 0xca,
-+	MTK_NL80211_VENDOR_SUBCMD_BACKGROUND_RADAR_CTRL = 0xcb,
- };
- 
- enum mtk_vendor_attr_edcca_ctrl {
-@@ -244,6 +245,17 @@ enum mtk_vendor_attr_bss_color_ctrl {
- 		NUM_MTK_VENDOR_ATTRS_BSS_COLOR_CTRL - 1
- };
- 
-+enum mtk_vendor_attr_background_radar_ctrl {
-+	MTK_VENDOR_ATTR_BACKGROUND_RADAR_CTRL_UNSPEC,
-+
-+	MTK_VENDOR_ATTR_BACKGROUND_RADAR_CTRL_MODE,
-+
-+	/* keep last */
-+	NUM_MTK_VENDOR_ATTRS_BACKGROUND_RADAR_CTRL,
-+	MTK_VENDOR_ATTR_BACKGROUND_RADAR_CTRL_MAX =
-+		NUM_MTK_VENDOR_ATTRS_BACKGROUND_RADAR_CTRL - 1
-+};
-+
- #define CSI_MAX_COUNT 256
- #define ETH_ALEN 6
- 
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index a9f48a1..bc82d28 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -5201,6 +5201,13 @@ struct wpa_driver_ops {
- 	* @amnt_dump_buf: Buffer to print
- 	*/
- 	int (*amnt_dump)(void *priv, u8 amnt_idx, u8 *amnt_dump_buf);
-+
-+	/**
-+	 * background_radar_mode - set background radar mode
-+	 * @priv: Private driver interface data
-+	 * @background_radar_mode: background radar mode
-+	 */
-+	int (*background_radar_mode)(void *priv, u8 background_radar_mode);
- };
- 
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 25e5910..73401fd 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -14723,6 +14723,39 @@ fail:
- 	return -ENOBUFS;
- }
- 
-+static int nl80211_background_radar_mode(void *priv, const u8 background_radar_mode)
-+{
-+	struct i802_bss *bss = priv;
-+	struct wpa_driver_nl80211_data *drv = bss->drv;
-+	/* Prepare nl80211 cmd */
-+	struct nl_msg *msg;
-+	struct nlattr *data;
-+	int ret;
-+
-+	if (!drv->mtk_background_radar_vendor_cmd_avail) {
-+		wpa_printf(MSG_INFO,
-+			   "nl80211: Driver does not support setting background radar mode");
-+		return 0;
-+	}
-+
-+	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
-+	    nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
-+	    nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD,
-+			MTK_NL80211_VENDOR_SUBCMD_BACKGROUND_RADAR_CTRL) ||
-+	    !(data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA)) ||
-+	    nla_put_u8(msg, MTK_VENDOR_ATTR_BACKGROUND_RADAR_CTRL_MODE, background_radar_mode)) {
-+		nlmsg_free(msg);
-+		return -ENOBUFS;
-+	}
-+	nla_nest_end(msg, data);
-+	ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
-+	if (ret) {
-+		wpa_printf(MSG_ERROR, "Failed to set background radar mode. ret=%d (%s) ",
-+			   ret, strerror(-ret));
-+	}
-+	return ret;
-+}
-+
- const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- 	.name = "nl80211",
- 	.desc = "Linux nl80211/cfg80211",
-@@ -14895,4 +14928,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- 	.ap_trigtype = nl80211_ap_trigtype,
- 	.amnt_set = nl80211_amnt_set,
- 	.amnt_dump = nl80211_amnt_dump,
-+	.background_radar_mode = nl80211_background_radar_mode,
- };
-diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 0d85adf..74ee9b1 100644
---- a/src/drivers/driver_nl80211.h
-+++ b/src/drivers/driver_nl80211.h
-@@ -210,6 +210,7 @@ struct wpa_driver_nl80211_data {
- 	unsigned int mtk_bss_color_vendor_cmd_avail:1;
- 	unsigned int mtk_rfeatures_vendor_cmd_avail:1;
- 	unsigned int mtk_amnt_vendor_cmd_avail:1;
-+	unsigned int mtk_background_radar_vendor_cmd_avail:1;
- 
- 	u64 vendor_scan_cookie;
- 	u64 remain_on_chan_cookie;
-diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
-index 8c8b84e..90711b4 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1133,6 +1133,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- 				case MTK_NL80211_VENDOR_SUBCMD_RFEATURE_CTRL:
- 					drv->mtk_rfeatures_vendor_cmd_avail = 1;
- 					break;
-+				case MTK_NL80211_VENDOR_SUBCMD_BACKGROUND_RADAR_CTRL:
-+					drv->mtk_background_radar_vendor_cmd_avail = 1;
-+					break;
- 				}
- 			}
- 
--- 
-2.18.0
-
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 e326ae8..02810bf 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
@@ -16,10 +16,7 @@
     file://150-add-NULL-checks-encountered-during-tests-hwsim.patch \
     file://160-dpp_pkex-EC-point-mul-w-value-prime.patch \
     file://170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch \
-    file://180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch \
-    file://181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch \
-    file://182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch \
-    file://183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch \
+    file://180-BSS-coloring-fix-CCA-with-multiple-BSS.patch \
     file://200-multicall.patch \
     file://300-noscan.patch \
     file://301-mesh-noscan.patch \
@@ -91,17 +88,16 @@
     file://mtk-0029-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch \
     file://mtk-0030-hostapd-mtk-Update-parameter_set_count-in-MU-EDCA-IE.patch \
     file://mtk-0031-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch \
-    file://mtk-0032-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch \
-    file://mtk-0033-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch \
-    file://mtk-0034-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch \
-    file://mtk-0035-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch \
-    file://mtk-0036-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch \
-    file://mtk-0037-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch \
-    file://mtk-0038-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch \
-    file://mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch \
+    file://mtk-0032-hostapd-mtk-Fix-11vmbss-aid-using-wrong-pool.patch \
+    file://mtk-0033-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch \
+    file://mtk-0034-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch \
+    file://mtk-0035-hostapd-mtk-update-op_class-when-AP-channel-switchin.patch \
+    file://mtk-0036-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch \
+    file://mtk-0037-hostapd-mtk-Fix-wpa_supplicant-configuration-parsing.patch \
+    file://mtk-0038-hostapd-mtk-Set-WMM-and-TX-queue-parameters-for-wpa_.patch \
+    file://mtk-0039-hostapd-mtk-Set-STA-TX-queue-parameters-configuratio.patch \
+    file://mtk-0040-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch \
     file://mtk-1001-hostapd-mtk-update-eht-operation-element.patch \
     file://mtk-1002-hostapd-mtk-ucode-add-support-for-ucode-to-parse-BW3.patch \
     file://mtk-1003-hostapd-mtk-synchronize-bandwidth-in-AP-STA-support.patch \
-    file://mtk-1004-hostapd-mtk-Add-support-for-updating-background-chan.patch \
-    file://mtk-1005-hostapd-mtk-add-zwdfs-mode-ctrl-for-eagle-efem-hwits.patch \
     "
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch b/recipes-wifi/hostapd/files/patches/mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch
deleted file mode 100644
index 105e188..0000000
--- a/recipes-wifi/hostapd/files/patches/mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d11dea1d3dee3577be404bfb6f7dc2460858242d Mon Sep 17 00:00:00 2001
-From: mtk20656 <chank.chen@mediatek.com>
-Date: Wed, 13 Sep 2023 19:29:51 +0800
-Subject: [PATCH] [hostapd][mt76]6g bss connect do not consider ht operation
-
-Signed-off-by: mtk20656 <chank.chen@mediatek.com>
----
- src/ap/ieee802_11.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-old mode 100755
-new mode 100644
-index ef520c8..904b1b5
---- a/src/ap/ieee802_11.c
-+++ b/src/ap/ieee802_11.c
-@@ -5434,7 +5434,8 @@ static void handle_assoc(struct hostapd_data *hapd,
- 			ieee802_11_set_beacons(hapd->iface);
- 	}
- 
--	update_ht_state(hapd, sta);
-+	if (!is_6ghz_op_class(hapd->iconf->op_class))
-+		update_ht_state(hapd, sta);
- 
- 	hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
- 		       HOSTAPD_LEVEL_DEBUG,
--- 
-2.18.0
-
diff --git a/recipes-wifi/hostapd/files/patches/patches.inc b/recipes-wifi/hostapd/files/patches/patches.inc
index bfacba1..34e183e 100644
--- a/recipes-wifi/hostapd/files/patches/patches.inc
+++ b/recipes-wifi/hostapd/files/patches/patches.inc
@@ -103,5 +103,4 @@
     file://mtk-0037-hostapd-mtk-add-back-ht-vht-cap-missing-field-before.patch \
     file://mtk-0038-hostapd-mtk-Fix-rnr-ie-length-when-no-need-to-report.patch \
     file://mtk-0039-hostapd-mtk-avoid-color-switch-when-beacon-is-not-se.patch \
-    file://mtk-0041-hostapd-mtk-6g-bss-connect-ignore-ht-opera.patch \
     "
diff --git a/recipes-wifi/hostapd/files/src-2.10.3/src/ap/ucode.c b/recipes-wifi/hostapd/files/src-2.10.3/src/ap/ucode.c
index ac3222b..0326f6f 100644
--- a/recipes-wifi/hostapd/files/src-2.10.3/src/ap/ucode.c
+++ b/recipes-wifi/hostapd/files/src-2.10.3/src/ap/ucode.c
@@ -8,7 +8,6 @@
 #include "hw_features.h"
 #include "ap_drv_ops.h"
 #include "dfs.h"
-#include "acs.h"
 #include <libubox/uloop.h>
 
 static uc_resource_type_t *global_type, *bss_type, *iface_type;
@@ -111,94 +110,6 @@
 	return NULL;
 }
 
-static struct hostapd_vlan *
-bss_conf_find_vlan(struct hostapd_bss_config *bss, int id)
-{
-	struct hostapd_vlan *vlan;
-
-	for (vlan = bss->vlan; vlan; vlan = vlan->next)
-		if (vlan->vlan_id == id)
-			return vlan;
-
-	return NULL;
-}
-
-static int
-bss_conf_rename_vlan(struct hostapd_data *hapd, struct hostapd_vlan *vlan,
-		     const char *ifname)
-{
-	if (!strcmp(ifname, vlan->ifname))
-		return 0;
-
-	hostapd_drv_if_rename(hapd, WPA_IF_AP_VLAN, vlan->ifname, ifname);
-	os_strlcpy(vlan->ifname, ifname, sizeof(vlan->ifname));
-
-	return 0;
-}
-
-static int
-bss_reload_vlans(struct hostapd_data *hapd, struct hostapd_bss_config *bss)
-{
-	struct hostapd_bss_config *old_bss = hapd->conf;
-	struct hostapd_vlan *vlan, *vlan_new, *wildcard;
-	char ifname[IFNAMSIZ + 1], vlan_ifname[IFNAMSIZ + 1], *pos;
-	int ret;
-
-	vlan = bss_conf_find_vlan(old_bss, VLAN_ID_WILDCARD);
-	wildcard = bss_conf_find_vlan(bss, VLAN_ID_WILDCARD);
-	if (!!vlan != !!wildcard)
-		return -1;
-
-	if (vlan && wildcard && strcmp(vlan->ifname, wildcard->ifname) != 0)
-		strcpy(vlan->ifname, wildcard->ifname);
-	else
-		wildcard = NULL;
-
-	for (vlan = bss->vlan; vlan; vlan = vlan->next) {
-		if (vlan->vlan_id == VLAN_ID_WILDCARD ||
-		    vlan->dynamic_vlan > 0)
-			continue;
-
-		if (!bss_conf_find_vlan(old_bss, vlan->vlan_id))
-			return -1;
-	}
-
-	for (vlan = old_bss->vlan; vlan; vlan = vlan->next) {
-		if (vlan->vlan_id == VLAN_ID_WILDCARD)
-			continue;
-
-		if (vlan->dynamic_vlan == 0) {
-			vlan_new = bss_conf_find_vlan(bss, vlan->vlan_id);
-			if (!vlan_new)
-				return -1;
-
-			if (bss_conf_rename_vlan(hapd, vlan, vlan_new->ifname))
-				return -1;
-
-			continue;
-		}
-
-		if (!wildcard)
-			continue;
-
-		os_strlcpy(ifname, wildcard->ifname, sizeof(ifname));
-		pos = os_strchr(ifname, '#');
-		if (!pos)
-			return -1;
-
-		*pos++ = '\0';
-		ret = os_snprintf(vlan_ifname, sizeof(vlan_ifname), "%s%d%s",
-				  ifname, vlan->vlan_id, pos);
-	        if (os_snprintf_error(sizeof(vlan_ifname), ret))
-			return -1;
-
-		if (bss_conf_rename_vlan(hapd, vlan, vlan_ifname))
-			return -1;
-	}
-
-	return 0;
-}
-
 static uc_value_t *
 uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 {
@@ -208,7 +119,6 @@
 	struct hostapd_config *conf;
 	uc_value_t *file = uc_fn_arg(0);
 	uc_value_t *index = uc_fn_arg(1);
-	uc_value_t *files_only = uc_fn_arg(2);
 	unsigned int i, idx = 0;
 	int ret = -1;
 
@@ -220,28 +130,9 @@
 
 	iface = hapd->iface;
 	conf = interfaces->config_read_cb(ucv_string_get(file));
-	if (!conf)
+	if (!conf || idx > conf->num_bss || !conf->bss[idx])
 		goto out;
 
-	if (idx > conf->num_bss || !conf->bss[idx])
-		goto free;
-
-	if (ucv_boolean_get(files_only)) {
-		struct hostapd_bss_config *bss = conf->bss[idx];
-		struct hostapd_bss_config *old_bss = hapd->conf;
-
-#define swap_field(name)				\
-	do {								\
-		void *ptr = old_bss->name;		\
-		old_bss->name = bss->name;		\
-		bss->name = ptr;				\
-	} while (0)
-
-		swap_field(ssid.wpa_psk_file);
-		ret = bss_reload_vlans(hapd, bss);
-		goto done;
-	}
-
 	hostapd_bss_deinit_no_free(hapd);
 	hostapd_drv_stop_ap(hapd);
 	hostapd_free_hapd_data(hapd);
@@ -252,14 +143,12 @@
 			iface->conf->bss[i] = conf->bss[idx];
 	hapd->conf = conf->bss[idx];
 	conf->bss[idx] = old_bss;
+	hostapd_config_free(conf);
 
-	hostapd_setup_bss(hapd, hapd == iface->bss[0], true);
-	hostapd_ucode_update_interfaces();
+	hostapd_setup_bss(hapd, hapd == iface->bss[0], !iface->conf->mbssid);
 
-done:
 	ret = 0;
-free:
-	hostapd_config_free(conf);
+
 out:
 	return ucv_int64_new(ret);
 }
@@ -290,15 +179,10 @@
 	struct hostapd_iface *iface;
 	int i, idx;
 
-	if (!hapd)
+	if (!hapd || hapd == hapd->iface->bss[0])
 		return NULL;
 
 	iface = hapd->iface;
-	if (iface->num_bss == 1) {
-		wpa_printf(MSG_ERROR, "trying to delete last bss of an iface: %s\n", hapd->conf->iface);
-		return NULL;
-	}
-
 	for (idx = 0; idx < iface->num_bss; idx++)
 		if (iface->bss[idx] == hapd)
 			break;
@@ -308,13 +192,8 @@
 
 	for (i = idx + 1; i < iface->num_bss; i++)
 		iface->bss[i - 1] = iface->bss[i];
-
 	iface->num_bss--;
 
-	iface->bss[0]->interface_added = 0;
-	hostapd_drv_set_first_bss(iface->bss[0]);
-	hapd->interface_added = 1;
-
 	hostapd_drv_stop_ap(hapd);
 	hostapd_bss_deinit(hapd);
 	hostapd_remove_iface_bss_conf(iface->conf, hapd->conf);
@@ -389,58 +268,6 @@
 }
 
 static uc_value_t *
-uc_hostapd_iface_set_bss_order(uc_vm_t *vm, size_t nargs)
-{
-	struct hostapd_iface *iface = uc_fn_thisval("hostapd.iface");
-	uc_value_t *bss_list = uc_fn_arg(0);
-	struct hostapd_data **new_bss;
-	struct hostapd_bss_config **new_conf;
-
-	if (!iface)
-		return NULL;
-
-	if (ucv_type(bss_list) != UC_ARRAY ||
-	    ucv_array_length(bss_list) != iface->num_bss)
-		return NULL;
-
-	new_bss = calloc(iface->num_bss, sizeof(*new_bss));
-	new_conf = calloc(iface->num_bss, sizeof(*new_conf));
-	for (size_t i = 0; i < iface->num_bss; i++) {
-		struct hostapd_data *bss;
-
-		bss = ucv_resource_data(ucv_array_get(bss_list, i), "hostapd.bss");
-		if (bss->iface != iface)
-			goto free;
-
-		for (size_t k = 0; k < i; k++)
-			if (new_bss[k] == bss)
-				goto free;
-
-		new_bss[i] = bss;
-		new_conf[i] = bss->conf;
-	}
-
-	new_bss[0]->interface_added = 0;
-	for (size_t i = 1; i < iface->num_bss; i++)
-		new_bss[i]->interface_added = 1;
-
-	free(iface->bss);
-	iface->bss = new_bss;
-
-	free(iface->conf->bss);
-	iface->conf->bss = new_conf;
-	iface->conf->num_bss = iface->num_bss;
-	hostapd_drv_set_first_bss(iface->bss[0]);
-
-	return ucv_boolean_new(true);
-
-free:
-	free(new_bss);
-	free(new_conf);
-	return NULL;
-}
-
-static uc_value_t *
 uc_hostapd_bss_ctrl(uc_vm_t *vm, size_t nargs)
 {
 	struct hostapd_data *hapd = uc_fn_thisval("hostapd.bss");
@@ -471,35 +298,12 @@
 	struct hostapd_iface *iface = uc_fn_thisval("hostapd.iface");
 	int i;
 
-	if (!iface)
-		return NULL;
-
-	switch (iface->state) {
-	case HAPD_IFACE_ENABLED:
-	case HAPD_IFACE_DISABLED:
-		break;
-#ifdef CONFIG_ACS
-	case HAPD_IFACE_ACS:
-		acs_cleanup(iface);
-		iface->scan_cb = NULL;
-		/* fallthrough */
-#endif
-	default:
-		hostapd_disable_iface(iface);
-		break;
-	}
-
-	if (iface->state != HAPD_IFACE_ENABLED)
-		hostapd_disable_iface(iface);
-
 	for (i = 0; i < iface->num_bss; i++) {
 		struct hostapd_data *hapd = iface->bss[i];
 
 		hostapd_drv_stop_ap(hapd);
-		hapd->beacon_set_done = 0;
+		hapd->started = 0;
 	}
-
-	return NULL;
 }
 
 static uc_value_t *
@@ -508,37 +312,27 @@
 	struct hostapd_iface *iface = uc_fn_thisval("hostapd.iface");
 	uc_value_t *info = uc_fn_arg(0);
 	struct hostapd_config *conf;
-	bool changed = false;
 	uint64_t intval;
 	int i;
 
 	if (!iface)
 		return NULL;
 
-	if (!info) {
-		iface->freq = 0;
+	if (!info)
 		goto out;
-	}
 
 	if (ucv_type(info) != UC_OBJECT)
 		return NULL;
 
-#define UPDATE_VAL(field, name)							\
-	if ((intval = ucv_int64_get(ucv_object_get(info, name, NULL))) &&	\
-		!errno && intval != conf->field) do {				\
-		conf->field = intval;						\
-		changed = true;							\
-	} while(0)
-
 	conf = iface->conf;
-	UPDATE_VAL(op_class, "op_class");
-	UPDATE_VAL(hw_mode, "hw_mode");
-	UPDATE_VAL(channel, "channel");
-	UPDATE_VAL(secondary_channel, "sec_channel");
-	if (!changed &&
-	    (iface->bss[0]->beacon_set_done ||
-	     iface->state == HAPD_IFACE_DFS))
-		return ucv_boolean_new(true);
+	if ((intval = ucv_int64_get(ucv_object_get(info, "op_class", NULL))) &&	!errno)
+		conf->op_class = intval;
+	if ((intval = ucv_int64_get(ucv_object_get(info, "hw_mode", NULL))) && !errno)
+		conf->hw_mode = intval;
+	if ((intval = ucv_int64_get(ucv_object_get(info, "channel", NULL))) && !errno)
+		conf->channel = intval;
+	if ((intval = ucv_int64_get(ucv_object_get(info, "sec_channel", NULL))) && !errno)
+		conf->secondary_channel = intval;
 
 	intval = ucv_int64_get(ucv_object_get(info, "center_seg0_idx", NULL));
 	if (!errno)
@@ -552,32 +346,13 @@
 	if (!errno)
 		hostapd_set_oper_chwidth(conf, intval);
 
-	intval = ucv_int64_get(ucv_object_get(info, "frequency", NULL));
-	if (!errno)
-		iface->freq = intval;
-	else
-		iface->freq = 0;
-	conf->acs = 0;
-
 out:
-	switch (iface->state) {
-	case HAPD_IFACE_DISABLED:
-		break;
-	case HAPD_IFACE_ENABLED:
-		if (!hostapd_is_dfs_required(iface) ||
-			hostapd_is_dfs_chan_available(iface))
-			break;
-		wpa_printf(MSG_INFO, "DFS CAC required on new channel, restart interface");
-		/* fallthrough */
-	default:
-		hostapd_disable_iface(iface);
-		break;
-	}
-
-	if (conf->channel && !iface->freq)
+	if (conf->channel)
 		iface->freq = hostapd_hw_get_freq(iface->bss[0], conf->channel);
 
-	if (iface->state != HAPD_IFACE_ENABLED) {
+	if (hostapd_is_dfs_required(iface) && !hostapd_is_dfs_chan_available(iface)) {
+		wpa_printf(MSG_INFO, "DFS CAC required on new channel, restart interface");
+		hostapd_disable_iface(iface);
 		hostapd_enable_iface(iface);
 		return ucv_boolean_new(true);
 	}
@@ -586,6 +361,7 @@
 		struct hostapd_data *hapd = iface->bss[i];
 		int ret;
 
+		hapd->started = 1;
 		hapd->conf->start_disabled = 0;
 		hostapd_set_freq(hapd, conf->hw_mode, iface->freq,
 				 conf->channel,
@@ -652,55 +428,6 @@
 	return ucv_boolean_new(!ret);
 }
 
-static uc_value_t *
-uc_hostapd_bss_rename(uc_vm_t *vm, size_t nargs)
-{
-	struct hostapd_data *hapd = uc_fn_thisval("hostapd.bss");
-	uc_value_t *ifname_arg = uc_fn_arg(0);
-	char prev_ifname[IFNAMSIZ + 1];
-	struct sta_info *sta;
-	const char *ifname;
-	int ret;
-
-	if (!hapd || ucv_type(ifname_arg) != UC_STRING)
-		return NULL;
-
-	os_strlcpy(prev_ifname, hapd->conf->iface, sizeof(prev_ifname));
-	ifname = ucv_string_get(ifname_arg);
-
-	hostapd_ubus_free_bss(hapd);
-	if (interfaces->ctrl_iface_deinit)
-		interfaces->ctrl_iface_deinit(hapd);
-
-	ret = hostapd_drv_if_rename(hapd, WPA_IF_AP_BSS, NULL, ifname);
-	if (ret)
-		goto out;
-
-	for (sta = hapd->sta_list; sta; sta = sta->next) {
-		char cur_name[IFNAMSIZ + 1], new_name[IFNAMSIZ + 1];
-
-		if (!(sta->flags & WLAN_STA_WDS) || sta->pending_wds_enable)
-			continue;
-
-		snprintf(cur_name, sizeof(cur_name), "%s.sta%d", prev_ifname, sta->aid);
-		snprintf(new_name, sizeof(new_name), "%s.sta%d", ifname, sta->aid);
-		hostapd_drv_if_rename(hapd, WPA_IF_AP_VLAN, cur_name, new_name);
-	}
-
-	if (!strncmp(hapd->conf->ssid.vlan, hapd->conf->iface, sizeof(hapd->conf->ssid.vlan)))
-		os_strlcpy(hapd->conf->ssid.vlan, ifname, sizeof(hapd->conf->ssid.vlan));
-	os_strlcpy(hapd->conf->iface, ifname, sizeof(hapd->conf->iface));
-	hostapd_ubus_add_bss(hapd);
-
-	hostapd_ucode_update_interfaces();
-out:
-	if (interfaces->ctrl_iface_init)
-		interfaces->ctrl_iface_init(hapd);
-
-	return ret ? NULL : ucv_boolean_new(true);
-}
-
-
 int hostapd_ucode_init(struct hapd_interfaces *ifaces)
 {
 	static const uc_function_list_t global_fns[] = {
@@ -714,11 +441,9 @@
 	static const uc_function_list_t bss_fns[] = {
 		{ "ctrl", uc_hostapd_bss_ctrl },
 		{ "set_config", uc_hostapd_bss_set_config },
-		{ "rename", uc_hostapd_bss_rename },
 		{ "delete", uc_hostapd_bss_delete },
 	};
 	static const uc_function_list_t iface_fns[] = {
-		{ "set_bss_order", uc_hostapd_iface_set_bss_order },
 		{ "add_bss", uc_hostapd_iface_add_bss },
 		{ "stop", uc_hostapd_iface_stop },
 		{ "start", uc_hostapd_iface_start },
diff --git a/recipes-wifi/hostapd/files/src-2.10.3/src/utils/ucode.c b/recipes-wifi/hostapd/files/src-2.10.3/src/utils/ucode.c
index 2beeb9a..896ef46 100644
--- a/recipes-wifi/hostapd/files/src-2.10.3/src/utils/ucode.c
+++ b/recipes-wifi/hostapd/files/src-2.10.3/src/utils/ucode.c
@@ -298,15 +298,9 @@
 uc_value_t *wpa_ucode_registry_remove(uc_value_t *reg, int idx)
 {
 	uc_value_t *val = wpa_ucode_registry_get(reg, idx);
-	void **dataptr;
-
-	if (!val)
-		return NULL;
 
-	ucv_array_set(reg, idx - 1, NULL);
-	dataptr = ucv_resource_dataptr(val, NULL);
-	if (dataptr)
-		*dataptr = NULL;
+	if (val)
+		ucv_array_set(reg, idx - 1, NULL);
 
 	return val;
 }
diff --git a/recipes-wifi/hostapd/files/src-2.10.3/wpa_supplicant/ucode.c b/recipes-wifi/hostapd/files/src-2.10.3/wpa_supplicant/ucode.c
index 6cba73d..d120ed6 100644
--- a/recipes-wifi/hostapd/files/src-2.10.3/wpa_supplicant/ucode.c
+++ b/recipes-wifi/hostapd/files/src-2.10.3/wpa_supplicant/ucode.c
@@ -2,7 +2,6 @@
 #include "utils/common.h"
 #include "utils/ucode.h"
 #include "drivers/driver.h"
-#include "ap/hostapd.h"
 #include "wpa_supplicant_i.h"
 #include "wps_supplicant.h"
 #include "bss.h"
@@ -136,7 +135,6 @@
 uc_wpas_add_iface(uc_vm_t *vm, size_t nargs)
 {
 	uc_value_t *info = uc_fn_arg(0);
-	uc_value_t *driver = ucv_object_get(info, "driver", NULL);
 	uc_value_t *ifname = ucv_object_get(info, "iface", NULL);
 	uc_value_t *bridge = ucv_object_get(info, "bridge", NULL);
 	uc_value_t *config = ucv_object_get(info, "config", NULL);
@@ -155,22 +153,6 @@
 		.ctrl_interface = ucv_string_get(ctrl),
 	};
 
-	if (driver) {
-		const char *drvname;
-		if (ucv_type(driver) != UC_STRING)
-			goto out;
-
-		iface.driver = NULL;
-		drvname = ucv_string_get(driver);
-		for (int i = 0; wpa_drivers[i]; i++) {
-			if (!strcmp(drvname, wpa_drivers[i]->name))
-				iface.driver = wpa_drivers[i]->name;
-		}
-
-		if (!iface.driver)
-			goto out;
-	}
-
 	if (!iface.ifname || !iface.confname)
 		goto out;
 
@@ -242,15 +224,6 @@
 		ucv_object_add(ret, "sec_chan_offset", ucv_int64_new(sec_chan));
 		ucv_object_add(ret, "frequency", ucv_int64_new(bss->freq));
 	}
-
-#ifdef CONFIG_MESH
-	if (wpa_s->ifmsh) {
-		struct hostapd_iface *ifmsh = wpa_s->ifmsh;
-
-		ucv_object_add(ret, "sec_chan_offset", ucv_int64_new(ifmsh->conf->secondary_channel));
-		ucv_object_add(ret, "frequency", ucv_int64_new(ifmsh->freq));
-	}
-#endif
 
 	return ret;
 }
diff --git a/recipes-wifi/hostapd/hostapd_2.10.3.bb b/recipes-wifi/hostapd/hostapd_2.10.3.bb
index b97c3b5..cc9809a 100644
--- a/recipes-wifi/hostapd/hostapd_2.10.3.bb
+++ b/recipes-wifi/hostapd/hostapd_2.10.3.bb
@@ -12,7 +12,7 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:"
 
-SRCREV ?= "e5ccbfc69ecf297590341ae8b461edba9d8e964c"
+SRCREV ?= "599d00be9de2846c6ea18c1487d8329522ade22b"
 SRC_URI = " \
     git://w1.fi/hostap.git;protocol=https;branch=main \
     file://hostapd-full.config \