[PATCH 09/71] wpa_supplicant: Support NAN_DATA interface
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 1 15:01:18 PDT 2026
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 6e1724af50..7c7316ede2 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2159,6 +2159,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 bcb4148d6b..4d0f7d90a0 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6522,6 +6522,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";
}
@@ -9296,6 +9298,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 aa42514509..b713250df8 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;
}
@@ -14506,6 +14509,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 = true;
+ } 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 69db55dd25..02a34615f2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -7946,6 +7946,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->drv_flags2 & WPA_DRIVER_FLAGS2_P2P_ASSISTED_DFS) &&
wpa_s->conf->p2p_assisted_dfs_chan_enable)
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 7737e9d4c8..83243fa35d 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;
};
/**
@@ -1720,6 +1725,7 @@ struct wpa_supplicant {
* we are already associated with. */
bool nan_mgmt;
+ bool nan_data;
#ifdef CONFIG_NAN
#define MAX_NAN_RADIOS 2
--
2.53.0
More information about the Hostap
mailing list