diff mbox series

[v3,12/12] AP: include enhanced critical update field in MLE for UHR

Message ID 20260507192336.43f7f33712e3.I18eaaa1fe670d1f44cc7cae5a7b24536a2452d07@changeid
State Accepted
Headers show
Series some UHR support | expand

Commit Message

Johannes Berg May 7, 2026, 5:21 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

A UHR AP has to include this field in the common info and
the per-STA profiles. Do this, even if it's currently just
set to zero.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 src/ap/ieee802_11_eht.c      | 17 +++++++++++++++++
 src/common/ieee802_11_defs.h |  2 ++
 2 files changed, 19 insertions(+)

Comments

Johannes Berg May 7, 2026, 5:27 p.m. UTC | #1
On Thu, 2026-05-07 at 19:21 +0200, Johannes Berg wrote:
> 
> +	if (hostapd_is_uhr_enabled(uhr)) {
> 

Ahrg! I made a last-minute replacement here, that should of course be
"hostapd_is_uhr_enabled(hapd)", there are 5 instances throughout this
function.

I'm not going to resend for that right now though.

johannes
diff mbox series

Patch

diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
index 6359303895c4..0b32fd150996 100644
--- a/src/ap/ieee802_11_eht.c
+++ b/src/ap/ieee802_11_eht.c
@@ -479,6 +479,12 @@  u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
 		common_info_len++;
 	}
 
+	if (hostapd_is_uhr_enabled(uhr)) {
+		/* Enhanced critical updates */
+		control |= BASIC_MULTI_LINK_CTRL_PRES_ENH_CRIT_UPD;
+		common_info_len++;
+	}
+
 	wpabuf_put_le16(buf, control);
 
 	wpabuf_put_u8(buf, common_info_len);
@@ -491,6 +497,10 @@  u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
 
 	wpabuf_put_u8(buf, hapd->eht_mld_bss_param_change);
 
+	/* Currently hard-code enhanced critical updates to zero */
+	if (hostapd_is_uhr_enabled(uhr))
+		wpabuf_put_u8(buf, 0);
+
 	wpa_printf(MSG_DEBUG, "MLD: EML Capabilities=0x%x",
 		   hapd->iface->mld_eml_capa);
 	wpabuf_put_le16(buf, hapd->iface->mld_eml_capa);
@@ -549,6 +559,9 @@  u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
 		 * frames */
 		if (include_bpcc)
 			sta_info_len++;
+		/* enhanced critical updates */
+		if (include_bpcc && hostapd_is_uhr_enabled(uhr))
+			sta_info_len++;
 
 		total_len = sta_info_len + link->resp_sta_profile_len;
 
@@ -570,6 +583,8 @@  u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
 
 		if (include_bpcc)
 			control |= BASIC_MLE_STA_CTRL_PRES_BSS_PARAM_COUNT;
+		if (include_bpcc && hostapd_is_uhr_enabled(uhr))
+			control |= BASIC_MLE_STA_CTRL_PRES_ENH_CRIT_UPD;
 
 		wpabuf_put_le16(buf, control);
 
@@ -594,6 +609,8 @@  u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
 		/* BSS Parameters Change Count */
 		if (include_bpcc)
 			wpabuf_put_u8(buf, link_bss->eht_mld_bss_param_change);
+		if (include_bpcc && hostapd_is_uhr_enabled(uhr))
+			wpabuf_put_u8(buf, 0);
 
 		if (!link->resp_sta_profile)
 			continue;
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 9f654b83f76f..d115578a7df1 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2877,6 +2877,7 @@  struct ieee80211_eht_capabilities {
 #define BASIC_MULTI_LINK_CTRL_PRES_MLD_CAPA		0x0100
 #define BASIC_MULTI_LINK_CTRL_PRES_AP_MLD_ID		0x0200
 #define BASIC_MULTI_LINK_CTRL_PRES_EXT_MLD_CAP		0x0400
+#define BASIC_MULTI_LINK_CTRL_PRES_ENH_CRIT_UPD		0x0800
 
 /*
  * STA Control field definitions of Per-STA Profile subelement in Basic
@@ -2893,6 +2894,7 @@  struct ieee80211_eht_capabilities {
 #define BASIC_MLE_STA_CTRL_PRES_NSTR_LINK_PAIR		0x0200
 #define BASIC_MLE_STA_CTRL_NSTR_BITMAP			0x0400
 #define BASIC_MLE_STA_CTRL_PRES_BSS_PARAM_COUNT		0x0800
+#define BASIC_MLE_STA_CTRL_PRES_ENH_CRIT_UPD		0x1000
 
 #define BASIC_MLE_STA_PROF_STA_MAC_IDX			3