[PATCH 01/16] nl80211: Fix inverted conditions in FTM capability parsing
Peddolla Harshavardhan Reddy
peddolla.reddy at oss.qualcomm.com
Sun Jul 12 23:29:49 PDT 2026
The conditions used to parse ranging type and RSTA attributes are
invalid, causing proximity ranging capability population to fail.
Correct the conditions so the capability fields are populated on a
successful parse.
Fixes: b46527ef7beb ("nl80211: Parse Peer Measurement (PMSR) capabilities")
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>
---
src/drivers/driver_nl80211_capa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 72816f225..6a8a51071 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1203,7 +1203,7 @@ static void pmsr_type_ftm_handler(struct wpa_driver_nl80211_data *drv,
if (tb[NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS] &&
!nla_parse_nested(type_caps, NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX,
tb[NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS],
- NULL) == 0) {
+ NULL)) {
drv->capa.ranging_type.infra_support =
!!type_caps[NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT];
drv->capa.ranging_type.pd_support =
@@ -1246,7 +1246,7 @@ static void pmsr_type_ftm_handler(struct wpa_driver_nl80211_data *drv,
tb[NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS] &&
!nla_parse_nested(rsta_caps, NL80211_PMSR_FTM_CAPA_ATTR_MAX,
tb[NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS],
- NULL) == 0) {
+ NULL)) {
drv->capa.rsta.support_ntb =
!!rsta_caps[NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB];
drv->capa.rsta.support_tb =
--
2.34.1
More information about the Hostap
mailing list