[PATCH v2] PR: Update device capabilities for OOB discovery in PASN wrapper
Emily Xia
xiayucheng at google.com
Tue Aug 11 20:00:06 PDT 2026
Previously a peer device discovered by out-of-band (OOB) discovery has
empty capabilities in pr_caps, ntb_caps, and edca_caps. This caused the
final decision of format_bw in wpas_pr_ranging_params to evaluate to 0
because peer_format_bw was always 0.
When processing the PASN ranging wrapper for peers discovered via OOB
discovery, update dev->pr_caps, dev->ntb_caps, and dev->edca_caps with
the parsed capabilities in standalone statements after matching checks
succeed.
Signed-off-by: Emily Xia <xiayucheng at google.com>
---
v2:
- Improve coding style by separating OOB capability assignment statements
from conditional error check blocks into standalone statements.
src/common/proximity_ranging.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/common/proximity_ranging.c b/src/common/proximity_ranging.c
index 21edca070..a73db909b 100644
--- a/src/common/proximity_ranging.c
+++ b/src/common/proximity_ranging.c
@@ -2261,7 +2261,9 @@ static int pr_process_pasn_ranging_wrapper(struct pr_data *pr,
if (!pr_eq_ranging_capa_params(dev, &caps)) {
wpa_printf(MSG_INFO, "PR: Ranging capabilities not matching");
goto end;
- } else if (dev->discovery_type == PR_DISCOVERY_TYPE_OOB) {
+ }
+
+ if (dev->discovery_type == PR_DISCOVERY_TYPE_OOB) {
dev->pr_caps = caps;
}
@@ -2287,7 +2289,9 @@ static int pr_process_pasn_ranging_wrapper(struct pr_data *pr,
wpa_printf(MSG_INFO,
"PR: NTB capabilities not matching");
goto end;
- } else if (dev->discovery_type == PR_DISCOVERY_TYPE_OOB) {
+ }
+
+ if (dev->discovery_type == PR_DISCOVERY_TYPE_OOB) {
dev->ntb_caps = ntb;
}
@@ -2305,7 +2309,9 @@ static int pr_process_pasn_ranging_wrapper(struct pr_data *pr,
wpa_printf(MSG_INFO,
"PR: EDCA capabilities not matching");
goto end;
- } else if (dev->discovery_type == PR_DISCOVERY_TYPE_OOB) {
+ }
+
+ if (dev->discovery_type == PR_DISCOVERY_TYPE_OOB) {
dev->edca_caps = edca;
}
--
2.55.0.679.g6767b8d81c-goog
More information about the Hostap
mailing list