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

[Description]
036ffb4 [MAC80211][hostapd][Add beacon_prot config]
2e0853c [mac80211][mt76][wed][sync wifi2wifi upstream patch]
338fd29 [mac80211][hostapd][Fix destination address of Probe Response frame on 6 GHz]
633ba34 [MAC80211][hostapd][Initialize the value of center_segment1]
15e7c3d [[MAC80211][misc] change hostapd.sh to parse and add config to disable_eht disable_he capabilitiy for STA connection ]
2a53b4a [[MAC80211][hospad] add config to disable_eht disable_he capabilitiy for STA connection ]
ede8c45 [mt76][hostapd][fix hsotapd 11v mbss for ubus issue]

[Release-log]

Change-Id: Ia043fc1e48fddb77e2bdfdc6602b8d6b1f73b6f3
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
index a9e802d..517f40c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
@@ -304,7 +304,7 @@
  	    is_broadcast_ether_addr(mgmt->da))
  		resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL,
 -					      &resp_len, true);
-+					      &resp_len, false, elems.mbssid_known_bss,
++					      &resp_len, true, elems.mbssid_known_bss,
 +					      elems.mbssid_known_bss_len);
  	else
  		resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
@@ -499,8 +499,8 @@
  
 -	if (hapd->driver && hapd->driver->set_operstate)
 -		hapd->driver->set_operstate(hapd->drv_priv, 1);
-+	if (start_beacon)
-+		return hostapd_start_beacon(hapd);
++	if (start_beacon && hostapd_start_beacon(hapd) < 0)
++		return -1;
  
  	hostapd_ubus_add_bss(hapd);
  
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
index b03656e..b03b120 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
@@ -45,7 +45,7 @@
  	size_t len = sizeof(buf);
  	enum hostapd_hw_mode hw_mode;
 -	u8 channel;
-+	u8 channel, center_segment0, center_segment1, op_class;
++	u8 channel, center_segment0, center_segment1 = 0, op_class;
  	int sec_chan = 0;
  	int ret;
 +	struct wpa_channel_info ci;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
