[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
b9da0eba [MAC80211][misc][Fix duplicate mac address issue]
a5027f97 [mac80211][mt76][move temperature margin check to mt7915_thermal_temp_store()]
89c51e81 [MAC80211][hostapd][Fix per-user ru index in muru manual mode config commands]
c79eef80 [MAC80211][app][Add ATERUINFO wrap support]
11e7f687 [MAC80211][hostapd][Fix wds AP interface adding issue]
73f5c596 [MAC80211][misc][Set AP and STA BE TXOP to 2 ms]
6efe3657 [MAC80211][hostapd][rebase to the latest codebase]
8a84e107 [MAC80211][mt76][Add txpower info dump support]
02d01027 [MAC80211][hostapd][Fix no BSS load update issue]
ecd77be0 [MAC80211][core][Add dfs state check before extending CAC time for weather radar]
e28c8d9b [MAC80211][hostapd][Fix hostapd_dfs_start_cac log]
178e1786 [MAC80211][hostapd][rebase to the latest codebase]
3bc1e09e [mac80211][wed][add per-bss counter in mt76]
[Release-log]
Change-Id: Ia83661954b75bc6e339198125a7e60982b10e4f1
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/recipes-wifi/hostapd/files/patches-2.10.3/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
index 761fe36..0a51c84 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
@@ -14,7 +14,7 @@
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2621,7 +2621,7 @@ static int drv_supports_vht(struct wpa_s
+@@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
}
@@ -23,7 +23,7 @@
{
int i;
-@@ -2630,7 +2630,10 @@ static bool ibss_mesh_is_80mhz_avail(int
+@@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
chan = hw_get_channel_chan(mode, i, NULL);
if (!chan ||
@@ -35,7 +35,7 @@
return false;
}
-@@ -2757,7 +2760,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
@@ -44,7 +44,7 @@
int chan_idx;
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
int i, res;
-@@ -2781,8 +2784,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
return;
/* Check primary channel flags */
@@ -57,7 +57,7 @@
#ifdef CONFIG_HT_OVERRIDES
if (ssid->disable_ht40)
-@@ -2808,8 +2814,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
return;
/* Check secondary channel flags */
@@ -70,7 +70,7 @@
if (ht40 == -1) {
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
-@@ -2863,7 +2872,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
@@ -79,7 +79,7 @@
static const int bw80[] = {
5180, 5260, 5500, 5580, 5660, 5745, 5825,
5955, 6035, 6115, 6195, 6275, 6355, 6435,
-@@ -2908,7 +2917,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
goto skip_80mhz;
/* Use 40 MHz if channel not usable */
@@ -88,7 +88,7 @@
goto skip_80mhz;
chwidth = CONF_OPER_CHWIDTH_80MHZ;
-@@ -2922,7 +2931,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
if ((mode->he_capab[ieee80211_mode].phy_cap[
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
@@ -97,7 +97,7 @@
for (j = 0; j < ARRAY_SIZE(bw160); j++) {
if (freq->freq == bw160[j]) {
chwidth = CONF_OPER_CHWIDTH_160MHZ;
-@@ -2950,10 +2959,12 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
if (!chan)
continue;
@@ -113,7 +113,7 @@
/* Found a suitable second segment for 80+80 */
chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
-@@ -3008,6 +3019,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int i, obss_scan = 1;
u8 channel;
bool is_6ghz;
@@ -121,7 +121,7 @@
freq->freq = ssid->frequency;
-@@ -3053,9 +3065,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
freq->channel = channel;
/* Setup higher BW only for 5 GHz */
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch b/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch
index 20a8bee..9b11f0e 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/011-mesh-use-deterministic-channel-on-channel-switch.patch
@@ -68,7 +68,7 @@
if (!chan) {
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -10739,6 +10739,10 @@ static int nl80211_switch_channel(void *
+@@ -10977,6 +10977,10 @@ static int nl80211_switch_channel(void *
if (ret)
goto error;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch b/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch
index 827e122..4ee43b5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/021-fix-sta-add-after-previous-connection.patch
@@ -1,6 +1,6 @@
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
-@@ -4168,6 +4168,13 @@ static int add_associated_sta(struct hos
+@@ -4601,6 +4601,13 @@ static int add_associated_sta(struct hos
* drivers to accept the STA parameter configuration. Since this is
* after a new FT-over-DS exchange, a new TK has been derived, so key
* reinstallation is not a concern for this case.
@@ -14,7 +14,7 @@
*/
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
-@@ -4181,7 +4188,8 @@ static int add_associated_sta(struct hos
+@@ -4614,7 +4621,8 @@ static int add_associated_sta(struct hos
(!(sta->flags & WLAN_STA_AUTHORIZED) ||
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/022-hostapd-fix-use-of-uninitialized-stack-variables.patch b/recipes-wifi/hostapd/files/patches-2.10.3/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
index f4f56f5..8dec325 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
@@ -14,7 +14,7 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -3562,7 +3562,7 @@ static int hostapd_change_config_freq(st
+@@ -3764,7 +3764,7 @@ static int hostapd_change_config_freq(st
struct hostapd_freq_params *old_params)
{
int channel;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch b/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
index c02d4b4..19248e8 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
@@ -20,7 +20,7 @@
#include <linux/rtnetlink.h>
#include <netpacket/packet.h>
#include <linux/errqueue.h>
-@@ -5590,26 +5587,29 @@ fail:
+@@ -5783,26 +5780,29 @@ fail:
static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
{
@@ -64,7 +64,7 @@
if (err < 0) {
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
-@@ -5619,9 +5619,8 @@ static void rtnl_neigh_delete_fdb_entry(
+@@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
MACSTR, MAC2STR(addr));
}
@@ -76,7 +76,7 @@
}
-@@ -8275,7 +8274,6 @@ static void *i802_init(struct hostapd_da
+@@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
(params->num_bridge == 0 || !params->bridge[0]))
add_ifidx(drv, br_ifindex, drv->ifindex);
@@ -84,7 +84,7 @@
if (bss->added_if_into_bridge || bss->already_in_bridge) {
int err;
-@@ -8292,7 +8290,6 @@ static void *i802_init(struct hostapd_da
+@@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
goto failed;
}
}
@@ -92,7 +92,7 @@
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
wpa_printf(MSG_DEBUG,
-@@ -11605,13 +11602,14 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -11843,13 +11840,14 @@ static int wpa_driver_br_add_ip_neigh(vo
const u8 *ipaddr, int prefixlen,
const u8 *addr)
{
@@ -112,7 +112,7 @@
int res;
if (!ipaddr || prefixlen == 0 || !addr)
-@@ -11630,85 +11628,66 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -11868,85 +11866,66 @@ static int wpa_driver_br_add_ip_neigh(vo
}
if (version == 4) {
@@ -220,7 +220,7 @@
addrsize = 16;
} else {
return -EINVAL;
-@@ -11726,41 +11705,30 @@ static int wpa_driver_br_delete_ip_neigh
+@@ -11964,41 +11943,30 @@ static int wpa_driver_br_delete_ip_neigh
return -1;
}
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch b/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch
index 179d47e..f98d380 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/040-mesh-allow-processing-authentication-frames-in-block.patch
@@ -16,7 +16,7 @@
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
-@@ -2948,15 +2948,6 @@ static void handle_auth(struct hostapd_d
+@@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d
seq_ctrl);
return;
}
@@ -25,7 +25,7 @@
- sta->plink_state == PLINK_BLOCKED) {
- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
- " is blocked - drop Authentication frame",
-- MAC2STR(mgmt->sa));
+- MAC2STR(sa));
- return;
- }
-#endif /* CONFIG_MESH */
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch b/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
new file mode 100644
index 0000000..710a3c8
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
@@ -0,0 +1,141 @@
+From d4c4ef302f98fd6bce173b8636e7e350d8b44981 Mon Sep 17 00:00:00 2001
+From: P Praneesh <ppranees@codeaurora.org>
+Date: Fri, 19 Mar 2021 12:17:27 +0530
+Subject: [PATCH] hostapd: update cfs0 and cfs1 for 160MHz
+
+As per standard Draft P802.11ax_D8.0,( Table 26-9—Setting
+of the VHT Channel Width and VHT NSS at an HE STA
+transmitting the OM Control subfield ), center frequency of
+160MHz should be published in HT information subset 2 of
+HT information when EXT NSS BW field is enabled.
+
+If the supported number of NSS in 160MHz is at least max NSS
+support, then center_freq_seg0 indicates the center frequency of 80MHz and
+center_freq_seg1 indicates the center frequency of 160MHz.
+
+If the supported number of NSS in 160MHz is less than max NSS
+support, then center_freq_seg0 indicates the center frequency of 80MHz and
+center_freq_seg1 is 0. The center frequency of 160MHz is published in HT
+operation information element instead.
+
+Signed-off-by: P Praneesh <ppranees@codeaurora.org>
+---
+ hostapd/config_file.c | 2 ++
+ src/ap/ieee802_11_ht.c | 7 +++++++
+ src/ap/ieee802_11_vht.c | 16 ++++++++++++++++
+ src/common/hw_features_common.c | 1 +
+ src/common/ieee802_11_defs.h | 1 +
+ 5 files changed, 27 insertions(+)
+
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -1153,6 +1153,8 @@ static int hostapd_config_vht_capab(stru
+ conf->vht_capab |= VHT_CAP_RX_ANTENNA_PATTERN;
+ if (os_strstr(capab, "[TX-ANTENNA-PATTERN]"))
+ conf->vht_capab |= VHT_CAP_TX_ANTENNA_PATTERN;
++ if (os_strstr(capab, "[EXT-NSS-BW-SUPP]"))
++ conf->vht_capab |= VHT_CAP_EXTENDED_NSS_BW_SUPPORT;
+ return 0;
+ }
+ #endif /* CONFIG_IEEE80211AC */
+--- a/src/ap/ieee802_11_ht.c
++++ b/src/ap/ieee802_11_ht.c
+@@ -82,7 +82,9 @@ u8 * hostapd_eid_ht_capabilities(struct
+ u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid)
+ {
+ struct ieee80211_ht_operation *oper;
++ le32 vht_capabilities_info;
+ u8 *pos = eid;
++ u8 chwidth;
+
+ if (!hapd->iconf->ieee80211n || hapd->conf->disable_11n ||
+ is_6ghz_op_class(hapd->iconf->op_class))
+@@ -103,6 +105,13 @@ u8 * hostapd_eid_ht_operation(struct hos
+ oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW |
+ HT_INFO_HT_PARAM_STA_CHNL_WIDTH;
+
++ vht_capabilities_info = host_to_le32(hapd->iface->current_mode->vht_capab);
++ chwidth = hostapd_get_oper_chwidth(hapd->iconf);
++ if (vht_capabilities_info & VHT_CAP_EXTENDED_NSS_BW_SUPPORT
++ && ((chwidth == CHANWIDTH_160MHZ) || (chwidth == CHANWIDTH_80P80MHZ))) {
++ oper->operation_mode = host_to_le16(hapd->iconf->vht_oper_centr_freq_seg0_idx << 5);
++ }
++
+ pos += sizeof(*oper);
+
+ return pos;
+--- a/src/ap/ieee802_11_vht.c
++++ b/src/ap/ieee802_11_vht.c
+@@ -25,6 +25,7 @@ u8 * hostapd_eid_vht_capabilities(struct
+ struct ieee80211_vht_capabilities *cap;
+ struct hostapd_hw_modes *mode = hapd->iface->current_mode;
+ u8 *pos = eid;
++ u8 chwidth;
+
+ if (!mode || is_6ghz_op_class(hapd->iconf->op_class))
+ return eid;
+@@ -62,6 +63,17 @@ u8 * hostapd_eid_vht_capabilities(struct
+ host_to_le32(nsts << VHT_CAP_BEAMFORMEE_STS_OFFSET);
+ }
+
++ chwidth = hostapd_get_oper_chwidth(hapd->iconf);
++ if (((host_to_le32(mode->vht_capab)) & VHT_CAP_EXTENDED_NSS_BW_SUPPORT)
++ && ((chwidth == CHANWIDTH_160MHZ) || (chwidth == CHANWIDTH_80P80MHZ))) {
++ cap->vht_capabilities_info |= VHT_CAP_EXTENDED_NSS_BW_SUPPORT;
++ cap->vht_capabilities_info &= ~(host_to_le32(VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ));
++ cap->vht_capabilities_info &= ~(host_to_le32(VHT_CAP_SUPP_CHAN_WIDTH_160MHZ));
++ cap->vht_capabilities_info &= ~(host_to_le32(VHT_CAP_SUPP_CHAN_WIDTH_MASK));
++ } else {
++ cap->vht_capabilities_info &= ~VHT_CAP_EXTENDED_NSS_BW_SUPPORT_MASK;
++ }
++
+ /* Supported MCS set comes from hw */
+ os_memcpy(&cap->vht_supported_mcs_set, mode->vht_mcs_set, 8);
+
+@@ -74,6 +86,7 @@ u8 * hostapd_eid_vht_capabilities(struct
+ u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid)
+ {
+ struct ieee80211_vht_operation *oper;
++ le32 vht_capabilities_info;
+ u8 *pos = eid;
+ enum oper_chan_width oper_chwidth =
+ hostapd_get_oper_chwidth(hapd->iconf);
+@@ -106,6 +119,7 @@ u8 * hostapd_eid_vht_operation(struct ho
+ oper->vht_op_info_chan_center_freq_seg1_idx = seg1;
+
+ oper->vht_op_info_chwidth = oper_chwidth;
++ vht_capabilities_info = host_to_le32(hapd->iface->current_mode->vht_capab);
+ if (oper_chwidth == CONF_OPER_CHWIDTH_160MHZ) {
+ /*
+ * Convert 160 MHz channel width to new style as interop
+@@ -119,6 +133,9 @@ u8 * hostapd_eid_vht_operation(struct ho
+ oper->vht_op_info_chan_center_freq_seg0_idx -= 8;
+ else
+ oper->vht_op_info_chan_center_freq_seg0_idx += 8;
++
++ if (vht_capabilities_info & VHT_CAP_EXTENDED_NSS_BW_SUPPORT)
++ oper->vht_op_info_chan_center_freq_seg1_idx = 0;
+ } else if (oper_chwidth == CONF_OPER_CHWIDTH_80P80MHZ) {
+ /*
+ * Convert 80+80 MHz channel width to new style as interop
+--- a/src/common/hw_features_common.c
++++ b/src/common/hw_features_common.c
+@@ -808,6 +808,7 @@ int ieee80211ac_cap_check(u32 hw, u32 co
+ VHT_CAP_CHECK(VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB);
+ VHT_CAP_CHECK(VHT_CAP_RX_ANTENNA_PATTERN);
+ VHT_CAP_CHECK(VHT_CAP_TX_ANTENNA_PATTERN);
++ VHT_CAP_CHECK(VHT_CAP_EXTENDED_NSS_BW_SUPPORT);
+
+ #undef VHT_CAP_CHECK
+ #undef VHT_CAP_CHECK_MAX
+--- a/src/common/ieee802_11_defs.h
++++ b/src/common/ieee802_11_defs.h
+@@ -1348,6 +1348,8 @@ struct ieee80211_ampe_ie {
+ #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27))
+ #define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28))
+ #define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29))
++#define VHT_CAP_EXTENDED_NSS_BW_SUPPORT ((u32) BIT(30))
++#define VHT_CAP_EXTENDED_NSS_BW_SUPPORT_MASK ((u32) BIT(30) | BIT(31))
+
+ #define VHT_OPMODE_CHANNEL_WIDTH_MASK ((u8) BIT(0) | BIT(1))
+ #define VHT_OPMODE_CHANNEL_RxNSS_MASK ((u8) BIT(4) | BIT(5) | \
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch b/recipes-wifi/hostapd/files/patches-2.10.3/170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch
deleted file mode 100644
index 7724f1a..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c85ce84d942e1eabde33e120b18e5b1f1637b76e Mon Sep 17 00:00:00 2001
-From: Nick Hainke <vincent@systemli.org>
-Date: Tue, 14 Mar 2023 21:40:53 +0100
-Subject: [PATCH] wpa_supplicant: fix compiling without IEEE8021X_EAPOL
-
-If IEEE8021X_EAPOL is not defined wpa_supplicant will not compile with
-following error:
-
- events.c: In function 'wpa_supplicant_connect':
- events.c:1827:14: warning: implicit declaration of function 'eap_is_wps_pbc_enrollee' [-Wimplicit-function-declaration]
- 1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
- | ^~~~~~~~~~~~~~~~~~~~~~~
- events.c:1827:43: error: 'struct wpa_ssid' has no member named 'eap'
- 1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
- | ^~
-
-Adding ifdef statements around the calling function fixes the issue.
-
-Signed-off-by: Nick Hainke <vincent@systemli.org>
----
- wpa_supplicant/events.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/wpa_supplicant/events.c
-+++ b/wpa_supplicant/events.c
-@@ -1824,6 +1824,7 @@ int wpa_supplicant_connect(struct wpa_su
- struct wpa_bss *selected,
- struct wpa_ssid *ssid)
- {
-+#ifdef IEEE8021X_EAPOL
- if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
- wpas_wps_partner_link_overlap_detect(wpa_s)) ||
- wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
-@@ -1846,6 +1847,7 @@ int wpa_supplicant_connect(struct wpa_su
- #endif /* CONFIG_WPS */
- return -1;
- }
-+#endif /* IEEE8021X_EAPOL */
-
- wpa_msg(wpa_s, MSG_DEBUG,
- "Considering connect request: reassociate: %d selected: "
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch b/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch
index f12aeb0..f7e797a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/200-multicall.patch
@@ -156,7 +156,7 @@
wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -6544,8 +6544,8 @@ union wpa_event_data {
+@@ -6651,8 +6651,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@@ -167,7 +167,7 @@
/**
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -6557,7 +6557,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6664,7 +6664,7 @@ void wpa_supplicant_event(void *ctx, enu
* Same as wpa_supplicant_event(), but we search for the interface in
* wpa_global.
*/
@@ -178,7 +178,7 @@
/*
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
-@@ -1887,8 +1887,8 @@ err:
+@@ -1994,8 +1994,8 @@ err:
#endif /* CONFIG_OWE */
@@ -189,7 +189,7 @@
{
struct hostapd_data *hapd = ctx;
#ifndef CONFIG_NO_STDOUT_DEBUG
-@@ -2161,7 +2161,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -2271,7 +2271,7 @@ void wpa_supplicant_event(void *ctx, enu
}
@@ -231,7 +231,7 @@
os_memset(&global, 0, sizeof(global));
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -5237,8 +5237,8 @@ static void wpas_event_unprot_beacon(str
+@@ -5345,8 +5345,8 @@ static void wpas_link_reconfig(struct wp
}
@@ -242,7 +242,7 @@
{
struct wpa_supplicant *wpa_s = ctx;
int resched;
-@@ -6149,7 +6149,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6264,7 +6264,7 @@ void wpa_supplicant_event(void *ctx, enu
}
@@ -253,7 +253,7 @@
struct wpa_supplicant *wpa_s;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7408,7 +7408,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -7435,7 +7435,6 @@ struct wpa_interface * wpa_supplicant_ma
return NULL;
}
@@ -261,7 +261,7 @@
/**
* wpa_supplicant_match_existing - Match existing interfaces
* @global: Pointer to global data from wpa_supplicant_init()
-@@ -7443,6 +7442,11 @@ static int wpa_supplicant_match_existing
+@@ -7470,6 +7469,11 @@ static int wpa_supplicant_match_existing
#endif /* CONFIG_MATCH_IFACE */
@@ -273,7 +273,7 @@
/**
* wpa_supplicant_add_iface - Add a new network interface
-@@ -7699,6 +7703,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -7726,6 +7730,8 @@ struct wpa_global * wpa_supplicant_init(
#ifndef CONFIG_NO_WPA_MSG
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
#endif /* CONFIG_NO_WPA_MSG */
@@ -284,7 +284,7 @@
wpa_debug_open_file(params->wpa_debug_file_path);
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -595,6 +595,11 @@ fail:
+@@ -685,6 +685,11 @@ fail:
return -1;
}
@@ -296,7 +296,7 @@
#ifdef CONFIG_WPS
static int gen_uuid(const char *txt_addr)
-@@ -688,6 +693,8 @@ int main(int argc, char *argv[])
+@@ -778,6 +783,8 @@ int main(int argc, char *argv[])
return -1;
#endif /* CONFIG_DPP */
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch b/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch
index 91e1aaa..1ea8904 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/300-noscan.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -3446,6 +3446,10 @@ static int hostapd_config_fill(struct ho
+@@ -3448,6 +3448,10 @@ static int hostapd_config_fill(struct ho
if (bss->ocv && !bss->ieee80211w)
bss->ieee80211w = 1;
#endif /* CONFIG_OCV */
@@ -13,7 +13,7 @@
} else if (os_strcmp(buf, "ht_capab") == 0) {
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1061,6 +1061,8 @@ struct hostapd_config {
+@@ -1072,6 +1072,8 @@ struct hostapd_config {
int ht_op_mode_fixed;
u16 ht_capab;
@@ -36,7 +36,7 @@
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
-@@ -230,6 +230,9 @@ void hostapd_2040_coex_action(struct hos
+@@ -239,6 +239,9 @@ void hostapd_2040_coex_action(struct hos
return;
}
@@ -46,7 +46,7 @@
if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
wpa_printf(MSG_DEBUG,
"Ignore too short 20/40 BSS Coexistence Management frame");
-@@ -390,6 +393,9 @@ void ht40_intolerant_add(struct hostapd_
+@@ -399,6 +402,9 @@ void ht40_intolerant_add(struct hostapd_
if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
return;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/301-mesh-noscan.patch b/recipes-wifi/hostapd/files/patches-2.10.3/301-mesh-noscan.patch
index 8a1bdaa..6b5416f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/301-mesh-noscan.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/301-mesh-noscan.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
-@@ -2599,6 +2599,7 @@ static const struct parse_data ssid_fiel
+@@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
#else /* CONFIG_MESH */
{ INT_RANGE(mode, 0, 4) },
#endif /* CONFIG_MESH */
@@ -31,7 +31,7 @@
/*
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2693,7 +2693,7 @@ static bool ibss_mesh_can_use_vht(struct
+@@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode)
{
@@ -40,7 +40,7 @@
return false;
if (!drv_supports_vht(wpa_s, ssid))
-@@ -2766,7 +2766,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
int i, res;
unsigned int j;
static const int ht40plus[] = {
@@ -49,7 +49,7 @@
184, 192
};
int ht40 = -1;
-@@ -3016,7 +3016,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch b/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch
index 033f763..a47546d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/310-rescan_immediately.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -5713,7 +5713,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -5740,7 +5740,7 @@ wpa_supplicant_alloc(struct wpa_supplica
if (wpa_s == NULL)
return NULL;
wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/330-nl80211_fix_set_freq.patch b/recipes-wifi/hostapd/files/patches-2.10.3/330-nl80211_fix_set_freq.patch
index 93a03a6..c11c957 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/330-nl80211_fix_set_freq.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/330-nl80211_fix_set_freq.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -5224,7 +5224,7 @@ static int nl80211_set_channel(struct i8
+@@ -5407,7 +5407,7 @@ static int nl80211_set_channel(struct i8
freq->he_enabled, freq->eht_enabled, freq->bandwidth,
freq->center_freq1, freq->center_freq2);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/340-reload_freq_change.patch b/recipes-wifi/hostapd/files/patches-2.10.3/340-reload_freq_change.patch
index 9a46807..ae6cd81 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/340-reload_freq_change.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/340-reload_freq_change.patch
@@ -1,6 +1,6 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -142,6 +142,29 @@ static void hostapd_reload_bss(struct ho
+@@ -143,6 +143,29 @@ static void hostapd_reload_bss(struct ho
#endif /* CONFIG_NO_RADIUS */
ssid = &hapd->conf->ssid;
@@ -30,7 +30,7 @@
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
/*
-@@ -250,6 +273,7 @@ int hostapd_reload_config(struct hostapd
+@@ -251,6 +274,7 @@ int hostapd_reload_config(struct hostapd
struct hostapd_data *hapd = iface->bss[0];
struct hostapd_config *newconf, *oldconf;
size_t j;
@@ -38,7 +38,7 @@
if (iface->config_fname == NULL) {
/* Only in-memory config in use - assume it has been updated */
-@@ -300,6 +324,17 @@ int hostapd_reload_config(struct hostapd
+@@ -301,6 +325,17 @@ int hostapd_reload_config(struct hostapd
}
iface->conf = newconf;
@@ -56,7 +56,7 @@
for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j];
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
-@@ -307,21 +342,6 @@ int hostapd_reload_config(struct hostapd
+@@ -308,21 +343,6 @@ int hostapd_reload_config(struct hostapd
newconf->bss[j]->config_id) != 0)
hostapd_clear_old_bss(hapd);
hapd->iconf = newconf;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/350-nl80211_del_beacon_bss.patch b/recipes-wifi/hostapd/files/patches-2.10.3/350-nl80211_del_beacon_bss.patch
index a943395..647ca2c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/350-nl80211_del_beacon_bss.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/350-nl80211_del_beacon_bss.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -3006,12 +3006,12 @@ static int wpa_driver_nl80211_del_beacon
+@@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
return 0;
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
@@ -15,7 +15,7 @@
if (!msg)
return -ENOBUFS;
-@@ -5907,7 +5907,7 @@ static void nl80211_teardown_ap(struct i
+@@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
nl80211_mgmt_unsubscribe(bss, "AP teardown");
nl80211_put_wiphy_data_ap(bss);
@@ -24,7 +24,7 @@
}
-@@ -8642,8 +8642,6 @@ static int wpa_driver_nl80211_if_remove(
+@@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
} else {
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
nl80211_teardown_ap(bss);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/360-ctrl_iface_reload.patch b/recipes-wifi/hostapd/files/patches-2.10.3/360-ctrl_iface_reload.patch
index e9f46ce..4d85ea1 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/360-ctrl_iface_reload.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/360-ctrl_iface_reload.patch
@@ -78,7 +78,7 @@
#ifdef NEED_AP_MLME
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
-@@ -3529,6 +3586,8 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3564,6 +3621,8 @@ static int hostapd_ctrl_iface_receive_pr
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
reply_size);
@@ -89,7 +89,7 @@
#ifdef RADIUS_SERVER
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
-@@ -1008,7 +1008,13 @@ int hostapd_parse_csa_settings(const cha
+@@ -1023,7 +1023,13 @@ int hostapd_parse_csa_settings(const cha
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
{
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/370-ap_sta_support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/370-ap_sta_support.patch
index 2406483..3baad2a 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/370-ap_sta_support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/370-ap_sta_support.patch
@@ -172,7 +172,7 @@
wpa_s->new_connection = 1;
wpa_drv_set_operstate(wpa_s, 0);
#ifndef IEEE8021X_EAPOL
-@@ -2520,6 +2572,8 @@ void wpa_supplicant_associate(struct wpa
+@@ -2537,6 +2589,8 @@ void wpa_supplicant_associate(struct wpa
return;
}
wpa_s->current_bss = bss;
@@ -181,7 +181,7 @@
#else /* CONFIG_MESH */
wpa_msg(wpa_s, MSG_ERROR,
"mesh mode support not included in the build");
-@@ -7010,6 +7064,16 @@ static int wpa_supplicant_init_iface(str
+@@ -7037,6 +7091,16 @@ static int wpa_supplicant_init_iface(str
sizeof(wpa_s->bridge_ifname));
}
@@ -198,7 +198,7 @@
/* RSNA Supplicant Key Management - INITIALIZE */
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
eapol_sm_notify_portValid(wpa_s->eapol, false);
-@@ -7352,6 +7416,11 @@ static void wpa_supplicant_deinit_iface(
+@@ -7379,6 +7443,11 @@ static void wpa_supplicant_deinit_iface(
if (terminate)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
@@ -235,7 +235,7 @@
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -2716,6 +2716,12 @@ static int hostapd_ctrl_iface_chan_switc
+@@ -2751,6 +2751,12 @@ static int hostapd_ctrl_iface_chan_switc
return 0;
}
@@ -250,7 +250,7 @@
/* Save CHAN_SWITCH VHT, HE, and EHT config */
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -2052,11 +2052,6 @@ static int __ieee802_11_set_beacon(struc
+@@ -2108,11 +2108,6 @@ static int __ieee802_11_set_beacon(struc
return -1;
}
@@ -264,7 +264,7 @@
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -5237,6 +5237,60 @@ static void wpas_event_unprot_beacon(str
+@@ -5345,6 +5345,60 @@ static void wpas_link_reconfig(struct wp
}
@@ -325,7 +325,7 @@
void supplicant_event(void *ctx, enum wpa_event_type event,
union wpa_event_data *data)
{
-@@ -5586,8 +5640,10 @@ void supplicant_event(void *ctx, enum wp
+@@ -5697,8 +5751,10 @@ void supplicant_event(void *ctx, enum wp
channel_width_to_string(data->ch_switch.ch_width),
data->ch_switch.cf1,
data->ch_switch.cf2);
@@ -339,7 +339,7 @@
wpa_s->current_ssid->frequency = data->ch_switch.freq;
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -6324,6 +6324,7 @@ union wpa_event_data {
+@@ -6421,6 +6421,7 @@ union wpa_event_data {
/**
* struct ch_switch
@@ -347,7 +347,7 @@
* @freq: Frequency of new channel in MHz
* @ht_enabled: Whether this is an HT channel
* @ch_offset: Secondary channel offset
-@@ -6334,6 +6335,7 @@ union wpa_event_data {
+@@ -6431,6 +6432,7 @@ union wpa_event_data {
* @punct_bitmap: Puncturing bitmap
*/
struct ch_switch {
@@ -357,7 +357,7 @@
int ch_offset;
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
-@@ -997,6 +997,7 @@ static void mlme_event_ch_switch(struct
+@@ -1202,6 +1202,7 @@ static void mlme_event_ch_switch(struct
struct nlattr *bw, struct nlattr *cf1,
struct nlattr *cf2,
struct nlattr *punct_bitmap,
@@ -365,7 +365,7 @@
int finished)
{
struct i802_bss *bss;
-@@ -1060,6 +1061,8 @@ static void mlme_event_ch_switch(struct
+@@ -1265,6 +1266,8 @@ static void mlme_event_ch_switch(struct
data.ch_switch.cf1 = nla_get_u32(cf1);
if (cf2)
data.ch_switch.cf2 = nla_get_u32(cf2);
@@ -374,7 +374,7 @@
if (finished)
bss->flink->freq = data.ch_switch.freq;
-@@ -3604,6 +3607,7 @@ static void do_process_drv_event(struct
+@@ -3848,6 +3851,7 @@ static void do_process_drv_event(struct
tb[NL80211_ATTR_CENTER_FREQ1],
tb[NL80211_ATTR_CENTER_FREQ2],
tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -382,7 +382,7 @@
0);
break;
case NL80211_CMD_CH_SWITCH_NOTIFY:
-@@ -3616,6 +3620,7 @@ static void do_process_drv_event(struct
+@@ -3860,6 +3864,7 @@ static void do_process_drv_event(struct
tb[NL80211_ATTR_CENTER_FREQ1],
tb[NL80211_ATTR_CENTER_FREQ2],
tb[NL80211_ATTR_PUNCT_BITMAP],
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch b/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch
index b886ab7..456599d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/380-disable_ctrl_iface_mib.patch
@@ -12,7 +12,7 @@
else
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3342,6 +3342,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3377,6 +3377,7 @@ static int hostapd_ctrl_iface_receive_pr
reply_size);
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
reply_len = hostapd_drv_status(hapd, reply, reply_size);
@@ -20,7 +20,7 @@
} else if (os_strcmp(buf, "MIB") == 0) {
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
if (reply_len >= 0) {
-@@ -3383,6 +3384,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3418,6 +3419,7 @@ static int hostapd_ctrl_iface_receive_pr
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
reply_size);
@@ -172,7 +172,7 @@
if (os_snprintf_error(buflen - len, ret))
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
-@@ -2753,6 +2753,7 @@ static const char * bool_txt(bool val)
+@@ -2834,6 +2834,7 @@ static const char * bool_txt(bool val)
return val ? "TRUE" : "FALSE";
}
@@ -180,7 +180,7 @@
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
{
-@@ -2939,6 +2940,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -3020,6 +3021,7 @@ int ieee802_1x_get_mib_sta(struct hostap
return len;
}
@@ -190,7 +190,7 @@
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
-@@ -4786,6 +4786,7 @@ static const char * wpa_bool_txt(int val
+@@ -5328,6 +5328,7 @@ static const char * wpa_bool_txt(int val
return val ? "TRUE" : "FALSE";
}
@@ -198,7 +198,7 @@
#define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \
-@@ -4938,7 +4939,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
+@@ -5480,7 +5481,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
return len;
}
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch b/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch
index 356d5f8..786b83d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/420-indicate-features.patch
@@ -9,7 +9,7 @@
struct hapd_global {
void **drv_priv;
-@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
+@@ -786,7 +786,7 @@ int main(int argc, char *argv[])
wpa_supplicant_event = hostapd_wpa_event;
wpa_supplicant_event_global = hostapd_wpa_event_global;
for (;;) {
@@ -18,7 +18,7 @@
if (c < 0)
break;
switch (c) {
-@@ -733,6 +733,8 @@ int main(int argc, char *argv[])
+@@ -823,6 +823,8 @@ int main(int argc, char *argv[])
break;
#endif /* CONFIG_DEBUG_LINUX_TRACING */
case 'v':
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/450-scan_wait.patch b/recipes-wifi/hostapd/files/patches-2.10.3/450-scan_wait.patch
index e265d1a..4588689 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/450-scan_wait.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/450-scan_wait.patch
@@ -24,16 +24,16 @@
/**
* hostapd_driver_init - Preparate driver interface
-@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct ho
- return -1;
+@@ -217,6 +227,8 @@ static int hostapd_driver_init(struct ho
}
+ #endif /* CONFIG_IEEE80211BE */
+ hapd->setup_complete_cb = hostapd_setup_complete_cb;
+
/* Initialize the driver interface */
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
b = NULL;
-@@ -407,8 +419,6 @@ static void hostapd_global_deinit(const
+@@ -497,8 +509,6 @@ static void hostapd_global_deinit(const
#endif /* CONFIG_NATIVE_WINDOWS */
eap_server_unregister_methods();
@@ -42,7 +42,7 @@
}
-@@ -434,18 +444,6 @@ static int hostapd_global_run(struct hap
+@@ -524,18 +534,6 @@ static int hostapd_global_run(struct hap
}
#endif /* EAP_SERVER_TNC */
@@ -61,7 +61,7 @@
eloop_run();
return 0;
-@@ -649,8 +647,7 @@ int main(int argc, char *argv[])
+@@ -739,8 +737,7 @@ int main(int argc, char *argv[])
struct hapd_interfaces interfaces;
int ret = 1;
size_t i, j;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index 8098777..4c72868 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -22,7 +22,7 @@
#include "common/defs.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_common.h"
-@@ -936,6 +937,9 @@ struct wpa_driver_associate_params {
+@@ -953,6 +954,9 @@ struct wpa_driver_associate_params {
* responsible for selecting with which BSS to associate. */
const u8 *bssid;
@@ -140,7 +140,7 @@
/* Helper macros for network block parser */
#ifdef OFFSET
-@@ -2673,6 +2765,8 @@ static const struct parse_data ssid_fiel
+@@ -2674,6 +2766,8 @@ static const struct parse_data ssid_fiel
{ INT(ap_max_inactivity) },
{ INT(dtim_period) },
{ INT(beacon_int) },
@@ -174,7 +174,7 @@
* macsec_policy - Determines the policy for MACsec secure session
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4177,6 +4177,12 @@ static void wpas_start_assoc_cb(struct w
+@@ -4203,6 +4203,12 @@ static void wpas_start_assoc_cb(struct w
params.beacon_int = ssid->beacon_int;
else
params.beacon_int = wpa_s->conf->beacon_int;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch b/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch
index e738ea1..be9e050 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/463-add-mcast_rate-to-11s.patch
@@ -19,7 +19,7 @@
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -1768,6 +1768,7 @@ struct wpa_driver_mesh_join_params {
+@@ -1827,6 +1827,7 @@ struct wpa_driver_mesh_join_params {
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
unsigned int flags;
bool handle_dfs;
@@ -29,7 +29,7 @@
struct wpa_driver_set_key_params {
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -11388,6 +11388,18 @@ static int nl80211_put_mesh_id(struct nl
+@@ -11626,6 +11626,18 @@ static int nl80211_put_mesh_id(struct nl
}
@@ -48,7 +48,7 @@
static int nl80211_put_mesh_config(struct nl_msg *msg,
struct wpa_driver_mesh_bss_params *params)
{
-@@ -11449,6 +11461,7 @@ static int nl80211_join_mesh(struct i802
+@@ -11687,6 +11699,7 @@ static int nl80211_join_mesh(struct i802
nl80211_put_basic_rates(msg, params->basic_rates) ||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
nl80211_put_beacon_int(msg, params->beacon_int) ||
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/464-fix-mesh-obss-check.patch b/recipes-wifi/hostapd/files/patches-2.10.3/464-fix-mesh-obss-check.patch
index 73ccc65..c7e8cf2 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/464-fix-mesh-obss-check.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/464-fix-mesh-obss-check.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3077,6 +3077,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3094,6 +3094,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
freq->freq = ssid->frequency;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/465-hostapd-config-support-random-BSS-color.patch b/recipes-wifi/hostapd/files/patches-2.10.3/465-hostapd-config-support-random-BSS-color.patch
index ada7785..7d3d946 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/465-hostapd-config-support-random-BSS-color.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/465-hostapd-config-support-random-BSS-color.patch
@@ -13,7 +13,7 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -3498,6 +3498,8 @@ static int hostapd_config_fill(struct ho
+@@ -3500,6 +3500,8 @@ static int hostapd_config_fill(struct ho
} 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/recipes-wifi/hostapd/files/patches-2.10.3/590-rrm-wnm-statistics.patch b/recipes-wifi/hostapd/files/patches-2.10.3/590-rrm-wnm-statistics.patch
index a6f4317..0efa6db 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/590-rrm-wnm-statistics.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/590-rrm-wnm-statistics.patch
@@ -1,6 +1,6 @@
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
-@@ -162,6 +162,21 @@ struct hostapd_sae_commit_queue {
+@@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
};
/**
@@ -22,9 +22,9 @@
* struct hostapd_data - hostapd per-BSS data structure
*/
struct hostapd_data {
-@@ -175,6 +190,9 @@ struct hostapd_data {
+@@ -182,6 +197,9 @@ struct hostapd_data {
- u8 own_addr[ETH_ALEN];
+ struct hostapd_data *mld_first_bss;
+ /* OpenWrt specific statistics */
+ struct hostapd_openwrt_stats openwrt_stats;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch b/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch
index aa68079..f393634 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/600-ubus_support.patch
@@ -31,7 +31,7 @@
};
enum hostapd_chan_status {
-@@ -183,6 +184,7 @@ struct hostapd_data {
+@@ -184,6 +185,7 @@ struct hostapd_data {
struct hostapd_iface *iface;
struct hostapd_config *iconf;
struct hostapd_bss_config *conf;
@@ -39,7 +39,7 @@
int interface_added; /* virtual interface added for this BSS */
unsigned int started:1;
unsigned int disabled:1;
-@@ -682,6 +684,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -695,6 +697,7 @@ hostapd_alloc_bss_data(struct hostapd_if
struct hostapd_bss_config *bss);
int hostapd_setup_interface(struct hostapd_iface *iface);
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
@@ -49,7 +49,7 @@
struct hostapd_iface * hostapd_alloc_iface(void);
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -435,6 +435,7 @@ void hostapd_free_hapd_data(struct hosta
+@@ -455,6 +455,7 @@ void hostapd_free_hapd_data(struct hosta
hapd->beacon_set_done = 0;
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
@@ -57,7 +57,7 @@
accounting_deinit(hapd);
hostapd_deinit_wpa(hapd);
vlan_deinit(hapd);
-@@ -1185,6 +1186,8 @@ static int hostapd_start_beacon(struct h
+@@ -1207,6 +1208,8 @@ static int hostapd_start_beacon(struct h
if (hapd->driver && hapd->driver->set_operstate)
hapd->driver->set_operstate(hapd->drv_priv, 1);
@@ -66,7 +66,7 @@
return 0;
}
-@@ -2126,6 +2129,7 @@ static int hostapd_setup_interface_compl
+@@ -2295,6 +2298,7 @@ static int hostapd_setup_interface_compl
if (err)
goto fail;
@@ -74,15 +74,15 @@
wpa_printf(MSG_DEBUG, "Completing interface initialization");
if (iface->freq) {
#ifdef NEED_AP_MLME
-@@ -2342,6 +2346,7 @@ dfs_offload:
+@@ -2514,6 +2518,7 @@ dfs_offload:
fail:
wpa_printf(MSG_ERROR, "Interface initialization failed");
+ hostapd_ubus_free_iface(iface);
- hostapd_set_state(iface, HAPD_IFACE_DISABLED);
- wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
- #ifdef CONFIG_FST
-@@ -2817,6 +2822,7 @@ void hostapd_interface_deinit_free(struc
+
+ if (iface->is_no_ir) {
+ hostapd_set_state(iface, HAPD_IFACE_NO_IR);
+@@ -3004,6 +3009,7 @@ void hostapd_interface_deinit_free(struc
(unsigned int) iface->conf->num_bss);
driver = iface->bss[0]->driver;
drv_priv = iface->bss[0]->drv_priv;
@@ -92,7 +92,7 @@
__func__, driver, drv_priv);
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
-@@ -2740,13 +2740,18 @@ static void handle_auth(struct hostapd_d
+@@ -2778,7 +2778,7 @@ static void handle_auth(struct hostapd_d
u16 auth_alg, auth_transaction, status_code;
u16 resp = WLAN_STATUS_SUCCESS;
struct sta_info *sta = NULL;
@@ -101,9 +101,10 @@
u16 fc;
const u8 *challenge = NULL;
u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
- size_t resp_ies_len = 0;
- u16 seq_ctrl;
+@@ -2787,6 +2787,11 @@ static void handle_auth(struct hostapd_d
struct radius_sta rad_info;
+ const u8 *dst, *sa, *bssid;
+ bool mld_sta = false;
+ struct hostapd_ubus_request req = {
+ .type = HOSTAPD_UBUS_AUTH_REQ,
+ .mgmt_frame = mgmt,
@@ -112,7 +113,7 @@
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
-@@ -2914,6 +2919,13 @@ static void handle_auth(struct hostapd_d
+@@ -2978,6 +2983,13 @@ static void handle_auth(struct hostapd_d
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto fail;
}
@@ -126,7 +127,7 @@
if (res == HOSTAPD_ACL_PENDING)
return;
-@@ -4695,7 +4707,7 @@ static void handle_assoc(struct hostapd_
+@@ -5141,7 +5153,7 @@ static void handle_assoc(struct hostapd_
int resp = WLAN_STATUS_SUCCESS;
u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
const u8 *pos;
@@ -135,7 +136,7 @@
struct sta_info *sta;
u8 *tmp = NULL;
#ifdef CONFIG_FILS
-@@ -4908,6 +4920,11 @@ static void handle_assoc(struct hostapd_
+@@ -5354,6 +5366,11 @@ static void handle_assoc(struct hostapd_
left = res;
}
#endif /* CONFIG_FILS */
@@ -147,7 +148,7 @@
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
* is used */
-@@ -5006,6 +5023,13 @@ static void handle_assoc(struct hostapd_
+@@ -5452,6 +5469,13 @@ static void handle_assoc(struct hostapd_
}
#endif /* CONFIG_FILS */
@@ -161,26 +162,26 @@
fail:
/*
-@@ -5099,6 +5123,7 @@ static void handle_disassoc(struct hosta
- wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d",
- MAC2STR(mgmt->sa),
- le_to_host16(mgmt->u.disassoc.reason_code));
+@@ -5733,6 +5757,7 @@ static void handle_disassoc(struct hosta
+ (unsigned long) len);
+ return;
+ }
+ hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
sta = ap_get_sta(hapd, mgmt->sa);
- if (sta == NULL) {
-@@ -5168,6 +5193,8 @@ static void handle_deauth(struct hostapd
+ if (!sta) {
+@@ -5764,6 +5789,8 @@ static void handle_deauth(struct hostapd
/* Clear the PTKSA cache entries for PASN */
ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
+ hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
+
sta = ap_get_sta(hapd, mgmt->sa);
- if (sta == NULL) {
- wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
+ if (!sta) {
+ wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -1006,6 +1006,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -1036,6 +1036,12 @@ void handle_probe_req(struct hostapd_dat
u16 csa_offs[2];
size_t csa_offs_len;
struct radius_sta rad_info;
@@ -193,7 +194,7 @@
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
ssi_signal < hapd->iconf->rssi_ignore_probe_request)
-@@ -1192,6 +1198,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -1222,6 +1228,12 @@ void handle_probe_req(struct hostapd_dat
}
#endif /* CONFIG_P2P */
@@ -234,7 +235,7 @@
wpabuf_free(sta->p2p_ie);
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
-@@ -460,6 +460,7 @@ void ap_handle_timer(void *eloop_ctx, vo
+@@ -471,6 +471,7 @@ void ap_handle_timer(void *eloop_ctx, vo
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
"local deauth request");
@@ -242,7 +243,7 @@
ap_free_sta(hapd, sta);
return;
}
-@@ -615,6 +616,7 @@ skip_poll:
+@@ -626,6 +627,7 @@ skip_poll:
mlme_deauthenticate_indication(
hapd, sta,
WLAN_REASON_PREV_AUTH_NOT_VALID);
@@ -250,7 +251,7 @@
ap_free_sta(hapd, sta);
break;
}
-@@ -1305,15 +1307,28 @@ void ap_sta_set_authorized(struct hostap
+@@ -1344,15 +1346,28 @@ void ap_sta_set_authorized(struct hostap
sta->addr, authorized, dev_addr);
if (authorized) {
@@ -279,7 +280,7 @@
#ifdef CONFIG_P2P
if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
os_snprintf(ip_addr, sizeof(ip_addr),
-@@ -1323,6 +1338,13 @@ void ap_sta_set_authorized(struct hostap
+@@ -1362,6 +1377,13 @@ void ap_sta_set_authorized(struct hostap
}
#endif /* CONFIG_P2P */
@@ -293,7 +294,7 @@
keyid = ap_sta_wpa_get_keyid(hapd, sta);
if (keyid) {
os_snprintf(keyid_buf, sizeof(keyid_buf),
-@@ -1341,17 +1363,19 @@ void ap_sta_set_authorized(struct hostap
+@@ -1380,17 +1402,19 @@ void ap_sta_set_authorized(struct hostap
dpp_pkhash, SHA256_MAC_LEN);
}
@@ -354,7 +355,7 @@
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7608,6 +7608,8 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -7635,6 +7635,8 @@ struct wpa_supplicant * wpa_supplicant_a
}
#endif /* CONFIG_P2P */
@@ -363,7 +364,7 @@
return wpa_s;
}
-@@ -7634,6 +7636,8 @@ int wpa_supplicant_remove_iface(struct w
+@@ -7661,6 +7663,8 @@ int wpa_supplicant_remove_iface(struct w
struct wpa_supplicant *parent = wpa_s->parent;
#endif /* CONFIG_MESH */
@@ -372,7 +373,7 @@
/* Remove interface from the global list of interfaces */
prev = global->ifaces;
if (prev == wpa_s) {
-@@ -7980,8 +7984,12 @@ int wpa_supplicant_run(struct wpa_global
+@@ -8007,8 +8011,12 @@ int wpa_supplicant_run(struct wpa_global
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
@@ -433,7 +434,7 @@
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -901,6 +901,7 @@ int main(int argc, char *argv[])
+@@ -991,6 +991,7 @@ int main(int argc, char *argv[])
}
hostapd_global_ctrl_iface_init(&interfaces);
@@ -441,7 +442,7 @@
if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
wpa_printf(MSG_ERROR, "Failed to start eloop");
-@@ -910,6 +911,7 @@ int main(int argc, char *argv[])
+@@ -1000,6 +1001,7 @@ int main(int argc, char *argv[])
ret = 0;
out:
@@ -574,7 +575,7 @@
}
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
-@@ -293,6 +293,7 @@ struct sta_info {
+@@ -322,6 +322,7 @@ struct sta_info {
#endif /* CONFIG_TESTING_OPTIONS */
#ifdef CONFIG_AIRTIME_POLICY
unsigned int airtime_weight;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/700-wifi-reload.patch b/recipes-wifi/hostapd/files/patches-2.10.3/700-wifi-reload.patch
index 5ac7f71..0c76276 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/700-wifi-reload.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/700-wifi-reload.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2418,6 +2418,8 @@ static int hostapd_config_fill(struct ho
+@@ -2420,6 +2420,8 @@ static int hostapd_config_fill(struct ho
bss->isolate = atoi(pos);
} else if (os_strcmp(buf, "ap_max_inactivity") == 0) {
bss->ap_max_inactivity = atoi(pos);
@@ -9,7 +9,7 @@
} else if (os_strcmp(buf, "skip_inactivity_poll") == 0) {
bss->skip_inactivity_poll = atoi(pos);
} else if (os_strcmp(buf, "config_id") == 0) {
-@@ -3128,6 +3130,8 @@ static int hostapd_config_fill(struct ho
+@@ -3130,6 +3132,8 @@ static int hostapd_config_fill(struct ho
}
} else if (os_strcmp(buf, "acs_exclude_dfs") == 0) {
conf->acs_exclude_dfs = atoi(pos);
@@ -20,7 +20,7 @@
} else if (os_strcmp(buf, "channel") == 0) {
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -997,6 +997,7 @@ void hostapd_config_free(struct hostapd_
+@@ -998,6 +998,7 @@ void hostapd_config_free(struct hostapd_
for (i = 0; i < conf->num_bss; i++)
hostapd_config_free_bss(conf->bss[i]);
@@ -30,7 +30,7 @@
os_free(conf->basic_rates);
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -987,6 +987,7 @@ struct eht_phy_capabilities_info {
+@@ -998,6 +998,7 @@ struct eht_phy_capabilities_info {
struct hostapd_config {
struct hostapd_bss_config **bss, *last_bss;
size_t num_bss;
@@ -40,7 +40,7 @@
int rts_threshold;
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -254,6 +254,10 @@ static int hostapd_iface_conf_changed(st
+@@ -255,6 +255,10 @@ static int hostapd_iface_conf_changed(st
{
size_t i;
@@ -51,7 +51,7 @@
if (newconf->num_bss != oldconf->num_bss)
return 1;
-@@ -267,7 +271,7 @@ static int hostapd_iface_conf_changed(st
+@@ -268,7 +272,7 @@ static int hostapd_iface_conf_changed(st
}
@@ -60,7 +60,7 @@
{
struct hapd_interfaces *interfaces = iface->interfaces;
struct hostapd_data *hapd = iface->bss[0];
-@@ -295,6 +299,9 @@ int hostapd_reload_config(struct hostapd
+@@ -296,6 +300,9 @@ int hostapd_reload_config(struct hostapd
char *fname;
int res;
@@ -70,7 +70,7 @@
hostapd_clear_old(iface);
wpa_printf(MSG_DEBUG,
-@@ -321,6 +328,24 @@ int hostapd_reload_config(struct hostapd
+@@ -322,6 +329,24 @@ int hostapd_reload_config(struct hostapd
wpa_printf(MSG_ERROR,
"Failed to enable interface on config reload");
return res;
@@ -95,7 +95,7 @@
}
iface->conf = newconf;
-@@ -337,6 +362,12 @@ int hostapd_reload_config(struct hostapd
+@@ -338,6 +363,12 @@ int hostapd_reload_config(struct hostapd
for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j];
@@ -108,7 +108,7 @@
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
os_strcmp(hapd->conf->config_id,
newconf->bss[j]->config_id) != 0)
-@@ -2514,6 +2545,10 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -2700,6 +2731,10 @@ hostapd_alloc_bss_data(struct hostapd_if
hapd->iconf = conf;
hapd->conf = bss;
hapd->iface = hapd_iface;
@@ -130,7 +130,7 @@
struct hostapd_config * (*config_read_cb)(const char *config_fname);
int (*ctrl_iface_init)(struct hostapd_data *hapd);
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
-@@ -185,6 +185,7 @@ struct hostapd_data {
+@@ -186,6 +186,7 @@ struct hostapd_data {
struct hostapd_config *iconf;
struct hostapd_bss_config *conf;
struct hostapd_ubus_bss ubus;
@@ -138,7 +138,7 @@
int interface_added; /* virtual interface added for this BSS */
unsigned int started:1;
unsigned int disabled:1;
-@@ -676,7 +677,7 @@ struct hostapd_iface {
+@@ -689,7 +690,7 @@ struct hostapd_iface {
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
int (*cb)(struct hostapd_iface *iface,
void *ctx), void *ctx);
@@ -149,7 +149,7 @@
hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -5054,6 +5054,9 @@ static int wpa_driver_nl80211_set_ap(voi
+@@ -5322,6 +5322,9 @@ static int wpa_driver_nl80211_set_ap(voi
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
ret, strerror(-ret));
@@ -157,7 +157,7 @@
+ ret = 0;
+ bss->flink->beacon_set = 0;
} else {
- bss->flink->beacon_set = 1;
+ link->beacon_set = 1;
nl80211_set_bss(bss, params->cts_protect, params->preamble,
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -172,7 +172,7 @@
}
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -320,7 +320,7 @@ static void handle_term(int sig, void *s
+@@ -410,7 +410,7 @@ static void handle_term(int sig, void *s
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
{
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/710-vlan_no_bridge.patch b/recipes-wifi/hostapd/files/patches-2.10.3/710-vlan_no_bridge.patch
index f625f4b..61f33ac 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/710-vlan_no_bridge.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/710-vlan_no_bridge.patch
@@ -30,7 +30,7 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -3353,6 +3353,8 @@ static int hostapd_config_fill(struct ho
+@@ -3355,6 +3355,8 @@ static int hostapd_config_fill(struct ho
#ifndef CONFIG_NO_VLAN
} else if (os_strcmp(buf, "dynamic_vlan") == 0) {
bss->ssid.dynamic_vlan = atoi(pos);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/711-wds_bridge_force.patch b/recipes-wifi/hostapd/files/patches-2.10.3/711-wds_bridge_force.patch
index e04ae62..c0f2c31 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/711-wds_bridge_force.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/711-wds_bridge_force.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2316,6 +2316,8 @@ static int hostapd_config_fill(struct ho
+@@ -2318,6 +2318,8 @@ static int hostapd_config_fill(struct ho
sizeof(conf->bss[0]->iface));
} else if (os_strcmp(buf, "bridge") == 0) {
os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch b/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch
index a06f141..0bb00f9 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/720-iface_max_num_sta.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2848,6 +2848,14 @@ static int hostapd_config_fill(struct ho
+@@ -2850,6 +2850,14 @@ static int hostapd_config_fill(struct ho
line, bss->max_num_sta, MAX_STA_COUNT);
return 1;
}
@@ -17,7 +17,7 @@
} else if (os_strcmp(buf, "extended_key_id") == 0) {
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
-@@ -721,6 +721,7 @@ void hostapd_cleanup_cs_params(struct ho
+@@ -734,6 +734,7 @@ void hostapd_cleanup_cs_params(struct ho
void hostapd_periodic_iface(struct hostapd_iface *iface);
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
@@ -27,7 +27,7 @@
void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -271,6 +271,30 @@ static int hostapd_iface_conf_changed(st
+@@ -272,6 +272,30 @@ static int hostapd_iface_conf_changed(st
}
@@ -60,7 +60,7 @@
struct hapd_interfaces *interfaces = iface->interfaces;
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -1222,7 +1222,7 @@ void handle_probe_req(struct hostapd_dat
+@@ -1252,7 +1252,7 @@ void handle_probe_req(struct hostapd_dat
if (hapd->conf->no_probe_resp_if_max_sta &&
is_multicast_ether_addr(mgmt->da) &&
is_multicast_ether_addr(mgmt->bssid) &&
@@ -71,7 +71,7 @@
" since no room for additional STA",
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1026,6 +1026,8 @@ struct hostapd_config {
+@@ -1037,6 +1037,8 @@ struct hostapd_config {
unsigned int track_sta_max_num;
unsigned int track_sta_max_age;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/730-ft_iface.patch b/recipes-wifi/hostapd/files/patches-2.10.3/730-ft_iface.patch
index 1826c97..563fe5b 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/730-ft_iface.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/730-ft_iface.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -3007,6 +3007,8 @@ static int hostapd_config_fill(struct ho
+@@ -3009,6 +3009,8 @@ static int hostapd_config_fill(struct ho
wpa_printf(MSG_INFO,
"Line %d: Obsolete peerkey parameter ignored", line);
#ifdef CONFIG_IEEE80211R_AP
@@ -21,7 +21,7 @@
int bridge_hairpin; /* hairpin_mode on bridge members */
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
-@@ -1616,8 +1616,12 @@ int hostapd_setup_wpa(struct hostapd_dat
+@@ -1727,8 +1727,12 @@ int hostapd_setup_wpa(struct hostapd_dat
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
const char *ft_iface;
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch b/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch
index a116644..6b6cc0f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/740-snoop_iface.patch
@@ -55,7 +55,7 @@
"x_snoop: Failed to initialize L2 packet processing %s",
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2320,6 +2320,8 @@ static int hostapd_config_fill(struct ho
+@@ -2322,6 +2322,8 @@ static int hostapd_config_fill(struct ho
os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
bss->bridge_hairpin = atoi(pos);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/750-qos_map_set_without_interworking.patch b/recipes-wifi/hostapd/files/patches-2.10.3/750-qos_map_set_without_interworking.patch
index c3a77bc..124f5ea 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/750-qos_map_set_without_interworking.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/750-qos_map_set_without_interworking.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -1602,6 +1602,8 @@ static int parse_anqp_elem(struct hostap
+@@ -1604,6 +1604,8 @@ static int parse_anqp_elem(struct hostap
return 0;
}
@@ -9,7 +9,7 @@
static int parse_qos_map_set(struct hostapd_bss_config *bss,
char *buf, int line)
-@@ -1643,8 +1645,6 @@ static int parse_qos_map_set(struct host
+@@ -1645,8 +1647,6 @@ static int parse_qos_map_set(struct host
return 0;
}
@@ -18,7 +18,7 @@
#ifdef CONFIG_HS20
static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
-@@ -4064,10 +4064,10 @@ static int hostapd_config_fill(struct ho
+@@ -4066,10 +4066,10 @@ static int hostapd_config_fill(struct ho
bss->gas_frag_limit = val;
} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
bss->gas_comeback_delay = atoi(pos);
@@ -32,7 +32,7 @@
os_free(bss->dump_msk_file);
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -1499,6 +1499,7 @@ static int hostapd_setup_bss(struct host
+@@ -1534,6 +1534,7 @@ static int hostapd_setup_bss(struct host
wpa_printf(MSG_ERROR, "GAS server initialization failed");
return -1;
}
@@ -40,7 +40,7 @@
if (conf->qos_map_set_len &&
hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
-@@ -1506,7 +1507,6 @@ static int hostapd_setup_bss(struct host
+@@ -1541,7 +1542,6 @@ static int hostapd_setup_bss(struct host
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
return -1;
}
@@ -50,7 +50,7 @@
wpa_printf(MSG_ERROR, "BSS Load initialization failed");
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -2672,8 +2672,6 @@ void wnm_bss_keep_alive_deinit(struct wp
+@@ -2683,8 +2683,6 @@ void wnm_bss_keep_alive_deinit(struct wp
}
@@ -59,7 +59,7 @@
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
size_t len)
{
-@@ -2706,8 +2704,6 @@ static void interworking_process_assoc_r
+@@ -2717,8 +2715,6 @@ static void interworking_process_assoc_r
}
}
@@ -68,7 +68,7 @@
static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
{
-@@ -3087,10 +3083,8 @@ static int wpa_supplicant_event_associnf
+@@ -3098,10 +3094,8 @@ static int wpa_supplicant_event_associnf
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
data->assoc_info.resp_ies_len);
#endif /* CONFIG_WNM */
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/751-qos_map_ignore_when_unsupported.patch b/recipes-wifi/hostapd/files/patches-2.10.3/751-qos_map_ignore_when_unsupported.patch
index 1fc4e8a..f5ebab7 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/751-qos_map_ignore_when_unsupported.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/751-qos_map_ignore_when_unsupported.patch
@@ -1,6 +1,6 @@
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -874,7 +874,8 @@ int hostapd_start_dfs_cac(struct hostapd
+@@ -927,7 +927,8 @@ int hostapd_start_dfs_cac(struct hostapd
int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
const u8 *qos_map_set, u8 qos_map_set_len)
{
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/760-dynamic_own_ip.patch b/recipes-wifi/hostapd/files/patches-2.10.3/760-dynamic_own_ip.patch
index 2f50158..946b453 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/760-dynamic_own_ip.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/760-dynamic_own_ip.patch
@@ -85,7 +85,7 @@
RadiusType msg_type, const u8 *addr);
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
-@@ -535,6 +535,10 @@ int add_common_radius_attr(struct hostap
+@@ -598,6 +598,10 @@ int add_common_radius_attr(struct hostap
struct hostapd_radius_attr *attr;
int len;
@@ -98,7 +98,7 @@
hapd->conf->own_ip_addr.af == AF_INET &&
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2688,6 +2688,8 @@ static int hostapd_config_fill(struct ho
+@@ -2690,6 +2690,8 @@ static int hostapd_config_fill(struct ho
} else if (os_strcmp(buf, "iapp_interface") == 0) {
wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used");
#endif /* CONFIG_IAPP */
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/761-shared_das_port.patch b/recipes-wifi/hostapd/files/patches-2.10.3/761-shared_das_port.patch
index 59c2a96..dad7afd 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/761-shared_das_port.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/761-shared_das_port.patch
@@ -10,14 +10,14 @@
unsigned int time_window;
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -1442,6 +1442,7 @@ static int hostapd_setup_bss(struct host
- struct radius_das_conf das_conf;
- os_memset(&das_conf, 0, sizeof(das_conf));
- das_conf.port = conf->radius_das_port;
-+ das_conf.nas_identifier = conf->nas_identifier;
- das_conf.shared_secret = conf->radius_das_shared_secret;
- das_conf.shared_secret_len =
- conf->radius_das_shared_secret_len;
+@@ -1471,6 +1471,7 @@ static int hostapd_setup_bss(struct host
+
+ os_memset(&das_conf, 0, sizeof(das_conf));
+ das_conf.port = conf->radius_das_port;
++ das_conf.nas_identifier = conf->nas_identifier;
+ das_conf.shared_secret = conf->radius_das_shared_secret;
+ das_conf.shared_secret_len =
+ conf->radius_das_shared_secret_len;
--- a/src/radius/radius_das.c
+++ b/src/radius/radius_das.c
@@ -12,13 +12,26 @@
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
index 22e4841..4e51a1c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0001-hostapd-mtk-Add-neighbor-report-and-BSS-Termination-.patch
@@ -1,7 +1,7 @@
-From cb7b7459ac276c5713dae22b8fe19365c2895de1 Mon Sep 17 00:00:00 2001
+From df9a616286f2d33e5c580517238b93ee22359f95 Mon Sep 17 00:00:00 2001
From: "howard.hsu" <howard-yh.hsu@mediatek.com>
Date: Wed, 19 Jan 2022 19:18:07 +0800
-Subject: [PATCH 01/28] hostapd: mtk: Add neighbor report and BSS Termination
+Subject: [PATCH 01/32] hostapd: mtk: Add neighbor report and BSS Termination
for MBO certification
1. Add hostapd_neighbor_count() and hostapd_neighbor_insert_buffer ()
@@ -32,7 +32,7 @@
9 files changed, 252 insertions(+), 5 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index a0e4ecd..0355e8b 100644
+index 55711ab10..fab1287cd 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1347,6 +1347,11 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
@@ -48,19 +48,19 @@
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 2755146..9f450f6 100644
+index 41c70708d..7d0de122d 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)
- /* comeback after 10 TUs */
+@@ -171,6 +171,7 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
bss->pasn_comeback_after = 10;
+ bss->pasn_noauth = 1;
#endif /* CONFIG_PASN */
+ bss->bss_termination_tsf = 0;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 7774360..af9bf92 100644
+index 02fd4940c..dc6025279 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -558,6 +558,7 @@ struct hostapd_bss_config {
@@ -72,10 +72,10 @@
/* IEEE 802.11u - Interworking */
int interworking;
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index d46de44..38fc8e4 100644
+index 50a4dc4d6..cf1cff447 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
-@@ -1265,6 +1265,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
+@@ -1280,6 +1280,10 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
wpa_printf(MSG_DEBUG, "Invalid bss_term data");
return -1;
}
@@ -86,7 +86,7 @@
end++;
WPA_PUT_LE16(&bss_term_dur[10], atoi(end));
}
-@@ -1291,14 +1295,25 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
+@@ -1306,14 +1310,25 @@ int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
req_mode |= WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT;
}
@@ -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 4642e49..cce6df4 100644
+index 4642e4927..cce6df41c 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 7646a98..ce492b5 100644
+index 7646a98a4..ce492b53f 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 5b276e8..1c14b32 100644
+index 5b276e8da..1c14b3201 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 ba1dd2e..32ccf14 100644
+index ba1dd2ed1..32ccf14ae 100644
--- a/src/ap/wnm_ap.c
+++ b/src/ap/wnm_ap.c
@@ -20,6 +20,7 @@
@@ -471,5 +471,5 @@
if (url) {
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
index d5ebb61..9a4638d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0002-hostapd-mtk-print-sae-groups-by-hostapd-ctrl.patch
@@ -1,14 +1,14 @@
-From 41cf77cdfd1b260a688592a8ae4c1474d492d6e4 Mon Sep 17 00:00:00 2001
+From a1c40b639dfdb7ebfbc4ee75f5d0ea35ff7d17fc Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Tue, 20 Sep 2022 19:33:45 +0800
-Subject: [PATCH 02/28] hostapd: mtk: print sae groups by hostapd ctrl
+Subject: [PATCH 02/32] 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 0355e8b..8e8a1a7 100644
+index fab1287cd..4624d9afd 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1421,6 +1421,19 @@ static int hostapd_ctrl_iface_get(struct hostapd_data *hapd, char *cmd,
@@ -32,5 +32,5 @@
return -1;
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
index 94bc2b9..dae1d21 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0003-hostapd-mtk-add-support-for-runtime-set-in-band-disc.patch
@@ -1,7 +1,7 @@
-From c7e5ad8609443c3e484ea06df88755de55f5bda0 Mon Sep 17 00:00:00 2001
+From 713b2663c91c55f00c6b9bfbf44922306aab6ad3 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Tue, 31 May 2022 21:15:54 +0800
-Subject: [PATCH 03/28] hostapd: mtk: add support for runtime set in-band
+Subject: [PATCH 03/32] 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 8e8a1a7..c4e344e 100644
+index 4624d9afd..d4737958a 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -827,6 +827,69 @@ static int hostapd_ctrl_iface_send_qos_map_conf(struct hostapd_data *hapd,
@@ -94,7 +94,7 @@
#ifdef CONFIG_WNM_AP
-@@ -3511,6 +3574,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -3546,6 +3609,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
if (hostapd_ctrl_iface_coloc_intf_req(hapd, buf + 15))
reply_len = -1;
#endif /* CONFIG_WNM_AP */
@@ -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 bc8993f..05ac5ac 100644
+index 61f8cba12..dfc996d49 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -655,6 +655,24 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
@@ -143,10 +143,10 @@
};
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index 73ab31c..ddb5d03 100644
+index 78b347618..f26e5254c 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -1618,6 +1618,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
+@@ -1648,6 +1648,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
struct wpa_driver_ap_params *params)
{
params->fd_max_int = hapd->conf->fils_discovery_max_int;
@@ -155,7 +155,7 @@
if (is_6ghz_op_class(hapd->iconf->op_class) &&
params->fd_max_int > FD_MAX_INTERVAL_6GHZ)
params->fd_max_int = FD_MAX_INTERVAL_6GHZ;
-@@ -1626,7 +1628,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
+@@ -1656,7 +1658,8 @@ static u8 * hostapd_fils_discovery(struct hostapd_data *hapd,
if (params->fd_min_int > params->fd_max_int)
params->fd_min_int = params->fd_max_int;
@@ -166,10 +166,10 @@
¶ms->fd_frame_tmpl_len);
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 4377165..d79929b 100644
+index 70d98e7d4..37e156fc8 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -4631,9 +4631,10 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg,
+@@ -4686,9 +4686,10 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg,
params->fd_max_int) ||
(params->fd_frame_tmpl &&
nla_put(msg, NL80211_FILS_DISCOVERY_ATTR_TMPL,
@@ -182,7 +182,7 @@
nla_nest_end(msg, attr);
return 0;
}
-@@ -5038,7 +5039,10 @@ static int wpa_driver_nl80211_set_ap(void *priv,
+@@ -5300,7 +5301,10 @@ static int wpa_driver_nl80211_set_ap(void *priv,
#endif /* CONFIG_SAE */
#ifdef CONFIG_FILS
@@ -195,10 +195,10 @@
#endif /* CONFIG_FILS */
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index 9a0ac03..12fc6a9 100644
+index c59fec406..82860ae32 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
-@@ -7569,6 +7569,7 @@ enum nl80211_fils_discovery_attributes {
+@@ -7591,6 +7591,7 @@ enum nl80211_fils_discovery_attributes {
NL80211_FILS_DISCOVERY_ATTR_INT_MIN,
NL80211_FILS_DISCOVERY_ATTR_INT_MAX,
NL80211_FILS_DISCOVERY_ATTR_TMPL,
@@ -207,5 +207,5 @@
/* keep last */
__NL80211_FILS_DISCOVERY_ATTR_LAST,
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
index e768500..e3e5973 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0004-hostapd-mtk-Add-mtk_vendor.h.patch
@@ -1,7 +1,7 @@
-From a19cc5fdbfb27400d24f3962ad2d134a3821a2cd Mon Sep 17 00:00:00 2001
+From 4fd45869d5a3ca0e99ce7d14c925828f1b027881 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 01/30] hostapd: mtk: Add mtk_vendor.h
+Subject: [PATCH 04/32] hostapd: mtk: Add mtk_vendor.h
---
src/common/mtk_vendor.h | 197 ++++++++++++++++++++++++++++++++++++++++
@@ -10,7 +10,7 @@
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
new file mode 100644
-index 0000000..4a19d2f
+index 000000000..4a19d2fc9
--- /dev/null
+++ b/src/common/mtk_vendor.h
@@ -0,0 +1,197 @@
@@ -212,5 +212,5 @@
+};
+#endif /* MTK_VENDOR_H */
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
index 46077c5..4f85cf2 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0005-hostapd-mtk-Support-EDCCA-hostapd-configuration.patch
@@ -1,7 +1,7 @@
-From ed079151f73c1a0acb6fe071434db64d3850a5e3 Mon Sep 17 00:00:00 2001
+From 68bb1314767dfb84656385e38a1c05862312d76e 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 02/30] hostapd: mtk: Support EDCCA hostapd configuration
+Subject: [PATCH 05/32] hostapd: mtk: Support EDCCA hostapd configuration
edcca_enable and edcca_compensation and implement edcca related handlers.
---
@@ -20,12 +20,12 @@
12 files changed, 428 insertions(+), 6 deletions(-)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index 11a3a1a..92a0ab7 100644
+index 45b4d457b..339d6915e 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4799,6 +4799,40 @@ static int hostapd_config_fill(struct hostapd_config *conf,
- }
- conf->punct_acs_threshold = val;
+@@ -4805,6 +4805,40 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ } else if (os_strcmp(buf, "mld_id") == 0) {
+ bss->mld_id = atoi(pos);
#endif /* CONFIG_IEEE80211BE */
+ } else if (os_strcmp(buf, "edcca_threshold") == 0) {
+ if (hostapd_parse_intlist(&conf->edcca_threshold, pos) ||
@@ -65,7 +65,7 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index c4e344e..b132e54 100644
+index d4737958a..d8afba992 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -599,6 +599,19 @@ static const char * pbc_status_str(enum pbc_status status)
@@ -88,7 +88,7 @@
static int hostapd_ctrl_iface_wps_get_status(struct hostapd_data *hapd,
char *buf, size_t buflen)
{
-@@ -3397,6 +3410,112 @@ static int hostapd_ctrl_iface_driver_cmd(struct hostapd_data *hapd, char *cmd,
+@@ -3432,6 +3445,112 @@ static int hostapd_ctrl_iface_driver_cmd(struct hostapd_data *hapd, char *cmd,
#endif /* ANDROID */
@@ -201,7 +201,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -3952,6 +4071,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -3987,6 +4106,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 */
@@ -215,10 +215,10 @@
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 9f450f6..55c35c7 100644
+index 7d0de122d..35ea6b7f3 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -294,6 +294,9 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -295,6 +295,9 @@ struct hostapd_config * hostapd_config_defaults(void)
conf->airtime_update_interval = AIRTIME_DEFAULT_UPDATE_INTERVAL;
#endif /* CONFIG_AIRTIME_POLICY */
@@ -228,7 +228,7 @@
return conf;
}
-@@ -1008,6 +1011,7 @@ void hostapd_config_free(struct hostapd_config *conf)
+@@ -1009,6 +1012,7 @@ void hostapd_config_free(struct hostapd_config *conf)
#ifdef CONFIG_ACS
os_free(conf->acs_chan_bias);
#endif /* CONFIG_ACS */
@@ -237,10 +237,10 @@
wpabuf_free(conf->civic);
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index af9bf92..acfe719 100644
+index dc6025279..9186fbda8 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1180,8 +1180,38 @@ struct hostapd_config {
+@@ -1191,8 +1191,38 @@ struct hostapd_config {
MBSSID_ENABLED = 1,
ENHANCED_MBSSID_ENABLED = 2,
} mbssid;
@@ -280,10 +280,10 @@
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 ab84a63..af6944b 100644
+index 75ddfa15c..99ba973aa 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1054,3 +1054,27 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
+@@ -1137,3 +1137,27 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
return hapd->driver->set_secure_ranging_ctx(hapd->drv_priv, ¶ms);
}
#endif /* CONFIG_PASN */
@@ -312,7 +312,7 @@
+ return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 93b2244..b89ad6e 100644
+index 331b0eaf4..8806217bb 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -144,6 +144,10 @@ int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd,
@@ -327,10 +327,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index f5da65a..cd0a0c9 100644
+index 0b7d2c1f4..b67698a72 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2390,6 +2390,13 @@ dfs_offload:
+@@ -2559,6 +2559,13 @@ dfs_offload:
}
#endif /* CONFIG_MESH */
@@ -345,7 +345,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 4a19d2f..6121857 100644
+index 4a19d2fc9..6121857dd 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -30,14 +30,22 @@ enum mtk_vendor_attr_edcca_ctrl {
@@ -378,10 +378,10 @@
[MTK_VENDOR_ATTR_EDCCA_CTRL_MODE] = { .type = NLA_U8 },
[MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL] = { .type = NLA_U8 },
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 2f91d30..73c7bb4 100644
+index 969cbda6b..443c4a79d 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5001,6 +5001,10 @@ struct wpa_driver_ops {
+@@ -5080,6 +5080,10 @@ struct wpa_driver_ops {
const u8 *match, size_t match_len,
bool multicast);
#endif /* CONFIG_TESTING_OPTIONS */
@@ -393,7 +393,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index d79929b..72c50f2 100644
+index 37e156fc8..c4e0bc9fe 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -37,6 +37,8 @@
@@ -405,7 +405,7 @@
#ifndef NETLINK_CAP_ACK
-@@ -13366,6 +13368,174 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
+@@ -13635,6 +13637,174 @@ static int testing_nl80211_radio_disable(void *priv, int disabled)
#endif /* CONFIG_TESTING_OPTIONS */
@@ -580,7 +580,7 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
-@@ -13519,4 +13689,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -13789,4 +13959,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 */
@@ -590,19 +590,19 @@
+ .get_edcca = nl80211_get_edcca,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 8bfbdd5..55c29cc 100644
+index aee8c4512..51b3fbec8 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -199,6 +199,7 @@ struct wpa_driver_nl80211_data {
- unsigned int uses_6ghz:1;
+@@ -202,6 +202,7 @@ struct wpa_driver_nl80211_data {
unsigned int secure_ranging_ctx_vendor_cmd_avail:1;
unsigned int puncturing:1;
+ unsigned int qca_ap_allowed_freqs: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 27ab1d9..efe7ae4 100644
+index 5e6406885..5dadf2450 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -18,6 +18,7 @@
@@ -613,7 +613,7 @@
static int protocol_feature_handler(struct nl_msg *msg, void *arg)
-@@ -1099,6 +1100,12 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1107,6 +1108,12 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
break;
}
#endif /* CONFIG_DRIVER_NL80211_BRCM */
@@ -627,5 +627,5 @@
wpa_printf(MSG_DEBUG, "nl80211: Supported vendor command: vendor_id=0x%x subcmd=%u",
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
index 0892d3f..747cafe 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0006-hostapd-mtk-Add-hostapd-MU-SET-GET-control.patch
@@ -1,4 +1,4 @@
-From ee34d2ccb27863f0eaa7abb0f65477ab9a0dd92f Mon Sep 17 00:00:00 2001
+From 8bfd442787c9b455d73a157f5879421b0b1ca9d4 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Tue, 9 Aug 2022 10:23:44 -0700
Subject: [PATCH 06/32] hostapd: mtk: Add hostapd MU SET/GET control
@@ -20,7 +20,7 @@
13 files changed, 251 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index a48034b..12741f8 100644
+index 339d6915e..1918d0340 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3679,6 +3679,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
@@ -40,10 +40,10 @@
} 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 c5c0e91..b317a65 100644
+index d8afba992..342cec820 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3516,6 +3516,63 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
+@@ -3551,6 +3551,63 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
}
@@ -107,7 +107,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4077,6 +4134,11 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4112,6 +4169,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);
@@ -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 05ac5ac..285aeba 100644
+index dfc996d49..98892ee9d 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1400,6 +1400,20 @@ static int hostapd_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
@@ -156,10 +156,10 @@
{ "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 55c35c7..afa19ec 100644
+index 35ea6b7f3..5d04e60c1 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -280,6 +280,7 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -281,6 +281,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;
@@ -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 22b1276..2077c67 100644
+index 9186fbda8..3df378ed2 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1133,6 +1133,7 @@ struct hostapd_config {
+@@ -1144,6 +1144,7 @@ struct hostapd_config {
u8 he_6ghz_tx_ant_pat;
u8 he_6ghz_reg_pwr_type;
bool require_he;
@@ -180,10 +180,10 @@
/* VHT enable/disable config from CHAN_SWITCH */
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index af6944b..d290a00 100644
+index 99ba973aa..44f494ed9 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1078,3 +1078,17 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
+@@ -1161,3 +1161,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);
}
@@ -202,7 +202,7 @@
+ return hapd->driver->mu_dump(hapd->drv_priv, mu_onoff);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index b89ad6e..1565bfa 100644
+index 8806217bb..6e0cf814c 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -148,6 +148,8 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -215,10 +215,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index cd0a0c9..21aba48 100644
+index b67698a72..aa0568175 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2396,6 +2396,8 @@ dfs_offload:
+@@ -2565,6 +2565,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..ef8618e 100644
+index 6121857dd..60bc4cd4c 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -10,6 +10,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -240,7 +240,7 @@
MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
};
-@@ -174,6 +176,19 @@ enum mtk_vendor_attr_rfeature_ctrl {
+@@ -177,6 +179,19 @@ enum mtk_vendor_attr_rfeature_ctrl {
NUM_MTK_VENDOR_ATTRS_RFEATURE_CTRL - 1
};
@@ -261,11 +261,11 @@
#define ETH_ALEN 6
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 73c7bb4..1a3f070 100644
+index 443c4a79d..1471ba2ef 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -1730,6 +1730,11 @@ struct wpa_driver_ap_params {
- * subchannel is punctured, otherwise active.
+@@ -176,6 +176,11 @@ struct hostapd_channel_data {
+ * punct_bitmap - RU puncturing bitmap
*/
u16 punct_bitmap;
+
@@ -275,8 +275,8 @@
+ u8 mu_onoff;
};
- struct wpa_driver_mesh_bss_params {
-@@ -5005,6 +5010,14 @@ struct wpa_driver_ops {
+ #define HE_MAC_CAPAB_0 0
+@@ -5084,6 +5089,14 @@ struct wpa_driver_ops {
const s8 edcca_compensation);
int (*configure_edcca_threshold)(void *priv, const int *threshold);
int (*get_edcca)(void *priv, const u8 mode, u8 *value);
@@ -292,10 +292,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index f5c95e1..fc8422c 100644
+index c4e0bc9fe..e7bfc35fa 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -13231,6 +13231,114 @@ fail:
+@@ -13500,6 +13500,114 @@ fail:
}
@@ -410,7 +410,7 @@
#ifdef CONFIG_DPP
static int nl80211_dpp_listen(void *priv, bool enable)
{
-@@ -13671,6 +13779,8 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -13950,6 +14058,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,
@@ -420,23 +420,23 @@
.dpp_listen = nl80211_dpp_listen,
#endif /* CONFIG_DPP */
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 55c29cc..f3a45ec 100644
+index 51b3fbec8..bd5d28404 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -200,6 +200,7 @@ struct wpa_driver_nl80211_data {
- unsigned int secure_ranging_ctx_vendor_cmd_avail:1;
+@@ -203,6 +203,7 @@ struct wpa_driver_nl80211_data {
unsigned int puncturing:1;
+ unsigned int qca_ap_allowed_freqs:1;
unsigned int mtk_edcca_vendor_cmd_avail:1;
+ unsigned int mtk_mu_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 efe7ae4..dcd1bcd 100644
+index 5dadf2450..ac66a916b 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1105,6 +1105,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
- case MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL :
+@@ -1113,6 +1113,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_MU_CTRL :
@@ -446,5 +446,5 @@
}
--
-2.39.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
index 0d96fd2..6f55c61 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0007-hostapd-mtk-Add-three-wire-PTA-ctrl-hostapd-vendor-c.patch
@@ -1,7 +1,7 @@
-From d0ce39f2142df00fbddff219bfe6fc6105d344cb Mon Sep 17 00:00:00 2001
+From 9b68a2d7cbffa1c1ee28c6a785649d90b621b95b 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 04/30] hostapd: mtk: Add three wire PTA ctrl hostapd vendor
+Subject: [PATCH 07/32] 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 0b36123..f34b81b 100644
+index 1918d0340..01880249d 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4842,6 +4842,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4848,6 +4848,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
conf->edcca_compensation = (s8) val;
@@ -35,10 +35,10 @@
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 1cad303..2c447ba 100644
+index 5d04e60c1..8a1d51382 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -297,6 +297,7 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -298,6 +298,7 @@ struct hostapd_config * hostapd_config_defaults(void)
conf->edcca_enable = EDCCA_MODE_AUTO;
conf->edcca_compensation = EDCCA_DEFAULT_COMPENSATION;
@@ -47,10 +47,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 49dd8ab..1b6c049 100644
+index 3df378ed2..e42656f82 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1185,6 +1185,19 @@ struct hostapd_config {
+@@ -1196,6 +1196,19 @@ struct hostapd_config {
u8 edcca_enable;
s8 edcca_compensation;
int *edcca_threshold;
@@ -71,10 +71,10 @@
enum edcca_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index d290a00..ff2c6f8 100644
+index 44f494ed9..2f15f99f4 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1092,3 +1092,14 @@ int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
+@@ -1175,3 +1175,14 @@ int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
return 0;
return hapd->driver->mu_dump(hapd->drv_priv, mu_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 1565bfa..e760658 100644
+index 6e0cf814c..960a110b7 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -150,6 +150,7 @@ int hostapd_drv_configure_edcca_threshold(struct hostapd_data *hapd,
@@ -102,10 +102,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 21aba48..2bf9fb2 100644
+index aa0568175..eb39b9ae3 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2398,6 +2398,8 @@ dfs_offload:
+@@ -2567,6 +2567,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_mu_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 60bc4cd..99ecbaf 100644
+index 60bc4cd4c..99ecbaf71 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,6 +13,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -149,10 +149,10 @@
MTK_VENDOR_ATTR_CSI_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 1a3f070..2ced065 100644
+index 1471ba2ef..cd7afef33 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5018,6 +5018,14 @@ struct wpa_driver_ops {
+@@ -5097,6 +5097,14 @@ struct wpa_driver_ops {
*/
int (*mu_ctrl)(void *priv, u8 mu_onoff);
int (*mu_dump)(void *priv, u8 *mu_onoff);
@@ -168,10 +168,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 5335754..1842b2d 100644
+index e7bfc35fa..86d08a721 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -13644,6 +13644,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
+@@ -13913,6 +13913,38 @@ static int nl80211_get_edcca(void *priv, const u8 mode, u8 *value)
return ret;
}
@@ -210,18 +210,18 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
-@@ -13803,4 +13835,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14073,4 +14105,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 f3a45ec..92da450 100644
+index bd5d28404..99af8b075 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -201,6 +201,7 @@ struct wpa_driver_nl80211_data {
- unsigned int puncturing:1;
+@@ -204,6 +204,7 @@ struct wpa_driver_nl80211_data {
+ unsigned int qca_ap_allowed_freqs:1;
unsigned int mtk_edcca_vendor_cmd_avail:1;
unsigned int mtk_mu_vendor_cmd_avail:1;
+ unsigned int mtk_3wire_vendor_cmd_avail:1;
@@ -229,10 +229,10 @@
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 dcd1bcd..3b25754 100644
+index ac66a916b..3ff47f3e8 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1108,6 +1108,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1116,6 +1116,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
case MTK_NL80211_VENDOR_SUBCMD_MU_CTRL :
drv->mtk_mu_vendor_cmd_avail = 1;
break;
@@ -243,5 +243,5 @@
}
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
index acb40a7..8c1d923 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0008-hostapd-mtk-Add-hostapd-iBF-control.patch
@@ -1,7 +1,7 @@
-From 7011a7a5503e76228d475060a72b3a168fac1b54 Mon Sep 17 00:00:00 2001
+From 0ec269fc9ad3ceb566093ee1b67ea73da7efa8e4 Mon Sep 17 00:00:00 2001
From: mtk27835 <shurong.wen@mediatek.com>
Date: Wed, 7 Sep 2022 14:41:51 -0700
-Subject: [PATCH 08/28] hostapd: mtk: Add hostapd iBF control
+Subject: [PATCH 08/32] 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 860beee..e1dd540 100644
+index 01880249d..81bfe81d5 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4844,6 +4844,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4852,6 +4852,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
u8 en = atoi(pos);
conf->three_wire_enable = en;
@@ -35,10 +35,10 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index b317a65..45797cd 100644
+index 342cec820..f2cb7af1e 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3573,6 +3573,30 @@ hostapd_ctrl_iface_get_mu(struct hostapd_data *hapd, char *buf,
+@@ -3608,6 +3608,30 @@ hostapd_ctrl_iface_get_mu(struct hostapd_data *hapd, char *buf,
}
@@ -69,7 +69,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4139,6 +4163,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4174,6 +4198,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_size);
} else if (os_strncmp(buf, "GET_MU", 6) == 0) {
reply_len = hostapd_ctrl_iface_get_mu(hapd, reply, reply_size);
@@ -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 285aeba..5922fe3 100644
+index 98892ee9d..4fa2d323d 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1606,6 +1606,13 @@ static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
@@ -106,10 +106,10 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index 2c447ba..a9f77e0 100644
+index 8a1d51382..7fd9dce48 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -298,6 +298,7 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -299,6 +299,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;
@@ -118,10 +118,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index e784629..c88c8ae 100644
+index e42656f82..3a3d2b542 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1186,6 +1186,7 @@ struct hostapd_config {
+@@ -1197,6 +1197,7 @@ struct hostapd_config {
s8 edcca_compensation;
int *edcca_threshold;
u8 three_wire_enable;
@@ -129,7 +129,7 @@
};
enum three_wire_mode {
-@@ -1310,6 +1311,7 @@ hostapd_set_oper_centr_freq_seg1_idx(struct hostapd_config *conf,
+@@ -1322,6 +1323,7 @@ hostapd_set_oper_centr_freq_seg1_idx(struct hostapd_config *conf,
conf->vht_oper_centr_freq_seg1_idx = oper_centr_freq_seg1_idx;
}
@@ -138,10 +138,10 @@
int hostapd_mac_comp(const void *a, const void *b);
struct hostapd_config * hostapd_config_defaults(void);
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index ff2c6f8..91ade16 100644
+index 2f15f99f4..41e76aa54 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1103,3 +1103,17 @@ int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd)
+@@ -1186,3 +1186,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);
}
@@ -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 e760658..2cc39b7 100644
+index 960a110b7..3f1df5d2c 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -151,6 +151,8 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value);
@@ -174,10 +174,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 2bf9fb2..2deb9a3 100644
+index eb39b9ae3..4212f3fcd 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2400,6 +2400,8 @@ dfs_offload:
+@@ -2569,6 +2569,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 ed47487..7b7aeaa 100644
+index 99ecbaf71..9811f266e 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -13,7 +13,8 @@ enum mtk_nl80211_vendor_subcmds {
@@ -200,7 +200,7 @@
};
enum mtk_vendor_attr_edcca_ctrl {
-@@ -204,6 +205,38 @@ enum mtk_vendor_attr_mu_ctrl {
+@@ -207,6 +208,38 @@ enum mtk_vendor_attr_mu_ctrl {
NUM_MTK_VENDOR_ATTRS_MU_CTRL - 1
};
@@ -240,10 +240,10 @@
#define CSI_MAX_COUNT 256
#define ETH_ALEN 6
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 2ced065..9e12e42 100644
+index cd7afef33..7ac02845b 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -1735,6 +1735,11 @@ struct wpa_driver_ap_params {
+@@ -181,6 +181,11 @@ struct hostapd_channel_data {
* mu onoff=<val> (bitmap- UL MU-MIMO(bit3), DL MU-MIMO(bit2), UL OFDMA(bit1), DL OFDMA(bit0))
*/
u8 mu_onoff;
@@ -254,8 +254,8 @@
+ u8 ibf_enable;
};
- struct wpa_driver_mesh_bss_params {
-@@ -5026,6 +5031,20 @@ struct wpa_driver_ops {
+ #define HE_MAC_CAPAB_0 0
+@@ -5105,6 +5110,20 @@ struct wpa_driver_ops {
*
*/
int (*three_wire_ctrl)(void *priv, u8 three_wire_enable);
@@ -277,10 +277,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 34bc9ac..641b894 100644
+index 86d08a721..ec85621ab 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -13668,6 +13668,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
+@@ -13946,6 +13946,112 @@ static int nl80211_enable_three_wire(void *priv, const u8 three_wire_enable)
return ret;
}
@@ -393,7 +393,7 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
.desc = "Linux nl80211/cfg80211",
-@@ -13827,4 +13933,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14106,4 +14212,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,
@@ -401,10 +401,10 @@
+ .ibf_dump = nl80211_ibf_dump,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 92da450..9ef313b 100644
+index 99af8b075..4e64e7d31 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -202,6 +202,7 @@ struct wpa_driver_nl80211_data {
+@@ -205,6 +205,7 @@ struct wpa_driver_nl80211_data {
unsigned int mtk_edcca_vendor_cmd_avail:1;
unsigned int mtk_mu_vendor_cmd_avail:1;
unsigned int mtk_3wire_vendor_cmd_avail:1;
@@ -413,10 +413,10 @@
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 3b25754..5c6bb36 100644
+index 3ff47f3e8..7ad15bafd 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1111,6 +1111,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1119,6 +1119,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;
@@ -427,5 +427,5 @@
}
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
index 8c4b67f..c22efa9 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0009-hostapd-mtk-Do-not-include-HE-capab-IE-if-associated.patch
@@ -1,7 +1,7 @@
-From fd9094f2ca304f391f9ea5569a60e563703fa907 Mon Sep 17 00:00:00 2001
+From 63e4c07d235e07d0616ecb1328067f7157271c30 Mon Sep 17 00:00:00 2001
From: Howard Hsu <howard-yh.hsu@mediatek.com>
Date: Thu, 22 Sep 2022 16:08:09 +0800
-Subject: [PATCH 09/28] hostapd: mtk: Do not include HE capab IE if associated
+Subject: [PATCH 09/32] hostapd: mtk: Do not include HE capab IE if associated
sta's HE capab IE is invalid
---
@@ -9,10 +9,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-index 5b40b13..b5dfad9 100644
+index db48b7cb7..1bf5bea9d 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
-@@ -4399,7 +4399,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
+@@ -4843,7 +4843,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
#endif /* CONFIG_IEEE80211AC */
#ifdef CONFIG_IEEE80211AX
@@ -23,5 +23,5 @@
p = hostapd_eid_he_operation(hapd, p);
p = hostapd_eid_cca(hapd, p);
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
index 41cdcf6..6bb78ff 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0010-hostapd-mtk-Add-DFS-detection-mode.patch
@@ -1,7 +1,7 @@
-From 246c1629481117413fd4648cdfc25f6fb24a5502 Mon Sep 17 00:00:00 2001
+From 28af790c74e862e0c23ced4e458e4149e69a1427 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 20 Feb 2023 14:55:49 +0800
-Subject: [PATCH 10/28] hostapd: mtk: Add DFS detection mode
+Subject: [PATCH 10/32] hostapd: mtk: Add DFS detection mode
Add DFS detection mode for testing radar detection rate.
If DFS detection mode is on, AP will not switch channels when receiving
@@ -17,10 +17,10 @@
4 files changed, 50 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
-index e1dd540..09b5605 100644
+index 81bfe81d5..d4eed008c 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4847,6 +4847,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4855,6 +4855,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,10 +32,10 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 45797cd..5ea8934 100644
+index f2cb7af1e..0d978be7e 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3597,6 +3597,26 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
+@@ -3632,6 +3632,26 @@ hostapd_ctrl_iface_get_ibf(struct hostapd_data *hapd, char *buf,
}
@@ -62,7 +62,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4165,6 +4185,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4200,6 +4220,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_len = hostapd_ctrl_iface_get_mu(hapd, reply, reply_size);
} else if (os_strncmp(buf, "GET_IBF", 7) == 0) {
reply_len = hostapd_ctrl_iface_get_ibf(hapd, reply, reply_size);
@@ -73,10 +73,10 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index c88c8ae..d651bfb 100644
+index 3a3d2b542..7b3e21f7b 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1187,6 +1187,7 @@ struct hostapd_config {
+@@ -1198,6 +1198,7 @@ struct hostapd_config {
int *edcca_threshold;
u8 three_wire_enable;
u8 ibf_enable;
@@ -84,7 +84,7 @@
};
enum three_wire_mode {
-@@ -1201,6 +1202,18 @@ enum three_wire_mode {
+@@ -1212,6 +1213,18 @@ enum three_wire_mode {
NUM_THREE_WIRE_MODE - 1
};
@@ -104,7 +104,7 @@
EDCCA_MODE_FORCE_DISABLE = 0,
EDCCA_MODE_AUTO = 1,
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index a19afb0..644a7ea 100644
+index a19afb03f..644a7eae7 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -1322,6 +1322,11 @@ hostapd_dfs_background_start_channel_switch(struct hostapd_iface *iface,
@@ -132,5 +132,5 @@
if (hostapd_csa_in_progress(iface))
return 0;
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
index 03f32ec..058e0d5 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0011-hostapd-mtk-Add-DFS-offchan-channel-switch.patch
@@ -1,7 +1,7 @@
-From b0a253a420b901e3f5b7b069a85a135835a702ff Mon Sep 17 00:00:00 2001
+From 575a8605a68d47f7ecf45ab81f704cc49a8aef65 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 20 Feb 2023 14:56:55 +0800
-Subject: [PATCH 11/28] hostapd: mtk: Add DFS offchan channel switch
+Subject: [PATCH 11/32] hostapd: mtk: Add DFS offchan channel switch
Add DFS background chain channel switch command for testing purpose.
This feature is implemented via hostapd_cli command.
@@ -16,10 +16,10 @@
3 files changed, 96 insertions(+), 16 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 5ea8934..40fb0d4 100644
+index 0d978be7e..78eb80bf0 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3617,6 +3617,76 @@ hostapd_ctrl_iface_set_dfs_detect_mode(struct hostapd_data *hapd, char *value,
+@@ -3652,6 +3652,76 @@ hostapd_ctrl_iface_set_dfs_detect_mode(struct hostapd_data *hapd, char *value,
}
@@ -96,7 +96,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4188,6 +4258,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4223,6 +4293,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
} 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);
@@ -106,7 +106,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index 644a7ea..48c5fc9 100644
+index 644a7eae7..48c5fc917 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -19,13 +19,6 @@
@@ -156,7 +156,7 @@
if (!iface->conf->ieee80211ac && !iface->conf->ieee80211ax)
return;
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 @@
@@ -188,5 +188,5 @@
#endif /* DFS_H */
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
index 230cbaa..b59fffc 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0012-hostapd-mtk-Add-amsdu-set-get-ctrl.patch
@@ -1,7 +1,7 @@
-From e906e5508fc01ce8c518431728218d04670a1ca3 Mon Sep 17 00:00:00 2001
+From ae49d6fffebb8314cc36eb3ba2241f0e70ae8ce6 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 16 Dec 2022 03:57:11 +0800
-Subject: [PATCH 12/28] hostapd: mtk: Add amsdu set get ctrl
+Subject: [PATCH 12/32] 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 09b5605..dc3defe 100644
+index d4eed008c..ecd290717 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -4851,6 +4851,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+@@ -4859,6 +4859,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
u8 en = strtol(pos, NULL, 10);
conf->dfs_detect_mode = en;
@@ -40,10 +40,10 @@
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 40fb0d4..07de0ad 100644
+index 78eb80bf0..ed17211e0 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3687,6 +3687,30 @@ hostapd_ctrl_iface_set_offchan_ctrl(struct hostapd_data *hapd, char *cmd,
+@@ -3722,6 +3722,30 @@ hostapd_ctrl_iface_set_offchan_ctrl(struct hostapd_data *hapd, char *cmd,
}
@@ -74,7 +74,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4260,6 +4284,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4295,6 +4319,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);
@@ -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 5922fe3..04451f5 100644
+index 4fa2d323d..d59373062 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1613,6 +1613,13 @@ static int hostapd_cli_cmd_get_ibf(struct wpa_ctrl *ctrl, int argc,
@@ -111,10 +111,10 @@
};
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index a9f77e0..f437f9f 100644
+index 7fd9dce48..83e2ea121 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -299,6 +299,7 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -300,6 +300,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;
@@ -123,10 +123,10 @@
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index d651bfb..7732af0 100644
+index 7b3e21f7b..94056157b 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1188,6 +1188,7 @@ struct hostapd_config {
+@@ -1199,6 +1199,7 @@ struct hostapd_config {
u8 three_wire_enable;
u8 ibf_enable;
u8 dfs_detect_mode;
@@ -135,10 +135,10 @@
enum three_wire_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 91ade16..00492b8 100644
+index 41e76aa54..a7226cfa9 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1116,4 +1116,18 @@ int hostapd_drv_ibf_dump(struct hostapd_data *hapd, u8 *ibf_enable)
+@@ -1199,4 +1199,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);
@@ -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 2cc39b7..2b8b587 100644
+index 3f1df5d2c..422cb5222 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -153,6 +153,8 @@ int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff);
@@ -172,10 +172,10 @@
#include "drivers/driver.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 2deb9a3..88eb984 100644
+index 4212f3fcd..abadd1ad0 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2402,6 +2402,8 @@ dfs_offload:
+@@ -2571,6 +2571,8 @@ dfs_offload:
goto fail;
if (hostapd_drv_ibf_ctrl(hapd) < 0)
goto fail;
@@ -185,10 +185,10 @@
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 7b7aeaa..97c5a47 100644
+index 9811f266e..7b4d7c11a 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
-@@ -167,7 +167,6 @@ enum mtk_vendor_attr_wireless_ctrl {
+@@ -170,7 +170,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,
@@ -196,7 +196,7 @@
MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU,
MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT,
-@@ -177,6 +176,22 @@ enum mtk_vendor_attr_wireless_ctrl {
+@@ -180,6 +179,22 @@ enum mtk_vendor_attr_wireless_ctrl {
NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL - 1
};
@@ -220,10 +220,10 @@
MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 9e12e42..2144cc4 100644
+index 7ac02845b..87a5a9b64 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5045,6 +5045,15 @@ struct wpa_driver_ops {
+@@ -5124,6 +5124,15 @@ struct wpa_driver_ops {
*
*/
int (*ibf_dump)(void *priv, u8 *ibf_enable);
@@ -240,10 +240,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 641b894..7c20b14 100644
+index ec85621ab..4ac8b6e0b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -13774,6 +13774,118 @@ fail:
+@@ -14052,6 +14052,118 @@ fail:
return -ENOBUFS;
}
@@ -362,7 +362,7 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
.desc = "Linux nl80211/cfg80211",
-@@ -13935,4 +14047,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14214,4 +14326,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.three_wire_ctrl = nl80211_enable_three_wire,
.ibf_ctrl = nl80211_ibf_enable,
.ibf_dump = nl80211_ibf_dump,
@@ -370,10 +370,10 @@
+ .amsdu_dump = nl80211_dump_amsdu,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 9ef313b..3bcc770 100644
+index 4e64e7d31..0100314ba 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -203,6 +203,7 @@ struct wpa_driver_nl80211_data {
+@@ -206,6 +206,7 @@ struct wpa_driver_nl80211_data {
unsigned int mtk_mu_vendor_cmd_avail:1;
unsigned int mtk_3wire_vendor_cmd_avail:1;
unsigned int mtk_ibf_vendor_cmd_avail:1;
@@ -382,10 +382,10 @@
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 5c6bb36..dee99f0 100644
+index 7ad15bafd..f14706d77 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1114,6 +1114,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1122,6 +1122,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;
@@ -396,5 +396,5 @@
}
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
index 0f096d4..8a9696f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0013-hostapd-mtk-Add-he_ldpc-configuration.patch
@@ -1,7 +1,7 @@
-From cacedd3d26510c3eaf923d19ac16813162ff7727 Mon Sep 17 00:00:00 2001
+From 65f862e0db364352657f0f19245339208dc0a966 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Thu, 12 Jan 2023 15:18:19 +0800
-Subject: [PATCH 13/28] hostapd: mtk: Add he_ldpc configuration
+Subject: [PATCH 13/32] 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 dc3defe..ac8359a 100644
+index ecd290717..8c5831dbb 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3517,6 +3517,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 bc4a0f6..d95a11e 100644
+index 30fb06d1c..fd42c5038 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -833,6 +833,11 @@ wmm_ac_vo_acm=0
@@ -42,10 +42,10 @@
#he_bss_color=1
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
-index f437f9f..26d6770 100644
+index 83e2ea121..1f27543bf 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
-@@ -268,6 +268,7 @@ struct hostapd_config * hostapd_config_defaults(void)
+@@ -269,6 +269,7 @@ struct hostapd_config * hostapd_config_defaults(void)
#endif /* CONFIG_ACS */
#ifdef CONFIG_IEEE80211AX
@@ -54,10 +54,10 @@
HE_OPERATION_RTS_THRESHOLD_OFFSET;
/* Set default basic MCS/NSS set to single stream MCS 0-7 */
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index 7732af0..b9aaa85 100644
+index 94056157b..195816c28 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -945,6 +945,7 @@ struct hostapd_bss_config {
+@@ -956,6 +956,7 @@ struct hostapd_bss_config {
* struct he_phy_capabilities_info - HE PHY capabilities
*/
struct he_phy_capabilities_info {
@@ -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 548a448..9407dd6 100644
+index 548a44821..9407dd6e5 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 dfad0b7..bc8fe05 100644
+index 571ace2f5..74301178f 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2355,6 +2355,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.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
index 6b22222..0751337 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0014-hostapd-mtk-Add-vendor-command-attribute-for-RTS-BW-.patch
@@ -1,7 +1,7 @@
-From 6bf2c734595e9faa8ba39bdda119e292fb747107 Mon Sep 17 00:00:00 2001
+From 2694ff1a1eb124938848bf46361990f13cf4d277 Mon Sep 17 00:00:00 2001
From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
Date: Tue, 24 Jan 2023 19:06:44 +0800
-Subject: [PATCH 14/28] hostapd: mtk: Add vendor command attribute for RTS BW
+Subject: [PATCH 14/32] hostapd: mtk: Add vendor command attribute for RTS BW
signaling.
Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
@@ -10,10 +10,10 @@
1 file changed, 1 insertion(+)
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 97c5a47..62d79cb 100644
+index 7b4d7c11a..ace993bc8 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
-@@ -169,6 +169,7 @@ enum mtk_vendor_attr_wireless_ctrl {
+@@ -172,6 +172,7 @@ enum mtk_vendor_attr_wireless_ctrl {
MTK_VENDOR_ATTR_WIRELESS_CTRL_MIMO,
MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU,
MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT,
@@ -22,5 +22,5 @@
/* keep last */
NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL,
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
index f17fe17..a850c6d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0015-hostapd-mtk-6G-band-does-not-require-DFS.patch
@@ -1,14 +1,14 @@
-From 0d48d01ab386b4999a7914009d3b0878823535e7 Mon Sep 17 00:00:00 2001
+From cd2d0f7ee500cbdf302b2042e9e4804107e06148 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/28] hostapd: mtk: 6G band does not require DFS
+Subject: [PATCH 15/32] 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 48c5fc9..dcf89ce 100644
+index 48c5fc917..dcf89ce62 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -1511,6 +1511,7 @@ int hostapd_is_dfs_required(struct hostapd_iface *iface)
@@ -20,5 +20,5 @@
return 0;
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
index 08b8327..f9c3cb7 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0016-hostapd-mtk-Fix-sending-wrong-VHT-operation-IE-in-CS.patch
@@ -1,7 +1,7 @@
-From ded7bc8b684fa76874abc1ba47f59ecdf7126bdb Mon Sep 17 00:00:00 2001
+From e8e838a2dffaa6ba5ea66f6638d4ba7f01302bf6 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 20 Feb 2023 11:01:18 +0800
-Subject: [PATCH 16/28] hostapd: mtk: Fix sending wrong VHT operation IE in CSA
+Subject: [PATCH 16/32] hostapd: mtk: Fix sending wrong VHT operation IE in CSA
while using ZWDFS
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -10,7 +10,7 @@
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index dcf89ce..e5ed645 100644
+index dcf89ce62..e5ed645d6 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -1115,6 +1115,14 @@ static int
@@ -42,5 +42,5 @@
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
index 5259512..8c35888 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0017-hostapd-mtk-Add-sta-assisted-DFS-state-update-mechan.patch
@@ -1,7 +1,7 @@
-From dda8da5352e042ff4fb1621c58624981ee00dce7 Mon Sep 17 00:00:00 2001
+From c5b6477df27a7da54a56ee0cc94b147072b25749 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 20 Feb 2023 10:51:47 +0800
-Subject: [PATCH 17/28] hostapd: mtk: Add sta-assisted DFS state update
+Subject: [PATCH 17/32] hostapd: mtk: Add sta-assisted DFS state update
mechanism
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -16,7 +16,7 @@
7 files changed, 78 insertions(+)
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index e5ed645..d52a60e 100644
+index e5ed645d6..d52a60e0d 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -1508,6 +1508,26 @@ int hostapd_dfs_nop_finished(struct hostapd_iface *iface, int freq,
@@ -47,7 +47,7 @@
{
int n_chans, n_chans1, start_chan_idx, start_chan_idx1, res;
diff --git a/src/ap/dfs.h b/src/ap/dfs.h
-index c2556d2..25ba29c 100644
+index c2556d2d9..25ba29ca1 100644
--- a/src/ap/dfs.h
+++ b/src/ap/dfs.h
@@ -30,6 +30,9 @@ int hostapd_dfs_radar_detected(struct hostapd_iface *iface, int freq,
@@ -61,10 +61,10 @@
int hostapd_is_dfs_chan_available(struct hostapd_iface *iface);
int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
-index ede88b2..c1f9a0e 100644
+index b0bba9906..694056b42 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
-@@ -1805,6 +1805,24 @@ static void hostapd_event_dfs_cac_started(struct hostapd_data *hapd,
+@@ -1912,6 +1912,24 @@ static void hostapd_event_dfs_cac_started(struct hostapd_data *hapd,
radar->cf1, radar->cf2);
}
@@ -89,7 +89,7 @@
#endif /* NEED_AP_MLME */
-@@ -2080,6 +2098,16 @@ void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
+@@ -2190,6 +2208,16 @@ void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
break;
hostapd_event_dfs_nop_finished(hapd, &data->dfs_event);
break;
@@ -107,10 +107,10 @@
/* channel list changed (regulatory?), update channel list */
/* TODO: check this. hostapd_get_hw_features() initializes
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
-index 4ab2a1b..866ae0b 100644
+index ccff0ee09..e209ac6d7 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
-@@ -369,6 +369,7 @@ extern "C" {
+@@ -374,6 +374,7 @@ extern "C" {
#define DFS_EVENT_CAC_COMPLETED "DFS-CAC-COMPLETED "
#define DFS_EVENT_NOP_FINISHED "DFS-NOP-FINISHED "
#define DFS_EVENT_PRE_CAC_EXPIRED "DFS-PRE-CAC-EXPIRED "
@@ -119,13 +119,13 @@
#define AP_CSA_FINISHED "AP-CSA-FINISHED "
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 2144cc4..faa4b7b 100644
+index 87a5a9b64..592f506ec 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5666,6 +5666,20 @@ enum wpa_event_type {
- * Described in wpa_event_data.ch_switch.
+@@ -5760,6 +5760,20 @@ enum wpa_event_type {
+ * EVENT_LINK_RECONFIG - Notification that AP links removed
*/
- EVENT_LINK_CH_SWITCH_STARTED,
+ EVENT_LINK_RECONFIG,
+
+ /**
+ * EVENT_DFS_STA_CAC_SKIPPED - Notification that CAC has been skipped
@@ -144,10 +144,10 @@
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
-index a45804c..67d9ce2 100644
+index 3e8ace052..3d0d9b7bb 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
-@@ -2217,6 +2217,12 @@ static void nl80211_radar_event(struct wpa_driver_nl80211_data *drv,
+@@ -2447,6 +2447,12 @@ static void nl80211_radar_event(struct wpa_driver_nl80211_data *drv,
case NL80211_RADAR_CAC_STARTED:
wpa_supplicant_event(drv->ctx, EVENT_DFS_CAC_STARTED, &data);
break;
@@ -161,10 +161,10 @@
wpa_printf(MSG_DEBUG, "nl80211: Unknown radar event %d "
"received", event_type);
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
-index 12fc6a9..6493023 100644
+index 82860ae32..225864b94 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
-@@ -6621,6 +6621,10 @@ enum nl80211_smps_mode {
+@@ -6643,6 +6643,10 @@ enum nl80211_smps_mode {
* applicable for ETSI dfs domain where pre-CAC is valid for ever.
* @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started,
* should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled.
@@ -175,7 +175,7 @@
*/
enum nl80211_radar_event {
NL80211_RADAR_DETECTED,
-@@ -6629,6 +6633,8 @@ enum nl80211_radar_event {
+@@ -6651,6 +6655,8 @@ enum nl80211_radar_event {
NL80211_RADAR_NOP_FINISHED,
NL80211_RADAR_PRE_CAC_EXPIRED,
NL80211_RADAR_CAC_STARTED,
@@ -185,5 +185,5 @@
/**
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch
index bf91686..ea43585 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0018-hostapd-mtk-Fix-auto-ht-issue-when-switching-to-DFS-.patch
@@ -1,7 +1,8 @@
-From 705e1a59381e7bbd92043ad4338834aad504f232 Mon Sep 17 00:00:00 2001
+From cf17d8510dd96dc092b73236b6e74d8ea1c5990c Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 20 Feb 2023 16:58:20 +0800
-Subject: [PATCH] hostapd: mtk: Fix auto ht issue when switching to DFS channel
+Subject: [PATCH 18/32] hostapd: mtk: Fix auto ht issue when switching to DFS
+ channel
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -9,10 +10,10 @@
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 07de0ad..3c38df5 100644
+index ed17211e0..f89bb58f1 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -2773,6 +2773,13 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
+@@ -2808,6 +2808,13 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
break;
}
@@ -26,7 +27,7 @@
if (settings.freq_params.center_freq1)
dfs_range += hostapd_is_dfs_overlap(
iface, bandwidth, settings.freq_params.center_freq1);
-@@ -2810,12 +2817,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
+@@ -2845,12 +2852,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
return 0;
}
@@ -40,5 +41,5 @@
/* Save CHAN_SWITCH VHT, HE, and EHT config */
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
index d38e758..9e93011 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0019-hostapd-mtk-Mark-DFS-channel-as-available-for-CSA.patch
@@ -1,7 +1,7 @@
-From 5832d4ddc23f535932b590f5e8d16c349b4c4a51 Mon Sep 17 00:00:00 2001
+From ece45354ac0191c2474b3f57cdfc26060db9efec Mon Sep 17 00:00:00 2001
From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
Date: Fri, 3 Mar 2023 12:45:42 +0800
-Subject: [PATCH 19/28] hostapd: mtk: Mark DFS channel as available for CSA.
+Subject: [PATCH 19/32] hostapd: mtk: Mark DFS channel as available for CSA.
---
hostapd/ctrl_iface.c | 10 ++++++++++
@@ -10,11 +10,11 @@
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index be86f6c..d09c22f 100644
+index f89bb58f1..bad9790ca 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -2779,6 +2779,16 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
- settings.freq_params.he_enabled = iface->conf->ieee80211ax;
+@@ -2815,6 +2815,16 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
+ settings.freq_params.eht_enabled = iface->conf->ieee80211be;
}
+ if (settings.freq_params.radar_background) {
@@ -31,7 +31,7 @@
dfs_range += hostapd_is_dfs_overlap(
iface, bandwidth, settings.freq_params.center_freq1);
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 04451f5..36d19d8 100644
+index d59373062..0a374be8e 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1715,7 +1715,7 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
@@ -44,10 +44,10 @@
{ "hs20_wnm_notif", hostapd_cli_cmd_hs20_wnm_notif, NULL,
"<addr> <url>\n"
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index 38fc8e4..fed5473 100644
+index cf1cff447..aab8a4665 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
-@@ -999,6 +999,7 @@ int hostapd_parse_csa_settings(const char *pos,
+@@ -1014,6 +1014,7 @@ int hostapd_parse_csa_settings(const char *pos,
settings->freq_params.vht_enabled = !!os_strstr(pos, " vht");
settings->freq_params.he_enabled = !!os_strstr(pos, " he");
settings->freq_params.eht_enabled = !!os_strstr(pos, " eht");
@@ -56,5 +56,5 @@
#undef SET_CSA_SETTING
#undef SET_CSA_SETTING_EXT
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Add-available-color-bitmap.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Add-available-color-bitmap.patch
index ffdab20..de6ffe6 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Add-available-color-bitmap.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0020-hostapd-mtk-Add-available-color-bitmap.patch
@@ -1,7 +1,7 @@
-From e3a3b2a33385a97229956f83574b1ae60f39d2cc Mon Sep 17 00:00:00 2001
+From 71b229a9e0a12ebc6d5f298f40042cc67fb285e1 Mon Sep 17 00:00:00 2001
From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
Date: Thu, 26 Jan 2023 09:16:00 +0800
-Subject: [PATCH 20/28] hostapd: mtk: Add available color bitmap
+Subject: [PATCH 20/32] hostapd: mtk: Add available color bitmap
Signed-off-by: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
---
@@ -17,10 +17,10 @@
9 files changed, 324 insertions(+), 2 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index d09c22f..bc7a97b 100644
+index bad9790ca..997b50aad 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3720,6 +3720,76 @@ hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
+@@ -3756,6 +3756,76 @@ hostapd_ctrl_iface_get_amsdu(struct hostapd_data *hapd, char *buf,
return ret;
}
@@ -97,7 +97,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
-@@ -4296,6 +4366,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4332,6 +4402,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_len = hostapd_ctrl_iface_set_offchan_ctrl(hapd, buf + 16, reply, reply_size);
} else if (os_strncmp(buf, "GET_AMSDU", 9) == 0) {
reply_len = hostapd_ctrl_iface_get_amsdu(hapd, reply, reply_size);
@@ -109,7 +109,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 36d19d8..dc01ad9 100644
+index 0a374be8e..e9e156d28 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1598,6 +1598,20 @@ static int hostapd_cli_cmd_reload_wpa_psk(struct wpa_ctrl *ctrl, int argc,
@@ -145,10 +145,10 @@
{ "driver", hostapd_cli_cmd_driver, NULL,
"<driver sub command> [<hex formatted data>] = send driver command data" },
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 00492b8..7b686e5 100644
+index a7226cfa9..9615ca8ce 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1130,4 +1130,12 @@ int hostapd_drv_amsdu_dump(struct hostapd_data *hapd, u8 *amsdu)
+@@ -1213,4 +1213,12 @@ 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);
@@ -164,7 +164,7 @@
+ return hapd->driver->get_aval_color_bmp(hapd->drv_priv, aval_color_bmp);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 2b8b587..47356ab 100644
+index 422cb5222..136ea2349 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -155,6 +155,8 @@ int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
@@ -177,7 +177,7 @@
#include "drivers/driver.h"
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 62d79cb..a99e6f2 100644
+index ace993bc8..e27fe69b3 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -15,6 +15,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -188,7 +188,7 @@
};
enum mtk_vendor_attr_edcca_ctrl {
-@@ -253,6 +254,16 @@ ibf_dump_policy[NUM_MTK_VENDOR_ATTRS_IBF_DUMP] = {
+@@ -256,6 +257,16 @@ ibf_dump_policy[NUM_MTK_VENDOR_ATTRS_IBF_DUMP] = {
[MTK_VENDOR_ATTR_IBF_DUMP_ENABLE] = { .type = NLA_U8 },
};
@@ -206,10 +206,10 @@
#define CSI_MAX_COUNT 256
#define ETH_ALEN 6
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index faa4b7b..f9f9fb5 100644
+index 592f506ec..91cb475ac 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5054,6 +5054,14 @@ struct wpa_driver_ops {
+@@ -5133,6 +5133,14 @@ struct wpa_driver_ops {
*/
int (*amsdu_ctrl)(void *priv, u8 amsdu);
int (*amsdu_dump)(void *priv, u8 *amsdu);
@@ -225,10 +225,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 7c20b14..18a5647 100644
+index 4ac8b6e0b..b8730472d 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -12498,7 +12498,6 @@ static void nl80211_parse_btm_candidate_info(struct candidate_list *candidate,
+@@ -12736,7 +12736,6 @@ static void nl80211_parse_btm_candidate_info(struct candidate_list *candidate,
num, MAC2STR(candidate->bssid), buf);
}
@@ -236,7 +236,7 @@
static int
nl80211_get_bss_transition_status_handler(struct nl_msg *msg, void *arg)
{
-@@ -13886,6 +13885,203 @@ fail:
+@@ -14164,6 +14163,203 @@ fail:
return -ENOBUFS;
}
@@ -440,17 +440,17 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
.desc = "Linux nl80211/cfg80211",
-@@ -14049,4 +14245,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14328,4 +14524,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.ibf_dump = nl80211_ibf_dump,
.amsdu_ctrl = nl80211_enable_amsdu,
.amsdu_dump = nl80211_dump_amsdu,
+ .get_aval_color_bmp = nl80211_get_aval_color_bmp,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 3bcc770..190e7a5 100644
+index 0100314ba..fd1e57cc2 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -204,6 +204,7 @@ struct wpa_driver_nl80211_data {
+@@ -207,6 +207,7 @@ struct wpa_driver_nl80211_data {
unsigned int mtk_3wire_vendor_cmd_avail:1;
unsigned int mtk_ibf_vendor_cmd_avail:1;
unsigned int mtk_wireless_vendor_cmd_avail:1;
@@ -459,10 +459,10 @@
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 dee99f0..a266926 100644
+index f14706d77..4f8e92024 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1117,6 +1117,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1125,6 +1125,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
case MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL:
drv->mtk_wireless_vendor_cmd_avail = 1;
break;
@@ -473,5 +473,5 @@
}
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
index bf3a442..df803ef 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0021-hostapd-mtk-Add-channel-information-for-hostapd-relo.patch
@@ -1,7 +1,7 @@
-From 8374019111ad6232db54e19e36f0fc1357612712 Mon Sep 17 00:00:00 2001
+From 84337cd7cc25c227b19f8dde3138c40fdbf863b4 Mon Sep 17 00:00:00 2001
From: Michael Lee <michael-cy.lee@mediatek.com>
Date: Wed, 22 Mar 2023 13:59:29 +0800
-Subject: [PATCH 21/28] hostapd: mtk: Add channel information for hostapd
+Subject: [PATCH 21/32] hostapd: mtk: Add channel information for hostapd
reload
Add center channel, operating class, and bandwidth into the UPDATE
@@ -15,7 +15,7 @@
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index bc7a97b..da6e727 100644
+index 997b50aad..3abf06a09 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -171,6 +171,17 @@ static struct hostapd_config *hostapd_ctrl_iface_config_read(const char *fname)
@@ -37,7 +37,7 @@
break;
}
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
-index b67b5ad..bec8db8 100644
+index deb14632c..2ca2bd263 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -150,9 +150,10 @@ static int hostapd_reload(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
@@ -75,5 +75,5 @@
ret = wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL);
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
index d4fd615..88dc605 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0022-hostapd-mtk-Fix-ZWDFS-issue-in-BW-160.patch
@@ -1,7 +1,7 @@
-From f1a0b030838b8e6e6505b74bbabd7af9fa7913dc Mon Sep 17 00:00:00 2001
+From 2b0d1e11b72e96c4af1c428b9e3d4de494e40c52 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 20 Mar 2023 16:08:30 +0800
-Subject: [PATCH 22/28] hostapd: mtk: Fix ZWDFS issue in BW 160
+Subject: [PATCH 22/32] hostapd: mtk: Fix ZWDFS issue in BW 160
When background radar is enabled and bandwidth is set to 160, AP will
fail to startup due to the lack of non-DFS channel.
@@ -14,7 +14,7 @@
1 file changed, 79 insertions(+), 19 deletions(-)
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
-index d52a60e..2f5c86e 100644
+index d52a60e0d..2f5c86eb6 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -69,15 +69,22 @@ static int dfs_get_used_n_chans(struct hostapd_iface *iface, int *seg1)
@@ -206,5 +206,5 @@
} else if (hostapd_dfs_is_background_event(iface, freq)) {
iface->radar_background.cac_started = 0;
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
index f865516..9ff8a4f 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0023-hostapd-mtk-Add-vendor-for-CAPI-certification-comman.patch
@@ -1,7 +1,7 @@
-From bc29227028570c319e8458833f4fd6a9ee007fe9 Mon Sep 17 00:00:00 2001
+From 69b54dc64a95701f5e949e55399dacb598d23142 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 17 Mar 2023 16:17:14 +0800
-Subject: [PATCH 01/11] hostapd: mtk: Add vendor for CAPI certification
+Subject: [PATCH 23/32] hostapd: mtk: Add vendor for CAPI certification
commands
---
@@ -16,7 +16,7 @@
8 files changed, 202 insertions(+), 31 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 4c6e9c3..620729e 100644
+index 3abf06a09..e0ed700db 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -70,6 +70,7 @@
@@ -27,7 +27,7 @@
#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256
-@@ -3801,6 +3802,96 @@ hostapd_ctrl_iface_get_aval_color_bmp(struct hostapd_data *hapd, char *buf,
+@@ -3837,6 +3838,96 @@ hostapd_ctrl_iface_get_aval_color_bmp(struct hostapd_data *hapd, char *buf,
return pos - buf;
}
@@ -124,7 +124,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
-@@ -4381,6 +4472,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4417,6 +4508,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_len = hostapd_ctrl_iface_get_bss_color(hapd, reply, reply_size);
} else if (os_strncmp(buf, "AVAL_COLOR_BMP", 14) == 0) {
reply_len = hostapd_ctrl_iface_get_aval_color_bmp(hapd, reply, reply_size);
@@ -136,10 +136,10 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 7b686e5..78b52c8 100644
+index 9615ca8ce..11444c7eb 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1139,3 +1139,24 @@ int hostapd_drv_get_aval_bss_color_bmp(struct hostapd_data *hapd, u64 *aval_colo
+@@ -1222,3 +1222,24 @@ int hostapd_drv_get_aval_bss_color_bmp(struct hostapd_data *hapd, u64 *aval_colo
return 0;
return hapd->driver->get_aval_color_bmp(hapd->drv_priv, aval_color_bmp);
}
@@ -165,7 +165,7 @@
+ return hapd->driver->ap_trigtype(hapd->drv_priv, enable, type);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 47356ab..bb9fdf7 100644
+index 136ea2349..946ee2d68 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -157,6 +157,9 @@ int hostapd_drv_amsdu_ctrl(struct hostapd_data *hapd);
@@ -179,7 +179,7 @@
#include "drivers/driver.h"
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index e27fe69..0b23c76 100644
+index e27fe69b3..0b23c76ad 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
@@ -50,17 +50,6 @@ enum mtk_vendor_attr_edcca_dump {
@@ -258,10 +258,10 @@
MTK_VENDOR_ATTR_BSS_COLOR_CTRL_UNSPEC,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index f9f9fb5..ae692c2 100644
+index 91cb475ac..3efea9f68 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5062,6 +5062,28 @@ struct wpa_driver_ops {
+@@ -5141,6 +5141,28 @@ struct wpa_driver_ops {
*
*/
int (*get_aval_color_bmp)(void *priv, u64 *aval_color_bmp);
@@ -291,7 +291,7 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 7081fd1..493abc4 100644
+index b8730472d..642d75bd1 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -76,6 +76,58 @@ enum nlmsgerr_attrs {
@@ -353,7 +353,7 @@
static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
{
struct nl_sock *handle;
-@@ -14255,4 +14307,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14525,4 +14577,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.amsdu_ctrl = nl80211_enable_amsdu,
.amsdu_dump = nl80211_dump_amsdu,
.get_aval_color_bmp = nl80211_get_aval_color_bmp,
@@ -362,10 +362,10 @@
+ .ap_trigtype = nl80211_ap_trigtype,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 190e7a5..49588e6 100644
+index fd1e57cc2..fc5217d61 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -205,6 +205,7 @@ struct wpa_driver_nl80211_data {
+@@ -208,6 +208,7 @@ struct wpa_driver_nl80211_data {
unsigned int mtk_ibf_vendor_cmd_avail:1;
unsigned int mtk_wireless_vendor_cmd_avail:1;
unsigned int mtk_bss_color_vendor_cmd_avail:1;
@@ -374,10 +374,10 @@
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 a266926..0674b66 100644
+index 4f8e92024..c1cf5b533 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1120,6 +1120,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1128,6 +1128,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
case MTK_NL80211_VENDOR_SUBCMD_BSS_COLOR_CTRL :
drv->mtk_bss_color_vendor_cmd_avail = 1;
break;
@@ -388,5 +388,5 @@
}
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
index 72c6355..28a7167 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0024-hostapd-mtk-Air-Monitor-support-in-hostapd-by-vendor.patch
@@ -1,7 +1,7 @@
-From c8a55373f42c6149df669ba74ffbff70ec74d8db Mon Sep 17 00:00:00 2001
+From 06f750bee3e0a9798aa583b27257ef26dd4a1a8c Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 12 May 2023 05:18:48 +0800
-Subject: [PATCH 24/28] hostapd: mtk: Air Monitor support in hostapd by vendor
+Subject: [PATCH 24/32] hostapd: mtk: Air Monitor support in hostapd by vendor
Signed-off-by: mtk23888 <dipanshu.mittal@mediatek.com>
---
@@ -17,10 +17,10 @@
9 files changed, 352 insertions(+)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 79457d7..234b800 100644
+index e0ed700db..9989a04ce 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3840,6 +3840,44 @@ hostapd_ctrl_iface_ap_wireless(struct hostapd_data *hapd, char *cmd,
+@@ -3876,6 +3876,44 @@ hostapd_ctrl_iface_ap_wireless(struct hostapd_data *hapd, char *cmd,
if (hostapd_drv_ap_wireless(hapd, (u8) sub_cmd, atoi(value)) != 0)
return -1;
@@ -65,7 +65,7 @@
return os_snprintf(buf, buflen, "OK\n");
}
-@@ -3893,6 +3931,75 @@ exit:
+@@ -3929,6 +3967,75 @@ exit:
return os_snprintf(buf, buflen, "OK\n");
}
@@ -141,7 +141,7 @@
static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
char *buf, char *reply,
int reply_size,
-@@ -4476,6 +4583,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4512,6 +4619,12 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_len = hostapd_ctrl_iface_ap_wireless(hapd, buf + 12, reply, reply_size);
} else if (os_strncmp(buf, "ap_rfeatures ", 13) == 0) {
reply_len = hostapd_ctrl_iface_ap_rfeatures(hapd, buf + 13, reply, reply_size);
@@ -155,7 +155,7 @@
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index dc01ad9..02f8546 100644
+index e9e156d28..6d763f327 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1633,6 +1633,17 @@ static int hostapd_cli_cmd_get_amsdu(struct wpa_ctrl *ctrl, int argc,
@@ -188,10 +188,10 @@
};
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 78b52c8..0052a6d 100644
+index 11444c7eb..b90dd5722 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1160,3 +1160,17 @@ int hostapd_drv_ap_trig_type(struct hostapd_data *hapd, u8 enable, u8 type)
+@@ -1243,3 +1243,17 @@ int hostapd_drv_ap_trig_type(struct hostapd_data *hapd, u8 enable, u8 type)
return 0;
return hapd->driver->ap_trigtype(hapd->drv_priv, enable, type);
}
@@ -210,7 +210,7 @@
+ return hapd->driver->amnt_dump(hapd->drv_priv, amnt_idx, amnt_dump_buf);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index bb9fdf7..9d5a23b 100644
+index 946ee2d68..1e2a92acb 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -161,6 +161,9 @@ int hostapd_drv_ap_wireless(struct hostapd_data *hapd, u8 sub_vendor_id, int val
@@ -224,10 +224,10 @@
int hostapd_drv_wnm_oper(struct hostapd_data *hapd,
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 32438af..74f467c 100644
+index 0b23c76ad..dd1ca2164 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
-@@ -256,10 +256,18 @@ struct csi_data {
+@@ -258,10 +258,18 @@ struct csi_data {
u16 rx_idx;
};
@@ -247,10 +247,10 @@
+
#endif /* MTK_VENDOR_H */
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index ae692c2..cb885f9 100644
+index 3efea9f68..5c70ec78f 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5084,6 +5084,22 @@ struct wpa_driver_ops {
+@@ -5163,6 +5163,22 @@ struct wpa_driver_ops {
* @type: trigger type
*/
int (*ap_trigtype)(void *priv, u8 enable, u8 type);
@@ -274,10 +274,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 730a696..088f625 100644
+index 642d75bd1..b923e5c7e 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -127,6 +127,19 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
+@@ -128,6 +128,19 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT] = {.type = NLA_U8 },
};
@@ -297,7 +297,7 @@
static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
{
struct nl_sock *handle;
-@@ -14133,6 +14146,171 @@ fail:
+@@ -14412,6 +14425,171 @@ fail:
return -ENOBUFS;
}
@@ -469,7 +469,7 @@
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
.desc = "Linux nl80211/cfg80211",
-@@ -14300,4 +14478,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14580,4 +14758,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.ap_wireless = nl80211_ap_wireless,
.ap_rfeatures = nl80211_ap_rfeatures,
.ap_trigtype = nl80211_ap_trigtype,
@@ -477,10 +477,10 @@
+ .amnt_dump = nl80211_amnt_dump,
};
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
-index 49588e6..e64a12e 100644
+index fc5217d61..0d85adfee 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
-@@ -206,6 +206,7 @@ struct wpa_driver_nl80211_data {
+@@ -209,6 +209,7 @@ struct wpa_driver_nl80211_data {
unsigned int mtk_wireless_vendor_cmd_avail:1;
unsigned int mtk_bss_color_vendor_cmd_avail:1;
unsigned int mtk_rfeatures_vendor_cmd_avail:1;
@@ -489,10 +489,10 @@
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 0674b66..7b5079b 100644
+index c1cf5b533..8c8b84ed3 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1119,6 +1119,8 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+@@ -1127,6 +1127,8 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
break;
case MTK_NL80211_VENDOR_SUBCMD_BSS_COLOR_CTRL :
drv->mtk_bss_color_vendor_cmd_avail = 1;
@@ -502,5 +502,5 @@
case MTK_NL80211_VENDOR_SUBCMD_RFEATURE_CTRL:
drv->mtk_rfeatures_vendor_cmd_avail = 1;
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-Fix-scan-result-updating-issue.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-Fix-scan-result-updating-issue.patch
index e00c83b..cbd0111 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-Fix-scan-result-updating-issue.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0025-hostapd-mtk-Fix-scan-result-updating-issue.patch
@@ -1,7 +1,7 @@
-From b86163db7e137c7a91f77f35bc2d5001177c371e Mon Sep 17 00:00:00 2001
+From eb14389eb6c2e30a702ee7ebc98330fbc62edb44 Mon Sep 17 00:00:00 2001
From: Michael Lee <michael-cy.lee@mediatek.com>
Date: Wed, 19 Apr 2023 17:18:33 +0800
-Subject: [PATCH 25/28] hostapd: mtk: Fix scan result updating issue
+Subject: [PATCH 25/32] hostapd: mtk: Fix scan result updating issue
There are no HT capability and operation in beacon of AP operating in
NOHT.
@@ -12,7 +12,7 @@
1 file changed, 4 insertions(+)
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
-index 3bfcf7e..004d4a6 100644
+index 3bfcf7ef4..004d4a639 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -307,8 +307,12 @@ static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src,
@@ -29,5 +29,5 @@
calculate_update_time(fetch_time, src->age, &dst->last_update);
}
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
index 87e286e..27d4416 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0026-hostapd-mtk-avoid-setting-beacon-after-wpa_supplican.patch
@@ -1,7 +1,7 @@
-From 1d5dfbffb750a0de15622265dc709524a330f059 Mon Sep 17 00:00:00 2001
+From 9444dedd3f8bd97887c9cf274587b4c76f94d621 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 12 May 2023 05:21:28 +0800
-Subject: [PATCH 26/28] hostapd: mtk: avoid setting beacon after wpa_supplicant
+Subject: [PATCH 26/32] hostapd: mtk: avoid setting beacon after wpa_supplicant
stop the AP
Add a new variable 'stopped_by_supplicant' to indicate the AP
@@ -11,15 +11,15 @@
'stopped_by_supplicant' as 0.
---
hostapd/ctrl_iface.c | 4 ++++
- src/ap/beacon.c | 5 ++++-
+ src/ap/beacon.c | 4 ++++
src/ap/bss_load.c | 3 ++-
src/ap/ctrl_iface_ap.c | 4 +++-
src/ap/hostapd.c | 2 ++
src/ap/hostapd.h | 1 +
- 6 files changed, 16 insertions(+), 3 deletions(-)
+ 6 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 234b800..06d8345 100644
+index 9989a04ce..4952bef89 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -194,11 +194,15 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
@@ -39,20 +39,19 @@
iface->interfaces->config_read_cb = config_read_cb;
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
-index ddb5d03..ffa27f3 100644
+index f26e5254c..24144feff 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
-@@ -2169,7 +2169,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
- continue;
+@@ -2247,6 +2247,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
- for (i = 0; i < colocated->num_bss; i++) {
-- if (colocated->bss[i] && colocated->bss[i]->started)
-+ if (colocated->bss[i] && colocated->bss[i]->started &&
-+ !colocated->bss[i]->stopped_by_supplicant)
- __ieee802_11_set_beacon(colocated->bss[i]);
+ for (i = 0; i < other->num_bss; i++) {
+ if (other->bss[i] && other->bss[i]->started)
++ if (other->bss[i] && other->bss[i]->started &&
++ !other->bss[i]->stopped_by_supplicant)
+ __ieee802_11_set_beacon(other->bss[i]);
}
}
-@@ -2185,6 +2186,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
+@@ -2262,6 +2264,7 @@ int ieee802_11_set_beacons(struct hostapd_iface *iface)
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->started &&
@@ -60,7 +59,7 @@
ieee802_11_set_beacon(iface->bss[i]) < 0)
ret = -1;
}
-@@ -2201,6 +2203,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
+@@ -2278,6 +2281,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->beacon_set_done && iface->bss[i]->started &&
@@ -69,7 +68,7 @@
ret = -1;
}
diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
-index 725d3cd..ae55521 100644
+index 725d3cd34..ae5552140 100644
--- a/src/ap/bss_load.c
+++ b/src/ap/bss_load.c
@@ -46,7 +46,8 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
@@ -83,10 +82,10 @@
err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
-index fed5473..2a8ac9d 100644
+index aab8a4665..d52188bb7 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
-@@ -1013,8 +1013,10 @@ int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
+@@ -1028,8 +1028,10 @@ int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
struct hostapd_iface *iface = hapd->iface;
int i;
@@ -99,10 +98,10 @@
return 0;
}
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 88eb984..05ddb6f 100644
+index abadd1ad0..6e6ae77d7 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -488,6 +488,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
+@@ -508,6 +508,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
}
hapd->started = 0;
hapd->beacon_set_done = 0;
@@ -110,7 +109,7 @@
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
hostapd_ubus_free_bss(hapd);
-@@ -1290,6 +1291,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
+@@ -1316,6 +1317,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
return -1;
}
hapd->started = 1;
@@ -119,17 +118,17 @@
if (!first || first == -1) {
u8 *addr = hapd->own_addr;
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
-index c0b3a08..fb8566a 100644
+index 072205c3c..4f1f98824 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
-@@ -190,6 +190,7 @@ struct hostapd_data {
+@@ -191,6 +191,7 @@ struct hostapd_data {
unsigned int started:1;
unsigned int disabled:1;
unsigned int reenable_beacon:1;
+ unsigned int stopped_by_supplicant:1;
u8 own_addr[ETH_ALEN];
-
+ u8 mld_addr[ETH_ALEN];
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
index 462989c..85c4ad4 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-setting-wrong-seg0-index-for-5G-cent.patch
@@ -1,7 +1,7 @@
-From f229416c4283da4a2f3b264285a5d97fdc8dcc96 Mon Sep 17 00:00:00 2001
+From 6583d6a35c98648fc5726b16c5c528def0dd4a38 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 12 May 2023 05:23:00 +0800
-Subject: [PATCH 27/28] hostapd: mtk: Fix setting wrong seg0 index for 5G
+Subject: [PATCH 27/32] hostapd: mtk: Fix setting wrong seg0 index for 5G
center chan 159 BW40
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -10,10 +10,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
-index b9aaa85..9df0b2c 100644
+index 195816c28..1eb871f10 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1294,7 +1294,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
+@@ -1306,7 +1306,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
#ifdef CONFIG_IEEE80211BE
if (conf->ieee80211be)
conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
@@ -24,5 +24,5 @@
conf->channel > oper_centr_freq_seg0_idx ? 16 : -16;
#endif /* CONFIG_IEEE80211BE */
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch
index 26ea489..85cd75c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0028-hostapd-mtk-Add-muru-user-number-debug-command.patch
@@ -1,23 +1,23 @@
-From a90c24ae2b7558eac18cf92fee6cfaf480233ec2 Mon Sep 17 00:00:00 2001
+From b232336ca798430ca9d920d1fa58b1418999eeb0 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 12 May 2023 05:24:19 +0800
-Subject: [PATCH 28/28] hostapd: mtk: Add muru user number debug command
+Subject: [PATCH 28/32] hostapd: mtk: Add muru user number debug command
---
hostapd/ctrl_iface.c | 13 ++++++++++++-
src/ap/ap_drv_ops.c | 4 ++--
src/ap/ap_drv_ops.h | 2 +-
- src/ap/hostapd.c | 4 ++--
+ src/ap/hostapd.c | 3 ++-
src/common/mtk_vendor.h | 7 +++++++
src/drivers/driver.h | 4 ++--
src/drivers/driver_nl80211.c | 37 ++++++++++++++++++++++++++++--------
- 7 files changed, 55 insertions(+), 16 deletions(-)
+ 7 files changed, 55 insertions(+), 15 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 06d8345..2d99647 100644
+index 4952bef89..972393e77 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3441,6 +3441,8 @@ hostapd_ctrl_iface_set_edcca(struct hostapd_data *hapd, char *cmd,
+@@ -3477,6 +3477,8 @@ hostapd_ctrl_iface_set_edcca(struct hostapd_data *hapd, char *cmd,
char *buf, size_t buflen)
{
char *pos, *config, *value;
@@ -26,7 +26,7 @@
config = cmd;
pos = os_strchr(config, ' ');
if (pos == NULL)
-@@ -3547,6 +3549,8 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3583,6 +3585,8 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
char *buf, size_t buflen)
{
char *pos, *config, *value;
@@ -35,7 +35,7 @@
config = cmd;
pos = os_strchr(config, ' ');
if (pos == NULL)
-@@ -3564,13 +3568,20 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3600,13 +3604,20 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
return -1;
}
hapd->iconf->mu_onoff = (u8) mu;
@@ -58,10 +58,10 @@
} else {
return -1;
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index 0052a6d..d5c7b15 100644
+index b90dd5722..0aec9e925 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1079,11 +1079,11 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
+@@ -1162,11 +1162,11 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
}
@@ -76,7 +76,7 @@
int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 9d5a23b..82283e6 100644
+index 1e2a92acb..5dd701e10 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -148,7 +148,7 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -89,19 +89,18 @@
int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 05ddb6f..9bd81d3 100644
+index 6e6ae77d7..c684d7e39 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -55,7 +55,7 @@
- #include "hs20.h"
- #include "airtime_policy.h"
+@@ -57,6 +57,7 @@
#include "wpa_auth_kay.h"
--
+ #include "hw_features.h"
+
+#include "common/mtk_vendor.h"
static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason);
#ifdef CONFIG_WEP
-@@ -2398,7 +2398,7 @@ dfs_offload:
+@@ -2567,7 +2568,7 @@ dfs_offload:
if (hostapd_drv_configure_edcca_threshold(hapd,
hapd->iconf->edcca_threshold) < 0)
goto fail;
@@ -111,10 +110,10 @@
if (hostapd_drv_three_wire_ctrl(hapd) < 0)
goto fail;
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 74f467c..7dd2fc4 100644
+index dd1ca2164..99371bf73 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
-@@ -197,6 +197,8 @@ enum mtk_vendor_attr_mu_ctrl {
+@@ -199,6 +199,8 @@ enum mtk_vendor_attr_mu_ctrl {
MTK_VENDOR_ATTR_MU_CTRL_ONOFF,
MTK_VENDOR_ATTR_MU_CTRL_DUMP,
@@ -123,7 +122,7 @@
/* keep last */
NUM_MTK_VENDOR_ATTRS_MU_CTRL,
-@@ -270,4 +272,9 @@ struct amnt_resp_data {
+@@ -272,4 +274,9 @@ struct amnt_resp_data {
struct amnt_data resp_data[0];
};
@@ -134,10 +133,10 @@
+};
#endif /* MTK_VENDOR_H */
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index cb885f9..6cd4dc9 100644
+index 5c70ec78f..84387a6d7 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5017,11 +5017,11 @@ struct wpa_driver_ops {
+@@ -5096,11 +5096,11 @@ struct wpa_driver_ops {
int (*get_edcca)(void *priv, const u8 mode, u8 *value);
/**
@@ -152,10 +151,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 088f625..8400e57 100644
+index b923e5c7e..0e7ee4306 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -13295,13 +13295,13 @@ fail:
+@@ -13565,13 +13565,13 @@ fail:
#ifdef CONFIG_IEEE80211AX
@@ -171,7 +170,7 @@
if (!drv->mtk_mu_vendor_cmd_avail) {
wpa_printf(MSG_INFO,
-@@ -13312,17 +13312,38 @@ static int nl80211_mu_onoff(void *priv, u8 mu_onoff)
+@@ -13582,17 +13582,38 @@ static int nl80211_mu_onoff(void *priv, u8 mu_onoff)
if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_MTK) ||
nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD, MTK_NL80211_VENDOR_SUBCMD_MU_CTRL) ||
@@ -215,7 +214,7 @@
}
-@@ -14454,7 +14475,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
+@@ -14734,7 +14755,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.update_connect_params = nl80211_update_connection_params,
.send_external_auth_status = nl80211_send_external_auth_status,
.set_4addr_mode = nl80211_set_4addr_mode,
@@ -225,5 +224,5 @@
#ifdef CONFIG_DPP
.dpp_listen = nl80211_dpp_listen,
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Fix-CCA-issue.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Fix-CCA-issue.patch
index e4667e4..7196118 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Fix-CCA-issue.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0029-hostapd-mtk-Fix-CCA-issue.patch
@@ -1,7 +1,7 @@
-From c92a1e50abdad2bf3e961c9d5aa34baea81f025b Mon Sep 17 00:00:00 2001
+From ce585467d784d1015b5a40ec09895d0949690b04 Mon Sep 17 00:00:00 2001
From: Michael Lee <michael-cy.lee@mediatek.com>
Date: Wed, 3 May 2023 14:55:18 +0800
-Subject: [PATCH] hostapd: mtk: Fix CCA issue
+Subject: [PATCH 29/32] hostapd: mtk: Fix CCA issue
When receiving CCA-related nl80211 commands, hostapd used to work on
struct wpa_driver_nl80211_data, whose ctx always points to
@@ -14,10 +14,10 @@
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
-index 67d9ce2..bcce9f5 100644
+index 3d0d9b7bb..ab988fad7 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
-@@ -3418,7 +3418,7 @@ static void nl80211_assoc_comeback(struct wpa_driver_nl80211_data *drv,
+@@ -3662,7 +3662,7 @@ static void nl80211_assoc_comeback(struct wpa_driver_nl80211_data *drv,
#ifdef CONFIG_IEEE80211AX
@@ -26,7 +26,7 @@
struct nlattr *tb[])
{
union wpa_event_data data;
-@@ -3432,37 +3432,37 @@ static void nl80211_obss_color_collision(struct wpa_driver_nl80211_data *drv,
+@@ -3676,37 +3676,37 @@ static void nl80211_obss_color_collision(struct wpa_driver_nl80211_data *drv,
wpa_printf(MSG_DEBUG, "nl80211: BSS color collision - bitmap %08llx",
(long long unsigned int) data.bss_color_collision.bitmap);
@@ -71,7 +71,7 @@
}
#endif /* CONFIG_IEEE80211AX */
-@@ -3724,16 +3724,16 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
+@@ -3968,16 +3968,16 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
break;
#ifdef CONFIG_IEEE80211AX
case NL80211_CMD_OBSS_COLOR_COLLISION:
@@ -93,5 +93,5 @@
#endif /* CONFIG_IEEE80211AX */
default:
--
-2.25.1
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
index f9c4714..69d1a31 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0030-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch
@@ -1,7 +1,7 @@
-From c4d3890bbf1bd8c8ac8bfaa56fd16e2391e05181 Mon Sep 17 00:00:00 2001
+From 62c4fa824adefc85ec7820b431f5d617aaf07bc7 Mon Sep 17 00:00:00 2001
From: Michael Lee <michael-cy.lee@mediatek.com>
Date: Wed, 3 May 2023 16:10:57 +0800
-Subject: [PATCH] hostapd: mtk: Fix unexpected AP beacon state transition
+Subject: [PATCH 30/32] hostapd: mtk: Fix unexpected AP beacon state transition
When AP fails to set the beacon, it assigns bss->beacon_set to 0 no
matter what the error number is.
@@ -18,10 +18,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index 8400e57..5013207 100644
+index 0e7ee4306..ab121ca16 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -5126,7 +5126,8 @@ static int wpa_driver_nl80211_set_ap(void *priv,
+@@ -5395,7 +5395,8 @@ static int wpa_driver_nl80211_set_ap(void *priv,
ret, strerror(-ret));
if (!bss->flink->beacon_set)
ret = 0;
@@ -29,8 +29,8 @@
+ if (ret != -EBUSY)
+ bss->flink->beacon_set = 0;
} else {
- bss->flink->beacon_set = 1;
+ link->beacon_set = 1;
nl80211_set_bss(bss, params->cts_protect, params->preamble,
--
-2.25.1
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
index fa37f91..6354d3c 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch
@@ -1,4 +1,4 @@
-From 011bf135a28d9e13fc27b72da4486d21c8c17e87 Mon Sep 17 00:00:00 2001
+From 78107269ba6f1ef6449e385e0182970ad85d7f43 Mon Sep 17 00:00:00 2001
From: Howard Hsu <howard-yh.hsu@mediatek.com>
Date: Sat, 3 Jun 2023 17:12:15 +0800
Subject: [PATCH] hostapd: mtk: add connac3 PHY MURU manual mode config support
@@ -46,10 +46,10 @@
8 files changed, 390 insertions(+), 43 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 274d079..663e6c8 100644
+index 972393e..b280a04 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -3575,22 +3575,61 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
+@@ -3579,22 +3579,61 @@ hostapd_ctrl_iface_get_edcca(struct hostapd_data *hapd, char *cmd, char *buf,
}
}
@@ -118,7 +118,7 @@
value = pos;
if (os_strcmp(config, "onoff") == 0) {
-@@ -3600,24 +3639,167 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
+@@ -3604,24 +3643,167 @@ hostapd_ctrl_iface_set_mu(struct hostapd_data *hapd, char *cmd,
return -1;
}
hapd->iconf->mu_onoff = (u8) mu;
@@ -186,7 +186,7 @@
+ for (i = 0; i < dl->user_num; i++) {
+ dl->usr[i].ru_alloc_seg = (val[2 * i] & 0x1);
+ dl->usr[i].ru_allo_ps160 = ((val[2 * i] & 0x2) >> 1);
-+ dl->usr[i].ru_idx = (val[(2 * i) + 1] & 0x1);
++ dl->usr[i].ru_idx = val[(2 * i) + 1];
+ }
+ os_free(val);
+ muru->cfg_dl |= host_to_le32(MURU_FIXED_USER_DL_RU_ALLOC);
@@ -200,7 +200,7 @@
+ for (i = 0; i < ul->user_num; i++) {
+ ul->usr[i].ru_alloc_seg = (val[2 * i] & 0x1);
+ ul->usr[i].ru_allo_ps160 = ((val[2 * i] & 0x2) >> 1);
-+ ul->usr[i].ru_idx = (val[(2 * i) + 1] & 0x1);
++ ul->usr[i].ru_idx = val[(2 * i) + 1];
+ }
+ os_free(val);
+ muru->cfg_ul |= host_to_le32(MURU_FIXED_USER_UL_RU_ALLOC);
@@ -300,7 +300,7 @@
}
-@@ -4609,8 +4791,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4613,8 +4795,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
reply_len = hostapd_ctrl_iface_get_edcca(hapd, buf+10, reply,
reply_size);
} else if (os_strncmp(buf, "SET_MU ", 7) == 0) {
@@ -310,7 +310,7 @@
} else if (os_strncmp(buf, "GET_MU", 6) == 0) {
reply_len = hostapd_ctrl_iface_get_mu(hapd, reply, reply_size);
} else if (os_strncmp(buf, "GET_IBF", 7) == 0) {
-@@ -4636,6 +4817,14 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
+@@ -4640,6 +4821,14 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
} else if (os_strncmp(buf, "DUMP_AMNT", 9) == 0) {
reply_len = hostapd_ctrl_iface_dump_amnt(hapd, buf+10,
reply, reply_size);
@@ -326,10 +326,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 9df0b2c..74dfce7 100644
+index 1eb871f..4e38e67 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -1190,6 +1190,7 @@ struct hostapd_config {
+@@ -1201,6 +1201,7 @@ struct hostapd_config {
u8 ibf_enable;
u8 dfs_detect_mode;
u8 amsdu;
@@ -338,10 +338,10 @@
enum three_wire_mode {
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
-index d5c7b15..fa369c8 100644
+index 0aec9e9..721bfa0 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
-@@ -1079,11 +1079,11 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
+@@ -1162,11 +1162,11 @@ int hostapd_drv_get_edcca(struct hostapd_data *hapd, const u8 mode, u8 *value)
return hapd->driver->get_edcca(hapd->drv_priv, mode, value);
}
@@ -356,7 +356,7 @@
int hostapd_drv_mu_dump(struct hostapd_data *hapd, u8 *mu_onoff)
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
-index 82283e6..33faba5 100644
+index 5dd701e..741fdab 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -148,7 +148,7 @@ int hostapd_drv_configure_edcca_enable(struct hostapd_data *hapd);
@@ -369,10 +369,10 @@
int hostapd_drv_three_wire_ctrl(struct hostapd_data *hapd);
int hostapd_drv_ibf_ctrl(struct hostapd_data *hapd);
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 6fd5947..535f62b 100644
+index c684d7e..52d04d6 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -2398,7 +2398,7 @@ dfs_offload:
+@@ -2568,7 +2568,7 @@ dfs_offload:
if (hostapd_drv_configure_edcca_threshold(hapd,
hapd->iconf->edcca_threshold) < 0)
goto fail;
@@ -382,10 +382,10 @@
if (hostapd_drv_three_wire_ctrl(hapd) < 0)
goto fail;
diff --git a/src/common/mtk_vendor.h b/src/common/mtk_vendor.h
-index 7dd2fc4..6de8596 100644
+index 99371bf..e140de6 100644
--- a/src/common/mtk_vendor.h
+++ b/src/common/mtk_vendor.h
-@@ -197,8 +197,11 @@ enum mtk_vendor_attr_mu_ctrl {
+@@ -199,8 +199,11 @@ enum mtk_vendor_attr_mu_ctrl {
MTK_VENDOR_ATTR_MU_CTRL_ONOFF,
MTK_VENDOR_ATTR_MU_CTRL_DUMP,
@@ -399,7 +399,7 @@
/* keep last */
NUM_MTK_VENDOR_ATTRS_MU_CTRL,
-@@ -273,8 +276,163 @@ struct amnt_resp_data {
+@@ -275,8 +278,163 @@ struct amnt_resp_data {
};
enum {
@@ -566,10 +566,10 @@
+
#endif /* MTK_VENDOR_H */
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
-index 6cd4dc9..bc7dcca 100644
+index 84387a6..9ec0e96 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -5021,7 +5021,7 @@ struct wpa_driver_ops {
+@@ -5100,7 +5100,7 @@ struct wpa_driver_ops {
* @priv: Private driver interface data
*
*/
@@ -579,10 +579,10 @@
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
-index ccfc2d0..dd6580f 100644
+index ab121ca..fdd8505 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -13296,12 +13296,13 @@ fail:
+@@ -13566,12 +13566,13 @@ fail:
#ifdef CONFIG_IEEE80211AX
@@ -597,7 +597,7 @@
int ret = -ENOBUFS;
if (!drv->mtk_mu_vendor_cmd_avail) {
-@@ -13318,17 +13319,16 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
+@@ -13588,17 +13589,16 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
switch (mode) {
case MU_CTRL_ONOFF:
@@ -622,7 +622,7 @@
ret = -EINVAL;
goto fail;
}
-@@ -13336,9 +13336,8 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
+@@ -13606,9 +13606,8 @@ static int nl80211_mu_ctrl(void *priv, u8 mode, u8 val)
nla_nest_end(msg, data);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch
index 1c5cacc..4b7c8b4 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch
@@ -1,18 +1,17 @@
-From 43c8934074a4f6fd1e98143b3bd011e71fe69fdb Mon Sep 17 00:00:00 2001
+From bb2459cc960ea017702c11e19cf3dbef4df599b8 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
-Date: Fri Jun 9 09:03:05 2023 +0800
-Subject: hostapd: mtk: Add HE capabilities check
+Date: Fri, 9 Jun 2023 09:03:05 +0800
+Subject: [PATCH 32/32] hostapd: mtk: Add HE capabilities check
Add HE capabilities check.
Since "HE capabilities" check has been removed by driver,
add the support for "HE capabilities" check in hostapd.
-
---
- src/ap/hw_features.c | 26 ++++++++++++++++++++++++++
- 1 files changed, 26 insertions(+)
+ src/ap/hw_features.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
-index 9967494..309f2d5 100644
+index 828b9261b..991af2c45 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -680,6 +680,32 @@ static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface)
@@ -49,5 +48,5 @@
}
#endif /* CONFIG_IEEE80211AX */
--
-2.39.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
new file mode 100644
index 0000000..96522dd
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
@@ -0,0 +1,31 @@
+From fba1094daa7efaea9e2e3e9342b6eb6bd00ca174 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Wed, 5 Jul 2023 10:47:20 +0800
+Subject: [PATCH 34/34] hostapd: mtk: Fix hostapd_dfs_start_cac log
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ src/ap/dfs.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/dfs.c b/src/ap/dfs.c
+index 6506d7a..c255978 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1655,9 +1655,11 @@ int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
+ /* TODO: How to check CAC time for ETSI weather channels? */
+ iface->dfs_cac_ms = 60000;
+ wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
+- "freq=%d chan=%d chan_offset=%d width=%d seg0=%d "
++ "freq=%d chan=%d chan_offset=%d width=%s seg0=%d "
+ "seg1=%d cac_time=%ds%s",
+- freq, (freq - 5000) / 5, chan_offset, chan_width, cf1, cf2,
++ freq, (freq - 5000) / 5, chan_offset,
++ channel_width_to_string(chan_width),
++ (cf1 - 5000) / 5, cf2 ? (cf2 - 5000) / 5 : 0,
+ iface->dfs_cac_ms / 1000,
+ hostapd_dfs_is_background_event(iface, freq) ?
+ " (background)" : "");
+--
+2.18.0
+
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch
new file mode 100644
index 0000000..1937640
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0035-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch
@@ -0,0 +1,55 @@
+From 99159b174eb245a7162fe38900971cdff017cf75 Mon Sep 17 00:00:00 2001
+From: Michael Lee <michael-cy.lee@mediatek.com>
+Date: Thu, 13 Jul 2023 13:14:26 +0800
+Subject: [PATCH] hostapd: mtk: Check the bridge after ioctl SIOCBRADDIF failed
+
+If ioctl returns EBUSY on command SIOCBRADDIF, the interface might
+already be bridged by others, and linux_br_add_if should not indicate an
+error in the case.
+
+This patch checks whether the interface is correctly brigded when ioctl
+returns EBUSY.
+
+Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
+---
+ src/drivers/linux_ioctl.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c
+index 7edb9df..b8c1af2 100644
+--- a/src/drivers/linux_ioctl.c
++++ b/src/drivers/linux_ioctl.c
+@@ -150,7 +150,8 @@ int linux_br_del(int sock, const char *brname)
+ int linux_br_add_if(int sock, const char *brname, const char *ifname)
+ {
+ struct ifreq ifr;
+- int ifindex;
++ int ifindex, ret;
++ char in_br[IFNAMSIZ];
+
+ ifindex = if_nametoindex(ifname);
+ if (ifindex == 0)
+@@ -164,8 +165,19 @@ int linux_br_add_if(int sock, const char *brname, const char *ifname)
+
+ wpa_printf(MSG_DEBUG, "Could not add interface %s into bridge "
+ "%s: %s", ifname, brname, strerror(errno));
++
++ /* If ioctl returns -EBUSY when adding interface into bridge,
++ * the interface might already be added by netifd, so here we
++ * check whether the interface is currently on the right
++ * bridge. */
++ if(errno == EBUSY && linux_br_get(in_br, ifname) == 0 &&
++ os_strcmp(in_br, brname) == 0)
++ ret = 0;
++ else
++ ret = -1;
++
+ errno = saved_errno;
+- return -1;
++ return ret;
+ }
+
+ return 0;
+--
+2.25.1
+
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0103-hostapd-mtk-Add-BW320-channel-switch-command.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0103-hostapd-mtk-Add-BW320-channel-switch-command.patch
deleted file mode 100644
index 5d38688..0000000
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0103-hostapd-mtk-Add-BW320-channel-switch-command.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From e61b734969cd94121434adef85f241f835aa1f5a Mon Sep 17 00:00:00 2001
-From: Evelyn Tsai <evelyn.tsai@mediatek.com>
-Date: Thu, 11 May 2023 14:16:57 +0800
-Subject: [PATCH 103/103] hostapd: mtk: Add BW320 channel switch command
-
----
- hostapd/ctrl_iface.c | 32 +++++++++++++++++++++++++++++++
- src/ap/drv_callbacks.c | 3 ++-
- src/ap/hostapd.c | 4 ++++
- src/drivers/driver_nl80211_capa.c | 2 ++
- 4 files changed, 40 insertions(+), 1 deletion(-)
-
-diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
-index 2d99647..274d079 100644
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -2713,6 +2713,38 @@ static int hostapd_ctrl_check_freq_params(struct hostapd_freq_params *params,
- return -1;
- }
- break;
-+ case 320:
-+ if (!params->center_freq1 || params->center_freq2 ||
-+ !params->sec_channel_offset)
-+ return -1;
-+
-+ switch (params->sec_channel_offset) {
-+ case 1:
-+ if (params->freq + 150 != params->center_freq1 &&
-+ params->freq + 110 != params->center_freq1 &&
-+ params->freq + 70 != params->center_freq1 &&
-+ params->freq + 30 != params->center_freq1 &&
-+ params->freq - 10 != params->center_freq1 &&
-+ params->freq - 50 != params->center_freq1 &&
-+ params->freq - 90 != params->center_freq1 &&
-+ params->freq - 130 != params->center_freq1)
-+ return -1;
-+ break;
-+ case -1:
-+ if (params->freq + 130 != params->center_freq1 &&
-+ params->freq + 90 != params->center_freq1 &&
-+ params->freq + 50 != params->center_freq1 &&
-+ params->freq + 10 != params->center_freq1 &&
-+ params->freq - 30 != params->center_freq1 &&
-+ params->freq - 70 != params->center_freq1 &&
-+ params->freq - 110 != params->center_freq1 &&
-+ params->freq - 150 != params->center_freq1)
-+ return -1;
-+ break;
-+ default:
-+ return -1;
-+ }
-+ break;
- default:
- return -1;
- }
-diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
-index c1f9a0e..dccbdb6 100644
---- a/src/ap/drv_callbacks.c
-+++ b/src/ap/drv_callbacks.c
-@@ -988,7 +988,8 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
- hapd->iconf->ch_switch_eht_config = 0;
-
- if (width == CHAN_WIDTH_40 || width == CHAN_WIDTH_80 ||
-- width == CHAN_WIDTH_80P80 || width == CHAN_WIDTH_160)
-+ width == CHAN_WIDTH_80P80 || width == CHAN_WIDTH_160 ||
-+ width == CHAN_WIDTH_320)
- hapd->iconf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
- else if (width == CHAN_WIDTH_20 || width == CHAN_WIDTH_20_NOHT)
- hapd->iconf->ht_capab &= ~HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
-diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
-index 9bd81d3..6fd5947 100644
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -3705,6 +3705,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
- case 40:
- case 80:
- case 160:
-+ case 320:
- conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
- break;
- default:
-@@ -3777,6 +3778,9 @@ static int hostapd_fill_csa_settings(struct hostapd_data *hapd,
- case 160:
- bandwidth = CONF_OPER_CHWIDTH_160MHZ;
- break;
-+ case 320:
-+ bandwidth = CONF_OPER_CHWIDTH_320MHZ;
-+ break;
- default:
- bandwidth = CONF_OPER_CHWIDTH_USE_HT;
- break;
-diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
-index 7b5079b..1a53ade 100644
---- a/src/drivers/driver_nl80211_capa.c
-+++ b/src/drivers/driver_nl80211_capa.c
-@@ -1701,6 +1701,8 @@ static void phy_info_freq(struct hostapd_hw_modes *mode,
- chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_80;
- if (tb_freq[NL80211_FREQUENCY_ATTR_NO_160MHZ])
- chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_160;
-+ if (tb_freq[NL80211_FREQUENCY_ATTR_NO_320MHZ])
-+ chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_320;
-
- if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]) {
- enum nl80211_dfs_state state =
---
-2.18.0
-
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0100-hostapd-mtk-update-eht-operation-element.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1000-hostapd-mtk-update-eht-operation-element.patch
similarity index 76%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0100-hostapd-mtk-update-eht-operation-element.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-1000-hostapd-mtk-update-eht-operation-element.patch
index d8cdf15..f25ae08 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0100-hostapd-mtk-update-eht-operation-element.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1000-hostapd-mtk-update-eht-operation-element.patch
@@ -1,17 +1,17 @@
-From ea9c7bda66bcd7819e106d5f672345b941365d15 Mon Sep 17 00:00:00 2001
+From 04a5e0bf7a0f13759a4df7ca7d6789c67c837017 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Wed, 10 May 2023 13:11:34 +0800
-Subject: [PATCH 100/103] hostapd: mtk: update eht operation element
+Subject: [PATCH 1000/1001] hostapd: mtk: update eht operation element
---
src/ap/ieee802_11_eht.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
-index 6ebe0f9..c14c5e2 100644
+index 9a07f7501..f132e1d9c 100644
--- a/src/ap/ieee802_11_eht.c
+++ b/src/ap/ieee802_11_eht.c
-@@ -214,9 +214,9 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
+@@ -215,9 +215,9 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
/* TODO: Fill in appropriate EHT-MCS max Nss information */
oper->basic_eht_mcs_nss_set[0] = 0x11;
@@ -25,5 +25,5 @@
if (is_6ghz_op_class(conf->op_class))
chwidth = op_class_to_ch_width(conf->op_class);
--
-2.18.0
+2.39.2
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0104-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
similarity index 86%
rename from recipes-wifi/hostapd/files/patches-2.10.3/mtk-0104-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
rename to recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
index 01a134e..25a401d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0104-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-1001-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch
@@ -1,7 +1,8 @@
-From 0aaec4ebc72e40da76a279d817763f4655f45d21 Mon Sep 17 00:00:00 2001
+From d9ddfb581c40edd45b7c1a30bfc2889ddb2102a4 Mon Sep 17 00:00:00 2001
From: mtk23510 <rudra.shahi@mediatek.com>
Date: Fri, 26 May 2023 14:52:35 +0800
-Subject: [PATCH] hostapd: mtk: Add support for gtk rekeying in hostapd cli
+Subject: [PATCH 1001/1001] hostapd: mtk: Add support for gtk rekeying in
+ hostapd cli
Signed-off-by: mtk23510 <rudra.shahi@mediatek.com>
---
@@ -9,7 +10,7 @@
1 file changed, 13 insertions(+)
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
-index 02f8546..d529bbc 100644
+index 6d763f327..363a6bb93 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1256,6 +1256,15 @@ static int hostapd_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
@@ -40,5 +41,5 @@
"= drop all ERP keys"},
{ "log_level", hostapd_cli_cmd_log_level, NULL,
--
-2.18.0
+2.39.2
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 8e652e0..e11b91d 100644
--- a/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/patches.inc
@@ -16,7 +16,7 @@
file://140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch \
file://150-add-NULL-checks-encountered-during-tests-hwsim.patch \
file://160-dpp_pkex-EC-point-mul-w-value-prime.patch \
- file://170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch \
+ file://170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch \
file://200-multicall.patch \
file://300-noscan.patch \
file://301-mesh-noscan.patch \
@@ -90,7 +90,8 @@
file://mtk-0030-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch \
file://mtk-0031-hostapd-mtk-add-connac3-PHY-MURU-manual-mode-config-.patch \
file://mtk-0032-hostapd-mtk-Add-HE-capabilities-check.patch \
- file://mtk-0100-hostapd-mtk-update-eht-operation-element.patch \
- file://mtk-0103-hostapd-mtk-Add-BW320-channel-switch-command.patch \
- file://mtk-0104-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch \
+ file://mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch \
+ file://mtk-0035-hostapd-mtk-Check-the-bridge-after-ioctl-SIOCBRADDIF.patch \
+ file://mtk-1000-hostapd-mtk-update-eht-operation-element.patch \
+ file://mtk-1001-hostapd-mtk-Add-support-for-gtk-rekeying-in-hostapd-.patch \
"
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch b/recipes-wifi/hostapd/files/patches/mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch
new file mode 100644
index 0000000..c4172bb
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches/mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch
@@ -0,0 +1,61 @@
+From 627b60aab19db40260366fae5c711adb2b09554e Mon Sep 17 00:00:00 2001
+From: Michael Lee <michael-cy.lee@mediatek.com>
+Date: Wed, 28 Jun 2023 11:08:12 +0800
+Subject: [PATCH] hostapd: mtk: register update_channel_utilization again
+
+The update_channel_utilization might be called when the bss is currently
+stopped by wpa_supplicant.
+In the original flow, the update_channel_utilization returns without
+register itself again, and channel utilization will not be updated for
+this bss anymore.
+This patch re-registers the update_channel_utilization again when the
+bss is stopped by wpa_supplicant.
+
+Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
+---
+ src/ap/bss_load.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
+index ae55521..f2a1a10 100644
+--- a/src/ap/bss_load.c
++++ b/src/ap/bss_load.c
+@@ -46,10 +46,12 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ int err;
+ struct hostapd_iface *iface = hapd->iface;
+
+- if (!(hapd->beacon_set_done && hapd->started &&
+- !hapd->stopped_by_supplicant))
++ if (!(hapd->beacon_set_done && hapd->started))
+ return;
+
++ if(!hapd->stopped_by_supplicant)
++ goto skip_update;
++
+ err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
+ if (err) {
+ wpa_printf(MSG_ERROR, "BSS Load: Failed to get survey data");
+@@ -58,9 +60,6 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+
+ ieee802_11_set_beacon(hapd);
+
+- if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
+- return;
+-
+ if (hapd->conf->chan_util_avg_period) {
+ iface->chan_util_samples_sum += iface->channel_utilization;
+ iface->chan_util_num_sample_periods +=
+@@ -76,6 +75,10 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
+ }
+ }
+
++skip_update:
++ if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
++ return;
++
+ eloop_register_timeout(sec, usec, update_channel_utilization, hapd,
+ NULL);
+ }
+--
+2.25.1
+
diff --git a/recipes-wifi/hostapd/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch b/recipes-wifi/hostapd/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
new file mode 100644
index 0000000..96522dd
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
@@ -0,0 +1,31 @@
+From fba1094daa7efaea9e2e3e9342b6eb6bd00ca174 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Wed, 5 Jul 2023 10:47:20 +0800
+Subject: [PATCH 34/34] hostapd: mtk: Fix hostapd_dfs_start_cac log
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ src/ap/dfs.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/dfs.c b/src/ap/dfs.c
+index 6506d7a..c255978 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1655,9 +1655,11 @@ int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
+ /* TODO: How to check CAC time for ETSI weather channels? */
+ iface->dfs_cac_ms = 60000;
+ wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
+- "freq=%d chan=%d chan_offset=%d width=%d seg0=%d "
++ "freq=%d chan=%d chan_offset=%d width=%s seg0=%d "
+ "seg1=%d cac_time=%ds%s",
+- freq, (freq - 5000) / 5, chan_offset, chan_width, cf1, cf2,
++ freq, (freq - 5000) / 5, chan_offset,
++ channel_width_to_string(chan_width),
++ (cf1 - 5000) / 5, cf2 ? (cf2 - 5000) / 5 : 0,
+ iface->dfs_cac_ms / 1000,
+ hostapd_dfs_is_background_event(iface, freq) ?
+ " (background)" : "");
+--
+2.18.0
+
diff --git a/recipes-wifi/hostapd/files/patches/patches.inc b/recipes-wifi/hostapd/files/patches/patches.inc
index 3851812..cd5f8de 100644
--- a/recipes-wifi/hostapd/files/patches/patches.inc
+++ b/recipes-wifi/hostapd/files/patches/patches.inc
@@ -95,4 +95,6 @@
file://mtk-0030-hostapd-mtk-Add-muru-user-number-debug-command.patch \
file://mtk-0031-hostapd-mtk-Fix-CCA-issue.patch \
file://mtk-0032-hostapd-mtk-Fix-unexpected-AP-beacon-state-transitio.patch \
+ file://mtk-0033-hostapd-mtk-register-update_channel_utilization-agai.patch \
+ file://mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch \
"
diff --git a/recipes-wifi/hostapd/hostapd_2.10.3.bb b/recipes-wifi/hostapd/hostapd_2.10.3.bb
index 06874d3..906d89a 100644
--- a/recipes-wifi/hostapd/hostapd_2.10.3.bb
+++ b/recipes-wifi/hostapd/hostapd_2.10.3.bb
@@ -12,7 +12,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:"
-SRCREV ?= "bb945b98fefc64887dffb40773a19d77585cee42"
+SRCREV ?= "599d00be9de2846c6ea18c1487d8329522ade22b"
SRC_URI = " \
git://w1.fi/hostap.git;protocol=https;branch=main \
file://hostapd-full.config \