]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unnecessary bssid_changed check
authorJouni Malinen <j@w1.fi>
Sat, 11 Aug 2012 14:54:43 +0000 (17:54 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 11 Aug 2012 14:54:43 +0000 (17:54 +0300)
The os_memcmp of bssid and wpa_s->bssid cannot return 0 in this
code path since identical os_memcmp was already done above.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/events.c

index 8f401504cf6645abc310876af571f2d70507a6c1..5b706705ee18313d615ce5671a0f4cde76a6ecc4 100644 (file)
@@ -1506,7 +1506,6 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
 {
        u8 bssid[ETH_ALEN];
        int ft_completed;
-       int bssid_changed;
        struct wpa_driver_capa capa;
 
 #ifdef CONFIG_AP
@@ -1536,11 +1535,9 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
                wpa_dbg(wpa_s, MSG_DEBUG, "Associated to a new BSS: BSSID="
                        MACSTR, MAC2STR(bssid));
                random_add_randomness(bssid, ETH_ALEN);
-               bssid_changed = os_memcmp(wpa_s->bssid, bssid, ETH_ALEN);
                os_memcpy(wpa_s->bssid, bssid, ETH_ALEN);
                os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
-               if (bssid_changed)
-                       wpas_notify_bssid_changed(wpa_s);
+               wpas_notify_bssid_changed(wpa_s);
 
                if (wpa_supplicant_dynamic_keys(wpa_s) && !ft_completed) {
                        wpa_clear_keys(wpa_s, bssid);