new file mode 100644
index 0000000..778d74d
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
@@ -0,0 +1,227 @@
+From 626077ef532dd21d8f19ef7c8b521348aedc74d7 Mon Sep 17 00:00:00 2001
+From: Amit Khatri <amit.khatri@mediatek.com>
+Date: Thu, 23 Mar 2023 14:26:46 +0800
+Subject: [PATCH] hostapd: mtk: Add support for masking EHT capabilities.
+
+If STA want to disable EHT mode connection.
+STA can set
+disable_eht=1 in netowrk bloack of AP configuration.
+e.g.
+wpa_cli -iapcli0 set_network 0 disable_eht=1
+
+It will make EHT capability on driver level.
+
+Signed-off-by: Amit Khatri <amit.khatri@mediatek.com>
+---
+ src/drivers/driver.h              |  8 ++++++++
+ src/drivers/driver_nl80211.c      |  9 +++++++++
+ src/drivers/nl80211_copy.h        |  2 ++
+ wpa_supplicant/Makefile           |  4 ++++
+ wpa_supplicant/config.c           |  3 +++
+ wpa_supplicant/config_file.c      |  3 +++
+ wpa_supplicant/config_ssid.h      | 11 +++++++++++
+ wpa_supplicant/sme.c              |  4 ++++
+ wpa_supplicant/wpa_cli.c          |  3 +++
+ wpa_supplicant/wpa_supplicant.c   | 15 +++++++++++++++
+ wpa_supplicant/wpa_supplicant_i.h |  6 ++++++
+ 11 files changed, 68 insertions(+)
+
+diff --git a/src/drivers/driver.h b/src/drivers/driver.h
+index 7f6392f..1bf0cd6 100644
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -1151,6 +1151,14 @@ struct wpa_driver_associate_params {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT for this connection
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * req_key_mgmt_offload - Request key management offload for connection
+ 	 *
+diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
+index f9a8763..945ce3e 100644
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -6058,6 +6058,15 @@ static int nl80211_ht_vht_overrides(struct nl_msg *msg,
+ 	}
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++		if (params->disable_eht) {
++			wpa_printf(MSG_DEBUG, "  * EHT disabled");
++			if (nla_put_flag(msg, NL80211_ATTR_DISABLE_EHT))
++				return -1;
++		}
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	return 0;
+ }
+ 
+diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
+index 0937752..ce8ee58 100644
+--- a/src/drivers/nl80211_copy.h
++++ b/src/drivers/nl80211_copy.h
+@@ -3175,6 +3175,8 @@ enum nl80211_attrs {
+ 
+ 	NL80211_ATTR_EHT_CAPABILITY,
+ 
++	NL80211_ATTR_DISABLE_EHT,
++
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+ 	__NL80211_ATTR_AFTER_LAST,
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index ef36b56..40cdb59 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -208,6 +208,10 @@ ifdef CONFIG_HE_OVERRIDES
+ CFLAGS += -DCONFIG_HE_OVERRIDES
+ endif
+ 
++ifdef CONFIG_EHT_OVERRIDES
++CFLAGS += -DCONFIG_EHT_OVERRIDES
++endif
++
+ ifndef CONFIG_BACKEND
+ CONFIG_BACKEND=file
+ endif
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index f9880ed..994ee5e 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -2718,6 +2718,9 @@ static const struct parse_data ssid_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	{ INT_RANGE(disable_he, 0, 1)},
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	{ INT_RANGE(disable_eht, 0, 1)},
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	{ INT(ap_max_inactivity) },
+ 	{ INT(dtim_period) },
+ 	{ INT(beacon_int) },
+diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
+index 24c2998..056b265 100644
+--- a/wpa_supplicant/config_file.c
++++ b/wpa_supplicant/config_file.c
+@@ -881,6 +881,9 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	INT(disable_he);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	INT(disable_eht);
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ #undef STR
+ #undef INT
+diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
+index 9a389cc..cc9aa8e 100644
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -810,6 +810,17 @@ struct wpa_ssid {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT (IEEE 802.11be) for this network
++	 *
++	 * By default, use it if it is available, but this can be configured
++	 * to 1 to have it disabled.
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
+ 	 *
+diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
+index 2dad36d..e7aadf6 100644
+--- a/wpa_supplicant/sme.c
++++ b/wpa_supplicant/sme.c
+@@ -2001,6 +2001,10 @@ mscs_fail:
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ #ifdef CONFIG_IEEE80211R
+ 	if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies &&
+ 	    get_ie(wpa_s->sme.ft_ies, wpa_s->sme.ft_ies_len,
+diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
+index 8443f54..ea251db 100644
+--- a/wpa_supplicant/wpa_cli.c
++++ b/wpa_supplicant/wpa_cli.c
+@@ -1476,6 +1476,9 @@ static const char *network_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	"disable_he",
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	"disable_eht",
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	"ap_max_inactivity", "dtim_period", "beacon_int",
+ #ifdef CONFIG_MACSEC
+ 	"macsec_policy",
+diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
+index ba34fd4..efc7594 100644
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -4082,6 +4082,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ 
+ #ifdef CONFIG_P2P
+ 	/*
+@@ -5877,6 +5881,17 @@ void wpa_supplicant_apply_he_overrides(
+ }
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params)
++{
++	if (!ssid)
++		return;
++
++	params->disable_eht = ssid->disable_eht;
++}
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ static int pcsc_reader_init(struct wpa_supplicant *wpa_s)
+ {
+diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
+index 3285af3..76607c5 100644
+--- a/wpa_supplicant/wpa_supplicant_i.h
++++ b/wpa_supplicant/wpa_supplicant_i.h
+@@ -1576,6 +1576,12 @@ void wpa_supplicant_apply_vht_overrides(
+ void wpa_supplicant_apply_he_overrides(
+ 	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
+ 	struct wpa_driver_associate_params *params);
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params);
++#endif CONFIG_EHT_OVERRIDES
++
+ 
+ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
+ int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
+-- 
+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 1265b34..1730898 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
@@ -85,6 +85,7 @@
     file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch \
     file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch \
+    file://mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch \
     file://mtk-0024-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch \
     file://mtk-0100-hostapd-mtk-update-eht-operation-elem.patch \
     "
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch b/recipes-wifi/hostapd/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
index a9e802d..517f40c 100644
--- a/recipes-wifi/hostapd/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
@@ -304,7 +304,7 @@
  	    is_broadcast_ether_addr(mgmt->da))
  		resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL,
 -					      &resp_len, true);
-+					      &resp_len, false, elems.mbssid_known_bss,
++					      &resp_len, true, elems.mbssid_known_bss,
 +					      elems.mbssid_known_bss_len);
  	else
  		resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
@@ -499,8 +499,8 @@
  
 -	if (hapd->driver && hapd->driver->set_operstate)
 -		hapd->driver->set_operstate(hapd->drv_priv, 1);
-+	if (start_beacon)
-+		return hostapd_start_beacon(hapd);
++	if (start_beacon && hostapd_start_beacon(hapd) < 0)
++		return -1;
  
  	hostapd_ubus_add_bss(hapd);
  
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch b/recipes-wifi/hostapd/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
index b03656e..b03b120 100644
--- a/recipes-wifi/hostapd/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
@@ -45,7 +45,7 @@
  	size_t len = sizeof(buf);
  	enum hostapd_hw_mode hw_mode;
 -	u8 channel;
-+	u8 channel, center_segment0, center_segment1, op_class;
++	u8 channel, center_segment0, center_segment1 = 0, op_class;
  	int sec_chan = 0;
  	int ret;
 +	struct wpa_channel_info ci;
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch b/recipes-wifi/hostapd/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
new file mode 100644
index 0000000..778d74d
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
@@ -0,0 +1,227 @@
+From 626077ef532dd21d8f19ef7c8b521348aedc74d7 Mon Sep 17 00:00:00 2001
+From: Amit Khatri <amit.khatri@mediatek.com>
+Date: Thu, 23 Mar 2023 14:26:46 +0800
+Subject: [PATCH] hostapd: mtk: Add support for masking EHT capabilities.
+
+If STA want to disable EHT mode connection.
+STA can set
+disable_eht=1 in netowrk bloack of AP configuration.
+e.g.
+wpa_cli -iapcli0 set_network 0 disable_eht=1
+
+It will make EHT capability on driver level.
+
+Signed-off-by: Amit Khatri <amit.khatri@mediatek.com>
+---
+ src/drivers/driver.h              |  8 ++++++++
+ src/drivers/driver_nl80211.c      |  9 +++++++++
+ src/drivers/nl80211_copy.h        |  2 ++
+ wpa_supplicant/Makefile           |  4 ++++
+ wpa_supplicant/config.c           |  3 +++
+ wpa_supplicant/config_file.c      |  3 +++
+ wpa_supplicant/config_ssid.h      | 11 +++++++++++
+ wpa_supplicant/sme.c              |  4 ++++
+ wpa_supplicant/wpa_cli.c          |  3 +++
+ wpa_supplicant/wpa_supplicant.c   | 15 +++++++++++++++
+ wpa_supplicant/wpa_supplicant_i.h |  6 ++++++
+ 11 files changed, 68 insertions(+)
+
+diff --git a/src/drivers/driver.h b/src/drivers/driver.h
+index 7f6392f..1bf0cd6 100644
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -1151,6 +1151,14 @@ struct wpa_driver_associate_params {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT for this connection
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * req_key_mgmt_offload - Request key management offload for connection
+ 	 *
+diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
+index f9a8763..945ce3e 100644
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -6058,6 +6058,15 @@ static int nl80211_ht_vht_overrides(struct nl_msg *msg,
+ 	}
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++		if (params->disable_eht) {
++			wpa_printf(MSG_DEBUG, "  * EHT disabled");
++			if (nla_put_flag(msg, NL80211_ATTR_DISABLE_EHT))
++				return -1;
++		}
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	return 0;
+ }
+ 
+diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
+index 0937752..ce8ee58 100644
+--- a/src/drivers/nl80211_copy.h
++++ b/src/drivers/nl80211_copy.h
+@@ -3175,6 +3175,8 @@ enum nl80211_attrs {
+ 
+ 	NL80211_ATTR_EHT_CAPABILITY,
+ 
++	NL80211_ATTR_DISABLE_EHT,
++
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+ 	__NL80211_ATTR_AFTER_LAST,
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index ef36b56..40cdb59 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -208,6 +208,10 @@ ifdef CONFIG_HE_OVERRIDES
+ CFLAGS += -DCONFIG_HE_OVERRIDES
+ endif
+ 
++ifdef CONFIG_EHT_OVERRIDES
++CFLAGS += -DCONFIG_EHT_OVERRIDES
++endif
++
+ ifndef CONFIG_BACKEND
+ CONFIG_BACKEND=file
+ endif
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index f9880ed..994ee5e 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -2718,6 +2718,9 @@ static const struct parse_data ssid_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	{ INT_RANGE(disable_he, 0, 1)},
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	{ INT_RANGE(disable_eht, 0, 1)},
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	{ INT(ap_max_inactivity) },
+ 	{ INT(dtim_period) },
+ 	{ INT(beacon_int) },
+diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
+index 24c2998..056b265 100644
+--- a/wpa_supplicant/config_file.c
++++ b/wpa_supplicant/config_file.c
+@@ -881,6 +881,9 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	INT(disable_he);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	INT(disable_eht);
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ #undef STR
+ #undef INT
+diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
+index 9a389cc..cc9aa8e 100644
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -810,6 +810,17 @@ struct wpa_ssid {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT (IEEE 802.11be) for this network
++	 *
++	 * By default, use it if it is available, but this can be configured
++	 * to 1 to have it disabled.
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
+ 	 *
+diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
+index 2dad36d..e7aadf6 100644
+--- a/wpa_supplicant/sme.c
++++ b/wpa_supplicant/sme.c
+@@ -2001,6 +2001,10 @@ mscs_fail:
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ #ifdef CONFIG_IEEE80211R
+ 	if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies &&
+ 	    get_ie(wpa_s->sme.ft_ies, wpa_s->sme.ft_ies_len,
+diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
+index 8443f54..ea251db 100644
+--- a/wpa_supplicant/wpa_cli.c
++++ b/wpa_supplicant/wpa_cli.c
+@@ -1476,6 +1476,9 @@ static const char *network_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	"disable_he",
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	"disable_eht",
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	"ap_max_inactivity", "dtim_period", "beacon_int",
+ #ifdef CONFIG_MACSEC
+ 	"macsec_policy",
+diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
+index ba34fd4..efc7594 100644
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -4082,6 +4082,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ 
+ #ifdef CONFIG_P2P
+ 	/*
+@@ -5877,6 +5881,17 @@ void wpa_supplicant_apply_he_overrides(
+ }
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params)
++{
++	if (!ssid)
++		return;
++
++	params->disable_eht = ssid->disable_eht;
++}
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ static int pcsc_reader_init(struct wpa_supplicant *wpa_s)
+ {
+diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
+index 3285af3..76607c5 100644
+--- a/wpa_supplicant/wpa_supplicant_i.h
++++ b/wpa_supplicant/wpa_supplicant_i.h
+@@ -1576,6 +1576,12 @@ void wpa_supplicant_apply_vht_overrides(
+ void wpa_supplicant_apply_he_overrides(
+ 	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
+ 	struct wpa_driver_associate_params *params);
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params);
++#endif CONFIG_EHT_OVERRIDES
++
+ 
+ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
+ int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
+-- 
+2.18.0
+
diff --git a/recipes-wifi/hostapd/files/patches/patches.inc b/recipes-wifi/hostapd/files/patches/patches.inc
index e1aacd5..10443d9 100644
--- a/recipes-wifi/hostapd/files/patches/patches.inc
+++ b/recipes-wifi/hostapd/files/patches/patches.inc
@@ -85,5 +85,6 @@
     file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch \
     file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch \
+    file://mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch \
     file://mtk-0024-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch \
     "
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch
new file mode 100644
index 0000000..5bfbd83
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch
@@ -0,0 +1,167 @@
+From 5b031e66dae802df853596a99c1ce73ad7761d09 Mon Sep 17 00:00:00 2001
+From: Sujuan Chen <sujuan.chen@mediatek.com>
+Date: Tue, 28 Mar 2023 10:53:31 +0800
+Subject: [PATCH] mac80211: mtk: add support for letting drivers register tc
+ offload support
+
+On newer MediaTek SoCs (e.g. MT7986), WLAN->WLAN or WLAN->Ethernet flows can
+be offloaded by the SoC. In order to support that, the .ndo_setup_tc op is
+needed.
+
+Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
+---
+ include/net/mac80211.h     |  9 +++++++++
+ net/mac80211/driver-ops.h  | 17 +++++++++++++++++
+ net/mac80211/ieee80211_i.h |  3 ++-
+ net/mac80211/iface.c       | 17 +++++++++++++++++
+ net/mac80211/trace.h       | 25 +++++++++++++++++++++++++
+ 5 files changed, 70 insertions(+), 1 deletion(-)
+
+diff --git a/include/net/mac80211.h b/include/net/mac80211.h
+index cb1d544..2d998be 100755
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -3980,6 +3980,10 @@ struct ieee80211_prep_tx_info {
+  *	resolve a path for hardware flow offloading
+  * @net_fill_receive_path: Called from .ndo_fill_receive_path in order to
+  *	get a path for hardware flow offloading
++ * @net_setup_tc: Called from .ndo_setup_tc in order to prepare hardware
++ *	flow offloading for flows originating from the vif.
++ *	Note that the driver must not assume that the vif driver_data is valid
++ *	at this point, since the callback can be called during netdev teardown.
+  */
+ struct ieee80211_ops {
+ 	void (*tx)(struct ieee80211_hw *hw,
+@@ -4318,6 +4322,11 @@ struct ieee80211_ops {
+ 	int (*net_fill_receive_path)(struct ieee80211_hw *hw,
+ 				     struct net_device_path_ctx *ctx,
+ 				     struct net_device_path *path);
++	int (*net_setup_tc)(struct ieee80211_hw *hw,
++			    struct ieee80211_vif *vif,
++			    struct net_device *dev,
++			    enum tc_setup_type type,
++			    void *type_data);
+ };
+ 
+ /**
+diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
+index 27da75e..79f408f 100644
+--- a/net/mac80211/driver-ops.h
++++ b/net/mac80211/driver-ops.h
+@@ -1521,4 +1521,21 @@ static inline int drv_net_fill_receive_path(struct ieee80211_local *local,
+ 	return ret;
+ }
+ 
++static inline int drv_net_setup_tc(struct ieee80211_local *local,
++				   struct ieee80211_sub_if_data *sdata,
++				   struct net_device *dev,
++				   enum tc_setup_type type, void *type_data)
++{
++	int ret = -EOPNOTSUPP;
++
++	sdata = get_bss_sdata(sdata);
++	trace_drv_net_setup_tc(local, sdata, type);
++	if (local->ops->net_setup_tc)
++		ret = local->ops->net_setup_tc(&local->hw, &sdata->vif, dev,
++					       type, type_data);
++	trace_drv_return_int(local, ret);
++
++	return ret;
++}
++
+ #endif /* __MAC80211_DRIVER_OPS */
+diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
+index 2519c14..fe7a03a 100644
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1822,7 +1822,8 @@ void ieee80211_color_aging_work(struct work_struct *work);
+ /* interface handling */
+ #define MAC80211_SUPPORTED_FEATURES_TX	(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
+ 					 NETIF_F_HW_CSUM | NETIF_F_SG | \
+-					 NETIF_F_HIGHDMA | NETIF_F_GSO_SOFTWARE)
++					 NETIF_F_HIGHDMA | NETIF_F_GSO_SOFTWARE | \
++					 NETIF_F_HW_TC)
+ #define MAC80211_SUPPORTED_FEATURES_RX	(NETIF_F_RXCSUM)
+ #define MAC80211_SUPPORTED_FEATURES	(MAC80211_SUPPORTED_FEATURES_TX | \
+ 					 MAC80211_SUPPORTED_FEATURES_RX)
+diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
+index 8a4f4e1..f3bf837 100644
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -773,6 +773,21 @@ static int __change_mtu(struct net_device *ndev, int new_mtu){
+ }
+ #endif
+ 
++static int ieee80211_netdev_setup_tc(struct net_device *dev,
++				     enum tc_setup_type type, void *type_data)
++{
++	struct ieee80211_sub_if_data *sdata;
++	struct ieee80211_local *local;
++
++	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
++	local = sdata->local;
++
++	if (!local->ops->net_setup_tc)
++		return -EOPNOTSUPP;
++
++	return drv_net_setup_tc(local, sdata, dev, type, type_data);
++}
++
+ static const struct net_device_ops ieee80211_dataif_ops = {
+ #if LINUX_VERSION_IS_LESS(4,10,0)
+ 	.ndo_change_mtu = __change_mtu,
+@@ -790,6 +805,7 @@ static const struct net_device_ops ieee80211_dataif_ops = {
+ #else
+ 	.ndo_get_stats64 = bp_ieee80211_get_stats64,
+ #endif
++	.ndo_setup_tc		= ieee80211_netdev_setup_tc,
+ 
+ };
+ 
+@@ -953,6 +969,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
+ #endif
+ 	.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
+ 	.ndo_fill_receive_path = ieee80211_netdev_fill_receive_path,
++	.ndo_setup_tc		= ieee80211_netdev_setup_tc,
+ };
+ 
+ static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
+diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
+index 737ab86..25d3e30 100644
+--- a/net/mac80211/trace.h
++++ b/net/mac80211/trace.h
+@@ -2899,6 +2899,31 @@ DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
+ 	TP_ARGS(local, sdata, sta)
+ );
+ 
++TRACE_EVENT(drv_net_setup_tc,
++	TP_PROTO(struct ieee80211_local *local,
++		 struct ieee80211_sub_if_data *sdata,
++		 u8 type),
++
++	TP_ARGS(local, sdata, type),
++
++	TP_STRUCT__entry(
++		LOCAL_ENTRY
++		VIF_ENTRY
++		__field(u8, type)
++	),
++
++	TP_fast_assign(
++		LOCAL_ASSIGN;
++		VIF_ASSIGN;
++		__entry->type = type;
++	),
++
++	TP_printk(
++		LOCAL_PR_FMT VIF_PR_FMT " type:%d\n",
++		LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
++	)
++);
++
+ TRACE_EVENT(bss_color_bitmap,
+ 	TP_PROTO(u8 color,
+ 		 u64 color_bitmap),
+-- 
+2.18.0
+
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch
deleted file mode 100644
index 0ea84cb..0000000
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-9902-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From cd9544a72d01f115e97b4967f416b07691196e5f Mon Sep 17 00:00:00 2001
-From: Sujuan Chen <sujuan.chen@mediatek.com>
-Date: Fri, 23 Dec 2022 18:12:41 +0800
-Subject: [PATCH] mac80211: mtk: register .ndo_setup_tc to support wifi2wifi
- offload
-
-Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
----
- include/net/mac80211.h |  5 +++++
- net/mac80211/iface.c   | 26 ++++++++++++++++++++++++++
- 2 files changed, 31 insertions(+)
-
-diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index bf4469b..3b2b2bb 100644
---- a/include/net/mac80211.h
-+++ b/include/net/mac80211.h
-@@ -3978,6 +3978,8 @@ struct ieee80211_prep_tx_info {
-  *	resolve a path for hardware flow offloading
-  * @net_fill_receive_path: Called from .ndo_fill_receive_path in order to
-  *	get a path for hardware flow offloading
-+  * @net_setup_tc: Called from .ndo_setup_tc in order to register flowblock
-+ *	callback function
-  */
- struct ieee80211_ops {
- 	void (*tx)(struct ieee80211_hw *hw,
-@@ -4316,6 +4318,9 @@ struct ieee80211_ops {
- 	int (*net_fill_receive_path)(struct ieee80211_hw *hw,
- 				     struct net_device_path_ctx *ctx,
- 				     struct net_device_path *path);
-+	int (*net_setup_tc)(struct ieee80211_hw *hw,
-+			    struct net_device *dev,
-+			    int type, void *type_data);
- };
- 
- /**
-diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
-index 35f1233..43f6cb0 100644
---- a/net/mac80211/iface.c
-+++ b/net/mac80211/iface.c
-@@ -932,6 +932,30 @@ static int ieee80211_netdev_fill_receive_path(struct net_device_path_ctx *ctx,
- 	return ret;
- }
- 
-+static int ieee80211_netdev_setup_tc(struct net_device *dev,
-+					       enum tc_setup_type type, void *type_data)
-+{
-+	struct ieee80211_sub_if_data *sdata;
-+	struct ieee80211_local *local;
-+	int ret = -ENOENT;
-+
-+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-+	local = sdata->local;
-+
-+	if (!local->ops->net_setup_tc)
-+		return -EOPNOTSUPP;
-+
-+	if (!type_data)
-+		return -EINVAL;
-+
-+	rcu_read_lock();
-+
-+	ret = local->ops->net_setup_tc(&local->hw, dev, (int)type, type_data);
-+
-+	rcu_read_unlock();
-+
-+	return ret;
-+}
- 
- static const struct net_device_ops ieee80211_dataif_8023_ops = {
- #if LINUX_VERSION_IS_LESS(4,10,0)
-@@ -952,6 +976,7 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
- #endif
- 	.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
- 	.ndo_fill_receive_path = ieee80211_netdev_fill_receive_path,
-+	.ndo_setup_tc		= ieee80211_netdev_setup_tc,
- };
- 
- static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
-@@ -1504,6 +1529,7 @@ static void ieee80211_if_setup(struct net_device *dev)
- 	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
- 	dev->netdev_ops = &ieee80211_dataif_ops;
- 	netdev_set_priv_destructor(dev, ieee80211_if_free);
-+	dev->features |= NETIF_F_HW_TC;
- }
- 
- static void ieee80211_if_setup_no_queue(struct net_device *dev)
--- 
-2.18.0
-
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc b/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
index 70cea85..897492a 100644
--- a/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/subsys.inc
@@ -68,5 +68,5 @@
     file://mtk-0017-mac80211-mtk-aging-color-bitmap.patch \
     file://mtk-9900-mac80211-mtk-mask-kernel-version-limitation-and-fil.patch \
     file://mtk-9901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-i.patch \
-    file://mtk-9902-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch \
+    file://mtk-9902-mac80211-mtk-add-support-for-letting-drivers-registe.patch \
     "
diff --git a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
similarity index 62%
rename from recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
rename to recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
index bce65e6..f5f46f4 100644
--- a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
@@ -1,25 +1,27 @@
-From 38e99f5b8641c3b1c054244d3c74229a9c0a470e Mon Sep 17 00:00:00 2001
+From 1b23af3704c18c7c111992940fc94d2cdef3b830 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Tue, 27 Dec 2022 09:45:14 +0800
-Subject: [PATCH 3007/3013] mt76: mt7915: add mt7915_net_setup_tc to support
+Subject: [PATCH] mt76: mt7915: wed: add mt7915_net_setup_tc to support
  wifi2wifi offload
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
- mt7915/main.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
+ mt7915/main.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index c549a183..22d293e9 100644
+index 7e7f6073..146e3643 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1602,6 +1602,21 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
+@@ -1604,6 +1604,23 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
  	return 0;
  }
  
 +static int mt7915_net_setup_tc(struct ieee80211_hw *hw,
-+			      struct net_device *ndev,
-+			      int type, void *type_data)
++			       struct ieee80211_vif *vif,
++			       struct net_device *ndev,
++			       enum tc_setup_type type,
++			       void *type_data)
 +{
 +	struct mt7915_dev *dev = mt7915_hw_dev(hw);
 +	struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
@@ -35,7 +37,7 @@
  #endif
  
  const struct ieee80211_ops mt7915_ops = {
-@@ -1655,5 +1670,6 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1657,5 +1674,6 @@ const struct ieee80211_ops mt7915_ops = {
  #ifdef CONFIG_NET_MEDIATEK_SOC_WED
  	.net_fill_forward_path = mt7915_net_fill_forward_path,
  	.net_fill_receive_path = mt7915_net_fill_receive_path,
diff --git a/recipes-wifi/linux-mt76/files/patches/patches.inc b/recipes-wifi/linux-mt76/files/patches/patches.inc
index e398741..b5504fa 100644
--- a/recipes-wifi/linux-mt76/files/patches/patches.inc
+++ b/recipes-wifi/linux-mt76/files/patches/patches.inc
@@ -40,7 +40,7 @@
     file://3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch \
     file://3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch \
     file://3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch \
-    file://3007-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch \
+    file://3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch \
     file://3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch \
     file://3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch \
     file://3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch \
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
index a9e802d..517f40c 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
@@ -304,7 +304,7 @@
  	    is_broadcast_ether_addr(mgmt->da))
  		resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL,
 -					      &resp_len, true);
-+					      &resp_len, false, elems.mbssid_known_bss,
++					      &resp_len, true, elems.mbssid_known_bss,
 +					      elems.mbssid_known_bss_len);
  	else
  		resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
@@ -499,8 +499,8 @@
  
 -	if (hapd->driver && hapd->driver->set_operstate)
 -		hapd->driver->set_operstate(hapd->drv_priv, 1);
-+	if (start_beacon)
-+		return hostapd_start_beacon(hapd);
++	if (start_beacon && hostapd_start_beacon(hapd) < 0)
++		return -1;
  
  	hostapd_ubus_add_bss(hapd);
  
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
index b03656e..b03b120 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
@@ -45,7 +45,7 @@
  	size_t len = sizeof(buf);
  	enum hostapd_hw_mode hw_mode;
 -	u8 channel;
-+	u8 channel, center_segment0, center_segment1, op_class;
++	u8 channel, center_segment0, center_segment1 = 0, op_class;
  	int sec_chan = 0;
  	int ret;
 +	struct wpa_channel_info ci;
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
new file mode 100644
index 0000000..778d74d
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
@@ -0,0 +1,227 @@
+From 626077ef532dd21d8f19ef7c8b521348aedc74d7 Mon Sep 17 00:00:00 2001
+From: Amit Khatri <amit.khatri@mediatek.com>
+Date: Thu, 23 Mar 2023 14:26:46 +0800
+Subject: [PATCH] hostapd: mtk: Add support for masking EHT capabilities.
+
+If STA want to disable EHT mode connection.
+STA can set
+disable_eht=1 in netowrk bloack of AP configuration.
+e.g.
+wpa_cli -iapcli0 set_network 0 disable_eht=1
+
+It will make EHT capability on driver level.
+
+Signed-off-by: Amit Khatri <amit.khatri@mediatek.com>
+---
+ src/drivers/driver.h              |  8 ++++++++
+ src/drivers/driver_nl80211.c      |  9 +++++++++
+ src/drivers/nl80211_copy.h        |  2 ++
+ wpa_supplicant/Makefile           |  4 ++++
+ wpa_supplicant/config.c           |  3 +++
+ wpa_supplicant/config_file.c      |  3 +++
+ wpa_supplicant/config_ssid.h      | 11 +++++++++++
+ wpa_supplicant/sme.c              |  4 ++++
+ wpa_supplicant/wpa_cli.c          |  3 +++
+ wpa_supplicant/wpa_supplicant.c   | 15 +++++++++++++++
+ wpa_supplicant/wpa_supplicant_i.h |  6 ++++++
+ 11 files changed, 68 insertions(+)
+
+diff --git a/src/drivers/driver.h b/src/drivers/driver.h
+index 7f6392f..1bf0cd6 100644
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -1151,6 +1151,14 @@ struct wpa_driver_associate_params {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT for this connection
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * req_key_mgmt_offload - Request key management offload for connection
+ 	 *
+diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
+index f9a8763..945ce3e 100644
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -6058,6 +6058,15 @@ static int nl80211_ht_vht_overrides(struct nl_msg *msg,
+ 	}
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++		if (params->disable_eht) {
++			wpa_printf(MSG_DEBUG, "  * EHT disabled");
++			if (nla_put_flag(msg, NL80211_ATTR_DISABLE_EHT))
++				return -1;
++		}
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	return 0;
+ }
+ 
+diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
+index 0937752..ce8ee58 100644
+--- a/src/drivers/nl80211_copy.h
++++ b/src/drivers/nl80211_copy.h
+@@ -3175,6 +3175,8 @@ enum nl80211_attrs {
+ 
+ 	NL80211_ATTR_EHT_CAPABILITY,
+ 
++	NL80211_ATTR_DISABLE_EHT,
++
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+ 	__NL80211_ATTR_AFTER_LAST,
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index ef36b56..40cdb59 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -208,6 +208,10 @@ ifdef CONFIG_HE_OVERRIDES
+ CFLAGS += -DCONFIG_HE_OVERRIDES
+ endif
+ 
++ifdef CONFIG_EHT_OVERRIDES
++CFLAGS += -DCONFIG_EHT_OVERRIDES
++endif
++
+ ifndef CONFIG_BACKEND
+ CONFIG_BACKEND=file
+ endif
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index f9880ed..994ee5e 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -2718,6 +2718,9 @@ static const struct parse_data ssid_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	{ INT_RANGE(disable_he, 0, 1)},
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	{ INT_RANGE(disable_eht, 0, 1)},
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	{ INT(ap_max_inactivity) },
+ 	{ INT(dtim_period) },
+ 	{ INT(beacon_int) },
+diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
+index 24c2998..056b265 100644
+--- a/wpa_supplicant/config_file.c
++++ b/wpa_supplicant/config_file.c
+@@ -881,6 +881,9 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	INT(disable_he);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	INT(disable_eht);
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ #undef STR
+ #undef INT
+diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
+index 9a389cc..cc9aa8e 100644
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -810,6 +810,17 @@ struct wpa_ssid {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT (IEEE 802.11be) for this network
++	 *
++	 * By default, use it if it is available, but this can be configured
++	 * to 1 to have it disabled.
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
+ 	 *
+diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
+index 2dad36d..e7aadf6 100644
+--- a/wpa_supplicant/sme.c
++++ b/wpa_supplicant/sme.c
+@@ -2001,6 +2001,10 @@ mscs_fail:
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ #ifdef CONFIG_IEEE80211R
+ 	if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies &&
+ 	    get_ie(wpa_s->sme.ft_ies, wpa_s->sme.ft_ies_len,
+diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
+index 8443f54..ea251db 100644
+--- a/wpa_supplicant/wpa_cli.c
++++ b/wpa_supplicant/wpa_cli.c
+@@ -1476,6 +1476,9 @@ static const char *network_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	"disable_he",
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	"disable_eht",
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	"ap_max_inactivity", "dtim_period", "beacon_int",
+ #ifdef CONFIG_MACSEC
+ 	"macsec_policy",
+diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
+index ba34fd4..efc7594 100644
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -4082,6 +4082,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ 
+ #ifdef CONFIG_P2P
+ 	/*
+@@ -5877,6 +5881,17 @@ void wpa_supplicant_apply_he_overrides(
+ }
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params)
++{
++	if (!ssid)
++		return;
++
++	params->disable_eht = ssid->disable_eht;
++}
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ static int pcsc_reader_init(struct wpa_supplicant *wpa_s)
+ {
+diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
+index 3285af3..76607c5 100644
+--- a/wpa_supplicant/wpa_supplicant_i.h
++++ b/wpa_supplicant/wpa_supplicant_i.h
+@@ -1576,6 +1576,12 @@ void wpa_supplicant_apply_vht_overrides(
+ void wpa_supplicant_apply_he_overrides(
+ 	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
+ 	struct wpa_driver_associate_params *params);
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params);
++#endif CONFIG_EHT_OVERRIDES
++
+ 
+ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
+ int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
+-- 
+2.18.0
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
index 1265b34..1730898 100644
--- a/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/wpa-supplicant/files/patches-2.10.3/patches.inc
@@ -85,6 +85,7 @@
     file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch \
     file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch \
+    file://mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch \
     file://mtk-0024-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch \
     file://mtk-0100-hostapd-mtk-update-eht-operation-elem.patch \
     "
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
index a9e802d..517f40c 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch
@@ -304,7 +304,7 @@
  	    is_broadcast_ether_addr(mgmt->da))
  		resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL,
 -					      &resp_len, true);
-+					      &resp_len, false, elems.mbssid_known_bss,
++					      &resp_len, true, elems.mbssid_known_bss,
 +					      elems.mbssid_known_bss_len);
  	else
  		resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
@@ -499,8 +499,8 @@
  
 -	if (hapd->driver && hapd->driver->set_operstate)
 -		hapd->driver->set_operstate(hapd->drv_priv, 1);
-+	if (start_beacon)
-+		return hostapd_start_beacon(hapd);
++	if (start_beacon && hostapd_start_beacon(hapd) < 0)
++		return -1;
  
  	hostapd_ubus_add_bss(hapd);
  
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
index b03656e..b03b120 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
@@ -45,7 +45,7 @@
  	size_t len = sizeof(buf);
  	enum hostapd_hw_mode hw_mode;
 -	u8 channel;
-+	u8 channel, center_segment0, center_segment1, op_class;
++	u8 channel, center_segment0, center_segment1 = 0, op_class;
  	int sec_chan = 0;
  	int ret;
 +	struct wpa_channel_info ci;
diff --git a/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch b/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
new file mode 100644
index 0000000..778d74d
--- /dev/null
+++ b/recipes-wifi/wpa-supplicant/files/patches/mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch
@@ -0,0 +1,227 @@
+From 626077ef532dd21d8f19ef7c8b521348aedc74d7 Mon Sep 17 00:00:00 2001
+From: Amit Khatri <amit.khatri@mediatek.com>
+Date: Thu, 23 Mar 2023 14:26:46 +0800
+Subject: [PATCH] hostapd: mtk: Add support for masking EHT capabilities.
+
+If STA want to disable EHT mode connection.
+STA can set
+disable_eht=1 in netowrk bloack of AP configuration.
+e.g.
+wpa_cli -iapcli0 set_network 0 disable_eht=1
+
+It will make EHT capability on driver level.
+
+Signed-off-by: Amit Khatri <amit.khatri@mediatek.com>
+---
+ src/drivers/driver.h              |  8 ++++++++
+ src/drivers/driver_nl80211.c      |  9 +++++++++
+ src/drivers/nl80211_copy.h        |  2 ++
+ wpa_supplicant/Makefile           |  4 ++++
+ wpa_supplicant/config.c           |  3 +++
+ wpa_supplicant/config_file.c      |  3 +++
+ wpa_supplicant/config_ssid.h      | 11 +++++++++++
+ wpa_supplicant/sme.c              |  4 ++++
+ wpa_supplicant/wpa_cli.c          |  3 +++
+ wpa_supplicant/wpa_supplicant.c   | 15 +++++++++++++++
+ wpa_supplicant/wpa_supplicant_i.h |  6 ++++++
+ 11 files changed, 68 insertions(+)
+
+diff --git a/src/drivers/driver.h b/src/drivers/driver.h
+index 7f6392f..1bf0cd6 100644
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -1151,6 +1151,14 @@ struct wpa_driver_associate_params {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT for this connection
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * req_key_mgmt_offload - Request key management offload for connection
+ 	 *
+diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
+index f9a8763..945ce3e 100644
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -6058,6 +6058,15 @@ static int nl80211_ht_vht_overrides(struct nl_msg *msg,
+ 	}
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++		if (params->disable_eht) {
++			wpa_printf(MSG_DEBUG, "  * EHT disabled");
++			if (nla_put_flag(msg, NL80211_ATTR_DISABLE_EHT))
++				return -1;
++		}
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	return 0;
+ }
+ 
+diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
+index 0937752..ce8ee58 100644
+--- a/src/drivers/nl80211_copy.h
++++ b/src/drivers/nl80211_copy.h
+@@ -3175,6 +3175,8 @@ enum nl80211_attrs {
+ 
+ 	NL80211_ATTR_EHT_CAPABILITY,
+ 
++	NL80211_ATTR_DISABLE_EHT,
++
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+ 	__NL80211_ATTR_AFTER_LAST,
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index ef36b56..40cdb59 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -208,6 +208,10 @@ ifdef CONFIG_HE_OVERRIDES
+ CFLAGS += -DCONFIG_HE_OVERRIDES
+ endif
+ 
++ifdef CONFIG_EHT_OVERRIDES
++CFLAGS += -DCONFIG_EHT_OVERRIDES
++endif
++
+ ifndef CONFIG_BACKEND
+ CONFIG_BACKEND=file
+ endif
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index f9880ed..994ee5e 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -2718,6 +2718,9 @@ static const struct parse_data ssid_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	{ INT_RANGE(disable_he, 0, 1)},
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	{ INT_RANGE(disable_eht, 0, 1)},
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	{ INT(ap_max_inactivity) },
+ 	{ INT(dtim_period) },
+ 	{ INT(beacon_int) },
+diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
+index 24c2998..056b265 100644
+--- a/wpa_supplicant/config_file.c
++++ b/wpa_supplicant/config_file.c
+@@ -881,6 +881,9 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	INT(disable_he);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	INT(disable_eht);
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ #undef STR
+ #undef INT
+diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
+index 9a389cc..cc9aa8e 100644
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -810,6 +810,17 @@ struct wpa_ssid {
+ 	int disable_he;
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++	/**
++	 * disable_eht - Disable EHT (IEEE 802.11be) for this network
++	 *
++	 * By default, use it if it is available, but this can be configured
++	 * to 1 to have it disabled.
++	 */
++	int disable_eht;
++#endif /* CONFIG_EHT_OVERRIDES */
++
++
+ 	/**
+ 	 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
+ 	 *
+diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
+index 2dad36d..e7aadf6 100644
+--- a/wpa_supplicant/sme.c
++++ b/wpa_supplicant/sme.c
+@@ -2001,6 +2001,10 @@ mscs_fail:
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ #ifdef CONFIG_IEEE80211R
+ 	if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies &&
+ 	    get_ie(wpa_s->sme.ft_ies, wpa_s->sme.ft_ies_len,
+diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
+index 8443f54..ea251db 100644
+--- a/wpa_supplicant/wpa_cli.c
++++ b/wpa_supplicant/wpa_cli.c
+@@ -1476,6 +1476,9 @@ static const char *network_fields[] = {
+ #ifdef CONFIG_HE_OVERRIDES
+ 	"disable_he",
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	"disable_eht",
++#endif /* CONFIG_EHT_OVERRIDES */
+ 	"ap_max_inactivity", "dtim_period", "beacon_int",
+ #ifdef CONFIG_MACSEC
+ 	"macsec_policy",
+diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
+index ba34fd4..efc7594 100644
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -4082,6 +4082,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
+ #ifdef CONFIG_HE_OVERRIDES
+ 	wpa_supplicant_apply_he_overrides(wpa_s, ssid, &params);
+ #endif /* CONFIG_HE_OVERRIDES */
++#ifdef CONFIG_EHT_OVERRIDES
++	wpa_supplicant_apply_eht_overrides(wpa_s, ssid, &params);
++#endif /* CONFIG_EHT_OVERRIDES */
++
+ 
+ #ifdef CONFIG_P2P
+ 	/*
+@@ -5877,6 +5881,17 @@ void wpa_supplicant_apply_he_overrides(
+ }
+ #endif /* CONFIG_HE_OVERRIDES */
+ 
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params)
++{
++	if (!ssid)
++		return;
++
++	params->disable_eht = ssid->disable_eht;
++}
++#endif /* CONFIG_EHT_OVERRIDES */
+ 
+ static int pcsc_reader_init(struct wpa_supplicant *wpa_s)
+ {
+diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
+index 3285af3..76607c5 100644
+--- a/wpa_supplicant/wpa_supplicant_i.h
++++ b/wpa_supplicant/wpa_supplicant_i.h
+@@ -1576,6 +1576,12 @@ void wpa_supplicant_apply_vht_overrides(
+ void wpa_supplicant_apply_he_overrides(
+ 	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
+ 	struct wpa_driver_associate_params *params);
++#ifdef CONFIG_EHT_OVERRIDES
++void wpa_supplicant_apply_eht_overrides(
++	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
++	struct wpa_driver_associate_params *params);
++#endif CONFIG_EHT_OVERRIDES
++
+ 
+ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
+ int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
+-- 
+2.18.0
+
diff --git a/recipes-wifi/wpa-supplicant/files/patches/patches.inc b/recipes-wifi/wpa-supplicant/files/patches/patches.inc
index e1aacd5..10443d9 100644
--- a/recipes-wifi/wpa-supplicant/files/patches/patches.inc
+++ b/recipes-wifi/wpa-supplicant/files/patches/patches.inc
@@ -85,5 +85,6 @@
     file://mtk-0021-hostapd-mtk-add-11v_mbss-and-ema-support-for-hostapd.patch \
     file://mtk-0022-hostapd-mtk-Add-available-color-bitmap.patch \
     file://mtk-0023-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch \
+    file://mtk-0024-hostapd-mtk-Add-support-for-masking-EHT-capabilities.patch \
     file://mtk-0024-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch \
     "