[PATCH 58/97] NAN: Support getting peer max idle period
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Apr 28 13:05:59 PDT 2026
From: Ilan Peer <ilan.peer at intel.com>
Extend the "PEER_INFO schedule" comment to also include the
peer NDL max idle period.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/nan/nan.c | 3 +++
src/nan/nan.h | 3 +++
src/nan/nan_util.c | 7 +++++++
3 files changed, 13 insertions(+)
diff --git a/src/nan/nan.c b/src/nan/nan.c
index 1e2f625405..53b82492f7 100644
--- a/src/nan/nan.c
+++ b/src/nan/nan.c
@@ -2745,6 +2745,9 @@ int nan_peer_get_schedule_info(struct nan_data *nan, const u8 *addr,
nan_peer_get_ndc_sched(nan, peer, sched);
nan_peer_get_immut_sched(nan, peer, sched);
+ if (peer->ndl)
+ sched->max_idle_period = peer->ndl->max_idle_period;
+
return 0;
}
diff --git a/src/nan/nan.h b/src/nan/nan.h
index aaa77259ee..6e01fb4938 100644
--- a/src/nan/nan.h
+++ b/src/nan/nan.h
@@ -375,6 +375,7 @@ struct nan_ndp_action_notif_params {
* @tbm: Time bitmap for the channel
* @ndc: NDC time bitmap for the map
* @immutable: Immutable time bitmap for the map
+ * @max_idle_period: Maximal NDL idle period in seconds that the peer indicated
*/
struct nan_peer_schedule {
u8 n_maps;
@@ -391,6 +392,8 @@ struct nan_peer_schedule {
struct nan_time_bitmap ndc;
struct nan_time_bitmap immutable;
} maps[NAN_MAX_MAPS];
+
+ u16 max_idle_period;
};
/**
diff --git a/src/nan/nan_util.c b/src/nan/nan_util.c
index c8604dc5ad..d55baebe81 100644
--- a/src/nan/nan_util.c
+++ b/src/nan/nan_util.c
@@ -1685,6 +1685,13 @@ int nan_peer_dump_sched_to_buf(struct nan_peer_schedule *sched,
pos += ret;
}
+ ret = wpa_scnprintf(pos, end - pos, "max_idle_period=%u",
+ sched->max_idle_period);
+
+ if (os_snprintf_error(end - pos, ret))
+ goto err;
+
+ pos += ret;
return pos - buf;
err:
--
2.53.0
More information about the Hostap
mailing list