[PATCH v2 16/35] nl80211: Configure 'enable dw notification' NAN flag
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Dec 23 03:46:05 PST 2025
Add enable_dw_notif flag to NAN cluster configuration parameters.
This flag is needed to toggle DW notifications generated by kernel in
case user space DE implementation is used.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/drivers/driver.h | 1 +
src/drivers/driver_nl80211.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 2069ba3e1a..c2a5ea648a 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3212,6 +3212,7 @@ struct driver_sta_mlo_info {
struct nan_cluster_config {
u8 master_pref;
u8 dual_band;
+ bool enable_dw_notif;
};
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0ce5d7ffa6..b56bbbd77c 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -15201,6 +15201,7 @@ static int wpa_driver_nl80211_nan_start(void *priv,
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
+ struct nlattr *conf;
u32 bands = 0;
int ret;
@@ -15236,6 +15237,25 @@ static int wpa_driver_nl80211_nan_start(void *priv,
goto fail;
}
+ conf = nla_nest_start(msg, NL80211_ATTR_NAN_CONFIG);
+ if (!conf)
+ goto fail;
+
+ if (params->enable_dw_notif) {
+ if (!(drv->capa.nan_flags &
+ WPA_DRIVER_FLAGS_NAN_SUPPORT_USERSPACE_DE)) {
+ wpa_printf(MSG_DEBUG,
+ "nl80211: Driver doesn't support NAN DW notifications");
+ goto fail;
+ }
+
+ if (nla_put_flag(msg, NL80211_NAN_CONF_NOTIFY_DW))
+ goto fail;
+ }
+
+ /* TODO: Set more attributes */
+ nla_nest_end(msg, conf);
+
ret = send_and_recv_resp(drv, msg, NULL, NULL);
if (!ret)
drv->nan_started = 1;
--
2.49.0
More information about the Hostap
mailing list