[PATCH 63/97] nl80211: Add an option for deferred NAN schedule update

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Apr 28 13:06:04 PDT 2026


From: Avraham Stern <avraham.stern at intel.com>

Add an option to mark a NAN schedule as "deferred". This means that
the driver doesn't have to apply the new schedule right away. This
gives the driver the option to do some needed operations (e.g. notify
peers about the new schedule) before applying the new schedule.
The driver will send a notification once the new schedule is applied.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 src/drivers/driver.h         | 3 +++
 src/drivers/driver_nl80211.c | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 69d354c17f..202e0fe2b6 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3387,12 +3387,15 @@ struct nan_cluster_config {
 /**
  * struct nan_schedule_config - NAN schedule configuration
  *
+ * @deferred: True if the driver should announce the schedule update to peers
+ *	before applying it
  * @num_channels: Number of channels in the schedule
  * @channels: Channel specific schedule information
  * @avail_attr: NAN Availability attribute as defined in Wi-Fi Aware spec v4.0,
  *	Table 93
  */
 struct nan_schedule_config {
+	bool deferred;
 	u8 num_channels;
 
 	/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 12bb46a230..82557fcfac 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -15811,6 +15811,13 @@ wpa_driver_nl80211_nan_config_schedule(void *priv, u8 map_id,
 		return -ENOMEM;
 	}
 
+	if (sched->deferred &&
+	    nla_put_flag(msg, NL80211_ATTR_NAN_SCHED_DEFERRED)) {
+		wpa_printf(MSG_ERROR,
+			   "nl80211: NAN: Failed to put deferred attribute");
+		goto fail;
+	}
+
 	ret = wpa_driver_nl80211_nan_set_schedule(drv, sched, msg);
 	if (ret)
 		goto fail;
-- 
2.53.0




More information about the Hostap mailing list