[PATCH 51/71] nl80211: Extend add/set station command to support NDI
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 1 15:02:00 PDT 2026
From: Ilan Peer <ilan.peer at intel.com>
When a NAN Data Interface (NDI) station is configured it should
be associated with the NAN Management Interface station to which
it belongs. Thus, when configuring an NDI station to the kernel
also set the corresponding NMI station address.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/drivers/driver_nl80211.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 96598538a2..58f6e9632f 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6354,6 +6354,28 @@ static int wpa_driver_nl80211_sta_add(void *priv,
}
#endif /* CONFIG_ENC_ASSOC */
+#ifdef CONFIG_NAN
+ /*
+ * Set the address of the NMI station to which the NDI station
+ * belongs
+ */
+ if (drv->nlmode == NL80211_IFTYPE_NAN_DATA) {
+ if (!params->nmi_addr) {
+ wpa_printf(MSG_DEBUG,
+ "nl80211: NMI address not provided for NDI station");
+ ret = -EINVAL;
+ goto fail;
+ }
+
+ wpa_printf(MSG_DEBUG, " * nmi_addr=" MACSTR,
+ MAC2STR(params->nmi_addr));
+
+ if (nla_put(msg, NL80211_ATTR_NAN_NMI_MAC, ETH_ALEN,
+ params->nmi_addr))
+ goto fail;
+ }
+#endif /* CONFIG_NAN */
+
ret = send_and_recv_cmd(drv, msg);
msg = NULL;
if (ret)
--
2.53.0
More information about the Hostap
mailing list