From: Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, kavita.kavita@oss.qualcomm.com
Subject: [PATCH wireless-next v3 12/15] wifi: cfg80211: add FTM range report negotiation support
Date: Thu, 5 Mar 2026 21:37:09 +0530 [thread overview]
Message-ID: <20260305160712.1263829-13-peddolla.reddy@oss.qualcomm.com> (raw)
In-Reply-To: <20260305160712.1263829-1-peddolla.reddy@oss.qualcomm.com>
Non-trigger based and trigger-based ranging use Location Measurement
Report for result exchange. EDCA-based ranging lacks an equivalent
mechanism to negotiate whether range measurement reports should be
exchanged after the FTM session.
Introduce FTM range report negotiation for EDCA-based ranging as
specified in "Proximity Ranging (PR) Implementation Consideration
Draft 1.9 Rev 1, section 5.2.2". Add a capability flag and request
attribute allowing devices to advertise support and applications
to request range reports for EDCA sessions.
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>
---
include/net/cfg80211.h | 8 +++++++-
include/uapi/linux/nl80211.h | 6 ++++++
net/wireless/nl80211.c | 4 ++++
net/wireless/pmsr.c | 18 ++++++++++++++++++
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 61651ecc3c9d..e398a594082a 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4446,6 +4446,8 @@ struct cfg80211_pmsr_result {
* to be indicated in case the device moves out of this range.
* (units mm, u64). measurement results need to be sent on a burst index
* basis in this case.
+ * @range_report: negotiate for FTM range report. Only valid for
+ * EDCA based ranging.
*
* See also nl80211 for the respective attribute documentation.
*/
@@ -4472,6 +4474,7 @@ struct cfg80211_pmsr_ftm_request_peer {
u32 measurements_per_aw;
u64 ingress_distancemm;
u64 egress_distancemm;
+ u8 range_report:1;
};
/**
@@ -5832,6 +5835,8 @@ cfg80211_get_iftype_ext_capa(struct wiphy *wiphy, enum nl80211_iftype type);
* @ftm.support_rsta: supports operating as RSTA in PMSR FTM request
* @ftm.support_edca_responder: supports operating as FTM responder in PMSR FTM
* request for EDCA-based ranging
+ * @ftm.support_range_report: capable of negotiating for FTM range report. Only
+ * valid for EDCA based ranging.
* @ftm.pd_edca_preambles: bitmap of preambles supported
* (&enum nl80211_preamble) in case of PD request with EDCA based
* initiator or responder role. ignored if @pd_support is not set.
@@ -5878,7 +5883,8 @@ struct cfg80211_pmsr_capabilities {
u32 min_allowed_ranging_interval_edca;
u32 min_allowed_ranging_interval_ntb;
u8 support_rsta:1,
- support_edca_responder:1;
+ support_edca_responder:1,
+ support_range_report:1;
u32 pd_edca_preambles;
u32 pd_ntb_preambles;
u32 pd_edca_bandwidths;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f064d6a260fb..a70dcb2aa111 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -7960,6 +7960,8 @@ enum nl80211_peer_measurement_attrs {
* Note that a higher channel bandwidth may be configured to allow for
* other measurements types with different bandwidth requirement in the
* same measurement.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_RANGE_REPORT: flag indicating if range report
+ * negotiation and reporting is supported in case of EDCA based ranging.
*
* @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
* @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
@@ -7994,6 +7996,7 @@ enum nl80211_peer_measurement_ftm_capa {
NL80211_PMSR_FTM_CAPA_ATTR_PD_NTB_PREAMBLES,
NL80211_PMSR_FTM_CAPA_ATTR_PD_EDCA_BANDWIDTHS,
NL80211_PMSR_FTM_CAPA_ATTR_PD_NTB_BANDWIDTHS,
+ NL80211_PMSR_FTM_CAPA_ATTR_RANGE_REPORT,
/* keep last */
NUM_NL80211_PMSR_FTM_CAPA_ATTR,
@@ -8077,6 +8080,8 @@ enum nl80211_peer_measurement_ftm_capa {
* @NL80211_PMSR_FTM_REQ_ATTR_EGRESS: the measurement result of the peer needs
* to be indicated in case the device moves out of this range.
* (units mm, u64)
+ * @NL80211_PMSR_FTM_REQ_ATTR_RANGE_REPORT: Negotiate Range report in case of
+ * EDCA based ranging (flag).
*
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -8106,6 +8111,7 @@ enum nl80211_peer_measurement_ftm_req {
NL80211_PMSR_FTM_REQ_ATTR_PAD,
NL80211_PMSR_FTM_REQ_ATTR_INGRESS,
NL80211_PMSR_FTM_REQ_ATTR_EGRESS,
+ NL80211_PMSR_FTM_REQ_ATTR_RANGE_REPORT,
/* keep last */
NUM_NL80211_PMSR_FTM_REQ_ATTR,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4de5ec8c5aaf..69f972af7e64 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -383,6 +383,7 @@ nl80211_pmsr_ftm_req_attr_policy[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1] = {
[NL80211_PMSR_FTM_REQ_ATTR_MEAS_PER_AW] = NLA_POLICY_MAX(NLA_U32, 4),
[NL80211_PMSR_FTM_REQ_ATTR_INGRESS] = { .type = NLA_U64 },
[NL80211_PMSR_FTM_REQ_ATTR_EGRESS] = { .type = NLA_U64 },
+ [NL80211_PMSR_FTM_REQ_ATTR_RANGE_REPORT] = { .type = NLA_FLAG },
};
static const struct nla_policy
@@ -2419,6 +2420,9 @@ nl80211_send_pmsr_ftm_capa(const struct cfg80211_pmsr_capabilities *cap,
if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_PD_NTB_BANDWIDTHS,
cap->ftm.pd_ntb_bandwidths))
return -ENOBUFS;
+ if (cap->ftm.support_range_report &&
+ nla_put_flag(msg, NL80211_PMSR_FTM_CAPA_ATTR_RANGE_REPORT))
+ return -ENOBUFS;
nla_nest_end(msg, ftm);
return 0;
diff --git a/net/wireless/pmsr.c b/net/wireless/pmsr.c
index 364034843df7..9a2e84805a31 100644
--- a/net/wireless/pmsr.c
+++ b/net/wireless/pmsr.c
@@ -259,6 +259,24 @@ static int pmsr_parse_ftm(struct cfg80211_registered_device *rdev,
out->ftm.egress_distancemm =
nla_get_u64(tb[NL80211_PMSR_FTM_REQ_ATTR_EGRESS]);
+ out->ftm.range_report =
+ nla_get_flag(tb[NL80211_PMSR_FTM_REQ_ATTR_RANGE_REPORT]);
+
+ if (!capa->ftm.support_range_report && out->ftm.range_report) {
+ NL_SET_ERR_MSG_ATTR(info->extack,
+ tb[NL80211_PMSR_FTM_REQ_ATTR_RANGE_REPORT],
+ "FTM: Range report negotiation not supported");
+ return -EOPNOTSUPP;
+ }
+
+ if ((out->ftm.non_trigger_based || out->ftm.trigger_based) &&
+ out->ftm.range_report) {
+ NL_SET_ERR_MSG_ATTR(info->extack,
+ tb[NL80211_PMSR_FTM_REQ_ATTR_RANGE_REPORT],
+ "FTM: Range report request is not valid for TB/NTB ranging");
+ return -EINVAL;
+ }
+
return 0;
}
--
2.34.1
next prev parent reply other threads:[~2026-03-05 16:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 16:06 [PATCH wireless-next v3 00/15] wifi: Ranging support enhancements Peddolla Harshavardhan Reddy
2026-03-05 16:06 ` [PATCH wireless-next v3 01/15] wifi: cfg80211: Allow RSTA role without LMR request Peddolla Harshavardhan Reddy
2026-03-12 21:03 ` Stern, Avraham
2026-03-20 18:07 ` Peddolla Harshavardhan Reddy
2026-03-05 16:06 ` [PATCH wireless-next v3 02/15] wifi: cfg80211: cancel pmsr_free_wk in cfg80211_pmsr_wdev_down Peddolla Harshavardhan Reddy
2026-03-12 21:04 ` Stern, Avraham
2026-03-20 18:20 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 03/15] wifi: cfg80211: Add MAC address filter to remain_on_channel Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 04/15] wifi: cfg80211/mac80211: Add NL80211_IFTYPE_PD for PD PASN and PMSR operations Peddolla Harshavardhan Reddy
2026-03-12 21:06 ` Stern, Avraham
2026-03-20 18:25 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 05/15] wifi: cfg80211: add start/stop proximity detection commands Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 06/15] wifi: cfg80211: add proximity detection capabilities to PMSR Peddolla Harshavardhan Reddy
2026-03-12 21:08 ` Stern, Avraham
2026-03-20 18:33 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 07/15] wifi: cfg80211: add continuous ranging and PD request support Peddolla Harshavardhan Reddy
2026-03-12 21:11 ` Stern, Avraham
2026-03-20 18:53 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 08/15] wifi: cfg80211: extend PMSR FTM response for proximity ranging Peddolla Harshavardhan Reddy
2026-03-12 21:13 ` Stern, Avraham
2026-03-05 16:07 ` [PATCH wireless-next v3 09/15] wifi: cfg80211: add role-based PD peer limits Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 10/15] wifi: cfg80211: add ingress/egress distance thresholds for FTM Peddolla Harshavardhan Reddy
2026-03-12 21:14 ` Stern, Avraham
2026-03-20 19:18 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 11/15] wifi: cfg80211: add PD-specific preamble and bandwidth capabilities Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` Peddolla Harshavardhan Reddy [this message]
2026-03-12 21:15 ` [PATCH wireless-next v3 12/15] wifi: cfg80211: add FTM range report negotiation support Stern, Avraham
2026-03-20 19:00 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 13/15] wifi: cfg80211: add result reporting control for PD requests Peddolla Harshavardhan Reddy
2026-03-12 21:16 ` Stern, Avraham
2026-03-20 19:04 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 14/15] wifi: cfg80211: add LTF keyseed support for secure ranging Peddolla Harshavardhan Reddy
2026-03-15 8:22 ` Stern, Avraham
2026-03-20 19:10 ` Peddolla Harshavardhan Reddy
2026-03-05 16:07 ` [PATCH wireless-next v3 15/15] wifi: mac80211_hwsim: Add support for extended FTM ranging Peddolla Harshavardhan Reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260305160712.1263829-13-peddolla.reddy@oss.qualcomm.com \
--to=peddolla.reddy@oss.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=kavita.kavita@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox