Remove unnecessary bssid_changed check

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>
This commit is contained in:
Jouni Malinen 2012-08-11 17:54:43 +03:00
parent 0a0c38f63d
commit e485286c67

View 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);