From: Jouni Malinen Date: Mon, 16 May 2011 16:19:30 +0000 (+0300) Subject: Update BSS table entry if roaming event indicates frequency change X-Git-Tag: hostap-1-bp~392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=117e812d06e64dbdd2fd53cb9290d4604bec3ad3;p=thirdparty%2Fhostap.git Update BSS table entry if roaming event indicates frequency change This is needed to make sure the frequency in the BSS table entry remains up-to-date if the AP changes its operating frequency. --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index a3153aa57..7a22d6d21 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1185,6 +1185,14 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s, if (wpa_found || rsn_found) wpa_s->ap_ies_from_associnfo = 1; + if (wpa_s->assoc_freq && data->assoc_info.freq && + wpa_s->assoc_freq != data->assoc_info.freq) { + wpa_printf(MSG_DEBUG, "Operating frequency changed from " + "%u to %u MHz", + wpa_s->assoc_freq, data->assoc_info.freq); + wpa_supplicant_update_scan_results(wpa_s); + } + wpa_s->assoc_freq = data->assoc_info.freq; return 0;