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.
This commit is contained in:
Jouni Malinen 2011-05-16 19:19:30 +03:00 committed by Jouni Malinen
parent 46957a9b2d
commit 117e812d06

View file

@ -1185,6 +1185,14 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
if (wpa_found || rsn_found) if (wpa_found || rsn_found)
wpa_s->ap_ies_from_associnfo = 1; 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; wpa_s->assoc_freq = data->assoc_info.freq;
return 0; return 0;