[RFC v2 59/99] wpa_supplicant: Support NAN_DATA interface
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Dec 23 03:52:03 PST 2025
Support creation of NAN data interface (NDI). NDI is a net device
interface that will be used for NAN data path establishment.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/drivers/driver.h | 5 +++++
src/drivers/driver_nl80211.c | 4 ++++
wpa_supplicant/ctrl_iface.c | 6 ++++++
wpa_supplicant/wpa_supplicant.c | 1 +
wpa_supplicant/wpa_supplicant_i.h | 6 ++++++
5 files changed, 22 insertions(+)
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index d37df6aeae..83b8f0727a 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2158,6 +2158,11 @@ enum wpa_driver_if_type {
*/
WPA_IF_NAN,
+ /*
+ * WPA_IF_NAN_DATA - NAN Data interface
+ */
+ WPA_IF_NAN_DATA,
+
/* keep last */
WPA_IF_MAX
};
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 3ecd127bf8..ef8c96cd72 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6469,6 +6469,8 @@ const char * nl80211_iftype_str(enum nl80211_iftype mode)
return "OCB";
case NL80211_IFTYPE_NAN:
return "NAN DEVICE";
+ case NL80211_IFTYPE_NAN_DATA:
+ return "NAN_DATA";
default:
return "unknown";
}
@@ -9243,6 +9245,8 @@ static enum nl80211_iftype wpa_driver_nl80211_if_type(
return NL80211_IFTYPE_MESH_POINT;
case WPA_IF_NAN:
return NL80211_IFTYPE_NAN;
+ case WPA_IF_NAN_DATA:
+ return NL80211_IFTYPE_NAN_DATA;
default:
return -1;
}
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 96c9716dca..1a1158f75d 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -4285,6 +4285,9 @@ static int iftype_str_to_index(const char *iftype_str)
if (os_strcmp(iftype_str, "NAN") == 0)
return WPA_IF_NAN;
+ if (os_strcmp(iftype_str, "NAN_DATA") == 0)
+ return WPA_IF_NAN_DATA;
+
return WPA_IF_MAX;
}
@@ -14455,6 +14458,9 @@ static int wpa_supplicant_global_iface_add(struct wpa_global *global,
} else if (os_strcmp(pos, "nan") == 0) {
type = WPA_IF_NAN;
iface.nan_mgmt = 1;
+ } else if (os_strcmp(pos, "nan_data") == 0) {
+ type = WPA_IF_NAN_DATA;
+ iface.nan_data = true;
} else {
wpa_printf(MSG_DEBUG,
"INTERFACE_ADD unsupported interface type: '%s'",
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 73c5730c3a..7d07ebd649 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -7923,6 +7923,7 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
wpa_s->p2p_mgmt = iface->p2p_mgmt;
wpa_s->nan_mgmt = iface->nan_mgmt;
+ wpa_s->nan_data = iface->nan_data;
if (wpa_s->num_multichan_concurrent == 0)
wpa_s->num_multichan_concurrent = 1;
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index b5b29edf31..f28860a2b2 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -140,6 +140,11 @@ struct wpa_interface {
* nan_mgmt - Interface used for NAN management (NAN Device operations)
*/
bool nan_mgmt;
+
+ /**
+ * nan_data - Interface used for NAN data path operations
+ */
+ bool nan_data;
};
/**
@@ -1662,6 +1667,7 @@ struct wpa_supplicant {
bool scs_reconfigure;
bool nan_mgmt;
+ bool nan_data;
#ifdef CONFIG_NAN
#define MAX_NAN_RADIOS 2
--
2.49.0
More information about the Hostap
mailing list