[PATCH 16/35] nl80211: Configure 'enable dw notification' NAN flag
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Mon Oct 20 05:27:51 PDT 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 7848aeabbf..350aad75cd 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3209,6 +3209,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 85898cf019..1391bfa62d 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -15195,6 +15195,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;
@@ -15230,6 +15231,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