[PATCH 53/71] nl80211: Support adding stations on NAN interface
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 1 15:02:02 PDT 2026
From: Ilan Peer <ilan.peer at intel.com>
When a station is set to authorized on a NAN Data interface
configure the station's HT/VHT capabilities to the kernel.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/drivers/driver_nl80211.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 6869ccd4da..257ad6b103 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6237,6 +6237,29 @@ static int wpa_driver_nl80211_sta_add(void *priv,
goto fail;
}
+ if (params->set && drv->nlmode == NL80211_IFTYPE_NAN &&
+ (params->flags & WPA_STA_AUTHORIZED)) {
+ if (params->ht_capabilities) {
+ wpa_hexdump(MSG_DEBUG, " * ht_capabilities",
+ (u8 *)params->ht_capabilities,
+ sizeof(*params->ht_capabilities));
+ if (nla_put(msg, NL80211_ATTR_HT_CAPABILITY,
+ sizeof(*params->ht_capabilities),
+ params->ht_capabilities))
+ goto fail;
+ }
+
+ if (params->vht_capabilities) {
+ wpa_hexdump(MSG_DEBUG, " * vht_capabilities",
+ (u8 *)params->vht_capabilities,
+ sizeof(*params->vht_capabilities));
+ if (nla_put(msg, NL80211_ATTR_VHT_CAPABILITY,
+ sizeof(*params->vht_capabilities),
+ params->vht_capabilities))
+ goto fail;
+ }
+ }
+
if (params->vht_opmode_enabled) {
wpa_printf(MSG_DEBUG, " * opmode=%u", params->vht_opmode);
if (nla_put_u8(msg, NL80211_ATTR_OPMODE_NOTIF,
--
2.53.0
More information about the Hostap
mailing list