From: Khanjan Desai Date: Mon, 9 Jun 2025 09:58:38 +0000 (+0530) Subject: Configuration of the I2R LMR Feedback policy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=525bbfca36b1c91cc7b608cb9c239d5e470fd7c2;p=thirdparty%2Fhostap.git Configuration of the I2R LMR Feedback policy Allow I2R LMR policy to be configured in hostapd.conf and advertised the configured policy in the Extended Capabilities field in Beacon and Probe Response frames. Signed-off-by: Khanjan Desai --- diff --git a/hostapd/config_file.c b/hostapd/config_file.c index d9fb42da9..983dfad0a 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4954,6 +4954,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, bss->mld_indicate_disabled = atoi(pos); #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_IEEE80211BE */ + } else if (os_strcmp(buf, "i2r_lmr_policy") == 0) { + conf->i2r_lmr_policy = atoi(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 40dffca71..2302e2abe 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -2441,6 +2441,21 @@ own_ip_addr=127.0.0.1 #urnm_mfpr=0 #urnm_mfpr_x20=0 +#i2r_lmr_policy: Policy for I2R LMR feedback +# This indicates whether initiating stations are required to support the +# capability to generate and transmit Initiator-to-Responder Location +# Measurement Reports (I2R LMRs). +# This parameter matches the dot11I2RLMRFeedbackPolicy MIB variable. +# +# When set to 1: +# Do not require initiating stations to support I2R LMR generation and +# transmission. +# +# When set to 0: +# Request initiating stations to negotiate and support the transmission of +# I2R LMRs during location measurement operations. +#i2r_lmr_policy=1 + ##### IEEE 802.11r configuration ############################################## # Mobility Domain identifier (dot11FTMobilityDomainID, MDID) diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 4cb0849a6..db5f75ef0 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1241,6 +1241,9 @@ struct hostapd_config { bool channel_usage; bool peer_to_peer_twt; + + /* Set I2R LMR policy to allow LMR response from ISTA */ + bool i2r_lmr_policy; }; diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c index 346b7e103..750891425 100644 --- a/src/ap/ieee802_11_shared.c +++ b/src/ap/ieee802_11_shared.c @@ -481,6 +481,8 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx, #endif /* CONFIG_SAE_PK */ break; case 12: /* Bits 96-103 */ + if (hapd->iconf->i2r_lmr_policy) + *pos |= 0x02; /* Bit 97 - I2R LMR Feedback Policy */ if (hapd->iconf->peer_to_peer_twt) *pos |= 0x10; /* Bit 100 - Peer to Peer TWT */ if (hapd->conf->known_sta_identification)