[PATCH 13/15] NAN: Report the correct map_id on channel evacuation
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Thu Oct 8 09:05:22 PDT 2026
The map_id reported in the NAN-CHAN-EVACUATION event was taken straight
from the schedule array index, while map_id is 1-based everywhere else
in the control interface. A map configured as map_id=1 was reported as
map_id=0, so the event couldn't be matched to a schedule.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
wpa_supplicant/nan_supplicant.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c
index 4f7dd3e322..bd964697eb 100644
--- a/wpa_supplicant/nan_supplicant.c
+++ b/wpa_supplicant/nan_supplicant.c
@@ -4240,7 +4240,7 @@ void wpas_nan_ulw_update(struct wpa_supplicant *wpa_s,
void wpas_nan_chan_evacuation(struct wpa_supplicant *wpa_s,
const struct nan_chan_evacuation_info *info)
{
- size_t map_id, i;
+ size_t i, j;
int freq = info->freq;
if (!wpas_nan_ready(wpa_s))
@@ -4249,15 +4249,14 @@ void wpas_nan_chan_evacuation(struct wpa_supplicant *wpa_s,
wpa_printf(MSG_DEBUG, "NAN: Channel evacuation notification freq=%d",
freq);
- for (map_id = 0; map_id < MAX_NAN_RADIOS; map_id++) {
- struct nan_schedule_config *sched =
- &wpa_s->nan_sched[map_id];
+ for (i = 0; i < MAX_NAN_RADIOS; i++) {
+ struct nan_schedule_config *sched = &wpa_s->nan_sched[i];
- for (i = 0; i < sched->num_channels; i++) {
- if (sched->channels[i].freq != freq)
+ for (j = 0; j < sched->num_channels; j++) {
+ if (sched->channels[j].freq != freq)
continue;
- wpas_notify_nan_chan_evacuation(wpa_s, map_id, freq);
+ wpas_notify_nan_chan_evacuation(wpa_s, i + 1, freq);
break;
}
}
--
2.53.0
More information about the Hostap
mailing list