]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Update BSS table entry if roaming event indicates frequency change
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 16 May 2011 16:19:30 +0000 (19:19 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 16 May 2011 16:19:30 +0000 (19:19 +0300)
This is needed to make sure the frequency in the BSS table entry
remains up-to-date if the AP changes its operating frequency.

wpa_supplicant/events.c

index a3153aa573e2f7c3b95faa833c05f582d9b02e89..7a22d6d2111d0f1c10895d2bb209bff460dd68d1 100644 (file)
@@ -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;