Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: nl80211/cfg80211: clarify periodic FTM parameters for non-EDCA based ranging

Periodic FTM request attributes are defined based on the periodic
parameters used in EDCA-based ranging negotiation. However, non-EDCA
based ranging (trigger-based/non-trigger-based) does not include
periodic parameters in the negotiation protocol, even though upper
layers may still request periodic measurements.

Clarify the semantics of periodic ranging attributes when used with
non-EDCA based ranging.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260111190221.b89cb3f68e1a.I7a9d8c6d1c66c77f1b43120a841101c96c3f19ad@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Avraham Stern and committed by
Johannes Berg
853ce694 86c6b6e4

+14 -8
+3 -1
include/net/cfg80211.h
··· 4295 4295 * @burst_period: burst period to use 4296 4296 * @asap: indicates to use ASAP mode 4297 4297 * @num_bursts_exp: number of bursts exponent 4298 - * @burst_duration: burst duration 4298 + * @burst_duration: burst duration. If @trigger_based or @non_trigger_based is 4299 + * set, this is the burst duration in milliseconds, and zero means the 4300 + * device should pick an appropriate value based on @ftms_per_burst. 4299 4301 * @ftms_per_burst: number of FTMs per burst 4300 4302 * @ftmr_retries: number of retries for FTM request 4301 4303 * @request_lci: request LCI information
+5 -2
include/uapi/linux/nl80211.h
··· 7851 7851 * &enum nl80211_preamble), optional for DMG (u32) 7852 7852 * @NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP: number of bursts exponent as in 7853 7853 * 802.11-2016 9.4.2.168 "Fine Timing Measurement Parameters element" 7854 - * (u8, 0-15, optional with default 15 i.e. "no preference") 7854 + * (u8, 0-15, optional with default 15 i.e. "no preference". No limit for 7855 + * non-EDCA ranging) 7855 7856 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD: interval between bursts in units 7856 7857 * of 100ms (u16, optional with default 0) 7857 7858 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION: burst duration, as in 802.11-2016 7858 7859 * Table 9-257 "Burst Duration field encoding" (u8, 0-15, optional with 7859 - * default 15 i.e. "no preference") 7860 + * default 15 i.e. "no preference"). For non-EDCA ranging, this is the 7861 + * burst duration in milliseconds (optional with default 0, i.e. let the 7862 + * device decide). 7860 7863 * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames 7861 7864 * requested per burst 7862 7865 * (u8, 0-31, optional with default 0 i.e. "no preference")
+6 -5
net/wireless/pmsr.c
··· 85 85 return -EINVAL; 86 86 } 87 87 88 - out->ftm.burst_duration = 15; 89 - if (tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION]) 90 - out->ftm.burst_duration = 91 - nla_get_u8(tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION]); 92 - 93 88 out->ftm.ftms_per_burst = 0; 94 89 if (tb[NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST]) 95 90 out->ftm.ftms_per_burst = ··· 158 163 "FTM: non EDCA based ranging must use HE preamble"); 159 164 return -EINVAL; 160 165 } 166 + 167 + if (tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION]) 168 + out->ftm.burst_duration = 169 + nla_get_u8(tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION]); 170 + else if (!out->ftm.non_trigger_based && !out->ftm.trigger_based) 171 + out->ftm.burst_duration = 15; 161 172 162 173 out->ftm.lmr_feedback = 163 174 !!tb[NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK];