hostapd: fix MUEDCA patch for hostapd 2024-09-15

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan
2024-09-19 03:11:53 -04:00
parent b2ae7ec412
commit 420cc86dfc

View File

@@ -14,15 +14,15 @@
"Failed to update beacons with WMM parameters");
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -20,6 +20,7 @@
#include "common/hw_features_common.h"
@@ -21,6 +21,7 @@
#include "common/nan_de.h"
#include "crypto/random.h"
#include "p2p/p2p.h"
+#include "wpa_debug.h"
#include "wps/wps.h"
#include "fst/fst.h"
#include "wnm_ap.h"
@@ -2267,6 +2268,47 @@ static void hostapd_event_wds_sta_interf
@@ -2316,6 +2317,47 @@ static void hostapd_event_wds_sta_interf
ifname, MAC2STR(addr));
}
@@ -70,19 +70,19 @@
#ifdef CONFIG_OWE
static int hostapd_notif_update_dh_ie(struct hostapd_data *hapd,
@@ -2677,6 +2719,9 @@ void hostapd_wpa_event(void *ctx, enum w
hostapd_cleanup_cca_params(hapd);
@@ -2874,6 +2916,9 @@ void hostapd_wpa_event(void *ctx, enum w
hapd->conf->iface);
hostapd_event_color_change(hapd, true);
break;
#endif /* CONFIG_IEEE80211AX */
+ case EVENT_UPDATE_MUEDCA_PARAMS:
+ hostapd_event_update_muedca_params(hapd, &data->update_muedca);
+ break;
default:
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
break;
#endif /* CONFIG_IEEE80211AX */
#ifdef CONFIG_IEEE80211BE
case EVENT_MLD_INTERFACE_FREED:
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -4100,6 +4100,10 @@ static int hostapd_fill_csa_settings(str
@@ -4511,6 +4511,10 @@ static int hostapd_fill_csa_settings(str
hapd->cs_count = settings->cs_count;
hapd->cs_block_tx = settings->block_tx;
@@ -157,7 +157,7 @@
size_t len);
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -5786,6 +5786,16 @@ enum wpa_event_type {
@@ -5980,6 +5980,16 @@ enum wpa_event_type {
EVENT_LINK_CH_SWITCH_STARTED,
/**
@@ -174,7 +174,7 @@
* EVENT_TID_LINK_MAP - MLD event to set TID-to-link mapping
*
* This event is used by the driver to indicate the received TID-to-link
@@ -6752,6 +6762,16 @@ union wpa_event_data {
@@ -6963,6 +6973,16 @@ union wpa_event_data {
struct pasn_auth pasn_auth;
/**
@@ -200,7 +200,7 @@
+ E2S(UPDATE_MUEDCA_PARAMS);
E2S(TID_LINK_MAP);
E2S(LINK_RECONFIG);
}
E2S(MLD_INTERFACE_FREED);
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -184,6 +184,7 @@ static const char * nl80211_command_to_s
@@ -210,9 +210,9 @@
+ C2S(NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS)
C2S(NL80211_CMD_SET_HW_TIMESTAMP)
C2S(NL80211_CMD_LINKS_REMOVED)
C2S(__NL80211_CMD_AFTER_LAST)
@@ -3644,6 +3645,35 @@ static void nl80211_sta_opmode_change_ev
wpa_supplicant_event(drv->ctx, EVENT_STATION_OPMODE_CHANGED, &ed);
C2S(NL80211_CMD_SET_TID_TO_LINK_MAPPING)
@@ -3650,6 +3651,35 @@ static void nl80211_port_authorized(stru
wpa_supplicant_event(drv->ctx, EVENT_PORT_AUTHORIZED, &event);
}
+static void nl80211_update_muedca_params_event(struct wpa_driver_nl80211_data *drv,
@@ -245,9 +245,9 @@
+ wpa_supplicant_event(drv->ctx, EVENT_UPDATE_MUEDCA_PARAMS, &ed);
+}
static void nl80211_control_port_frame(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb)
@@ -4090,6 +4120,9 @@ static void do_process_drv_event(struct
static void nl80211_sta_opmode_change_event(struct wpa_driver_nl80211_data *drv,
struct nlattr **tb)
@@ -4177,6 +4207,9 @@ static void do_process_drv_event(struct
case NL80211_CMD_LINKS_REMOVED:
wpa_supplicant_event(drv->ctx, EVENT_LINK_RECONFIG, NULL);
break;
@@ -259,9 +259,9 @@
"(cmd=%d)", cmd);
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -1323,6 +1323,11 @@
* Multi-Link reconfiguration. %NL80211_ATTR_MLO_LINKS is used to provide
* information about the removed STA MLD setup links.
@@ -1329,6 +1329,11 @@
* %NL80211_ATTR_MLO_TTLM_ULINK attributes are used to specify the
* TID to Link mapping for downlink/uplink traffic.
*
+ * @NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS: Updated MU-EDCA parameters from driver.
+ * This event is used to update MU-EDCA parameters in Beacon frame, which
@@ -271,15 +271,15 @@
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -1578,6 +1583,7 @@ enum nl80211_commands {
@@ -1586,6 +1591,7 @@ enum nl80211_commands {
NL80211_CMD_LINKS_REMOVED,
NL80211_CMD_SET_TID_TO_LINK_MAPPING,
+ NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS,
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -2799,6 +2805,9 @@ enum nl80211_commands {
@@ -2816,6 +2822,9 @@ enum nl80211_commands {
* the incoming frame RX timestamp.
* @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
* (re)associations.
@@ -289,9 +289,9 @@
*
* @NL80211_ATTR_PUNCT_BITMAP: (u32) Preamble puncturing bitmap, lowest
* bit corresponds to the lowest 20 MHz channel. Each bit set to 1
@@ -3364,6 +3373,7 @@ enum nl80211_attrs {
NL80211_ATTR_MLO_LINK_DISABLED,
@@ -3416,6 +3425,7 @@ enum nl80211_attrs {
NL80211_ATTR_WIPHY_RADIOS,
NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS,
+ NL80211_ATTR_HE_MUEDCA_PARAMS,
/* add attributes here, update the policy in nl80211.c */