From 6ca4949ae146e84c60563017eb6bfa3c5ac6456c Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Mon, 20 Aug 2018 14:20:44 +0200 Subject: [PATCH] RRM: Update own neighbor report on channel switch After performing a successful channel switch, the AP should update its own neighbor report element, so do this from src/ap/drv_callbacks.c after a successful switch. Signed-off-by: Markus Theil --- src/ap/drv_callbacks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index fa81da9f8..d49ad4c41 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -38,6 +38,7 @@ #include "mbo_ap.h" #include "dpp_hostapd.h" #include "fils_hlp.h" +#include "neighbor_db.h" #ifdef CONFIG_FILS @@ -744,6 +745,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht, #ifdef NEED_AP_MLME int channel, chwidth, is_dfs; u8 seg0_idx = 0, seg1_idx = 0; + size_t i; hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_INFO, @@ -826,6 +828,9 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht, wpa_msg(hapd->msg_ctx, MSG_INFO, AP_CSA_FINISHED "freq=%d dfs=%d", freq, is_dfs); } + + for (i = 0; i < hapd->iface->num_bss; i++) + hostapd_neighbor_set_own_report(hapd->iface->bss[i]); #endif /* NEED_AP_MLME */ }