[PATCH 68/97] wpa_supplicant: Implement NAN schedule changed callback
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Apr 28 13:06:09 PDT 2026
From: Avraham Stern <avraham.stern at intel.com>
Notify the control interface when a peer schedule is changed.
Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
src/common/wpa_ctrl.h | 1 +
wpa_supplicant/nan_supplicant.c | 9 +++++++++
wpa_supplicant/notify.c | 9 +++++++++
wpa_supplicant/notify.h | 2 ++
4 files changed, 21 insertions(+)
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index 5e4db4a372..65e81b5451 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -256,6 +256,7 @@ extern "C" {
#define NAN_BOOTSTRAP_FAILURE "NAN-BOOTSTRAP-FAILURE "
#define NAN_NIK_RECEIVED "NAN-NIK-RECEIVED "
#define NAN_PAIRING_REQUEST "NAN-PAIRING-REQUEST "
+#define NAN_PEER_SCHEDULE_CHANGED "NAN-PEER-SCHEDULE-CHANGED "
/* NAN Pairing status
* addr=<peer address> akmp=<SAE|PASN> cipher=<CCMP|GCMP-256>
diff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c
index 1640441c38..f54304345b 100644
--- a/wpa_supplicant/nan_supplicant.c
+++ b/wpa_supplicant/nan_supplicant.c
@@ -978,6 +978,14 @@ static void wpas_nan_bootstrap_completed_cb(void *ctx, const u8 *peer_nmi,
}
+static void wpas_nan_schedule_changed_cb(void *ctx, const u8 *peer_nmi)
+{
+ struct wpa_supplicant *wpa_s = ctx;
+
+ wpas_notify_nan_schedule_changed(wpa_s, peer_nmi);
+}
+
+
static int wpas_nan_transmit_followup_cb(void *ctx, const u8 *peer_nmi,
const struct wpabuf *attrs, int handle,
u8 req_instance_id)
@@ -1313,6 +1321,7 @@ int wpas_nan_init(struct wpa_supplicant *wpa_s)
nan.set_peer_schedule = wpas_nan_set_peer_schedule_cb;
nan.set_group_key = wpas_nan_set_group_key_cb;
nan.get_seqnum = wpas_nan_get_seqnum_cb;
+ nan.schedule_changed = wpas_nan_schedule_changed_cb;
wpa_printf(MSG_DEBUG, "NAN: Bootstrap support enabled");
nan.bootstrap_request = wpas_nan_bootstrap_request_cb;
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index ec2c68ea11..8d91eed132 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -1472,6 +1472,15 @@ void wpas_notify_nan_cluster_join(struct wpa_supplicant *wpa_s,
}
+void wpas_notify_nan_schedule_changed(struct wpa_supplicant *wpa_s,
+ const u8 *peer_nmi)
+{
+ wpa_msg_global(wpa_s, MSG_INFO,
+ NAN_PEER_SCHEDULE_CHANGED "peer_nmi=" MACSTR,
+ MAC2STR(peer_nmi));
+}
+
+
void wpas_notify_nan_pairing_status(struct wpa_supplicant *wpa_s,
const u8 *peer_addr, int akmp,
int cipher, u16 status,
diff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h
index f6d3654e17..4748a57db8 100644
--- a/wpa_supplicant/notify.h
+++ b/wpa_supplicant/notify.h
@@ -248,6 +248,8 @@ void wpas_notify_nan_ndp_disconnected(struct wpa_supplicant *wpa_s,
bool failure);
void wpas_notify_nan_cluster_join(struct wpa_supplicant *wpa_s,
const u8 *cluster_id, bool new_cluster);
+void wpas_notify_nan_schedule_changed(struct wpa_supplicant *wpa_s,
+ const u8 *peer_nmi);
void wpas_notify_nan_pairing_status(struct wpa_supplicant *wpa_s,
const u8 *peer_addr, int akmp, int cipher,
u16 status, const u8 *nd_pmk);
--
2.53.0
More information about the Hostap
mailing list