[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
16b7683 [mac80211][mt76][Fix wtbl CR and fix memory leak]
787e2c4 [MAC80211][core][remove duplicated patches]
f2532a8 [MAC80211][core][refine backports patches]
4827f0a [MAC80211][wed][fix fe reset hang issue]
472b001 [MAC80211][hostapd][refine hostapd patches]
[Release-log]
Change-Id: I1c2669521173b1977eed191945f505792fb6cca6
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99900-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
similarity index 96%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
index f790577..fb7c63f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99900-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,8 +1,8 @@
-From 4791a374c9861b0d90db7fbdefe509f4e7d12247 Mon Sep 17 00:00:00 2001
+From cd52509a69c3ba34d9b4146664140fd1ff712aa9 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 99900/99910] hostapd: mtk: Add neighbor report and BSS
- Termination for MBO certification
+Subject: [PATCH 01/15] hostapd: mtk: Add neighbor report and BSS Termination
+ for MBO certification
1. Add hostapd_neighbor_count() and hostapd_neighbor_insert_buffer ()
The first function can count the number of neighbor report in neighbore report
@@ -32,7 +32,7 @@
9 files changed, 252 insertions(+), 5 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index a258492..c2a2822 100644
+index a2584920c..c2a282227 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1338,6 +1338,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
@@ -48,7 +48,7 @@
ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value);
if (ret)
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index d7a0c7c..4a20eb4 100644
+index d7a0c7c80..4a20eb4e1 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -170,6 +170,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
@@ -60,10 +60,10 @@
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index ed3bec7..3f68e76 100644
+index 39b26d602..a87563265 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -557,6 +557,7 @@ struct hostapd_bss_config {
+@@ -558,6 +558,7 @@ struct hostapd_bss_config {
int wnm_sleep_mode;
int wnm_sleep_mode_no_keys;
int bss_transition;
@@ -72,7 +72,7 @@
/* IEEE 802.11u - Interworking */
int interworking;
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 96209ce..18bae5c 100644
+index 96209ce7e..18bae5c8b 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -1203,6 +1203,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
@@ -115,7 +115,7 @@
if (pos) {
unsigned int mbo_reason, cell_pref, reassoc_delay;
diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c
-index 90f1577..5845ff8 100644
+index 90f15778b..5845ff857 100644
--- a/src/ap/gas_serv.c
+++ b/src/ap/gas_serv.c
@@ -19,6 +19,7 @@
@@ -183,7 +183,7 @@
#ifdef CONFIG_FILS
if (info_id == ANQP_FILS_REALM_INFO &&
diff --git a/src/ap/gas_serv.h b/src/ap/gas_serv.h
-index 1528af4..d0241f2 100644
+index 1528af4af..d0241f23c 100644
--- a/src/ap/gas_serv.h
+++ b/src/ap/gas_serv.h
@@ -40,6 +40,8 @@
@@ -196,7 +196,7 @@
* First 15 Hotspot 2.0 vendor specific ANQP-elements can be included in the
* optimized bitmap.
diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
-index 52f25eb..9254d09 100644
+index 52f25eb7a..9254d09fd 100644
--- a/src/ap/neighbor_db.c
+++ b/src/ap/neighbor_db.c
@@ -89,6 +89,38 @@ int hostapd_neighbor_show(struct hostapd_data *hapd, char *buf, size_t buflen)
@@ -330,7 +330,7 @@
+}
+#endif
diff --git a/src/ap/neighbor_db.h b/src/ap/neighbor_db.h
-index 992671b..a1ddc07 100644
+index 992671b62..a1ddc075b 100644
--- a/src/ap/neighbor_db.h
+++ b/src/ap/neighbor_db.h
@@ -24,4 +24,13 @@ int hostapd_neighbor_remove(struct hostapd_data *hapd, const u8 *bssid,
@@ -348,7 +348,7 @@
+#endif
#endif /* NEIGHBOR_DB_H */
diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
-index 3ea92af..4349e1d 100644
+index 3ea92af2d..4349e1df2 100644
--- a/src/ap/wnm_ap.c
+++ b/src/ap/wnm_ap.c
@@ -20,6 +20,7 @@
@@ -471,5 +471,5 @@
return 0;
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99901-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
similarity index 83%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
index 3c5137d..3f20768 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99901-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,14 +1,14 @@
-From 6d95c027c13fba5404fa8d096d55b4a072b2ec59 Mon Sep 17 00:00:00 2001
+From 2a08e4acbe0ff6f6af42df8262178cf153c8868d 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 99901/99910] hostapd: mtk: print sae groups by hostapd ctrl
+Subject: [PATCH 02/15] hostapd: mtk: print sae groups by hostapd ctrl
---
hostapd/ctrl_iface.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c2a2822..bc690c5 100644
+index c2a282227..bc690c526 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1412,6 +1412,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd,
@@ -32,5 +32,5 @@
return -1;
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
similarity index 95%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
index 885c6c9..18d5970 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.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 7a84545afb1f5bc2784eb5a046d56d869fb52067 Mon Sep 17 00:00:00 2001
+From b2253861a02b5ae8074f36e0a417e05a207891b9 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 99902/99910] hostapd: mtk: add support for runtime set in-band
+Subject: [PATCH 03/15] hostapd: mtk: add support for runtime set in-band
discovery
Usage:
@@ -21,7 +21,7 @@
5 files changed, 98 insertions(+), 4 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index bc690c5..bb8c74f 100644
+index bc690c526..bb8c74fd3 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -826,6 +826,69 @@ static int hostapd_ctrl_iface_send_qos_map_conf(struct hostapd_data *hapd,
@@ -105,7 +105,7 @@
reply_len = hostapd_ctrl_iface_get_config(hapd, reply,
reply_size);
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 85c41d0..db21258 100644
+index 85c41d0c3..db2125805 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -642,6 +642,24 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
@@ -143,7 +143,7 @@
};
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 814e86e..1a26f11 100644
+index 814e86efe..1a26f11ff 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1497,6 +1497,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
@@ -166,7 +166,7 @@
¶ms->fd_frame_tmpl_len);
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 53f2503..5eba0ea 100644
+index 1fa7dd8e0..c695263bf 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4498,9 +4498,10 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg,
@@ -195,7 +195,7 @@
#endif /* CONFIG_FILS */
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index 0568a79..c4bf3ad 100644
+index 0568a7909..c4bf3ad35 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -7379,6 +7379,7 @@ enum nl80211_fils_discovery_attributes {
@@ -207,5 +207,5 @@
/* keep last */
__NL80211_FILS_DISCOVERY_ATTR_LAST,
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99903-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
similarity index 97%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99903-hostapd-mtk-Add-mtk_vendor.h.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
index d108ca3..5b1a853 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99903-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 8694400211d08019e4c495fc98ca3e3783465044 Mon Sep 17 00:00:00 2001
+From 514ffcc16d420fade1b28478cd785e7709878bc7 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 99903/99910] hostapd: mtk: Add mtk_vendor.h
+Subject: [PATCH 04/15] hostapd: mtk: Add mtk_vendor.h
---
src/common/mtk_vendor.h | 195 ++++++++++++++++++++++++++++++++++++++++
@@ -10,7 +10,7 @@
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
new file mode 100644
-index 0000000..528387f
+index 000000000..528387fa5
--- /dev/null
+++ b/src/common/mtk_vendor.h
@@ -0,0 +1,195 @@
@@ -210,5 +210,5 @@
+};
+#endif /* MTK_VENDOR_H */
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99904-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
similarity index 96%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index e9bb053..317a678 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99904-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 d3d5b514064036fb17729743fa13e25646f468e9 Mon Sep 17 00:00:00 2001
+From f3df970bcf111eb0912f639ac32c0c145e381f95 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 99904/99910] hostapd: mtk: Support EDCCA hostapd configuration
+Subject: [PATCH 05/15] hostapd: mtk: Support EDCCA hostapd configuration
edcca_enable and edcca_compensation and implement edcca related handlers.
---
@@ -20,10 +20,10 @@
12 files changed, 415 insertions(+), 7 deletions(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index eda9db0..0ee8952 100644
+index 24018f721..b5024ccd5 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4753,6 +4753,38 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4755,6 +4755,38 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "eht_mu_beamformer") == 0) {
conf->eht_phy_capab.mu_beamformer = atoi(pos);
#endif /* CONFIG_IEEE80211BE */
@@ -63,7 +63,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index bb8c74f..9c70d54 100644
+index bb8c74fd3..9c70d5419 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -598,6 +598,19 @@ static const char * pbc_status_str(enum pbc_status status)
@@ -213,7 +213,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 4a20eb4..344585a 100644
+index 4a20eb4e1..344585aee 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -294,6 +294,9 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -235,10 +235,10 @@
wpabuf_free(conf->civic);
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 3f68e76..775c567 100644
+index a87563265..4ac469910 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1153,8 +1153,37 @@ struct hostapd_config {
+@@ -1154,8 +1154,37 @@ struct hostapd_config {
#define CH_SWITCH_EHT_ENABLED BIT(0)
#define CH_SWITCH_EHT_DISABLED BIT(1)
unsigned int ch_switch_eht_config;
@@ -277,7 +277,7 @@
static inline enum oper_chan_width
hostapd_get_oper_chwidth(struct hostapd_config *conf)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 0c7aee2..25e967d 100644
+index 0c7aee276..25e967d1b 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1015,3 +1015,27 @@ int hostapd_drv_dpp_listen(struct hostapd_data *hapd, bool enable)
@@ -309,7 +309,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 b4fb766..70a99f4 100644
+index b4fb766ee..70a99f406 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -138,7 +138,10 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd);
@@ -325,10 +325,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 0dd8c13..d05f948 100644
+index 65487ac28..3bb38fec3 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2295,6 +2295,13 @@ dfs_offload:
+@@ -2296,6 +2296,13 @@ dfs_offload:
}
#endif /* CONFIG_MESH */
@@ -343,7 +343,7 @@
iface->bss[0]->conf->iface);
if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 528387f..7056126 100644
+index 528387fa5..70561263c 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -29,14 +29,21 @@ enum mtk_vendor_attr_edcca_ctrl {
@@ -375,7 +375,7 @@
[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 1d2b1b2..3559974 100644
+index 1d2b1b265..35599741c 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4676,6 +4676,10 @@ struct wpa_driver_ops {
@@ -390,7 +390,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 5eba0ea..9c2782c 100644
+index c695263bf..6d4a4dbbe 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -35,6 +35,8 @@
@@ -578,7 +578,7 @@
+ .get_edcca = nl80211_get_edcca,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 6e40d55..13e5d24 100644
+index 6e40d5556..13e5d248c 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -181,6 +181,7 @@ struct wpa_driver_nl80211_data {
@@ -590,7 +590,7 @@
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 7ede0d0..732ae29 100644
+index 7ede0d030..732ae292d 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -18,6 +18,7 @@
@@ -615,5 +615,5 @@
wpa_printf(MSG_DEBUG, "nl80211: Supported vendor command: vendor_id=0x%x subcmd=%u",
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
similarity index 94%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
index 1a622f3..27e71da 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
@@ -1,7 +1,7 @@
-From 893c5f92257a7313a179dc728ba51a74efbfc74a Mon Sep 17 00:00:00 2001
+From 4919444a2dc29c019ec92321109603763c732071 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Tue, 9 Aug 2022 10:23:44 -0700
-Subject: [PATCH 99905/99910] hostapd: mtk: Add hostapd HEMU SET/GET control
+Subject: [PATCH 06/15] hostapd: mtk: Add hostapd HEMU SET/GET control
---
hostapd/config_file.c | 9 +++
@@ -20,10 +20,10 @@
13 files changed, 251 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 0ee8952..b22d10b 100644
+index b5024ccd5..cd27d0890 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -3659,6 +3659,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -3661,6 +3661,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
bss->unsol_bcast_probe_resp_interval = val;
@@ -40,7 +40,7 @@
} else if (os_strcmp(buf, "max_listen_interval") == 0) {
bss->max_listen_interval = atoi(pos);
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 9c70d54..5f71aee 100644
+index 9c70d5419..5f71aeea9 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3441,6 +3441,63 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
@@ -120,7 +120,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index db21258..0d36477 100644
+index db2125805..0d364773b 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1380,6 +1380,20 @@ static int hostapd_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
@@ -156,7 +156,7 @@
{ "dpp_qr_code", hostapd_cli_cmd_dpp_qr_code, NULL,
"report a scanned DPP URI from a QR Code" },
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 344585a..0e1f192 100644
+index 344585aee..0e1f192cf 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -280,6 +280,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -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 775c567..41b8c68 100644
+index 4ac469910..0616c30bb 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1114,6 +1114,7 @@ struct hostapd_config {
+@@ -1115,6 +1115,7 @@ struct hostapd_config {
u8 he_6ghz_rx_ant_pat;
u8 he_6ghz_tx_ant_pat;
u8 he_6ghz_reg_pwr_type;
@@ -180,7 +180,7 @@
/* VHT enable/disable config from CHAN_SWITCH */
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 25e967d..4598737 100644
+index 25e967d1b..4598737a3 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1039,3 +1039,17 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
@@ -202,7 +202,7 @@
+ return hapd->driver->hemu_dump(hapd->drv_priv, hemu_onoff);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 70a99f4..bca39c5 100644
+index 70a99f406..bca39c502 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -142,6 +142,8 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -215,10 +215,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index d05f948..921769d 100644
+index 3bb38fec3..44a378aa9 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2301,6 +2301,8 @@ dfs_offload:
+@@ -2302,6 +2302,8 @@ dfs_offload:
if (hostapd_drv_configure_edcca_threshold(hapd,
hapd->iconf->edcca_threshold) < 0)
goto fail;
@@ -228,7 +228,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 7056126..69a46df 100644
+index 70561263c..69a46dfbb 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -10,6 +10,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -261,7 +261,7 @@
#define ETH_ALEN 6
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 3559974..4cd7505 100644
+index 35599741c..4cd7505db 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1623,6 +1623,11 @@ struct wpa_driver_ap_params {
@@ -292,7 +292,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 9c2782c..73dee2e 100644
+index 6d4a4dbbe..f8b3f40c2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12304,6 +12304,114 @@ fail:
@@ -420,7 +420,7 @@
.dpp_listen = nl80211_dpp_listen,
#endif /* CONFIG_DPP */
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 13e5d24..57f0249 100644
+index 13e5d248c..57f02497e 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -182,6 +182,7 @@ struct wpa_driver_nl80211_data {
@@ -432,7 +432,7 @@
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 732ae29..cc146d9 100644
+index 732ae292d..cc146d9fc 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1056,6 +1056,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -446,5 +446,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
similarity index 91%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
index 594e476..4bc3fcd 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
@@ -1,8 +1,8 @@
-From c91612769eba54821da1136d5959a40438c02824 Mon Sep 17 00:00:00 2001
+From 00a1908f92e31d6d85edc877c98387a9fdb737af 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 99906/99910] hostapd: mtk: Add three wire PTA ctrl hostapd
- vendor command
+Subject: [PATCH 07/15] 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 b22d10b..18b372a 100644
+index cd27d0890..df9c1e7a7 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4794,6 +4794,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4796,6 +4796,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
conf->edcca_compensation = (s8) val;
@@ -35,7 +35,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 0e1f192..9249a6b 100644
+index 0e1f192cf..9249a6bb8 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -297,6 +297,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -47,10 +47,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 41b8c68..71cf515 100644
+index 0616c30bb..0c370e75b 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1157,6 +1157,19 @@ struct hostapd_config {
+@@ -1158,6 +1158,19 @@ struct hostapd_config {
u8 edcca_enable;
s8 edcca_compensation;
int *edcca_threshold;
@@ -71,7 +71,7 @@
enum edcca_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 4598737..a1d83e4 100644
+index 4598737a3..a1d83e4ee 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1053,3 +1053,14 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff)
@@ -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 bca39c5..5ba6297 100644
+index bca39c502..5ba62978c 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -144,6 +144,7 @@ int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
@@ -102,10 +102,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 921769d..f9dabdf 100644
+index 44a378aa9..c972b15ea 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2303,6 +2303,8 @@ dfs_offload:
+@@ -2304,6 +2304,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_hemu_ctrl(hapd) < 0)
goto fail;
@@ -115,7 +115,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 69a46df..ee5a4f4 100644
+index 69a46dfbb..ee5a4f436 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,6 +13,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -149,7 +149,7 @@
MTK_VENDOR_ATTR_CSI_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 4cd7505..9ca19af 100644
+index 4cd7505db..9ca19af81 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4693,6 +4693,14 @@ struct wpa_driver_ops {
@@ -168,7 +168,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 73dee2e..2bb8cc2 100644
+index f8b3f40c2..92882cb73 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12637,6 +12637,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
@@ -217,7 +217,7 @@
+ .three_wire_ctrl = nl80211_enable_three_wire,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 57f0249..9fe7811 100644
+index 57f02497e..9fe7811b9 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -183,6 +183,7 @@ struct wpa_driver_nl80211_data {
@@ -229,7 +229,7 @@
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 cc146d9..04bc54e 100644
+index cc146d9fc..04bc54e77 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1059,6 +1059,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -243,5 +243,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99907-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
similarity index 93%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
index c37cb40..6bfe3d0 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99907-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 4971762bfaba906054d43bd2d042c436a1ac97b2 Mon Sep 17 00:00:00 2001
+From 508e76ba51d47394a1b01ba7b9f3c1f25db0aa39 Mon Sep 17 00:00:00 2001
From: mtk27835 <shurong.wen@mediatek.com>
Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 99907/99910] hostapd: mtk: Add hostapd iBF control
+Subject: [PATCH 08/15] 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 18b372a..d9d882c 100644
+index df9c1e7a7..63c9d40be 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4798,6 +4798,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4800,6 +4800,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
u8 en = atoi(pos);
conf->three_wire_enable = en;
@@ -35,7 +35,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 5f71aee..c881d37 100644
+index 5f71aeea9..c881d3717 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3498,6 +3498,30 @@ hostapd_ctrl_iface_get_hemu(struct hostapd_data *hapd, char *buf,
@@ -79,7 +79,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 0d36477..c2a123a 100644
+index 0d364773b..c2a123a8c 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1586,6 +1586,13 @@ static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
@@ -106,7 +106,7 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 9249a6b..7a96cb8 100644
+index 9249a6bb8..7a96cb8b2 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -298,6 +298,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -118,10 +118,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 71cf515..44a0e7e 100644
+index 0c370e75b..a9e3d2aeb 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1158,6 +1158,7 @@ struct hostapd_config {
+@@ -1159,6 +1159,7 @@ struct hostapd_config {
s8 edcca_compensation;
int *edcca_threshold;
u8 three_wire_enable;
@@ -129,7 +129,7 @@
};
enum three_wire_mode {
-@@ -1198,6 +1199,7 @@ enum mtk_vendor_attr_edcca_ctrl_mode {
+@@ -1199,6 +1200,7 @@ enum mtk_vendor_attr_edcca_ctrl_mode {
#define EDCCA_MIN_CONFIG_THRES -126
#define EDCCA_MAX_CONFIG_THRES 0
@@ -138,7 +138,7 @@
static inline enum oper_chan_width
hostapd_get_oper_chwidth(struct hostapd_config *conf)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index a1d83e4..60ae825 100644
+index a1d83e4ee..60ae8253b 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1064,3 +1064,17 @@ int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd)
@@ -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 5ba6297..ab9aedc 100644
+index 5ba62978c..ab9aedcee 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -145,6 +145,8 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
@@ -174,10 +174,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index f9dabdf..e44b73d 100644
+index c972b15ea..da7f7d87b 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2305,6 +2305,8 @@ dfs_offload:
+@@ -2306,6 +2306,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_three_wire_ctrl(hapd) < 0)
goto fail;
@@ -187,7 +187,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index ee5a4f4..4050cf8 100644
+index ee5a4f436..4050cf886 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,7 +13,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -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 9ca19af..71ded61 100644
+index 9ca19af81..71ded617f 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1628,6 +1628,11 @@ struct wpa_driver_ap_params {
@@ -277,7 +277,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 2bb8cc2..e974f85 100644
+index 92882cb73..5c2a291ca 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12670,6 +12670,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
@@ -401,7 +401,7 @@
+ .ibf_dump = nl80211_ibf_dump,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 9fe7811..607592c 100644
+index 9fe7811b9..607592ceb 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -184,6 +184,7 @@ struct wpa_driver_nl80211_data {
@@ -413,7 +413,7 @@
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 04bc54e..9ecc0ff 100644
+index 04bc54e77..9ecc0ff9a 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1062,6 +1062,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -427,5 +427,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
similarity index 77%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
index 47628d7..daf82b0 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
@@ -1,15 +1,15 @@
-From f96a62568fb3c419e71f8d7469d485dce55f4da6 Mon Sep 17 00:00:00 2001
+From 1d4ef2662fb22f96c6db3730f35879d1be55db3d 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 99908/99910] hostapd: mtk: Do not include HE capab IE if
- associated sta's HE capab IE is invalid
+Subject: [PATCH 09/15] hostapd: mtk: Do not include HE capab IE if associated
+ sta's HE capab IE is invalid
---
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
-index d921783..098793e 100644
+index d92178379..098793ef3 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -5192,7 +5192,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
@@ -23,5 +23,5 @@
p = hostapd_eid_he_operation(hapd, p);
p = hostapd_eid_cca(hapd, p);
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
similarity index 94%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
index c1fc3f1..8a387a7 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
@@ -1,7 +1,7 @@
-From 782f38f2eec27e438e55cb09e824a6ffc1c3eb18 Mon Sep 17 00:00:00 2001
+From 4e7c861c971ca49ea162bd908fef6021a62b9018 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Fri, 7 Oct 2022 10:46:29 +0800
-Subject: [PATCH 99909/99910] hostapd: mtk: Add DFS and ZWDFS support
+Subject: [PATCH 10/15] hostapd: mtk: Add DFS and ZWDFS support
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -17,10 +17,10 @@
9 files changed, 186 insertions(+), 17 deletions(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index d9d882c..fd61448 100644
+index 63c9d40be..cd1534952 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4801,6 +4801,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4803,6 +4803,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;
@@ -32,7 +32,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c881d37..6ea1573 100644
+index c881d3717..6ea1573b8 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3522,6 +3522,96 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
@@ -145,10 +145,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 44a0e7e..3f5afdf 100644
+index a9e3d2aeb..77f6169d2 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1159,6 +1159,7 @@ struct hostapd_config {
+@@ -1160,6 +1160,7 @@ struct hostapd_config {
int *edcca_threshold;
u8 three_wire_enable;
u8 ibf_enable;
@@ -156,7 +156,7 @@
};
enum three_wire_mode {
-@@ -1173,6 +1174,18 @@ enum three_wire_mode {
+@@ -1174,6 +1175,18 @@ enum three_wire_mode {
NUM_THREE_WIRE_MODE - 1
};
@@ -176,7 +176,7 @@
EDCCA_MODE_FORCE_DISABLE = 0,
EDCCA_MODE_AUTO = 1,
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index b5d105d..1c3f678 100644
+index b5d105d6a..1c3f6785b 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -19,13 +19,6 @@
@@ -250,7 +250,7 @@
if (hostapd_csa_in_progress(iface))
return 0;
diff --git a/src/ap/dfs.h b/src/ap/dfs.h
-index 606c1b3..c2556d2 100644
+index 606c1b393..c2556d2d9 100644
--- a/src/ap/dfs.h
+++ b/src/ap/dfs.h
@@ -9,6 +9,12 @@
@@ -282,10 +282,10 @@
#endif /* DFS_H */
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index e44b73d..793ce2f 100644
+index da7f7d87b..a0229c9ca 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -1463,7 +1463,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
+@@ -1464,7 +1464,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
return -1;
}
@@ -297,7 +297,7 @@
if (flush_old_stations && !conf->start_disabled &&
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 71ded61..aa23fbd 100644
+index 71ded617f..aa23fbdb3 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4720,6 +4720,13 @@ struct wpa_driver_ops {
@@ -315,7 +315,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index e974f85..003adc4 100644
+index 5c2a291ca..7472542cc 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12776,6 +12776,34 @@ fail:
@@ -360,7 +360,7 @@
+ .start_disabled = nl80211_start_disabled,
};
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index c4bf3ad..79bc76c 100644
+index c4bf3ad35..79bc76c57 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -3176,6 +3176,7 @@ enum nl80211_attrs {
@@ -372,5 +372,5 @@
__NL80211_ATTR_AFTER_LAST,
NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
similarity index 93%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
index c05a444..ed796c1 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
@@ -1,7 +1,7 @@
-From 6cf5ec59e09945a075909b8070d9795869db081e Mon Sep 17 00:00:00 2001
+From bc0722ebc1cc08be6239879fddaef37e0db2d9e0 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 99910/99910] hostapd: mtk: Add amsdu set get ctrl
+Subject: [PATCH 11/15] 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 fd61448..759033b 100644
+index cd1534952..10ea52518 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4805,6 +4805,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4807,6 +4807,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
u8 en = strtol(pos, NULL, 10);
conf->dfs_detect_mode = en;
@@ -40,7 +40,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 6ea1573..0ad8451 100644
+index 6ea1573b8..0ad8451aa 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3612,6 +3612,30 @@ hostapd_ctrl_iface_set_offchan_ctrl(struct hostapd_data *hapd, char *cmd,
@@ -84,7 +84,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index c2a123a..30b3392 100644
+index c2a123a8c..30b3392e6 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1593,6 +1593,13 @@ static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
@@ -111,7 +111,7 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 7a96cb8..85ad5e4 100644
+index 7a96cb8b2..85ad5e444 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -299,6 +299,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -123,10 +123,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 3f5afdf..92f1bd6 100644
+index 77f6169d2..a9ac39619 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1160,6 +1160,7 @@ struct hostapd_config {
+@@ -1161,6 +1161,7 @@ struct hostapd_config {
u8 three_wire_enable;
u8 ibf_enable;
u8 dfs_detect_mode;
@@ -135,7 +135,7 @@
enum three_wire_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 60ae825..1a82f23 100644
+index 60ae8253b..1a82f234c 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1077,4 +1077,18 @@ int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
@@ -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 ab9aedc..4406666 100644
+index ab9aedcee..4406666fd 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -147,6 +147,8 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff);
@@ -172,10 +172,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 793ce2f..aef01f2 100644
+index a0229c9ca..152060db4 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2309,6 +2309,8 @@ dfs_offload:
+@@ -2310,6 +2310,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_ibf_ctrl(hapd) < 0)
goto fail;
@@ -185,7 +185,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 4050cf8..0999ea9 100644
+index 4050cf886..0999ea9e2 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -167,7 +167,6 @@ enum mtk_vendor_attr_wireless_ctrl {
@@ -220,7 +220,7 @@
MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index aa23fbd..b07aaf3 100644
+index aa23fbdb3..b07aaf3fe 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4727,6 +4727,15 @@ struct wpa_driver_ops {
@@ -240,7 +240,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 003adc4..5c04284 100644
+index 7472542cc..6702384ef 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12804,6 +12804,118 @@ fail:
@@ -370,7 +370,7 @@
+ .amsdu_dump = nl80211_dump_amsdu,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 607592c..e570224 100644
+index 607592ceb..e57022409 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -185,6 +185,7 @@ struct wpa_driver_nl80211_data {
@@ -382,7 +382,7 @@
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 9ecc0ff..fcfa68b 100644
+index 9ecc0ff9a..fcfa68bf7 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1065,6 +1065,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -396,5 +396,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99911-hostapd-mtk-Add-he_ldpc-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch
similarity index 90%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99911-hostapd-mtk-Add-he_ldpc-configuration.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch
index 2e8dfe0..63101e0 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99911-hostapd-mtk-Add-he_ldpc-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch
@@ -1,7 +1,7 @@
-From 216258435a119d48c233b63c2383850bc5f86e94 Mon Sep 17 00:00:00 2001
+From b49ce922afa13fe8ea5d847753dfb7641b70c9a4 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] hostapd: mtk: Add he_ldpc configuration
+Subject: [PATCH 12/15] 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 10ea525..4237a5c 100644
+index 10ea52518..4237a5cca 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3508,6 +3508,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 ea67aa1..e3a5eb3 100644
+index ea67aa100..e3a5eb365 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -830,6 +830,11 @@ wmm_ac_vo_acm=0
@@ -42,7 +42,7 @@
#he_bss_color=1
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 85ad5e4..b283de6 100644
+index 85ad5e444..b283de624 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -268,6 +268,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -54,7 +54,7 @@
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 a9ac396..b8b20a7 100644
+index a9ac39619..b8b20a7aa 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -929,6 +929,7 @@ struct hostapd_bss_config {
@@ -66,7 +66,7 @@
bool he_su_beamformee;
bool he_mu_beamformer;
diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
-index b5b7e5d..f27aeb1 100644
+index b5b7e5d46..f27aeb196 100644
--- a/src/ap/ieee802_11_he.c
+++ b/src/ap/ieee802_11_he.c
@@ -138,6 +138,13 @@ u8 * hostapd_eid_he_capab(struct hostapd_data *hapd, u8 *eid,
@@ -84,7 +84,7 @@
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 65e125e..62088bd 100644
+index 65e125e83..62088bda6 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2298,6 +2298,9 @@ struct ieee80211_spatial_reuse {
@@ -98,5 +98,5 @@
#define HE_PHYCAP_SU_BEAMFORMER_CAPAB ((u8) BIT(7))
#define HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX 4
--
-2.39.0
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
similarity index 86%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
index df9dcc5..1222510 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
@@ -1,8 +1,8 @@
-From 9c04bbbe2677cc11b88c867ab7b1df7e408483b5 Mon Sep 17 00:00:00 2001
+From 52a1775318c9926a1dbf4f7c563e95b5be3c9bd6 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Tue, 17 Jan 2023 13:25:18 +0800
-Subject: [PATCH] hostapd: mtk: Add the broadcast destination address of Probe
- Response frame on 6 GHz
+Subject: [PATCH 13/15] hostapd: mtk: Add the broadcast destination address of
+ Probe Response frame on 6 GHz
According to IEEE 802.11ax 26.17.2.3.2,
if a 6 GHz AP receives a Probe Request frame and responds with a Probe Response frame,
@@ -19,7 +19,7 @@
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 1a26f11..f3ea5c2 100644
+index 1a26f11ff..f3ea5c277 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1156,8 +1156,13 @@ void handle_probe_req(struct hostapd_data *hapd,
@@ -39,5 +39,5 @@
return;
--
-2.39.0
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99913-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
similarity index 78%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99913-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
index 9f79e08..3689f74 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99913-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 3ccac8701695b1dfd94202b0ecf1ca37439dc91d Mon Sep 17 00:00:00 2001
+From 7d741c99f2e211abe70593ff6e8265633bed0d8a 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] hostapd: mtk: Add vendor command attribute for RTS BW
+Subject: [PATCH 14/15] hostapd: mtk: Add vendor command attribute for RTS BW
signaling.
Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
@@ -10,7 +10,7 @@
1 file changed, 1 insertion(+)
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 0999ea9..fb12895 100644
+index 0999ea9e2..fb12895ce 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -169,6 +169,7 @@ enum mtk_vendor_attr_wireless_ctrl {
@@ -22,5 +22,5 @@
/* keep last */
NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL,
--
-2.18.0
+2.25.1
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
new file mode 100644
index 0000000..642c625
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
@@ -0,0 +1,24 @@
+From 619075bb430c908c61a818c45e36f1ca76020741 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/15] 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 1c3f6785b..4b1e64246 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1506,6 +1506,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 ||
++ is_6ghz_freq(iface->freq) ||
+ iface->current_mode->mode != HOSTAPD_MODE_IEEE80211A)
+ return 0;
+
+--
+2.25.1
+
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99920-hostapd-add-eht-oper.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0100-hostapd-mtk-update-eht-operation-elem.patch
similarity index 83%
rename from recipes-wifi/hostapd/files/patches-2.10.3/99920-hostapd-add-eht-oper.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-0100-hostapd-mtk-update-eht-operation-elem.patch
index 17363be..bc3bc1a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99920-hostapd-add-eht-oper.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0100-hostapd-mtk-update-eht-operation-elem.patch
@@ -1,7 +1,7 @@
-From 93b4d02dcb26ba9e655acb00ab2a6e28f9cb4d54 Mon Sep 17 00:00:00 2001
+From d91a63957aa7b4231d45c0a8ca33a34d53764ef2 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 30 Sep 2022 00:16:21 +0800
-Subject: [PATCH] hostapd add eht oper
+Subject: [PATCH] hostapd: mtk: update eht operation elem
---
src/ap/ieee802_11_eht.c | 5 +++--
@@ -9,7 +9,7 @@
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
-index ec36a9e..fc472b8 100644
+index ec36a9e7a..fc472b8e2 100644
--- a/src/ap/ieee802_11_eht.c
+++ b/src/ap/ieee802_11_eht.c
@@ -183,7 +183,7 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
@@ -35,10 +35,10 @@
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
-index 65e125e..d240b87 100644
+index 62088bda6..78e7bee58 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
-@@ -2432,6 +2432,7 @@ struct ieee80211_eht_oper_info {
+@@ -2435,6 +2435,7 @@ struct ieee80211_eht_oper_info {
/* Figure 9-1002a: EHT Operation element format */
struct ieee80211_eht_operation {
u8 oper_params; /* EHT Operation Parameters: EHT_OPER_* bits */
@@ -47,5 +47,5 @@
} STRUCT_PACKED;
--
-2.18.0
+2.25.1
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 1f1d02f..8cda113 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
@@ -62,19 +62,20 @@
file://800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch \
file://990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch \
file://992-openssl-include-rsa.patch \
- file://99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch \
- file://99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch \
- file://99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch \
- file://99903-hostapd-mtk-Add-mtk_vendor.h.patch \
- file://99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch \
- file://99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch \
- file://99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch \
- file://99907-hostapd-mtk-Add-hostapd-iBF-control.patch \
- file://99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch \
- file://99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch \
- file://99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch \
- file://99911-hostapd-mtk-Add-he_ldpc-configuration.patch \
- file://99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
- file://99913-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
- file://99920-hostapd-add-eht-oper.patch \
+ file://mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch \
+ file://mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch \
+ file://mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch \
+ file://mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch \
+ file://mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch \
+ file://mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch \
+ file://mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch \
+ file://mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch \
+ file://mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch \
+ file://mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch \
+ file://mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch \
+ file://mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch \
+ file://mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
+ file://mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
+ file://mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch \
+ file://mtk-0100-hostapd-mtk-update-eht-operation-elem.patch \
"
diff --git a/recipes-wifi/hostapd/files/patches/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch b/recipes-wifi/hostapd/files/patches/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
deleted file mode 100644
index 3c5137d..0000000
--- a/recipes-wifi/hostapd/files/patches/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 6d95c027c13fba5404fa8d096d55b4a072b2ec59 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 99901/99910] hostapd: mtk: print sae groups by hostapd ctrl
-
----
- hostapd/ctrl_iface.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c2a2822..bc690c5 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -1412,6 +1412,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd,
- if (os_snprintf_error(buflen, res))
- return -1;
- return res;
-+ } else if (os_strcmp(cmd, "sae_group_capability") == 0) {
-+#ifdef CONFIG_SAE
-+ /* see sae_set_group() */
-+ res = os_snprintf(buf, buflen, "%s%s%s%s19 20 21",
-+ dh_groups_get(15) ? "15 ": "",
-+ dh_groups_get(16) ? "16 ": "",
-+ dh_groups_get(17) ? "17 ": "",
-+ dh_groups_get(18) ? "18 ": "");
-+
-+ if (os_snprintf_error(buflen, res))
-+ return -1;
-+ return res;
-+#endif /* CONFIG_SAE */
- }
-
- return -1;
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch b/recipes-wifi/hostapd/files/patches/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
deleted file mode 100644
index e9bb053..0000000
--- a/recipes-wifi/hostapd/files/patches/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
+++ /dev/null
@@ -1,619 +0,0 @@
-From d3d5b514064036fb17729743fa13e25646f468e9 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 99904/99910] hostapd: mtk: Support EDCCA hostapd configuration
-
-edcca_enable and edcca_compensation and implement edcca related handlers.
----
- hostapd/config_file.c | 32 ++++++
- hostapd/ctrl_iface.c | 125 ++++++++++++++++++++++
- src/ap/ap_config.c | 4 +
- src/ap/ap_config.h | 29 ++++++
- src/ap/ap_drv_ops.c | 24 +++++
- src/ap/ap_drv_ops.h | 5 +-
- src/ap/hostapd.c | 7 ++
- src/common/mtk_vendor.h | 19 ++--
- src/drivers/driver.h | 4 +
- src/drivers/driver_nl80211.c | 165 ++++++++++++++++++++++++++++++
- src/drivers/driver_nl80211.h | 1 +
- src/drivers/driver_nl80211_capa.c | 7 ++
- 12 files changed, 415 insertions(+), 7 deletions(-)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index eda9db0..0ee8952 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -4753,6 +4753,38 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- } else if (os_strcmp(buf, "eht_mu_beamformer") == 0) {
- conf->eht_phy_capab.mu_beamformer = atoi(pos);
- #endif /* CONFIG_IEEE80211BE */
-+ } else if (os_strcmp(buf, "edcca_threshold") == 0) {
-+ if (hostapd_parse_intlist(&conf->edcca_threshold, pos) ||
-+ conf->edcca_threshold[0] < EDCCA_MIN_CONFIG_THRES ||
-+ conf->edcca_threshold[0] > EDCCA_MAX_CONFIG_THRES ||
-+ conf->edcca_threshold[1] < EDCCA_MIN_CONFIG_THRES ||
-+ conf->edcca_threshold[1] > EDCCA_MAX_CONFIG_THRES ||
-+ conf->edcca_threshold[2] < EDCCA_MIN_CONFIG_THRES ||
-+ conf->edcca_threshold[2] > EDCCA_MAX_CONFIG_THRES) {
-+ wpa_printf(MSG_ERROR, "Line %d: invalid edcca threshold",
-+ line);
-+ return 1;
-+ }
-+ } else if (os_strcmp(buf, "edcca_enable") == 0) {
-+ int mode = atoi(pos);
-+ if (mode < EDCCA_MODE_FORCE_DISABLE || mode > EDCCA_MODE_AUTO) {
-+ wpa_printf(MSG_ERROR, "Line %d: Invalid edcca_enable %d;"
-+ " allowed value 0 (Force Disable) or 1(Auto) ",
-+ line, mode);
-+ return 1;
-+ }
-+ conf->edcca_enable = (u8) mode;
-+ } else if (os_strcmp(buf, "edcca_compensation") == 0) {
-+ int val = atoi(pos);
-+ if (val < EDCCA_MIN_COMPENSATION ||
-+ val > EDCCA_MAX_COMPENSATION) {
-+ wpa_printf(MSG_ERROR, "Line %d: Invalid compensation"
-+ " value %d; allowed value %d ~ %d.",
-+ line, val, EDCCA_MIN_COMPENSATION,
-+ EDCCA_MAX_COMPENSATION);
-+ return 1;
-+ }
-+ conf->edcca_compensation = (s8) val;
- } else {
- wpa_printf(MSG_ERROR,
- "Line %d: unknown configuration item '%s'",
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index bb8c74f..9c70d54 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -598,6 +598,19 @@ static const char * pbc_status_str(enum pbc_status status)
- }
-
-
-+static const char * edcca_mode_str(enum edcca_mode status)
-+{
-+ switch (status) {
-+ case EDCCA_MODE_FORCE_DISABLE:
-+ return "Force Disable";
-+ case EDCCA_MODE_AUTO:
-+ return "Auto";
-+ default:
-+ return "Unknown";
-+ }
-+}
-+
-+
- static int hostapd_ctrl_iface_wps_get_status(struct hostapd_data *hapd,
- char *buf, size_t buflen)
- {
-@@ -3322,6 +3335,112 @@ static int hostapd_ctrl_iface_driver_cmd(struct hostapd_data *hapd, char *cmd,
- #endif /* ANDROID */
-
-
-+static int
-+hostapd_ctrl_iface_set_edcca(struct hostapd_data *hapd, char *cmd,
-+ char *buf, size_t buflen)
-+{
-+ char *pos, *config, *value;
-+ config = cmd;
-+ pos = os_strchr(config, ' ');
-+ if (pos == NULL)
-+ return -1;
-+ *pos++ = '\0';
-+
-+ if(pos == NULL)
-+ return -1;
-+ value = pos;
-+
-+ if (os_strcmp(config, "enable") == 0) {
-+ int mode = atoi(value);
-+ if (mode < EDCCA_MODE_FORCE_DISABLE || mode > EDCCA_MODE_AUTO) {
-+ wpa_printf(MSG_ERROR, "Invalid value for edcca enable");
-+ return -1;
-+ }
-+ hapd->iconf->edcca_enable = (u8) mode;
-+ if (hostapd_drv_configure_edcca_enable(hapd) != 0)
-+ return -1;
-+ } else if (os_strcmp(config, "compensation") == 0) {
-+ int compensation = atoi(value);
-+ if (compensation < EDCCA_MIN_COMPENSATION ||
-+ compensation > EDCCA_MAX_COMPENSATION) {
-+ wpa_printf(MSG_ERROR, "Invalid value for edcca compensation");
-+ return -1;
-+ }
-+ hapd->iconf->edcca_compensation = (s8) compensation;
-+ if (hostapd_drv_configure_edcca_enable(hapd) != 0)
-+ return -1;
-+ } else if (os_strcmp(config, "threshold") == 0) {
-+ char *thres_value;
-+ thres_value = os_strchr(value, ':');
-+ if (thres_value == NULL)
-+ return -1;
-+ *thres_value++ = '\0';
-+
-+ if(thres_value == NULL)
-+ return -1;
-+ int bw_idx= atoi(value);
-+ int threshold = atoi(thres_value);
-+
-+ if (bw_idx < EDCCA_BW_20 || bw_idx > EDCCA_BW_80) {
-+ wpa_printf(MSG_ERROR,
-+ "Unsupported Bandwidth idx %d for SET_EDCCA",
-+ bw_idx);
-+ return -1;
-+ }
-+ if (threshold < EDCCA_MIN_CONFIG_THRES ||
-+ threshold > EDCCA_MAX_CONFIG_THRES) {
-+ wpa_printf(MSG_ERROR,
-+ "Unsupported threshold %d for SET_EDCCA",
-+ threshold);
-+ return -1;
-+ }
-+
-+ int threshold_arr[EDCCA_MAX_BW_NUM];
-+ /* 0x7f means keep the origival value in firmware */
-+ os_memset(threshold_arr, 0x7f, sizeof(threshold_arr));
-+ threshold_arr[bw_idx] = threshold;
-+
-+ if (hostapd_drv_configure_edcca_threshold(hapd, threshold_arr) != 0)
-+ return -1;
-+ } else {
-+ wpa_printf(MSG_ERROR,
-+ "Unsupported parameter %s for SET_EDCCA", config);
-+ return -1;
-+ }
-+ return os_snprintf(buf, buflen, "OK\n");
-+}
-+
-+
-+static int
-+hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
-+ size_t buflen)
-+{
-+ char *pos, *end;
-+
-+ pos = buf;
-+ end = buf + buflen;
-+ u8 value[EDCCA_MAX_BW_NUM] = {0};
-+
-+ if (os_strcmp(cmd, "enable") == 0) {
-+ return os_snprintf(pos, end - pos, "Enable: %s\n",
-+ edcca_mode_str(hapd->iconf->edcca_enable));
-+ } else if (os_strcmp(cmd, "compensation") == 0) {
-+ return os_snprintf(pos, end - pos, "Compensation: %d\n",
-+ hapd->iconf->edcca_compensation);
-+ } else if (os_strcmp(cmd, "threshold") == 0) {
-+ if (hostapd_drv_get_edcca(hapd, EDCCA_CTRL_GET_THRES, &value) != 0)
-+ return -1;
-+ return os_snprintf(pos, end - pos,
-+ "Threshold BW20: 0x%x, BW40: 0x%x, BW80: 0x%x\n",
-+ value[0], value[1], value[2]);
-+ } else {
-+ wpa_printf(MSG_ERROR,
-+ "Unsupported parameter %s for GET_EDCCA", cmd);
-+ return -1;
-+ }
-+}
-+
-+
- static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- char *buf, char *reply,
- int reply_size,
-@@ -3868,6 +3987,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- reply_len = hostapd_ctrl_iface_driver_cmd(hapd, buf + 7, reply,
- reply_size);
- #endif /* ANDROID */
-+ } else if (os_strncmp(buf, "SET_EDCCA ", 10) == 0) {
-+ reply_len = hostapd_ctrl_iface_set_edcca(hapd, buf+10, reply,
-+ reply_size);
-+ } else if (os_strncmp(buf, "GET_EDCCA ", 10) == 0) {
-+ reply_len = hostapd_ctrl_iface_get_edcca(hapd, buf+10, reply,
-+ reply_size);
- } else {
- os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
- reply_len = 16;
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 4a20eb4..344585a 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -294,6 +294,9 @@ struct hostapd_config * hostapd_config_defaults(void)
- conf->airtime_update_interval = AIRTIME_DEFAULT_UPDATE_INTERVAL;
- #endif /* CONFIG_AIRTIME_POLICY */
-
-+ conf->edcca_enable = EDCCA_MODE_AUTO;
-+ conf->edcca_compensation = EDCCA_DEFAULT_COMPENSATION;
-+
- return conf;
- }
-
-@@ -1007,6 +1010,7 @@ void hostapd_config_free(struct hostapd_config *conf)
- #ifdef CONFIG_ACS
- os_free(conf->acs_chan_bias);
- #endif /* CONFIG_ACS */
-+ os_free(conf->edcca_threshold);
- wpabuf_free(conf->lci);
- wpabuf_free(conf->civic);
-
-diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 3f68e76..775c567 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1153,8 +1153,37 @@ struct hostapd_config {
- #define CH_SWITCH_EHT_ENABLED BIT(0)
- #define CH_SWITCH_EHT_DISABLED BIT(1)
- unsigned int ch_switch_eht_config;
-+ u8 edcca_enable;
-+ s8 edcca_compensation;
-+ int *edcca_threshold;
- };
-
-+enum edcca_mode {
-+ EDCCA_MODE_FORCE_DISABLE = 0,
-+ EDCCA_MODE_AUTO = 1,
-+};
-+
-+enum edcca_bw_id {
-+ EDCCA_BW_20 = 0,
-+ EDCCA_BW_40,
-+ EDCCA_BW_80,
-+ EDCCA_MAX_BW_NUM,
-+};
-+
-+enum mtk_vendor_attr_edcca_ctrl_mode {
-+ EDCCA_CTRL_SET_EN = 0,
-+ EDCCA_CTRL_SET_THRES,
-+ EDCCA_CTRL_GET_EN,
-+ EDCCA_CTRL_GET_THRES,
-+ EDCCA_CTRL_NUM,
-+};
-+
-+#define EDCCA_DEFAULT_COMPENSATION -6
-+#define EDCCA_MIN_COMPENSATION -126
-+#define EDCCA_MAX_COMPENSATION 126
-+#define EDCCA_MIN_CONFIG_THRES -126
-+#define EDCCA_MAX_CONFIG_THRES 0
-+
-
- static inline enum oper_chan_width
- hostapd_get_oper_chwidth(struct hostapd_config *conf)
-diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 0c7aee2..25e967d 100644
---- a/src/ap/ap_drv_ops.c
-+++ b/src/ap/ap_drv_ops.c
-@@ -1015,3 +1015,27 @@ int hostapd_drv_dpp_listen(struct hostapd_data *hapd, bool enable)
- return 0;
- return hapd->driver->dpp_listen(hapd->drv_priv, enable);
- }
-+
-+int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd)
-+{
-+ if (!hapd->driver || !hapd->driver->configure_edcca_enable)
-+ return 0;
-+ return hapd->driver->configure_edcca_enable(hapd->drv_priv,
-+ hapd->iconf->edcca_enable,
-+ hapd->iconf->edcca_compensation);
-+}
-+
-+int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
-+ const int *threshold)
-+{
-+ if (!hapd->driver || !hapd->driver->configure_edcca_threshold)
-+ return 0;
-+ return hapd->driver->configure_edcca_threshold(hapd->drv_priv, threshold);
-+}
-+
-+int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
-+{
-+ if (!hapd->driver || !hapd->driver->get_edcca)
-+ return 0;
-+ 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 b4fb766..70a99f4 100644
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -138,7 +138,10 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd);
- int hostapd_drv_update_dh_ie(struct hostapd_data *hapd, const u8 *peer,
- u16 reason_code, const u8 *ie, size_t ielen);
- int hostapd_drv_dpp_listen(struct hostapd_data *hapd, bool enable);
--
-+int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
-+int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
-+ const int *threshold);
-+int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
-
- #include "drivers/driver.h"
-
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 0dd8c13..d05f948 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -2295,6 +2295,13 @@ dfs_offload:
- }
- #endif /* CONFIG_MESH */
-
-+ if (hostapd_drv_configure_edcca_enable(hapd) < 0)
-+ goto fail;
-+
-+ if (hostapd_drv_configure_edcca_threshold(hapd,
-+ hapd->iconf->edcca_threshold) < 0)
-+ goto fail;
-+
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
- iface->bss[0]->conf->iface);
- if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
-diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 528387f..7056126 100644
---- a/src/common/mtk_vendor.h
-+++ b/src/common/mtk_vendor.h
-@@ -29,14 +29,21 @@ enum mtk_vendor_attr_edcca_ctrl {
- NUM_MTK_VENDOR_ATTRS_EDCCA_CTRL - 1
- };
-
--enum mtk_vendor_attr_edcca_ctrl_mode {
-- EDCCA_CTRL_SET_EN = 0,
-- EDCCA_CTRL_SET_THERS,
-- EDCCA_CTRL_GET_EN,
-- EDCCA_CTRL_GET_THERS,
-- EDCCA_CTRL_NUM,
-+enum mtk_vendor_attr_edcca_dump {
-+ MTK_VENDOR_ATTR_EDCCA_DUMP_UNSPEC = 0,
-+
-+ MTK_VENDOR_ATTR_EDCCA_DUMP_MODE,
-+ MTK_VENDOR_ATTR_EDCCA_DUMP_PRI20_VAL,
-+ MTK_VENDOR_ATTR_EDCCA_DUMP_SEC40_VAL,
-+ MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL,
-+
-+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP,
-+ MTK_VENDOR_ATTR_EDCCA_DUMP_MAX =
-+ NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP - 1
- };
-
-+
- static struct nla_policy edcca_ctrl_policy[NUM_MTK_VENDOR_ATTRS_EDCCA_CTRL] = {
- [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 1d2b1b2..3559974 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -4676,6 +4676,10 @@ struct wpa_driver_ops {
- const u8 *match, size_t match_len,
- bool multicast);
- #endif /* CONFIG_TESTING_OPTIONS */
-+ int (*configure_edcca_enable)(void *priv, const u8 edcca_enable,
-+ const s8 edcca_compensation);
-+ int (*configure_edcca_threshold)(void *priv, const int *threshold);
-+ int (*get_edcca)(void *priv, const u8 mode, u8 *value);
- };
-
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 5eba0ea..9c2782c 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -35,6 +35,8 @@
- #include "radiotap_iter.h"
- #include "rfkill.h"
- #include "driver_nl80211.h"
-+#include "common/mtk_vendor.h"
-+#include "ap/ap_config.h"
-
-
- #ifndef NETLINK_CAP_ACK
-@@ -12368,6 +12370,165 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
-
- #endif /* CONFIG_TESTING_OPTIONS */
-
-+static int nl80211_configure_edcca_enable(void *priv,
-+ const u8 edcca_enable,
-+ const s8 edcca_compensation)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_edcca_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting EDCCA enable");
-+ 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_EDCCA_CTRL) ||
-+ !(data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA)) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_MODE, EDCCA_CTRL_SET_EN) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL, edcca_enable) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_COMPENSATE,
-+ edcca_compensation)) {
-+ wpa_printf (MSG_ERROR, "Prepare nl80211 msg fail");
-+ 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 configure EDCCA enable. ret=%d (%s) ",
-+ ret, strerror(-ret));
-+ }
-+ return ret;
-+}
-+
-+static int nl80211_configure_edcca_threshold(void *priv, const int *threshold)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_edcca_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting EDCCA threshold");
-+ return 0;
-+ }
-+
-+ if (!threshold) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Input EDCCA threshold is empty!");
-+ 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_EDCCA_CTRL) ||
-+ !(data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA)) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_MODE, EDCCA_CTRL_SET_THRES) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL, threshold[0] & 0xff) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_SEC40_VAL, threshold[1] & 0xff) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_SEC80_VAL, threshold[2] & 0xff)) {
-+ wpa_printf (MSG_ERROR, "Prepare nl80211 msg fail");
-+ 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 configure EDCCA threshold. ret=%d (%s) ",
-+ ret, strerror(-ret));
-+ }
-+ return ret;
-+}
-+
-+
-+static int edcca_info_handler(struct nl_msg *msg, void *arg)
-+{
-+ u8 *info = (u8*) arg;
-+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
-+ struct nlattr *tb_vendor[MTK_VENDOR_ATTR_EDCCA_DUMP_MAX + 1];
-+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-+ struct nlattr *nl_vend, *attr;
-+
-+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
-+ genlmsg_attrlen(gnlh, 0), NULL);
-+
-+ nl_vend = tb[NL80211_ATTR_VENDOR_DATA];
-+ if (!nl_vend)
-+ return NL_SKIP;
-+
-+ nla_parse(tb_vendor, MTK_VENDOR_ATTR_EDCCA_DUMP_MAX,
-+ nla_data(nl_vend), nla_len(nl_vend), NULL);
-+
-+ attr = tb_vendor[MTK_VENDOR_ATTR_EDCCA_DUMP_PRI20_VAL];
-+ if (!attr) {
-+ wpa_printf(MSG_ERROR, "nl80211: MTK_VENDOR_ATTR_EDCCA_DUMP_PRI20_VAL");
-+ return NL_SKIP;
-+ }
-+
-+ *info++ = nla_get_u8(attr);
-+
-+ attr = tb_vendor[MTK_VENDOR_ATTR_EDCCA_DUMP_SEC40_VAL];
-+ if (!attr) {
-+ wpa_printf(MSG_ERROR, "nl80211: MTK_VENDOR_ATTR_EDCCA_DUMP_SEC40_VAL");
-+ return NL_SKIP;
-+ }
-+
-+ *info++ = nla_get_u8(attr);
-+
-+ attr = tb_vendor[MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL];
-+ if (!attr) {
-+ wpa_printf(MSG_ERROR, "nl80211: MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL");
-+ return NL_SKIP;
-+ }
-+
-+ *info = nla_get_u8(attr);
-+ return NL_SKIP;
-+}
-+
-+
-+static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_edcca_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting EDCCA threshold");
-+ return 0;
-+ }
-+
-+ if (!(msg = nl80211_drv_msg(drv, NLM_F_DUMP, 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_EDCCA_CTRL) ||
-+ !(data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA | NLA_F_NESTED)) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_EDCCA_CTRL_MODE, mode)) {
-+ wpa_printf (MSG_ERROR, "Prepare nl80211 msg fail");
-+ nlmsg_free(msg);
-+ return -ENOBUFS;
-+ }
-+ nla_nest_end(msg, data);
-+ ret = send_and_recv_msgs(drv, msg, edcca_info_handler, value, NULL, NULL);
-+ if (ret) {
-+ wpa_printf(MSG_ERROR, "Failed to get EDCCA configuration. ret=%d (%s)",
-+ ret, strerror(-ret));
-+ }
-+ return ret;
-+}
-+
-
- const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- .name = "nl80211",
-@@ -12514,4 +12675,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 */
-+/* Need ifdef CONFIG_DRIVER_NL80211_MTK */
-+ .configure_edcca_enable = nl80211_configure_edcca_enable,
-+ .configure_edcca_threshold = nl80211_configure_edcca_threshold,
-+ .get_edcca = nl80211_get_edcca,
- };
-diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 6e40d55..13e5d24 100644
---- a/src/drivers/driver_nl80211.h
-+++ b/src/drivers/driver_nl80211.h
-@@ -181,6 +181,7 @@ struct wpa_driver_nl80211_data {
- unsigned int qca_do_acs:1;
- unsigned int brcm_do_acs:1;
- unsigned int uses_6ghz:1;
-+ unsigned int mtk_edcca_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 7ede0d0..732ae29 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -18,6 +18,7 @@
- #include "common/qca-vendor-attr.h"
- #include "common/brcm_vendor.h"
- #include "driver_nl80211.h"
-+#include "common/mtk_vendor.h"
-
-
- static int protocol_feature_handler(struct nl_msg *msg, void *arg)
-@@ -1050,6 +1051,12 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- break;
- }
- #endif /* CONFIG_DRIVER_NL80211_BRCM */
-+ } else if (vinfo->vendor_id == OUI_MTK) {
-+ switch (vinfo->subcmd) {
-+ case MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL :
-+ drv->mtk_edcca_vendor_cmd_avail = 1;
-+ break;
-+ }
- }
-
- wpa_printf(MSG_DEBUG, "nl80211: Supported vendor command: vendor_id=0x%x subcmd=%u",
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch b/recipes-wifi/hostapd/files/patches/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
deleted file mode 100644
index 1a622f3..0000000
--- a/recipes-wifi/hostapd/files/patches/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
+++ /dev/null
@@ -1,450 +0,0 @@
-From 893c5f92257a7313a179dc728ba51a74efbfc74a Mon Sep 17 00:00:00 2001
-From: TomLiu <tomml.liu@mediatek.com>
-Date: Tue, 9 Aug 2022 10:23:44 -0700
-Subject: [PATCH 99905/99910] hostapd: mtk: Add hostapd HEMU SET/GET control
-
----
- hostapd/config_file.c | 9 +++
- hostapd/ctrl_iface.c | 62 +++++++++++++++++
- hostapd/hostapd_cli.c | 18 +++++
- src/ap/ap_config.c | 1 +
- src/ap/ap_config.h | 1 +
- src/ap/ap_drv_ops.c | 14 ++++
- src/ap/ap_drv_ops.h | 2 +
- src/ap/hostapd.c | 2 +
- src/common/mtk_vendor.h | 15 ++++
- src/drivers/driver.h | 13 ++++
- src/drivers/driver_nl80211.c | 110 ++++++++++++++++++++++++++++++
- src/drivers/driver_nl80211.h | 1 +
- src/drivers/driver_nl80211_capa.c | 3 +
- 13 files changed, 251 insertions(+)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 0ee8952..b22d10b 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -3659,6 +3659,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- return 1;
- }
- bss->unsol_bcast_probe_resp_interval = val;
-+ } else if (os_strcmp(buf, "hemu_onoff") == 0) {
-+ int val = atoi(pos);
-+ if (val < 0 || val > 15) {
-+ wpa_printf(MSG_ERROR,
-+ "Line %d: invalid hemu_onoff value",
-+ line);
-+ return 1;
-+ }
-+ conf->hemu_onoff = val;
- #endif /* CONFIG_IEEE80211AX */
- } else if (os_strcmp(buf, "max_listen_interval") == 0) {
- bss->max_listen_interval = atoi(pos);
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 9c70d54..5f71aee 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -3441,6 +3441,63 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
- }
-
-
-+static int
-+hostapd_ctrl_iface_set_hemu(struct hostapd_data *hapd, char *cmd,
-+ char *buf, size_t buflen)
-+{
-+ char *pos, *config, *value;
-+ config = cmd;
-+ pos = os_strchr(config, ' ');
-+ if (pos == NULL)
-+ return -1;
-+ *pos++ = '\0';
-+
-+ if(pos == NULL)
-+ return -1;
-+ value = pos;
-+
-+ if (os_strcmp(config, "onoff") == 0) {
-+ int hemu = atoi(value);
-+ if (hemu < 0 || hemu > 15) {
-+ wpa_printf(MSG_ERROR, "Invalid value for hemu");
-+ return -1;
-+ }
-+ hapd->iconf->hemu_onoff = (u8) hemu;
-+ } else {
-+ wpa_printf(MSG_ERROR,
-+ "Unsupported parameter %s for SET_HEMU", config);
-+ return -1;
-+ }
-+
-+ if(hostapd_drv_hemu_ctrl(hapd) == 0) {
-+ return os_snprintf(buf, buflen, "OK\n");
-+ } else {
-+ return -1;
-+ }
-+}
-+
-+
-+static int
-+hostapd_ctrl_iface_get_hemu(struct hostapd_data *hapd, char *buf,
-+ size_t buflen)
-+{
-+ u8 hemu_onoff;
-+ char *pos, *end;
-+
-+ pos = buf;
-+ end = buf + buflen;
-+
-+ if (hostapd_drv_hemu_dump(hapd, &hemu_onoff) == 0) {
-+ hapd->iconf->hemu_onoff = hemu_onoff;
-+ return os_snprintf(pos, end - pos, "[hostapd_cli] = UL MU-MIMO: %d, DL MU-MIMO: %d, UL OFDMA: %d, DL OFDMA: %d\n",
-+ !!(hemu_onoff&BIT(3)), !!(hemu_onoff&BIT(2)), !!(hemu_onoff&BIT(1)), !!(hemu_onoff&BIT(0)));
-+ } else {
-+ wpa_printf(MSG_INFO, "ctrl iface failed to call");
-+ return -1;
-+ }
-+}
-+
-+
- static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- char *buf, char *reply,
- int reply_size,
-@@ -3993,6 +4050,11 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- } else if (os_strncmp(buf, "GET_EDCCA ", 10) == 0) {
- reply_len = hostapd_ctrl_iface_get_edcca(hapd, buf+10, reply,
- reply_size);
-+ } else if (os_strncmp(buf, "SET_HEMU ", 9) == 0) {
-+ reply_len = hostapd_ctrl_iface_set_hemu(hapd, buf+9, reply,
-+ reply_size);
-+ } else if (os_strncmp(buf, "GET_HEMU", 8) == 0) {
-+ reply_len = hostapd_ctrl_iface_get_hemu(hapd, reply, reply_size);
- } else {
- os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
- reply_len = 16;
-diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index db21258..0d36477 100644
---- a/hostapd/hostapd_cli.c
-+++ b/hostapd/hostapd_cli.c
-@@ -1380,6 +1380,20 @@ static int hostapd_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
- }
-
-
-+static int hostapd_cli_cmd_set_hemu(struct wpa_ctrl *ctrl, int argc,
-+ char *argv[])
-+{
-+ return hostapd_cli_cmd(ctrl, "SET_HEMU", 1, argc, argv);
-+}
-+
-+
-+static int hostapd_cli_cmd_get_hemu(struct wpa_ctrl *ctrl, int argc,
-+ char *argv[])
-+{
-+ return hostapd_cli_cmd(ctrl, "GET_HEMU", 0, NULL, NULL);
-+}
-+
-+
- #ifdef CONFIG_DPP
-
- static int hostapd_cli_cmd_dpp_qr_code(struct wpa_ctrl *ctrl, int argc,
-@@ -1705,6 +1719,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
- " = send FTM range request"},
- { "driver_flags", hostapd_cli_cmd_driver_flags, NULL,
- " = show supported driver flags"},
-+ { "set_hemu", hostapd_cli_cmd_set_hemu, NULL,
-+ "<value> [0-15] bitmap- UL MU-MIMO(bit3), DL MU-MIMO(bit2), UL OFDMA(bit1), DL OFDMA(bit0)"},
-+ { "get_hemu", hostapd_cli_cmd_get_hemu, NULL,
-+ " = show hemu onoff value in 0-15 bitmap"},
- #ifdef CONFIG_DPP
- { "dpp_qr_code", hostapd_cli_cmd_dpp_qr_code, NULL,
- "report a scanned DPP URI from a QR Code" },
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 344585a..0e1f192 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -280,6 +280,7 @@ struct hostapd_config * hostapd_config_defaults(void)
- conf->he_6ghz_max_ampdu_len_exp = 7;
- conf->he_6ghz_rx_ant_pat = 1;
- conf->he_6ghz_tx_ant_pat = 1;
-+ conf->hemu_onoff = 13;
- #endif /* CONFIG_IEEE80211AX */
-
- /* 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 775c567..41b8c68 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1114,6 +1114,7 @@ struct hostapd_config {
- u8 he_6ghz_rx_ant_pat;
- u8 he_6ghz_tx_ant_pat;
- u8 he_6ghz_reg_pwr_type;
-+ u8 hemu_onoff;
- #endif /* CONFIG_IEEE80211AX */
-
- /* VHT enable/disable config from CHAN_SWITCH */
-diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 25e967d..4598737 100644
---- a/src/ap/ap_drv_ops.c
-+++ b/src/ap/ap_drv_ops.c
-@@ -1039,3 +1039,17 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
- return 0;
- return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
- }
-+
-+int hostapd_drv_hemu_ctrl(struct hostapd_data *hapd)
-+{
-+ if (!hapd->driver || !hapd->driver->hemu_ctrl)
-+ return 0;
-+ return hapd->driver->hemu_ctrl(hapd->drv_priv, hapd->iconf->hemu_onoff);
-+}
-+
-+int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff)
-+{
-+ if (!hapd->driver || !hapd->driver->hemu_dump)
-+ return 0;
-+ return hapd->driver->hemu_dump(hapd->drv_priv, hemu_onoff);
-+}
-diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 70a99f4..bca39c5 100644
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -142,6 +142,8 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
- int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
- const int *threshold);
- int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
-+int hostapd_drv_hemu_ctrl(struct hostapd_data *hapd);
-+int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff);
-
- #include "drivers/driver.h"
-
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index d05f948..921769d 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -2301,6 +2301,8 @@ dfs_offload:
- if (hostapd_drv_configure_edcca_threshold(hapd,
- hapd->iconf->edcca_threshold) < 0)
- goto fail;
-+ if (hostapd_drv_hemu_ctrl(hapd) < 0)
-+ goto fail;
-
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
- iface->bss[0]->conf->iface);
-diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 7056126..69a46df 100644
---- a/src/common/mtk_vendor.h
-+++ b/src/common/mtk_vendor.h
-@@ -10,6 +10,8 @@ enum mtk_nl80211_vendor_subcmds {
- MTK_NL80211_VENDOR_SUBCMD_CSI_CTRL = 0xc2,
- MTK_NL80211_VENDOR_SUBCMD_RFEATURE_CTRL = 0xc3,
- MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL = 0xc4,
-+ MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
-+ MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL= 0xc6,
- MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
- };
-
-@@ -174,6 +176,19 @@ enum mtk_vendor_attr_rfeature_ctrl {
- NUM_MTK_VENDOR_ATTRS_RFEATURE_CTRL - 1
- };
-
-+enum mtk_vendor_attr_hemu_ctrl {
-+ MTK_VENDOR_ATTR_HEMU_CTRL_UNSPEC,
-+
-+ MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF,
-+ MTK_VENDOR_ATTR_HEMU_CTRL_DUMP,
-+
-+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_HEMU_CTRL,
-+ MTK_VENDOR_ATTR_HEMU_CTRL_MAX =
-+ NUM_MTK_VENDOR_ATTRS_HEMU_CTRL - 1
-+};
-+
-+
- #define CSI_MAX_COUNT 256
- #define ETH_ALEN 6
-
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 3559974..4cd7505 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -1623,6 +1623,11 @@ struct wpa_driver_ap_params {
- * Unsolicited broadcast Probe Response template length
- */
- size_t unsol_bcast_probe_resp_tmpl_len;
-+
-+ /**
-+ * hemu onoff=<val> (bitmap- UL MU-MIMO(bit3), DL MU-MIMO(bit2), UL OFDMA(bit1), DL OFDMA(bit0))
-+ */
-+ u8 hemu_onoff;
- };
-
- struct wpa_driver_mesh_bss_params {
-@@ -4680,6 +4685,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);
-+
-+ /**
-+ * hemu_ctrl - ctrl on off for UL/DL MURU
-+ * @priv: Private driver interface data
-+ *
-+ */
-+ int (*hemu_ctrl)(void *priv, u8 hemu_onoff);
-+ int (*hemu_dump)(void *priv, u8 *hemu_onoff);
- };
-
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 9c2782c..73dee2e 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -12304,6 +12304,114 @@ fail:
- }
-
-
-+#ifdef CONFIG_IEEE80211AX
-+static int nl80211_hemu_muruonoff(void *priv, u8 hemu_onoff)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_hemu_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting hemu control");
-+ 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_HEMU_CTRL) ||
-+ !(data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA)) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF, hemu_onoff)) {
-+ 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 hemu_onoff. ret=%d (%s)", ret, strerror(-ret));
-+ }
-+ return ret;
-+}
-+
-+
-+static int hemu_dump_handler(struct nl_msg *msg, void *arg)
-+{
-+ u8 *hemu_onoff = (u8 *) arg;
-+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
-+ struct nlattr *tb_vendor[MTK_VENDOR_ATTR_HEMU_CTRL_MAX + 1];
-+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-+ struct nlattr *nl_vend, *attr;
-+
-+ static const struct nla_policy
-+ hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL + 1] = {
-+ [MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF] = {.type = NLA_U8 },
-+ [MTK_VENDOR_ATTR_HEMU_CTRL_DUMP] = {.type = NLA_U8 },
-+ };
-+
-+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
-+ genlmsg_attrlen(gnlh, 0), NULL);
-+
-+ nl_vend = tb[NL80211_ATTR_VENDOR_DATA];
-+ if (!nl_vend)
-+ return NL_SKIP;
-+
-+ nla_parse(tb_vendor, MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
-+ nla_data(nl_vend), nla_len(nl_vend), NULL);
-+
-+ attr = tb_vendor[MTK_VENDOR_ATTR_HEMU_CTRL_DUMP];
-+ if (!attr) {
-+ wpa_printf(MSG_ERROR, "nl80211: cannot find MTK_VENDOR_ATTR_HEMU_CTRL_DUMP");
-+ return NL_SKIP;
-+ }
-+
-+ *hemu_onoff = nla_get_u8(attr);
-+ wpa_printf(MSG_DEBUG, "nla_get hemu_onoff: %d\n", *hemu_onoff);
-+
-+ return 0;
-+}
-+
-+static int nl80211_hemu_dump(void *priv, u8 *hemu_onoff)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *attr;
-+ int ret;
-+
-+ if (!drv->mtk_hemu_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting hemu control");
-+ return 0;
-+ }
-+
-+ if (!(msg = nl80211_drv_msg(drv, NLM_F_DUMP, 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_HEMU_CTRL)) {
-+ nlmsg_free(msg);
-+ return -ENOBUFS;
-+ }
-+
-+ attr = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA);
-+ if (!attr) {
-+ nlmsg_free(msg);
-+ return -1;
-+ }
-+
-+ nla_nest_end(msg, attr);
-+
-+ ret = send_and_recv_msgs(drv, msg, hemu_dump_handler, hemu_onoff, NULL, NULL);
-+
-+ if(ret){
-+ wpa_printf(MSG_ERROR, "Failed to get hemu_onoff. ret=%d (%s)", ret, strerror(-ret));
-+ }
-+
-+ return ret;
-+}
-+#endif /* CONFIG_IEEE80211AX */
-+
-+
- #ifdef CONFIG_DPP
- static int nl80211_dpp_listen(void *priv, bool enable)
- {
-@@ -12668,6 +12776,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,
-+ .hemu_ctrl = nl80211_hemu_muruonoff,
-+ .hemu_dump = nl80211_hemu_dump,
- #ifdef CONFIG_DPP
- .dpp_listen = nl80211_dpp_listen,
- #endif /* CONFIG_DPP */
-diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 13e5d24..57f0249 100644
---- a/src/drivers/driver_nl80211.h
-+++ b/src/drivers/driver_nl80211.h
-@@ -182,6 +182,7 @@ struct wpa_driver_nl80211_data {
- unsigned int brcm_do_acs:1;
- unsigned int uses_6ghz:1;
- unsigned int mtk_edcca_vendor_cmd_avail:1;
-+ unsigned int mtk_hemu_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 732ae29..cc146d9 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1056,6 +1056,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- case MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL :
- drv->mtk_edcca_vendor_cmd_avail = 1;
- break;
-+ case MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL :
-+ drv->mtk_hemu_vendor_cmd_avail = 1;
-+ break;
- }
- }
-
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch b/recipes-wifi/hostapd/files/patches/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
deleted file mode 100644
index 594e476..0000000
--- a/recipes-wifi/hostapd/files/patches/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From c91612769eba54821da1136d5959a40438c02824 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 99906/99910] hostapd: mtk: Add three wire PTA ctrl hostapd
- vendor command
-
-Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
----
- hostapd/config_file.c | 4 ++++
- src/ap/ap_config.c | 1 +
- src/ap/ap_config.h | 13 ++++++++++++
- src/ap/ap_drv_ops.c | 11 +++++++++++
- src/ap/ap_drv_ops.h | 1 +
- src/ap/hostapd.c | 2 ++
- src/common/mtk_vendor.h | 16 +++++++++++++++
- src/drivers/driver.h | 8 ++++++++
- src/drivers/driver_nl80211.c | 33 +++++++++++++++++++++++++++++++
- src/drivers/driver_nl80211.h | 1 +
- src/drivers/driver_nl80211_capa.c | 3 +++
- 11 files changed, 93 insertions(+)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index b22d10b..18b372a 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -4794,6 +4794,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- return 1;
- }
- conf->edcca_compensation = (s8) val;
-+ } else if (os_strcmp(buf, "three_wire_enable") == 0) {
-+ u8 en = atoi(pos);
-+
-+ conf->three_wire_enable = en;
- } else {
- wpa_printf(MSG_ERROR,
- "Line %d: unknown configuration item '%s'",
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 0e1f192..9249a6b 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -297,6 +297,7 @@ struct hostapd_config * hostapd_config_defaults(void)
-
- conf->edcca_enable = EDCCA_MODE_AUTO;
- conf->edcca_compensation = EDCCA_DEFAULT_COMPENSATION;
-+ conf->three_wire_enable = THREE_WIRE_MODE_DISABLE;
-
- return conf;
- }
-diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 41b8c68..71cf515 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1157,6 +1157,19 @@ struct hostapd_config {
- u8 edcca_enable;
- s8 edcca_compensation;
- int *edcca_threshold;
-+ u8 three_wire_enable;
-+};
-+
-+enum three_wire_mode {
-+ THREE_WIRE_MODE_DISABLE,
-+ THREE_WIRE_MODE_EXT0_ENABLE,
-+ THREE_WIRE_MODE_EXT1_ENABLE,
-+ THREE_WIRE_MODE_ALL_ENABLE,
-+
-+ /* keep last */
-+ NUM_THREE_WIRE_MODE,
-+ THREE_WIRE_MODE_MAX =
-+ NUM_THREE_WIRE_MODE - 1
- };
-
- enum edcca_mode {
-diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 4598737..a1d83e4 100644
---- a/src/ap/ap_drv_ops.c
-+++ b/src/ap/ap_drv_ops.c
-@@ -1053,3 +1053,14 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff)
- return 0;
- return hapd->driver->hemu_dump(hapd->drv_priv, hemu_onoff);
- }
-+
-+int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd)
-+{
-+ if (!hapd->driver || !hapd->driver->three_wire_ctrl)
-+ return 0;
-+ if (hapd->iconf->three_wire_enable > THREE_WIRE_MODE_MAX) {
-+ wpa_printf(MSG_INFO, "Invalid value for three wire enable\n");
-+ return 0;
-+ }
-+ 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 bca39c5..5ba6297 100644
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -144,6 +144,7 @@ int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
- int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
- int hostapd_drv_hemu_ctrl(struct hostapd_data *hapd);
- int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff);
-+int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
-
- #include "drivers/driver.h"
-
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 921769d..f9dabdf 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -2303,6 +2303,8 @@ dfs_offload:
- goto fail;
- if (hostapd_drv_hemu_ctrl(hapd) < 0)
- goto fail;
-+ if (hostapd_drv_three_wire_ctrl(hapd) < 0)
-+ goto fail;
-
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
- iface->bss[0]->conf->iface);
-diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 69a46df..ee5a4f4 100644
---- a/src/common/mtk_vendor.h
-+++ b/src/common/mtk_vendor.h
-@@ -13,6 +13,7 @@ enum mtk_nl80211_vendor_subcmds {
- MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
- MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL= 0xc6,
- MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
-+ MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL = 0xc8
- };
-
- enum mtk_vendor_attr_edcca_ctrl {
-@@ -55,6 +56,21 @@ static struct nla_policy edcca_ctrl_policy[NUM_MTK_VENDOR_ATTRS_EDCCA_CTRL] = {
- [MTK_VENDOR_ATTR_EDCCA_CTRL_COMPENSATE] = { .type = NLA_U8 },
- };
-
-+enum mtk_vendor_attr_3wire_ctrl {
-+ MTK_VENDOR_ATTR_3WIRE_CTRL_UNSPEC,
-+
-+ MTK_VENDOR_ATTR_3WIRE_CTRL_MODE,
-+
-+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_3WIRE_CTRL,
-+ MTK_VENDOR_ATTR_3WIRE_CTRL_MAX =
-+ NUM_MTK_VENDOR_ATTRS_3WIRE_CTRL - 1
-+};
-+
-+static struct nla_policy three_wire_ctrl_policy[NUM_MTK_VENDOR_ATTRS_3WIRE_CTRL] = {
-+ [MTK_VENDOR_ATTR_3WIRE_CTRL_MODE] = {.type = NLA_U8 },
-+};
-+
- enum mtk_vendor_attr_csi_ctrl {
- MTK_VENDOR_ATTR_CSI_CTRL_UNSPEC,
-
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 4cd7505..9ca19af 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -4693,6 +4693,14 @@ struct wpa_driver_ops {
- */
- int (*hemu_ctrl)(void *priv, u8 hemu_onoff);
- int (*hemu_dump)(void *priv, u8 *hemu_onoff);
-+
-+ /**
-+ * three_wire_ctrl - set three_wire_ctrl mode
-+ * @priv: Private driver interface data
-+ * @three_wire_enable: three_wire_ctrl mode
-+ *
-+ */
-+ int (*three_wire_ctrl)(void *priv, u8 three_wire_enable);
- };
-
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 73dee2e..2bb8cc2 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -12637,6 +12637,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
- return ret;
- }
-
-+static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
-+{
-+ 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_3wire_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting three wire control");
-+ 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_3WIRE_CTRL) ||
-+ !(data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA)) ||
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_3WIRE_CTRL_MODE, three_wire_enable)) {
-+ 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 enable three wire. ret=%d (%s) ",
-+ ret, strerror(-ret));
-+ }
-+ return ret;
-+}
-
- const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- .name = "nl80211",
-@@ -12789,4 +12821,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,
-+ .three_wire_ctrl = nl80211_enable_three_wire,
- };
-diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 57f0249..9fe7811 100644
---- a/src/drivers/driver_nl80211.h
-+++ b/src/drivers/driver_nl80211.h
-@@ -183,6 +183,7 @@ struct wpa_driver_nl80211_data {
- unsigned int uses_6ghz:1;
- unsigned int mtk_edcca_vendor_cmd_avail:1;
- unsigned int mtk_hemu_vendor_cmd_avail:1;
-+ unsigned int mtk_3wire_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 cc146d9..04bc54e 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1059,6 +1059,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- case MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL :
- drv->mtk_hemu_vendor_cmd_avail = 1;
- break;
-+ case MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL :
-+ drv->mtk_3wire_vendor_cmd_avail = 1;
-+ break;
- }
- }
-
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99907-hostapd-mtk-Add-hostapd-iBF-control.patch b/recipes-wifi/hostapd/files/patches/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
deleted file mode 100644
index c37cb40..0000000
--- a/recipes-wifi/hostapd/files/patches/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ /dev/null
@@ -1,431 +0,0 @@
-From 4971762bfaba906054d43bd2d042c436a1ac97b2 Mon Sep 17 00:00:00 2001
-From: mtk27835 <shurong.wen@mediatek.com>
-Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 99907/99910] hostapd: mtk: Add hostapd iBF control
-
-Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
----
- hostapd/config_file.c | 3 +
- hostapd/ctrl_iface.c | 26 +++++++
- hostapd/hostapd_cli.c | 9 +++
- src/ap/ap_config.c | 1 +
- src/ap/ap_config.h | 2 +
- src/ap/ap_drv_ops.c | 14 ++++
- src/ap/ap_drv_ops.h | 2 +
- src/ap/hostapd.c | 2 +
- src/common/mtk_vendor.h | 35 +++++++++-
- src/drivers/driver.h | 19 ++++++
- src/drivers/driver_nl80211.c | 108 ++++++++++++++++++++++++++++++
- src/drivers/driver_nl80211.h | 1 +
- src/drivers/driver_nl80211_capa.c | 3 +
- 13 files changed, 224 insertions(+), 1 deletion(-)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 18b372a..d9d882c 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -4798,6 +4798,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- u8 en = atoi(pos);
-
- conf->three_wire_enable = en;
-+ } else if (os_strcmp(buf, "ibf_enable") == 0) { /*ibf setting is per device*/
-+ int val = atoi(pos);
-+ conf->ibf_enable = !!val;
- } else {
- wpa_printf(MSG_ERROR,
- "Line %d: unknown configuration item '%s'",
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 5f71aee..c881d37 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -3498,6 +3498,30 @@ hostapd_ctrl_iface_get_hemu(struct hostapd_data *hapd, char *buf,
- }
-
-
-+static int
-+hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
-+ size_t buflen)
-+{
-+ u8 ibf_enable;
-+ int ret;
-+ char *pos, *end;
-+
-+ pos = buf;
-+ end = buf + buflen;
-+
-+ if (hostapd_drv_ibf_dump(hapd, &ibf_enable) == 0) {
-+ hapd->iconf->ibf_enable = ibf_enable;
-+ ret = os_snprintf(pos, end - pos, "ibf_enable: %u\n",
-+ ibf_enable);
-+ }
-+
-+ if (os_snprintf_error(end - pos, ret))
-+ return 0;
-+
-+ return ret;
-+}
-+
-+
- static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- char *buf, char *reply,
- int reply_size,
-@@ -4055,6 +4079,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- reply_size);
- } else if (os_strncmp(buf, "GET_HEMU", 8) == 0) {
- reply_len = hostapd_ctrl_iface_get_hemu(hapd, reply, reply_size);
-+ } else if (os_strncmp(buf, "GET_IBF", 7) == 0) {
-+ reply_len = hostapd_ctrl_iface_get_ibf(hapd, reply, reply_size);
- } else {
- os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
- reply_len = 16;
-diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 0d36477..c2a123a 100644
---- a/hostapd/hostapd_cli.c
-+++ b/hostapd/hostapd_cli.c
-@@ -1586,6 +1586,13 @@ static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
- #endif /* ANDROID */
-
-
-+static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
-+ char *argv[])
-+{
-+ return hostapd_cli_cmd(ctrl, "GET_IBF", 0, NULL, NULL);
-+}
-+
-+
- struct hostapd_cli_cmd {
- const char *cmd;
- int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
-@@ -1787,6 +1794,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
- #endif /* ANDROID */
- { "inband_discovery", hostapd_cli_cmd_inband_discovery, NULL,
- "<tx type(0/1/2)> <interval> = runtime set inband discovery" },
-+ { "get_ibf", hostapd_cli_cmd_get_ibf, NULL,
-+ " = show iBF state (enabled/disabled)"},
- { NULL, NULL, NULL, NULL }
- };
-
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 9249a6b..7a96cb8 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -298,6 +298,7 @@ struct hostapd_config * hostapd_config_defaults(void)
- conf->edcca_enable = EDCCA_MODE_AUTO;
- conf->edcca_compensation = EDCCA_DEFAULT_COMPENSATION;
- conf->three_wire_enable = THREE_WIRE_MODE_DISABLE;
-+ conf->ibf_enable = IBF_DEFAULT_ENABLE;
-
- return conf;
- }
-diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 71cf515..44a0e7e 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1158,6 +1158,7 @@ struct hostapd_config {
- s8 edcca_compensation;
- int *edcca_threshold;
- u8 three_wire_enable;
-+ u8 ibf_enable;
- };
-
- enum three_wire_mode {
-@@ -1198,6 +1199,7 @@ enum mtk_vendor_attr_edcca_ctrl_mode {
- #define EDCCA_MIN_CONFIG_THRES -126
- #define EDCCA_MAX_CONFIG_THRES 0
-
-+#define IBF_DEFAULT_ENABLE 0
-
- static inline enum oper_chan_width
- hostapd_get_oper_chwidth(struct hostapd_config *conf)
-diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index a1d83e4..60ae825 100644
---- a/src/ap/ap_drv_ops.c
-+++ b/src/ap/ap_drv_ops.c
-@@ -1064,3 +1064,17 @@ int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd)
- }
- return hapd->driver->three_wire_ctrl(hapd->drv_priv, hapd->iconf->three_wire_enable);
- }
-+
-+int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd)
-+{
-+ if (!hapd->driver || !hapd->driver->ibf_ctrl)
-+ return 0;
-+ return hapd->driver->ibf_ctrl(hapd->drv_priv, hapd->iconf->ibf_enable);
-+}
-+
-+int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
-+{
-+ if (!hapd->driver || !hapd->driver->ibf_dump)
-+ return 0;
-+ return hapd->driver->ibf_dump(hapd->drv_priv, ibf_enable);
-+}
-\ No newline at end of file
-diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 5ba6297..ab9aedc 100644
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -145,6 +145,8 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
- int hostapd_drv_hemu_ctrl(struct hostapd_data *hapd);
- int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff);
- int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
-+int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
-+int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable);
-
- #include "drivers/driver.h"
-
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index f9dabdf..e44b73d 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -2305,6 +2305,8 @@ dfs_offload:
- goto fail;
- if (hostapd_drv_three_wire_ctrl(hapd) < 0)
- goto fail;
-+ if (hostapd_drv_ibf_ctrl(hapd) < 0)
-+ goto fail;
-
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
- iface->bss[0]->conf->iface);
-diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index ee5a4f4..4050cf8 100644
---- a/src/common/mtk_vendor.h
-+++ b/src/common/mtk_vendor.h
-@@ -13,7 +13,8 @@ enum mtk_nl80211_vendor_subcmds {
- MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
- MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL= 0xc6,
- MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
-- MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL = 0xc8
-+ MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL = 0xc8,
-+ MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL = 0xc9,
- };
-
- enum mtk_vendor_attr_edcca_ctrl {
-@@ -204,6 +205,38 @@ enum mtk_vendor_attr_hemu_ctrl {
- NUM_MTK_VENDOR_ATTRS_HEMU_CTRL - 1
- };
-
-+enum mtk_vendor_attr_ibf_ctrl {
-+ MTK_VENDOR_ATTR_IBF_CTRL_UNSPEC,
-+
-+ MTK_VENDOR_ATTR_IBF_CTRL_ENABLE,
-+
-+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_IBF_CTRL,
-+ MTK_VENDOR_ATTR_IBF_CTRL_MAX =
-+ NUM_MTK_VENDOR_ATTRS_IBF_CTRL - 1
-+};
-+
-+enum mtk_vendor_attr_ibf_dump {
-+ MTK_VENDOR_ATTR_IBF_DUMP_UNSPEC,
-+
-+ MTK_VENDOR_ATTR_IBF_DUMP_ENABLE,
-+
-+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_IBF_DUMP,
-+ MTK_VENDOR_ATTR_IBF_DUMP_MAX =
-+ NUM_MTK_VENDOR_ATTRS_IBF_DUMP - 1
-+};
-+
-+static struct nla_policy
-+ibf_ctrl_policy[NUM_MTK_VENDOR_ATTRS_IBF_CTRL] = {
-+ [MTK_VENDOR_ATTR_IBF_CTRL_ENABLE] = { .type = NLA_U8 },
-+};
-+
-+static struct nla_policy
-+ibf_dump_policy[NUM_MTK_VENDOR_ATTRS_IBF_DUMP] = {
-+ [MTK_VENDOR_ATTR_IBF_DUMP_ENABLE] = { .type = NLA_U8 },
-+};
-+
-
- #define CSI_MAX_COUNT 256
- #define ETH_ALEN 6
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 9ca19af..71ded61 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -1628,6 +1628,11 @@ struct wpa_driver_ap_params {
- * hemu onoff=<val> (bitmap- UL MU-MIMO(bit3), DL MU-MIMO(bit2), UL OFDMA(bit1), DL OFDMA(bit0))
- */
- u8 hemu_onoff;
-+
-+ /**
-+ * ibf_enable=<val>
-+ */
-+ u8 ibf_enable;
- };
-
- struct wpa_driver_mesh_bss_params {
-@@ -4701,6 +4706,20 @@ struct wpa_driver_ops {
- *
- */
- int (*three_wire_ctrl)(void *priv, u8 three_wire_enable);
-+
-+ /**
-+ * ibf_ctrl - ctrl disable/enable for ibf
-+ * @priv: Private driver interface data
-+ *
-+ */
-+ int (*ibf_ctrl)(void *priv, u8 ibf_enable);
-+
-+ /**
-+ * ibf_dump - dump ibf
-+ * @priv: Private driver interface data
-+ *
-+ */
-+ int (*ibf_dump)(void *priv, u8 *ibf_enable);
- };
-
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 2bb8cc2..e974f85 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -12670,6 +12670,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
- return ret;
- }
-
-+static int nl80211_ibf_enable(void *priv, u8 ibf_enable)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_ibf_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting ibf control");
-+ return 0;
-+ }
-+
-+ msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR);
-+ if (!msg)
-+ goto fail;
-+
-+ if (nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
-+ nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL))
-+ goto fail;
-+
-+ data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA);
-+ if (!data)
-+ goto fail;
-+
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_IBF_CTRL_ENABLE, ibf_enable);
-+
-+ 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 ibf_enable. ret=%d (%s)", ret, strerror(-ret));
-+ }
-+
-+ return ret;
-+
-+fail:
-+ nlmsg_free(msg);
-+ return -ENOBUFS;
-+}
-+
-+static int ibf_dump_handler(struct nl_msg *msg, void *arg)
-+{
-+ u8 *ibf_enable = (u8 *) arg;
-+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
-+ struct nlattr *tb_vendor[MTK_VENDOR_ATTR_IBF_DUMP_MAX + 1];
-+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-+ struct nlattr *nl_vend, *attr;
-+
-+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
-+ genlmsg_attrlen(gnlh, 0), NULL);
-+
-+ nl_vend = tb[NL80211_ATTR_VENDOR_DATA];
-+ if (!nl_vend)
-+ return NL_SKIP;
-+
-+ nla_parse(tb_vendor, MTK_VENDOR_ATTR_IBF_DUMP_MAX,
-+ nla_data(nl_vend), nla_len(nl_vend), NULL);
-+
-+ attr = tb_vendor[MTK_VENDOR_ATTR_IBF_DUMP_ENABLE];
-+ if (!attr) {
-+ wpa_printf(MSG_ERROR, "nl80211: cannot find MTK_VENDOR_ATTR_IBF_DUMP_ENABLE");
-+ return NL_SKIP;
-+ }
-+
-+ *ibf_enable = nla_get_u8(attr);
-+
-+ return NL_SKIP;
-+}
-+
-+static int
-+nl80211_ibf_dump(void *priv, u8 *ibf_enable)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_VENDOR);
-+ if (!msg)
-+ goto fail;
-+
-+ if (nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
-+ nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL))
-+ goto fail;
-+
-+ data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA | NLA_F_NESTED);
-+ if (!data)
-+ goto fail;
-+
-+ nla_nest_end(msg, data);
-+
-+ ret = send_and_recv_msgs(drv, msg, ibf_dump_handler, ibf_enable, NULL, NULL);
-+
-+ if (ret) {
-+ wpa_printf(MSG_ERROR, "Failed to dump ibf_enable. ret=%d (%s)", ret, strerror(-ret));
-+ }
-+
-+ return ret;
-+
-+fail:
-+ nlmsg_free(msg);
-+ return -ENOBUFS;
-+}
-+
- const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- .name = "nl80211",
- .desc = "Linux nl80211/cfg80211",
-@@ -12822,4 +12928,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,
-+ .ibf_ctrl = nl80211_ibf_enable,
-+ .ibf_dump = nl80211_ibf_dump,
- };
-diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 9fe7811..607592c 100644
---- a/src/drivers/driver_nl80211.h
-+++ b/src/drivers/driver_nl80211.h
-@@ -184,6 +184,7 @@ struct wpa_driver_nl80211_data {
- unsigned int mtk_edcca_vendor_cmd_avail:1;
- unsigned int mtk_hemu_vendor_cmd_avail:1;
- unsigned int mtk_3wire_vendor_cmd_avail:1;
-+ unsigned int mtk_ibf_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 04bc54e..9ecc0ff 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1062,6 +1062,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- case MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL :
- drv->mtk_3wire_vendor_cmd_avail = 1;
- break;
-+ case MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL:
-+ drv->mtk_ibf_vendor_cmd_avail = 1;
-+ break;
- }
- }
-
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch b/recipes-wifi/hostapd/files/patches/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
deleted file mode 100644
index c1fc3f1..0000000
--- a/recipes-wifi/hostapd/files/patches/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
+++ /dev/null
@@ -1,376 +0,0 @@
-From 782f38f2eec27e438e55cb09e824a6ffc1c3eb18 Mon Sep 17 00:00:00 2001
-From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Date: Fri, 7 Oct 2022 10:46:29 +0800
-Subject: [PATCH 99909/99910] hostapd: mtk: Add DFS and ZWDFS support
-
-Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
----
- hostapd/config_file.c | 4 ++
- hostapd/ctrl_iface.c | 95 ++++++++++++++++++++++++++++++++++++
- src/ap/ap_config.h | 13 +++++
- src/ap/dfs.c | 35 +++++++------
- src/ap/dfs.h | 15 ++++++
- src/ap/hostapd.c | 4 +-
- src/drivers/driver.h | 7 +++
- src/drivers/driver_nl80211.c | 29 +++++++++++
- src/drivers/nl80211_copy.h | 1 +
- 9 files changed, 186 insertions(+), 17 deletions(-)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index d9d882c..fd61448 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -4801,6 +4801,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;
-+ } else if (os_strcmp(buf, "dfs_detect_mode") == 0) { /*bypass channel switch*/
-+ u8 en = strtol(pos, NULL, 10);
-+
-+ conf->dfs_detect_mode = en;
- } else {
- wpa_printf(MSG_ERROR,
- "Line %d: unknown configuration item '%s'",
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c881d37..6ea1573 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -3522,6 +3522,96 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
- }
-
-
-+static int
-+hostapd_ctrl_iface_set_dfs_detect_mode(struct hostapd_data *hapd, char *value,
-+ char *buf, size_t buflen)
-+{
-+ u8 dfs_detect_mode;
-+
-+ if (!value)
-+ return -1;
-+
-+ dfs_detect_mode = strtol(value, NULL, 10);
-+ if (dfs_detect_mode > DFS_DETECT_MODE_MAX) {
-+ wpa_printf(MSG_ERROR, "Invalid value for dfs detect mode");
-+ return -1;
-+ }
-+ hapd->iconf->dfs_detect_mode = dfs_detect_mode;
-+
-+ return os_snprintf(buf, buflen, "OK\n");
-+}
-+
-+
-+static int
-+hostapd_ctrl_iface_set_offchan_ctrl(struct hostapd_data *hapd, char *cmd,
-+ char *buf, size_t buflen)
-+{
-+ struct hostapd_iface *iface = hapd->iface;
-+ char *pos, *param;
-+ enum hostapd_hw_mode hw_mode;
-+ bool chan_found = false;
-+ int i, num_available_chandefs, channel, chan_width, sec = 0;
-+ int sec_chan_idx_80p80 = -1;
-+ u8 oper_centr_freq_seg0_idx, oper_centr_freq_seg1_idx;
-+ struct hostapd_channel_data *chan;
-+ enum dfs_channel_type type = DFS_NO_CAC_YET;
-+
-+ param = os_strchr(cmd, ' ');
-+ if (!param)
-+ return -1;
-+ *param++ = '\0';
-+
-+ pos = os_strstr(param, "chan=");
-+ if (pos)
-+ channel = strtol(pos + 5, NULL, 10);
-+ else
-+ return -1;
-+
-+ num_available_chandefs = dfs_find_channel(iface, NULL, 0, type);
-+ for (i = 0; i < num_available_chandefs; i++) {
-+ dfs_find_channel(iface, &chan, i, type);
-+ if (chan->chan == channel) {
-+ chan_found = true;
-+ break;
-+ }
-+ }
-+
-+ if (!chan_found)
-+ return -1;
-+
-+ if (iface->conf->secondary_channel)
-+ sec = 1;
-+
-+ dfs_adjust_center_freq(iface, chan,
-+ sec,
-+ sec_chan_idx_80p80,
-+ &oper_centr_freq_seg0_idx,
-+ &oper_centr_freq_seg1_idx);
-+
-+ if (hostapd_start_dfs_cac(iface, iface->conf->hw_mode,
-+ chan->freq, chan->chan,
-+ iface->conf->ieee80211n,
-+ iface->conf->ieee80211ac,
-+ iface->conf->ieee80211ax,
-+ iface->conf->ieee80211be,
-+ sec, hostapd_get_oper_chwidth(iface->conf),
-+ oper_centr_freq_seg0_idx,
-+ oper_centr_freq_seg1_idx, true)) {
-+ wpa_printf(MSG_ERROR, "DFS failed to start CAC offchannel");
-+ iface->radar_background.channel = -1;
-+ return -1;
-+ }
-+
-+ iface->radar_background.channel = chan->chan;
-+ iface->radar_background.freq = chan->freq;
-+ 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;
-+
-+ 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,
-@@ -4081,6 +4171,11 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- reply_len = hostapd_ctrl_iface_get_hemu(hapd, reply, reply_size);
- } else if (os_strncmp(buf, "GET_IBF", 7) == 0) {
- reply_len = hostapd_ctrl_iface_get_ibf(hapd, reply, reply_size);
-+ } else if (os_strncmp(buf, "DFS_DETECT_MODE ", 16) == 0) {
-+ reply_len = hostapd_ctrl_iface_set_dfs_detect_mode(hapd, buf + 16,
-+ reply, reply_size);
-+ } else if (os_strncmp(buf, "SET_OFFCHAN_CTRL", 16) == 0) {
-+ reply_len = hostapd_ctrl_iface_set_offchan_ctrl(hapd, buf + 16, 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 44a0e7e..3f5afdf 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1159,6 +1159,7 @@ struct hostapd_config {
- int *edcca_threshold;
- u8 three_wire_enable;
- u8 ibf_enable;
-+ u8 dfs_detect_mode;
- };
-
- enum three_wire_mode {
-@@ -1173,6 +1174,18 @@ enum three_wire_mode {
- NUM_THREE_WIRE_MODE - 1
- };
-
-+enum dfs_mode {
-+ DFS_DETECT_MODE_DISABLE,
-+ DFS_DETECT_MODE_AP_ENABLE,
-+ DFS_DETECT_MODE_BACKGROUND_ENABLE,
-+ DFS_DETECT_MODE_ALL_ENABLE,
-+
-+ /* keep last */
-+ NUM_DFS_DETECT_MODE,
-+ DFS_DETECT_MODE_MAX =
-+ NUM_DFS_DETECT_MODE - 1
-+};
-+
- enum edcca_mode {
- EDCCA_MODE_FORCE_DISABLE = 0,
- EDCCA_MODE_AUTO = 1,
-diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index b5d105d..1c3f678 100644
---- a/src/ap/dfs.c
-+++ b/src/ap/dfs.c
-@@ -19,13 +19,6 @@
- #include "dfs.h"
- #include "crypto/crypto.h"
-
--
--enum dfs_channel_type {
-- DFS_ANY_CHANNEL,
-- DFS_AVAILABLE, /* non-radar or radar-available */
-- DFS_NO_CAC_YET, /* radar-not-yet-available */
--};
--
- static struct hostapd_channel_data *
- dfs_downgrade_bandwidth(struct hostapd_iface *iface, int *secondary_channel,
- u8 *oper_centr_freq_seg0_idx,
-@@ -238,9 +231,9 @@ static int is_in_chanlist(struct hostapd_iface *iface,
- * - hapd->vht/he_oper_centr_freq_seg0_idx
- * - hapd->vht/he_oper_centr_freq_seg1_idx
- */
--static int dfs_find_channel(struct hostapd_iface *iface,
-- struct hostapd_channel_data **ret_chan,
-- int idx, enum dfs_channel_type type)
-+int dfs_find_channel(struct hostapd_iface *iface,
-+ struct hostapd_channel_data **ret_chan,
-+ int idx, enum dfs_channel_type type)
- {
- struct hostapd_hw_modes *mode;
- struct hostapd_channel_data *chan;
-@@ -299,12 +292,12 @@ static int dfs_find_channel(struct hostapd_iface *iface,
- }
-
-
--static void dfs_adjust_center_freq(struct hostapd_iface *iface,
-- struct hostapd_channel_data *chan,
-- int secondary_channel,
-- int sec_chan_idx_80p80,
-- u8 *oper_centr_freq_seg0_idx,
-- u8 *oper_centr_freq_seg1_idx)
-+void dfs_adjust_center_freq(struct hostapd_iface *iface,
-+ struct hostapd_channel_data *chan,
-+ int secondary_channel,
-+ int sec_chan_idx_80p80,
-+ u8 *oper_centr_freq_seg0_idx,
-+ u8 *oper_centr_freq_seg1_idx)
- {
- if (!iface->conf->ieee80211ac && !iface->conf->ieee80211ax)
- return;
-@@ -1317,6 +1310,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");
-
-+ /* Skip channel switch when background dfs detect mode is on */
-+ if (iface->conf->dfs_detect_mode == DFS_DETECT_MODE_BACKGROUND_ENABLE ||
-+ iface->conf->dfs_detect_mode == DFS_DETECT_MODE_ALL_ENABLE)
-+ return 0;
-+
- /* Check if CSA in progress */
- if (hostapd_csa_in_progress(iface))
- return 0;
-@@ -1365,6 +1363,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");
-
-+ /* Skip channel switch when dfs detect mode is on */
-+ if (iface->conf->dfs_detect_mode == DFS_DETECT_MODE_AP_ENABLE ||
-+ iface->conf->dfs_detect_mode == DFS_DETECT_MODE_ALL_ENABLE)
-+ return 0;
-+
- /* Check if CSA in progress */
- if (hostapd_csa_in_progress(iface))
- return 0;
-diff --git a/src/ap/dfs.h b/src/ap/dfs.h
-index 606c1b3..c2556d2 100644
---- a/src/ap/dfs.h
-+++ b/src/ap/dfs.h
-@@ -9,6 +9,12 @@
- #ifndef DFS_H
- #define DFS_H
-
-+enum dfs_channel_type {
-+ DFS_ANY_CHANNEL,
-+ DFS_AVAILABLE, /* non-radar or radar-available */
-+ DFS_NO_CAC_YET, /* radar-not-yet-available */
-+};
-+
- int hostapd_handle_dfs(struct hostapd_iface *iface);
-
- int hostapd_dfs_complete_cac(struct hostapd_iface *iface, int success, int freq,
-@@ -32,5 +38,14 @@ int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
- int hostapd_handle_dfs_offload(struct hostapd_iface *iface);
- int hostapd_is_dfs_overlap(struct hostapd_iface *iface, enum chan_width width,
- int center_freq);
-+int dfs_find_channel(struct hostapd_iface *iface,
-+ struct hostapd_channel_data **ret_chan,
-+ int idx, enum dfs_channel_type type);
-+void dfs_adjust_center_freq(struct hostapd_iface *iface,
-+ struct hostapd_channel_data *chan,
-+ int secondary_channel,
-+ int sec_chan_idx_80p80,
-+ u8 *oper_centr_freq_seg0_idx,
-+ u8 *oper_centr_freq_seg1_idx);
-
- #endif /* DFS_H */
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index e44b73d..793ce2f 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -1463,7 +1463,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
- return -1;
- }
-
-- if (!conf->start_disabled && ieee802_11_set_beacon(hapd) < 0)
-+ if (conf->start_disabled)
-+ hapd->driver->start_disabled(hapd->drv_priv);
-+ else if (ieee802_11_set_beacon(hapd) < 0)
- return -1;
-
- if (flush_old_stations && !conf->start_disabled &&
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 71ded61..aa23fbd 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -4720,6 +4720,13 @@ struct wpa_driver_ops {
- *
- */
- int (*ibf_dump)(void *priv, u8 *ibf_enable);
-+
-+ /**
-+ * start_disabled - set start_disabled to cfg80211
-+ * @priv: Private driver interface data
-+ *
-+ */
-+ int (*start_disabled)(void *priv);
- };
-
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index e974f85..003adc4 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -12776,6 +12776,34 @@ fail:
- return -ENOBUFS;
- }
-
-+static int nl80211_start_disabled(void *priv)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ msg = nl80211_bss_msg(bss, 0, NL80211_CMD_NEW_BEACON);
-+ if (!msg)
-+ goto fail;
-+
-+ if (nla_put_flag(msg, NL80211_ATTR_START_DISABLED))
-+ goto fail;
-+
-+ ret = send_and_recv_msgs_connect_handle(drv, msg, bss, 1);
-+
-+ if (ret)
-+ wpa_printf(MSG_ERROR, "Failed to set start_disabled. ret=%d (%s)",
-+ ret, strerror(-ret));
-+
-+ return ret;
-+
-+fail:
-+ nlmsg_free(msg);
-+ return ret;
-+}
-+
- const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- .name = "nl80211",
- .desc = "Linux nl80211/cfg80211",
-@@ -12930,4 +12958,5 @@ 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,
-+ .start_disabled = nl80211_start_disabled,
- };
-diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index c4bf3ad..79bc76c 100644
---- a/src/drivers/nl80211_copy.h
-+++ b/src/drivers/nl80211_copy.h
-@@ -3176,6 +3176,7 @@ enum nl80211_attrs {
- NL80211_ATTR_EHT_CAPABILITY,
-
- /* add attributes here, update the policy in nl80211.c */
-+ NL80211_ATTR_START_DISABLED = 999,
-
- __NL80211_ATTR_AFTER_LAST,
- NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch b/recipes-wifi/hostapd/files/patches/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
deleted file mode 100644
index c05a444..0000000
--- a/recipes-wifi/hostapd/files/patches/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
+++ /dev/null
@@ -1,400 +0,0 @@
-From 6cf5ec59e09945a075909b8070d9795869db081e 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 99910/99910] hostapd: mtk: Add amsdu set get ctrl
-
----
- hostapd/config_file.c | 9 +++
- hostapd/ctrl_iface.c | 26 +++++++
- hostapd/hostapd_cli.c | 9 +++
- src/ap/ap_config.c | 1 +
- src/ap/ap_config.h | 1 +
- src/ap/ap_drv_ops.c | 14 ++++
- src/ap/ap_drv_ops.h | 2 +
- src/ap/hostapd.c | 2 +
- src/common/mtk_vendor.h | 17 ++++-
- src/drivers/driver.h | 9 +++
- src/drivers/driver_nl80211.c | 114 ++++++++++++++++++++++++++++++
- src/drivers/driver_nl80211.h | 1 +
- src/drivers/driver_nl80211_capa.c | 3 +
- 13 files changed, 207 insertions(+), 1 deletion(-)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index fd61448..759033b 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -4805,6 +4805,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- u8 en = strtol(pos, NULL, 10);
-
- conf->dfs_detect_mode = en;
-+ } else if (os_strcmp(buf, "amsdu") == 0) {
-+ int val = atoi(pos);
-+ if (val < 0 || val > 1) {
-+ wpa_printf(MSG_ERROR,
-+ "Line %d: invalid amsdu value",
-+ line);
-+ return 1;
-+ }
-+ conf->amsdu = val;
- } else {
- wpa_printf(MSG_ERROR,
- "Line %d: unknown configuration item '%s'",
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 6ea1573..0ad8451 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -3612,6 +3612,30 @@ hostapd_ctrl_iface_set_offchan_ctrl(struct hostapd_data *hapd, char *cmd,
- }
-
-
-+static int
-+hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
-+ size_t buflen)
-+{
-+ u8 amsdu;
-+ int ret;
-+ char *pos, *end;
-+
-+ pos = buf;
-+ end = buf + buflen;
-+
-+ if (hostapd_drv_amsdu_dump(hapd, &amsdu) == 0) {
-+ hapd->iconf->amsdu = amsdu;
-+ ret = os_snprintf(pos, end - pos, "[hostapd_cli] AMSDU: %u\n",
-+ hapd->iconf->amsdu);
-+ }
-+
-+ if (os_snprintf_error(end - pos, ret))
-+ return 0;
-+
-+ return ret;
-+}
-+
-+
- static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- char *buf, char *reply,
- int reply_size,
-@@ -4176,6 +4200,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
- reply, reply_size);
- } else if (os_strncmp(buf, "SET_OFFCHAN_CTRL", 16) == 0) {
- reply_len = hostapd_ctrl_iface_set_offchan_ctrl(hapd, buf + 16, reply, reply_size);
-+ } else if (os_strncmp(buf, "GET_AMSDU", 9) == 0) {
-+ reply_len = hostapd_ctrl_iface_get_amsdu(hapd, reply, reply_size);
- } else {
- os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
- reply_len = 16;
-diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index c2a123a..30b3392 100644
---- a/hostapd/hostapd_cli.c
-+++ b/hostapd/hostapd_cli.c
-@@ -1593,6 +1593,13 @@ static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
- }
-
-
-+static int hostapd_cli_cmd_get_amsdu(struct wpa_ctrl *ctrl, int argc,
-+ char *argv[])
-+{
-+ return hostapd_cli_cmd(ctrl, "GET_AMSDU", 0, NULL, NULL);
-+}
-+
-+
- struct hostapd_cli_cmd {
- const char *cmd;
- int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
-@@ -1796,6 +1803,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
- "<tx type(0/1/2)> <interval> = runtime set inband discovery" },
- { "get_ibf", hostapd_cli_cmd_get_ibf, NULL,
- " = show iBF state (enabled/disabled)"},
-+ { "get_amsdu", hostapd_cli_cmd_get_amsdu, NULL,
-+ " = show AMSDU state"},
- { NULL, NULL, NULL, NULL }
- };
-
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 7a96cb8..85ad5e4 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -299,6 +299,7 @@ struct hostapd_config * hostapd_config_defaults(void)
- conf->edcca_compensation = EDCCA_DEFAULT_COMPENSATION;
- conf->three_wire_enable = THREE_WIRE_MODE_DISABLE;
- conf->ibf_enable = IBF_DEFAULT_ENABLE;
-+ conf->amsdu = 1;
-
- return conf;
- }
-diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 3f5afdf..92f1bd6 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1160,6 +1160,7 @@ struct hostapd_config {
- u8 three_wire_enable;
- u8 ibf_enable;
- u8 dfs_detect_mode;
-+ u8 amsdu;
- };
-
- enum three_wire_mode {
-diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 60ae825..1a82f23 100644
---- a/src/ap/ap_drv_ops.c
-+++ b/src/ap/ap_drv_ops.c
-@@ -1077,4 +1077,18 @@ int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
- if (!hapd->driver || !hapd->driver->ibf_dump)
- return 0;
- return hapd->driver->ibf_dump(hapd->drv_priv, ibf_enable);
-+}
-+
-+int hostapd_drv_amsdu_ctrl(struct hostapd_data *hapd)
-+{
-+ if (!hapd->driver || !hapd->driver->amsdu_ctrl)
-+ return 0;
-+ return hapd->driver->amsdu_ctrl(hapd->drv_priv, hapd->iconf->amsdu);
-+}
-+
-+int hostapd_drv_amsdu_dump(struct hostapd_data *hapd, u8 *amsdu)
-+{
-+ if (!hapd->driver || !hapd->driver->amsdu_dump)
-+ return 0;
-+ return hapd->driver->amsdu_dump(hapd->drv_priv, amsdu);
- }
-\ No newline at end of file
-diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index ab9aedc..4406666 100644
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -147,6 +147,8 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff);
- int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
- int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
- int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable);
-+int hostapd_drv_amsdu_ctrl(struct hostapd_data *hapd);
-+int hostapd_drv_amsdu_dump(struct hostapd_data *hapd, u8 *amsdu);
-
- #include "drivers/driver.h"
-
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 793ce2f..aef01f2 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -2309,6 +2309,8 @@ dfs_offload:
- goto fail;
- if (hostapd_drv_ibf_ctrl(hapd) < 0)
- goto fail;
-+ if (hostapd_drv_amsdu_ctrl(hapd) < 0)
-+ goto fail;
-
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
- iface->bss[0]->conf->iface);
-diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 4050cf8..0999ea9 100644
---- a/src/common/mtk_vendor.h
-+++ b/src/common/mtk_vendor.h
-@@ -167,7 +167,6 @@ enum mtk_vendor_attr_wireless_ctrl {
- MTK_VENDOR_ATTR_WIRELESS_CTRL_NUSERS_OFDMA,
- MTK_VENDOR_ATTR_WIRELESS_CTRL_BA_BUFFER_SIZE,
- MTK_VENDOR_ATTR_WIRELESS_CTRL_MIMO,
-- MTK_VENDOR_ATTR_WIRELESS_CTRL_AMPDU,
- MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU,
- MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT,
-
-@@ -177,6 +176,22 @@ enum mtk_vendor_attr_wireless_ctrl {
- NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL - 1
- };
-
-+enum mtk_vendor_attr_wireless_dump {
-+ MTK_VENDOR_ATTR_WIRELESS_DUMP_UNSPEC,
-+
-+ MTK_VENDOR_ATTR_WIRELESS_DUMP_AMSDU,
-+
-+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_WIRELESS_DUMP,
-+ MTK_VENDOR_ATTR_WIRELESS_DUMP_MAX =
-+ NUM_MTK_VENDOR_ATTRS_WIRELESS_DUMP - 1
-+};
-+
-+static const struct nla_policy
-+wireless_dump_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_DUMP] = {
-+ [MTK_VENDOR_ATTR_WIRELESS_DUMP_AMSDU] = { .type = NLA_U8 },
-+};
-+
- enum mtk_vendor_attr_rfeature_ctrl {
- MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
-
-diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index aa23fbd..b07aaf3 100644
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -4727,6 +4727,15 @@ struct wpa_driver_ops {
- *
- */
- int (*start_disabled)(void *priv);
-+
-+ /**
-+ * amsdu_ctrl - enable/disable amsdu
-+ * amsdu_dump - get current amsdu status
-+ * @priv: Private driver interface data
-+ *
-+ */
-+ int (*amsdu_ctrl)(void *priv, u8 amsdu);
-+ int (*amsdu_dump)(void *priv, u8 *amsdu);
- };
-
- /**
-diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 003adc4..5c04284 100644
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -12804,6 +12804,118 @@ fail:
- return ret;
- }
-
-+static int nl80211_enable_amsdu(void *priv, u8 amsdu)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_wireless_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support setting ap wireless control");
-+ return 0;
-+ }
-+
-+ msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR);
-+ if (!msg)
-+ goto fail;
-+
-+ if (nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
-+ nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL))
-+ goto fail;
-+
-+ data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA);
-+ if (!data)
-+ goto fail;
-+
-+ nla_put_u8(msg, MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU, amsdu);
-+
-+ 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 amsdu. ret=%d (%s)", ret, strerror(-ret));
-+ }
-+
-+ return ret;
-+
-+fail:
-+ nlmsg_free(msg);
-+ return -ENOBUFS;
-+}
-+
-+static int dump_amsdu_handler(struct nl_msg *msg, void *arg)
-+{
-+ u8 *amsdu = (u8 *) arg;
-+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
-+ struct nlattr *tb_vendor[MTK_VENDOR_ATTR_WIRELESS_DUMP_MAX + 1];
-+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-+ struct nlattr *nl_vend, *attr_amsdu;
-+
-+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
-+ genlmsg_attrlen(gnlh, 0), NULL);
-+
-+ nl_vend = tb[NL80211_ATTR_VENDOR_DATA];
-+ if (!nl_vend)
-+ return NL_SKIP;
-+
-+ nla_parse(tb_vendor, MTK_VENDOR_ATTR_WIRELESS_DUMP_MAX,
-+ nla_data(nl_vend), nla_len(nl_vend), NULL);
-+
-+ attr_amsdu = tb_vendor[MTK_VENDOR_ATTR_WIRELESS_DUMP_AMSDU];
-+ if (!attr_amsdu ){
-+ wpa_printf(MSG_ERROR, "nl80211: cannot find vendor attributes");
-+ return NL_SKIP;
-+ }
-+
-+ *amsdu = nla_get_u8(attr_amsdu);
-+
-+ return NL_SKIP;
-+}
-+
-+static int
-+nl80211_dump_amsdu(void *priv, u8 *amsdu)
-+{
-+ struct i802_bss *bss = priv;
-+ struct wpa_driver_nl80211_data *drv = bss->drv;
-+ struct nl_msg *msg;
-+ struct nlattr *data;
-+ int ret;
-+
-+ if (!drv->mtk_wireless_vendor_cmd_avail) {
-+ wpa_printf(MSG_INFO,
-+ "nl80211: Driver does not support ap_wireless control");
-+ return 0;
-+ }
-+
-+ msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_VENDOR);
-+ if (!msg)
-+ goto fail;
-+
-+ if (nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
-+ nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL))
-+ goto fail;
-+
-+ data = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA);
-+ if (!data)
-+ goto fail;
-+
-+ nla_nest_end(msg, data);
-+
-+ ret = send_and_recv_msgs(drv, msg, dump_amsdu_handler, amsdu, NULL, NULL);
-+
-+ if (ret) {
-+ wpa_printf(MSG_ERROR, "Failed to dump amsdu. ret=%d (%s)", ret, strerror(-ret));
-+ }
-+
-+ return ret;
-+
-+fail:
-+ nlmsg_free(msg);
-+ return -ENOBUFS;
-+}
-+
- const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- .name = "nl80211",
- .desc = "Linux nl80211/cfg80211",
-@@ -12959,4 +13071,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
- .ibf_ctrl = nl80211_ibf_enable,
- .ibf_dump = nl80211_ibf_dump,
- .start_disabled = nl80211_start_disabled,
-+ .amsdu_ctrl = nl80211_enable_amsdu,
-+ .amsdu_dump = nl80211_dump_amsdu,
- };
-diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 607592c..e570224 100644
---- a/src/drivers/driver_nl80211.h
-+++ b/src/drivers/driver_nl80211.h
-@@ -185,6 +185,7 @@ struct wpa_driver_nl80211_data {
- unsigned int mtk_hemu_vendor_cmd_avail:1;
- unsigned int mtk_3wire_vendor_cmd_avail:1;
- unsigned int mtk_ibf_vendor_cmd_avail:1;
-+ unsigned int mtk_wireless_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 9ecc0ff..fcfa68b 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1065,6 +1065,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- case MTK_NL80211_VENDOR_SUBCMD_IBF_CTRL:
- drv->mtk_ibf_vendor_cmd_avail = 1;
- break;
-+ case MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL:
-+ drv->mtk_wireless_vendor_cmd_avail = 1;
-+ break;
- }
- }
-
---
-2.36.1
-
diff --git a/recipes-wifi/hostapd/files/patches/99911-hostapd-mtk-Add-he_ldpc-configuration.patch b/recipes-wifi/hostapd/files/patches/99911-hostapd-mtk-Add-he_ldpc-configuration.patch
deleted file mode 100644
index 2e8dfe0..0000000
--- a/recipes-wifi/hostapd/files/patches/99911-hostapd-mtk-Add-he_ldpc-configuration.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 216258435a119d48c233b63c2383850bc5f86e94 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] hostapd: mtk: Add he_ldpc configuration
-
----
- hostapd/config_file.c | 2 ++
- hostapd/hostapd.conf | 5 +++++
- src/ap/ap_config.c | 1 +
- src/ap/ap_config.h | 1 +
- src/ap/ieee802_11_he.c | 7 +++++++
- src/common/ieee802_11_defs.h | 3 +++
- 6 files changed, 19 insertions(+)
-
-diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 10ea525..4237a5c 100644
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -3508,6 +3508,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- conf->he_phy_capab.he_su_beamformee = atoi(pos);
- } else if (os_strcmp(buf, "he_mu_beamformer") == 0) {
- conf->he_phy_capab.he_mu_beamformer = atoi(pos);
-+ } else if (os_strcmp(buf, "he_ldpc") == 0) {
-+ conf->he_phy_capab.he_ldpc = atoi(pos);
- } else if (os_strcmp(buf, "he_bss_color") == 0) {
- 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 ea67aa1..e3a5eb3 100644
---- a/hostapd/hostapd.conf
-+++ b/hostapd/hostapd.conf
-@@ -830,6 +830,11 @@ wmm_ac_vo_acm=0
- # 1 = supported
- #he_mu_beamformer=1
-
-+#he_ldpc: HE LDPC support
-+# 0 = not supported
-+# 1 = supported (default)
-+#he_ldpc=1
-+
- # he_bss_color: BSS color (1-63)
- #he_bss_color=1
-
-diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 85ad5e4..b283de6 100644
---- a/src/ap/ap_config.c
-+++ b/src/ap/ap_config.c
-@@ -268,6 +268,7 @@ struct hostapd_config * hostapd_config_defaults(void)
- #endif /* CONFIG_ACS */
-
- #ifdef CONFIG_IEEE80211AX
-+ conf->he_phy_capab.he_ldpc = 1;
- conf->he_op.he_rts_threshold = HE_OPERATION_RTS_THRESHOLD_MASK >>
- 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 a9ac396..b8b20a7 100644
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -929,6 +929,7 @@ struct hostapd_bss_config {
- * struct he_phy_capabilities_info - HE PHY capabilities
- */
- struct he_phy_capabilities_info {
-+ bool he_ldpc;
- bool he_su_beamformer;
- bool he_su_beamformee;
- bool he_mu_beamformer;
-diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
-index b5b7e5d..f27aeb1 100644
---- a/src/ap/ieee802_11_he.c
-+++ b/src/ap/ieee802_11_he.c
-@@ -138,6 +138,13 @@ u8 * hostapd_eid_he_capab(struct hostapd_data *hapd, u8 *eid,
- os_memcpy(&cap->optional[mcs_nss_size],
- mode->he_capab[opmode].ppet, ppet_size);
-
-+ if (hapd->iface->conf->he_phy_capab.he_ldpc)
-+ cap->he_phy_capab_info[HE_PHYCAP_LDPC_CODING_IN_PAYLOAD_IDX] |=
-+ HE_PHYCAP_LDPC_CODING_IN_PAYLOAD;
-+ else
-+ cap->he_phy_capab_info[HE_PHYCAP_LDPC_CODING_IN_PAYLOAD_IDX] &=
-+ ~HE_PHYCAP_LDPC_CODING_IN_PAYLOAD;
-+
- if (hapd->iface->conf->he_phy_capab.he_su_beamformer)
- 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 65e125e..62088bd 100644
---- a/src/common/ieee802_11_defs.h
-+++ b/src/common/ieee802_11_defs.h
-@@ -2298,6 +2298,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))
-
-+#define HE_PHYCAP_LDPC_CODING_IN_PAYLOAD_IDX 1
-+#define HE_PHYCAP_LDPC_CODING_IN_PAYLOAD ((u8) BIT(5))
-+
- #define HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX 3
- #define HE_PHYCAP_SU_BEAMFORMER_CAPAB ((u8) BIT(7))
- #define HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX 4
---
-2.39.0
-
diff --git a/recipes-wifi/hostapd/files/patches/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch b/recipes-wifi/hostapd/files/patches/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
deleted file mode 100644
index df9dcc5..0000000
--- a/recipes-wifi/hostapd/files/patches/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9c04bbbe2677cc11b88c867ab7b1df7e408483b5 Mon Sep 17 00:00:00 2001
-From: MeiChia Chiu <meichia.chiu@mediatek.com>
-Date: Tue, 17 Jan 2023 13:25:18 +0800
-Subject: [PATCH] hostapd: mtk: Add the broadcast destination address of Probe
- Response frame on 6 GHz
-
-According to IEEE 802.11ax 26.17.2.3.2,
-if a 6 GHz AP receives a Probe Request frame and responds with a Probe Response frame,
-the Address 1 field of the Probe Response frame shall be set to the broadcast address,
-unless the AP is not indicating its actual SSID in the SSID element of its Beacon frames.
-
-Without this, hostapd fill the Address 1 feild of the Probe Response frame
-with the source address from Probe Request frame on 6 GHz.
-Fix this to use broadcast address instead.
-
-Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
----
- src/ap/beacon.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 1a26f11..f3ea5c2 100644
---- a/src/ap/beacon.c
-+++ b/src/ap/beacon.c
-@@ -1156,8 +1156,13 @@ void handle_probe_req(struct hostapd_data *hapd,
- wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, RX_PROBE_REQUEST "sa=" MACSTR
- " signal=%d", MAC2STR(mgmt->sa), ssi_signal);
-
-- resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
-- &resp_len, false);
-+ if (is_6ghz_op_class(hapd->iconf->op_class) &&
-+ is_broadcast_ether_addr(mgmt->da))
-+ resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL,
-+ &resp_len, true);
-+ else
-+ resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
-+ &resp_len, false);
- if (resp == NULL)
- return;
-
---
-2.39.0
-
diff --git a/recipes-wifi/hostapd/files/patches/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch b/recipes-wifi/hostapd/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
similarity index 96%
rename from recipes-wifi/hostapd/files/patches/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
index f790577..fb7c63f 100644
--- a/recipes-wifi/hostapd/files/patches/99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
@@ -1,8 +1,8 @@
-From 4791a374c9861b0d90db7fbdefe509f4e7d12247 Mon Sep 17 00:00:00 2001
+From cd52509a69c3ba34d9b4146664140fd1ff712aa9 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 99900/99910] hostapd: mtk: Add neighbor report and BSS
- Termination for MBO certification
+Subject: [PATCH 01/15] hostapd: mtk: Add neighbor report and BSS Termination
+ for MBO certification
1. Add hostapd_neighbor_count() and hostapd_neighbor_insert_buffer ()
The first function can count the number of neighbor report in neighbore report
@@ -32,7 +32,7 @@
9 files changed, 252 insertions(+), 5 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index a258492..c2a2822 100644
+index a2584920c..c2a282227 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1338,6 +1338,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
@@ -48,7 +48,7 @@
ret = hostapd_set_iface(hapd->iconf, hapd->conf, cmd, value);
if (ret)
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index d7a0c7c..4a20eb4 100644
+index d7a0c7c80..4a20eb4e1 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -170,6 +170,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
@@ -60,10 +60,10 @@
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index ed3bec7..3f68e76 100644
+index 39b26d602..a87563265 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -557,6 +557,7 @@ struct hostapd_bss_config {
+@@ -558,6 +558,7 @@ struct hostapd_bss_config {
int wnm_sleep_mode;
int wnm_sleep_mode_no_keys;
int bss_transition;
@@ -72,7 +72,7 @@
/* IEEE 802.11u - Interworking */
int interworking;
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 96209ce..18bae5c 100644
+index 96209ce7e..18bae5c8b 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -1203,6 +1203,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
@@ -115,7 +115,7 @@
if (pos) {
unsigned int mbo_reason, cell_pref, reassoc_delay;
diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c
-index 90f1577..5845ff8 100644
+index 90f15778b..5845ff857 100644
--- a/src/ap/gas_serv.c
+++ b/src/ap/gas_serv.c
@@ -19,6 +19,7 @@
@@ -183,7 +183,7 @@
#ifdef CONFIG_FILS
if (info_id == ANQP_FILS_REALM_INFO &&
diff --git a/src/ap/gas_serv.h b/src/ap/gas_serv.h
-index 1528af4..d0241f2 100644
+index 1528af4af..d0241f23c 100644
--- a/src/ap/gas_serv.h
+++ b/src/ap/gas_serv.h
@@ -40,6 +40,8 @@
@@ -196,7 +196,7 @@
* First 15 Hotspot 2.0 vendor specific ANQP-elements can be included in the
* optimized bitmap.
diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
-index 52f25eb..9254d09 100644
+index 52f25eb7a..9254d09fd 100644
--- a/src/ap/neighbor_db.c
+++ b/src/ap/neighbor_db.c
@@ -89,6 +89,38 @@ int hostapd_neighbor_show(struct hostapd_data *hapd, char *buf, size_t buflen)
@@ -330,7 +330,7 @@
+}
+#endif
diff --git a/src/ap/neighbor_db.h b/src/ap/neighbor_db.h
-index 992671b..a1ddc07 100644
+index 992671b62..a1ddc075b 100644
--- a/src/ap/neighbor_db.h
+++ b/src/ap/neighbor_db.h
@@ -24,4 +24,13 @@ int hostapd_neighbor_remove(struct hostapd_data *hapd, const u8 *bssid,
@@ -348,7 +348,7 @@
+#endif
#endif /* NEIGHBOR_DB_H */
diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
-index 3ea92af..4349e1d 100644
+index 3ea92af2d..4349e1df2 100644
--- a/src/ap/wnm_ap.c
+++ b/src/ap/wnm_ap.c
@@ -20,6 +20,7 @@
@@ -471,5 +471,5 @@
return 0;
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch b/recipes-wifi/hostapd/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
similarity index 83%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
index 3c5137d..3f20768 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
@@ -1,14 +1,14 @@
-From 6d95c027c13fba5404fa8d096d55b4a072b2ec59 Mon Sep 17 00:00:00 2001
+From 2a08e4acbe0ff6f6af42df8262178cf153c8868d 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 99901/99910] hostapd: mtk: print sae groups by hostapd ctrl
+Subject: [PATCH 02/15] hostapd: mtk: print sae groups by hostapd ctrl
---
hostapd/ctrl_iface.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c2a2822..bc690c5 100644
+index c2a282227..bc690c526 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1412,6 +1412,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd,
@@ -32,5 +32,5 @@
return -1;
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch b/recipes-wifi/hostapd/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
similarity index 95%
rename from recipes-wifi/hostapd/files/patches/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
index 885c6c9..18d5970 100644
--- a/recipes-wifi/hostapd/files/patches/99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
@@ -1,7 +1,7 @@
-From 7a84545afb1f5bc2784eb5a046d56d869fb52067 Mon Sep 17 00:00:00 2001
+From b2253861a02b5ae8074f36e0a417e05a207891b9 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 99902/99910] hostapd: mtk: add support for runtime set in-band
+Subject: [PATCH 03/15] hostapd: mtk: add support for runtime set in-band
discovery
Usage:
@@ -21,7 +21,7 @@
5 files changed, 98 insertions(+), 4 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index bc690c5..bb8c74f 100644
+index bc690c526..bb8c74fd3 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -826,6 +826,69 @@ static int hostapd_ctrl_iface_send_qos_map_conf(struct hostapd_data *hapd,
@@ -105,7 +105,7 @@
reply_len = hostapd_ctrl_iface_get_config(hapd, reply,
reply_size);
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 85c41d0..db21258 100644
+index 85c41d0c3..db2125805 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -642,6 +642,24 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
@@ -143,7 +143,7 @@
};
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 814e86e..1a26f11 100644
+index 814e86efe..1a26f11ff 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1497,6 +1497,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
@@ -166,7 +166,7 @@
¶ms->fd_frame_tmpl_len);
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 53f2503..5eba0ea 100644
+index 1fa7dd8e0..c695263bf 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4498,9 +4498,10 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg,
@@ -195,7 +195,7 @@
#endif /* CONFIG_FILS */
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index 0568a79..c4bf3ad 100644
+index 0568a7909..c4bf3ad35 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -7379,6 +7379,7 @@ enum nl80211_fils_discovery_attributes {
@@ -207,5 +207,5 @@
/* keep last */
__NL80211_FILS_DISCOVERY_ATTR_LAST,
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches/99903-hostapd-mtk-Add-mtk_vendor.h.patch b/recipes-wifi/hostapd/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
similarity index 97%
rename from recipes-wifi/hostapd/files/patches/99903-hostapd-mtk-Add-mtk_vendor.h.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
index d108ca3..5b1a853 100644
--- a/recipes-wifi/hostapd/files/patches/99903-hostapd-mtk-Add-mtk_vendor.h.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
@@ -1,7 +1,7 @@
-From 8694400211d08019e4c495fc98ca3e3783465044 Mon Sep 17 00:00:00 2001
+From 514ffcc16d420fade1b28478cd785e7709878bc7 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 99903/99910] hostapd: mtk: Add mtk_vendor.h
+Subject: [PATCH 04/15] hostapd: mtk: Add mtk_vendor.h
---
src/common/mtk_vendor.h | 195 ++++++++++++++++++++++++++++++++++++++++
@@ -10,7 +10,7 @@
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
new file mode 100644
-index 0000000..528387f
+index 000000000..528387fa5
--- /dev/null
+++ b/src/common/mtk_vendor.h
@@ -0,0 +1,195 @@
@@ -210,5 +210,5 @@
+};
+#endif /* MTK_VENDOR_H */
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch b/recipes-wifi/hostapd/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
similarity index 96%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index e9bb053..317a678 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
@@ -1,7 +1,7 @@
-From d3d5b514064036fb17729743fa13e25646f468e9 Mon Sep 17 00:00:00 2001
+From f3df970bcf111eb0912f639ac32c0c145e381f95 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 99904/99910] hostapd: mtk: Support EDCCA hostapd configuration
+Subject: [PATCH 05/15] hostapd: mtk: Support EDCCA hostapd configuration
edcca_enable and edcca_compensation and implement edcca related handlers.
---
@@ -20,10 +20,10 @@
12 files changed, 415 insertions(+), 7 deletions(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index eda9db0..0ee8952 100644
+index 24018f721..b5024ccd5 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4753,6 +4753,38 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4755,6 +4755,38 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "eht_mu_beamformer") == 0) {
conf->eht_phy_capab.mu_beamformer = atoi(pos);
#endif /* CONFIG_IEEE80211BE */
@@ -63,7 +63,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index bb8c74f..9c70d54 100644
+index bb8c74fd3..9c70d5419 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -598,6 +598,19 @@ static const char * pbc_status_str(enum pbc_status status)
@@ -213,7 +213,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 4a20eb4..344585a 100644
+index 4a20eb4e1..344585aee 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -294,6 +294,9 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -235,10 +235,10 @@
wpabuf_free(conf->civic);
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 3f68e76..775c567 100644
+index a87563265..4ac469910 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1153,8 +1153,37 @@ struct hostapd_config {
+@@ -1154,8 +1154,37 @@ struct hostapd_config {
#define CH_SWITCH_EHT_ENABLED BIT(0)
#define CH_SWITCH_EHT_DISABLED BIT(1)
unsigned int ch_switch_eht_config;
@@ -277,7 +277,7 @@
static inline enum oper_chan_width
hostapd_get_oper_chwidth(struct hostapd_config *conf)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 0c7aee2..25e967d 100644
+index 0c7aee276..25e967d1b 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1015,3 +1015,27 @@ int hostapd_drv_dpp_listen(struct hostapd_data *hapd, bool enable)
@@ -309,7 +309,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 b4fb766..70a99f4 100644
+index b4fb766ee..70a99f406 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -138,7 +138,10 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd);
@@ -325,10 +325,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 0dd8c13..d05f948 100644
+index 65487ac28..3bb38fec3 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2295,6 +2295,13 @@ dfs_offload:
+@@ -2296,6 +2296,13 @@ dfs_offload:
}
#endif /* CONFIG_MESH */
@@ -343,7 +343,7 @@
iface->bss[0]->conf->iface);
if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 528387f..7056126 100644
+index 528387fa5..70561263c 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -29,14 +29,21 @@ enum mtk_vendor_attr_edcca_ctrl {
@@ -375,7 +375,7 @@
[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 1d2b1b2..3559974 100644
+index 1d2b1b265..35599741c 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4676,6 +4676,10 @@ struct wpa_driver_ops {
@@ -390,7 +390,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 5eba0ea..9c2782c 100644
+index c695263bf..6d4a4dbbe 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -35,6 +35,8 @@
@@ -578,7 +578,7 @@
+ .get_edcca = nl80211_get_edcca,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 6e40d55..13e5d24 100644
+index 6e40d5556..13e5d248c 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -181,6 +181,7 @@ struct wpa_driver_nl80211_data {
@@ -590,7 +590,7 @@
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 7ede0d0..732ae29 100644
+index 7ede0d030..732ae292d 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -18,6 +18,7 @@
@@ -615,5 +615,5 @@
wpa_printf(MSG_DEBUG, "nl80211: Supported vendor command: vendor_id=0x%x subcmd=%u",
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch b/recipes-wifi/hostapd/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
similarity index 94%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
index 1a622f3..27e71da 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch
@@ -1,7 +1,7 @@
-From 893c5f92257a7313a179dc728ba51a74efbfc74a Mon Sep 17 00:00:00 2001
+From 4919444a2dc29c019ec92321109603763c732071 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Tue, 9 Aug 2022 10:23:44 -0700
-Subject: [PATCH 99905/99910] hostapd: mtk: Add hostapd HEMU SET/GET control
+Subject: [PATCH 06/15] hostapd: mtk: Add hostapd HEMU SET/GET control
---
hostapd/config_file.c | 9 +++
@@ -20,10 +20,10 @@
13 files changed, 251 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 0ee8952..b22d10b 100644
+index b5024ccd5..cd27d0890 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -3659,6 +3659,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -3661,6 +3661,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
bss->unsol_bcast_probe_resp_interval = val;
@@ -40,7 +40,7 @@
} else if (os_strcmp(buf, "max_listen_interval") == 0) {
bss->max_listen_interval = atoi(pos);
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 9c70d54..5f71aee 100644
+index 9c70d5419..5f71aeea9 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3441,6 +3441,63 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
@@ -120,7 +120,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index db21258..0d36477 100644
+index db2125805..0d364773b 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1380,6 +1380,20 @@ static int hostapd_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
@@ -156,7 +156,7 @@
{ "dpp_qr_code", hostapd_cli_cmd_dpp_qr_code, NULL,
"report a scanned DPP URI from a QR Code" },
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 344585a..0e1f192 100644
+index 344585aee..0e1f192cf 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -280,6 +280,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -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 775c567..41b8c68 100644
+index 4ac469910..0616c30bb 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1114,6 +1114,7 @@ struct hostapd_config {
+@@ -1115,6 +1115,7 @@ struct hostapd_config {
u8 he_6ghz_rx_ant_pat;
u8 he_6ghz_tx_ant_pat;
u8 he_6ghz_reg_pwr_type;
@@ -180,7 +180,7 @@
/* VHT enable/disable config from CHAN_SWITCH */
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 25e967d..4598737 100644
+index 25e967d1b..4598737a3 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1039,3 +1039,17 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
@@ -202,7 +202,7 @@
+ return hapd->driver->hemu_dump(hapd->drv_priv, hemu_onoff);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 70a99f4..bca39c5 100644
+index 70a99f406..bca39c502 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -142,6 +142,8 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -215,10 +215,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index d05f948..921769d 100644
+index 3bb38fec3..44a378aa9 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2301,6 +2301,8 @@ dfs_offload:
+@@ -2302,6 +2302,8 @@ dfs_offload:
if (hostapd_drv_configure_edcca_threshold(hapd,
hapd->iconf->edcca_threshold) < 0)
goto fail;
@@ -228,7 +228,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 7056126..69a46df 100644
+index 70561263c..69a46dfbb 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -10,6 +10,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -261,7 +261,7 @@
#define ETH_ALEN 6
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 3559974..4cd7505 100644
+index 35599741c..4cd7505db 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1623,6 +1623,11 @@ struct wpa_driver_ap_params {
@@ -292,7 +292,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 9c2782c..73dee2e 100644
+index 6d4a4dbbe..f8b3f40c2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12304,6 +12304,114 @@ fail:
@@ -420,7 +420,7 @@
.dpp_listen = nl80211_dpp_listen,
#endif /* CONFIG_DPP */
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 13e5d24..57f0249 100644
+index 13e5d248c..57f02497e 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -182,6 +182,7 @@ struct wpa_driver_nl80211_data {
@@ -432,7 +432,7 @@
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 732ae29..cc146d9 100644
+index 732ae292d..cc146d9fc 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1056,6 +1056,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -446,5 +446,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch b/recipes-wifi/hostapd/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
similarity index 91%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
index 594e476..4bc3fcd 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
@@ -1,8 +1,8 @@
-From c91612769eba54821da1136d5959a40438c02824 Mon Sep 17 00:00:00 2001
+From 00a1908f92e31d6d85edc877c98387a9fdb737af 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 99906/99910] hostapd: mtk: Add three wire PTA ctrl hostapd
- vendor command
+Subject: [PATCH 07/15] 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 b22d10b..18b372a 100644
+index cd27d0890..df9c1e7a7 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4794,6 +4794,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4796,6 +4796,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
conf->edcca_compensation = (s8) val;
@@ -35,7 +35,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 0e1f192..9249a6b 100644
+index 0e1f192cf..9249a6bb8 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -297,6 +297,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -47,10 +47,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 41b8c68..71cf515 100644
+index 0616c30bb..0c370e75b 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1157,6 +1157,19 @@ struct hostapd_config {
+@@ -1158,6 +1158,19 @@ struct hostapd_config {
u8 edcca_enable;
s8 edcca_compensation;
int *edcca_threshold;
@@ -71,7 +71,7 @@
enum edcca_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 4598737..a1d83e4 100644
+index 4598737a3..a1d83e4ee 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1053,3 +1053,14 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff)
@@ -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 bca39c5..5ba6297 100644
+index bca39c502..5ba62978c 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -144,6 +144,7 @@ int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
@@ -102,10 +102,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 921769d..f9dabdf 100644
+index 44a378aa9..c972b15ea 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2303,6 +2303,8 @@ dfs_offload:
+@@ -2304,6 +2304,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_hemu_ctrl(hapd) < 0)
goto fail;
@@ -115,7 +115,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 69a46df..ee5a4f4 100644
+index 69a46dfbb..ee5a4f436 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,6 +13,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -149,7 +149,7 @@
MTK_VENDOR_ATTR_CSI_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 4cd7505..9ca19af 100644
+index 4cd7505db..9ca19af81 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4693,6 +4693,14 @@ struct wpa_driver_ops {
@@ -168,7 +168,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 73dee2e..2bb8cc2 100644
+index f8b3f40c2..92882cb73 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12637,6 +12637,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
@@ -217,7 +217,7 @@
+ .three_wire_ctrl = nl80211_enable_three_wire,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 57f0249..9fe7811 100644
+index 57f02497e..9fe7811b9 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -183,6 +183,7 @@ struct wpa_driver_nl80211_data {
@@ -229,7 +229,7 @@
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 cc146d9..04bc54e 100644
+index cc146d9fc..04bc54e77 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1059,6 +1059,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -243,5 +243,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99907-hostapd-mtk-Add-hostapd-iBF-control.patch b/recipes-wifi/hostapd/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
similarity index 93%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
index c37cb40..6bfe3d0 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99907-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
@@ -1,7 +1,7 @@
-From 4971762bfaba906054d43bd2d042c436a1ac97b2 Mon Sep 17 00:00:00 2001
+From 508e76ba51d47394a1b01ba7b9f3c1f25db0aa39 Mon Sep 17 00:00:00 2001
From: mtk27835 <shurong.wen@mediatek.com>
Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 99907/99910] hostapd: mtk: Add hostapd iBF control
+Subject: [PATCH 08/15] 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 18b372a..d9d882c 100644
+index df9c1e7a7..63c9d40be 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4798,6 +4798,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4800,6 +4800,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
u8 en = atoi(pos);
conf->three_wire_enable = en;
@@ -35,7 +35,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 5f71aee..c881d37 100644
+index 5f71aeea9..c881d3717 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3498,6 +3498,30 @@ hostapd_ctrl_iface_get_hemu(struct hostapd_data *hapd, char *buf,
@@ -79,7 +79,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 0d36477..c2a123a 100644
+index 0d364773b..c2a123a8c 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1586,6 +1586,13 @@ static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
@@ -106,7 +106,7 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 9249a6b..7a96cb8 100644
+index 9249a6bb8..7a96cb8b2 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -298,6 +298,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -118,10 +118,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 71cf515..44a0e7e 100644
+index 0c370e75b..a9e3d2aeb 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1158,6 +1158,7 @@ struct hostapd_config {
+@@ -1159,6 +1159,7 @@ struct hostapd_config {
s8 edcca_compensation;
int *edcca_threshold;
u8 three_wire_enable;
@@ -129,7 +129,7 @@
};
enum three_wire_mode {
-@@ -1198,6 +1199,7 @@ enum mtk_vendor_attr_edcca_ctrl_mode {
+@@ -1199,6 +1200,7 @@ enum mtk_vendor_attr_edcca_ctrl_mode {
#define EDCCA_MIN_CONFIG_THRES -126
#define EDCCA_MAX_CONFIG_THRES 0
@@ -138,7 +138,7 @@
static inline enum oper_chan_width
hostapd_get_oper_chwidth(struct hostapd_config *conf)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index a1d83e4..60ae825 100644
+index a1d83e4ee..60ae8253b 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1064,3 +1064,17 @@ int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd)
@@ -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 5ba6297..ab9aedc 100644
+index 5ba62978c..ab9aedcee 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -145,6 +145,8 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
@@ -174,10 +174,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index f9dabdf..e44b73d 100644
+index c972b15ea..da7f7d87b 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2305,6 +2305,8 @@ dfs_offload:
+@@ -2306,6 +2306,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_three_wire_ctrl(hapd) < 0)
goto fail;
@@ -187,7 +187,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index ee5a4f4..4050cf8 100644
+index ee5a4f436..4050cf886 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,7 +13,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -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 9ca19af..71ded61 100644
+index 9ca19af81..71ded617f 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1628,6 +1628,11 @@ struct wpa_driver_ap_params {
@@ -277,7 +277,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 2bb8cc2..e974f85 100644
+index 92882cb73..5c2a291ca 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12670,6 +12670,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
@@ -401,7 +401,7 @@
+ .ibf_dump = nl80211_ibf_dump,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 9fe7811..607592c 100644
+index 9fe7811b9..607592ceb 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -184,6 +184,7 @@ struct wpa_driver_nl80211_data {
@@ -413,7 +413,7 @@
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 04bc54e..9ecc0ff 100644
+index 04bc54e77..9ecc0ff9a 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1062,6 +1062,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -427,5 +427,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch b/recipes-wifi/hostapd/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
similarity index 77%
rename from recipes-wifi/hostapd/files/patches/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
index 47628d7..daf82b0 100644
--- a/recipes-wifi/hostapd/files/patches/99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
@@ -1,15 +1,15 @@
-From f96a62568fb3c419e71f8d7469d485dce55f4da6 Mon Sep 17 00:00:00 2001
+From 1d4ef2662fb22f96c6db3730f35879d1be55db3d 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 99908/99910] hostapd: mtk: Do not include HE capab IE if
- associated sta's HE capab IE is invalid
+Subject: [PATCH 09/15] hostapd: mtk: Do not include HE capab IE if associated
+ sta's HE capab IE is invalid
---
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
-index d921783..098793e 100644
+index d92178379..098793ef3 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -5192,7 +5192,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
@@ -23,5 +23,5 @@
p = hostapd_eid_he_operation(hapd, p);
p = hostapd_eid_cca(hapd, p);
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch b/recipes-wifi/hostapd/files/patches/mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
similarity index 94%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
index c1fc3f1..8a387a7 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch
@@ -1,7 +1,7 @@
-From 782f38f2eec27e438e55cb09e824a6ffc1c3eb18 Mon Sep 17 00:00:00 2001
+From 4e7c861c971ca49ea162bd908fef6021a62b9018 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Fri, 7 Oct 2022 10:46:29 +0800
-Subject: [PATCH 99909/99910] hostapd: mtk: Add DFS and ZWDFS support
+Subject: [PATCH 10/15] hostapd: mtk: Add DFS and ZWDFS support
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -17,10 +17,10 @@
9 files changed, 186 insertions(+), 17 deletions(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index d9d882c..fd61448 100644
+index 63c9d40be..cd1534952 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4801,6 +4801,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4803,6 +4803,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;
@@ -32,7 +32,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c881d37..6ea1573 100644
+index c881d3717..6ea1573b8 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3522,6 +3522,96 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
@@ -145,10 +145,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 44a0e7e..3f5afdf 100644
+index a9e3d2aeb..77f6169d2 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1159,6 +1159,7 @@ struct hostapd_config {
+@@ -1160,6 +1160,7 @@ struct hostapd_config {
int *edcca_threshold;
u8 three_wire_enable;
u8 ibf_enable;
@@ -156,7 +156,7 @@
};
enum three_wire_mode {
-@@ -1173,6 +1174,18 @@ enum three_wire_mode {
+@@ -1174,6 +1175,18 @@ enum three_wire_mode {
NUM_THREE_WIRE_MODE - 1
};
@@ -176,7 +176,7 @@
EDCCA_MODE_FORCE_DISABLE = 0,
EDCCA_MODE_AUTO = 1,
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index b5d105d..1c3f678 100644
+index b5d105d6a..1c3f6785b 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -19,13 +19,6 @@
@@ -250,7 +250,7 @@
if (hostapd_csa_in_progress(iface))
return 0;
diff --git a/src/ap/dfs.h b/src/ap/dfs.h
-index 606c1b3..c2556d2 100644
+index 606c1b393..c2556d2d9 100644
--- a/src/ap/dfs.h
+++ b/src/ap/dfs.h
@@ -9,6 +9,12 @@
@@ -282,10 +282,10 @@
#endif /* DFS_H */
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index e44b73d..793ce2f 100644
+index da7f7d87b..a0229c9ca 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -1463,7 +1463,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
+@@ -1464,7 +1464,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
return -1;
}
@@ -297,7 +297,7 @@
if (flush_old_stations && !conf->start_disabled &&
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 71ded61..aa23fbd 100644
+index 71ded617f..aa23fbdb3 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4720,6 +4720,13 @@ struct wpa_driver_ops {
@@ -315,7 +315,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index e974f85..003adc4 100644
+index 5c2a291ca..7472542cc 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12776,6 +12776,34 @@ fail:
@@ -360,7 +360,7 @@
+ .start_disabled = nl80211_start_disabled,
};
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index c4bf3ad..79bc76c 100644
+index c4bf3ad35..79bc76c57 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -3176,6 +3176,7 @@ enum nl80211_attrs {
@@ -372,5 +372,5 @@
__NL80211_ATTR_AFTER_LAST,
NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch b/recipes-wifi/hostapd/files/patches/mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
similarity index 93%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
index c05a444..ed796c1 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
@@ -1,7 +1,7 @@
-From 6cf5ec59e09945a075909b8070d9795869db081e Mon Sep 17 00:00:00 2001
+From bc0722ebc1cc08be6239879fddaef37e0db2d9e0 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 99910/99910] hostapd: mtk: Add amsdu set get ctrl
+Subject: [PATCH 11/15] 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 fd61448..759033b 100644
+index cd1534952..10ea52518 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4805,6 +4805,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4807,6 +4807,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
u8 en = strtol(pos, NULL, 10);
conf->dfs_detect_mode = en;
@@ -40,7 +40,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 6ea1573..0ad8451 100644
+index 6ea1573b8..0ad8451aa 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3612,6 +3612,30 @@ hostapd_ctrl_iface_set_offchan_ctrl(struct hostapd_data *hapd, char *cmd,
@@ -84,7 +84,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index c2a123a..30b3392 100644
+index c2a123a8c..30b3392e6 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1593,6 +1593,13 @@ static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
@@ -111,7 +111,7 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 7a96cb8..85ad5e4 100644
+index 7a96cb8b2..85ad5e444 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -299,6 +299,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -123,10 +123,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 3f5afdf..92f1bd6 100644
+index 77f6169d2..a9ac39619 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1160,6 +1160,7 @@ struct hostapd_config {
+@@ -1161,6 +1161,7 @@ struct hostapd_config {
u8 three_wire_enable;
u8 ibf_enable;
u8 dfs_detect_mode;
@@ -135,7 +135,7 @@
enum three_wire_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 60ae825..1a82f23 100644
+index 60ae8253b..1a82f234c 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1077,4 +1077,18 @@ int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
@@ -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 ab9aedc..4406666 100644
+index ab9aedcee..4406666fd 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -147,6 +147,8 @@ int hostapd_drv_hemu_dump(struct hostapd_data *hapd, u8 *hemu_onoff);
@@ -172,10 +172,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 793ce2f..aef01f2 100644
+index a0229c9ca..152060db4 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2309,6 +2309,8 @@ dfs_offload:
+@@ -2310,6 +2310,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_ibf_ctrl(hapd) < 0)
goto fail;
@@ -185,7 +185,7 @@
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 4050cf8..0999ea9 100644
+index 4050cf886..0999ea9e2 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -167,7 +167,6 @@ enum mtk_vendor_attr_wireless_ctrl {
@@ -220,7 +220,7 @@
MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index aa23fbd..b07aaf3 100644
+index aa23fbdb3..b07aaf3fe 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4727,6 +4727,15 @@ struct wpa_driver_ops {
@@ -240,7 +240,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 003adc4..5c04284 100644
+index 7472542cc..6702384ef 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -12804,6 +12804,118 @@ fail:
@@ -370,7 +370,7 @@
+ .amsdu_dump = nl80211_dump_amsdu,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 607592c..e570224 100644
+index 607592ceb..e57022409 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -185,6 +185,7 @@ struct wpa_driver_nl80211_data {
@@ -382,7 +382,7 @@
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 9ecc0ff..fcfa68b 100644
+index 9ecc0ff9a..fcfa68bf7 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1065,6 +1065,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
@@ -396,5 +396,5 @@
}
--
-2.36.1
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99911-hostapd-mtk-Add-he_ldpc-configuration.patch b/recipes-wifi/hostapd/files/patches/mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch
similarity index 90%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99911-hostapd-mtk-Add-he_ldpc-configuration.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch
index 2e8dfe0..63101e0 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99911-hostapd-mtk-Add-he_ldpc-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch
@@ -1,7 +1,7 @@
-From 216258435a119d48c233b63c2383850bc5f86e94 Mon Sep 17 00:00:00 2001
+From b49ce922afa13fe8ea5d847753dfb7641b70c9a4 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] hostapd: mtk: Add he_ldpc configuration
+Subject: [PATCH 12/15] 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 10ea525..4237a5c 100644
+index 10ea52518..4237a5cca 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3508,6 +3508,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 ea67aa1..e3a5eb3 100644
+index ea67aa100..e3a5eb365 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -830,6 +830,11 @@ wmm_ac_vo_acm=0
@@ -42,7 +42,7 @@
#he_bss_color=1
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 85ad5e4..b283de6 100644
+index 85ad5e444..b283de624 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -268,6 +268,7 @@ struct hostapd_config * hostapd_config_defaults(void)
@@ -54,7 +54,7 @@
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 a9ac396..b8b20a7 100644
+index a9ac39619..b8b20a7aa 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -929,6 +929,7 @@ struct hostapd_bss_config {
@@ -66,7 +66,7 @@
bool he_su_beamformee;
bool he_mu_beamformer;
diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
-index b5b7e5d..f27aeb1 100644
+index b5b7e5d46..f27aeb196 100644
--- a/src/ap/ieee802_11_he.c
+++ b/src/ap/ieee802_11_he.c
@@ -138,6 +138,13 @@ u8 * hostapd_eid_he_capab(struct hostapd_data *hapd, u8 *eid,
@@ -84,7 +84,7 @@
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 65e125e..62088bd 100644
+index 65e125e83..62088bda6 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2298,6 +2298,9 @@ struct ieee80211_spatial_reuse {
@@ -98,5 +98,5 @@
#define HE_PHYCAP_SU_BEAMFORMER_CAPAB ((u8) BIT(7))
#define HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX 4
--
-2.39.0
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch b/recipes-wifi/hostapd/files/patches/mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
similarity index 86%
copy from recipes-wifi/hostapd/files/patches-2.10.3/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
copy to recipes-wifi/hostapd/files/patches/mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
index df9dcc5..1222510 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch
@@ -1,8 +1,8 @@
-From 9c04bbbe2677cc11b88c867ab7b1df7e408483b5 Mon Sep 17 00:00:00 2001
+From 52a1775318c9926a1dbf4f7c563e95b5be3c9bd6 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Tue, 17 Jan 2023 13:25:18 +0800
-Subject: [PATCH] hostapd: mtk: Add the broadcast destination address of Probe
- Response frame on 6 GHz
+Subject: [PATCH 13/15] hostapd: mtk: Add the broadcast destination address of
+ Probe Response frame on 6 GHz
According to IEEE 802.11ax 26.17.2.3.2,
if a 6 GHz AP receives a Probe Request frame and responds with a Probe Response frame,
@@ -19,7 +19,7 @@
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 1a26f11..f3ea5c2 100644
+index 1a26f11ff..f3ea5c277 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1156,8 +1156,13 @@ void handle_probe_req(struct hostapd_data *hapd,
@@ -39,5 +39,5 @@
return;
--
-2.39.0
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches/99913-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch b/recipes-wifi/hostapd/files/patches/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
similarity index 78%
rename from recipes-wifi/hostapd/files/patches/99913-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
rename to recipes-wifi/hostapd/files/patches/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
index 9f79e08..3689f74 100644
--- a/recipes-wifi/hostapd/files/patches/99913-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/recipes-wifi/hostapd/files/patches/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
@@ -1,7 +1,7 @@
-From 3ccac8701695b1dfd94202b0ecf1ca37439dc91d Mon Sep 17 00:00:00 2001
+From 7d741c99f2e211abe70593ff6e8265633bed0d8a 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] hostapd: mtk: Add vendor command attribute for RTS BW
+Subject: [PATCH 14/15] hostapd: mtk: Add vendor command attribute for RTS BW
signaling.
Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
@@ -10,7 +10,7 @@
1 file changed, 1 insertion(+)
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 0999ea9..fb12895 100644
+index 0999ea9e2..fb12895ce 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -169,6 +169,7 @@ enum mtk_vendor_attr_wireless_ctrl {
@@ -22,5 +22,5 @@
/* keep last */
NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL,
--
-2.18.0
+2.25.1
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch b/recipes-wifi/hostapd/files/patches/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
new file mode 100644
index 0000000..642c625
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
@@ -0,0 +1,24 @@
+From 619075bb430c908c61a818c45e36f1ca76020741 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/15] 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 1c3f6785b..4b1e64246 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1506,6 +1506,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 ||
++ is_6ghz_freq(iface->freq) ||
+ iface->current_mode->mode != HOSTAPD_MODE_IEEE80211A)
+ return 0;
+
+--
+2.25.1
+
diff --git a/recipes-wifi/hostapd/files/patches/patches.inc b/recipes-wifi/hostapd/files/patches/patches.inc
index eed0d2d..4fcacd1 100644
--- a/recipes-wifi/hostapd/files/patches/patches.inc
+++ b/recipes-wifi/hostapd/files/patches/patches.inc
@@ -62,18 +62,19 @@
file://800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch \
file://990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch \
file://992-openssl-include-rsa.patch \
- file://99900-hostapd-mtk-Add-neighbor-report-and-BSS-Termination.patch \
- file://99901-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch \
- file://99902-hostapd-mtk-add-support-for-runtime-set-in-band-dis.patch \
- file://99903-hostapd-mtk-Add-mtk_vendor.h.patch \
- file://99904-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch \
- file://99905-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch \
- file://99906-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-.patch \
- file://99907-hostapd-mtk-Add-hostapd-iBF-control.patch \
- file://99908-hostapd-mtk-Do-not-include-HE-capab-IE-if-associate.patch \
- file://99909-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch \
- file://99910-hostapd-mtk-Add-amsdu-set-get-ctrl.patch \
- file://99911-hostapd-mtk-Add-he_ldpc-configuration.patch \
- file://99912-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
- file://99913-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
+ file://mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch \
+ file://mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch \
+ file://mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch \
+ file://mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch \
+ file://mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch \
+ file://mtk-0006-hostapd-mtk-Add-hostapd-HEMU-SET-GET-control.patch \
+ file://mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch \
+ file://mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch \
+ file://mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch \
+ file://mtk-0010-hostapd-mtk-Add-DFS-and-ZWDFS-support.patch \
+ file://mtk-0011-hostapd-mtk-Add-amsdu-set-get-ctrl.patch \
+ file://mtk-0012-hostapd-mtk-Add-he_ldpc-configuration.patch \
+ file://mtk-0013-hostapd-mtk-Add-the-broadcast-destination-address-of.patch \
+ file://mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch \
+ file://mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch \
"