[RFC v2 86/99] nl80211: don't fill empty supported rates in sta_add for NAN
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Dec 23 03:52:30 PST 2025
From: Daniel Gabay <daniel.gabay at intel.com>
NAN interfaces should not fill empty supported rates.
Signed-off-by: Daniel Gabay <daniel.gabay at intel.com>
---
src/drivers/driver_nl80211.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 9ca1be105f..d03bc6cfb2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6053,9 +6053,16 @@ static int wpa_driver_nl80211_sta_add(void *priv,
params->supp_rates, params->supp_rates_len);
wpa_printf(MSG_DEBUG, " * capability=0x%x",
params->capability);
- if (nla_put(msg, NL80211_ATTR_STA_SUPPORTED_RATES,
- params->supp_rates_len, params->supp_rates) ||
- nla_put_u16(msg, NL80211_ATTR_STA_CAPABILITY,
+
+ if (params->supp_rates_len > 0 ||
+ (drv->nlmode != NL80211_IFTYPE_NAN &&
+ drv->nlmode != NL80211_IFTYPE_NAN_DATA)) {
+ if (nla_put(msg, NL80211_ATTR_STA_SUPPORTED_RATES,
+ params->supp_rates_len, params->supp_rates))
+ goto fail;
+ }
+
+ if (nla_put_u16(msg, NL80211_ATTR_STA_CAPABILITY,
params->capability))
goto fail;
--
2.49.0
More information about the Hostap
mailing list