aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-08-11 14:54:43 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-11 14:54:43 (GMT)
commite485286c67b2110862884e40bb93260e34b37721 (patch)
tree1e66aba2c0cc3c07dcada56954f167862ef44ff2 /wpa_supplicant/events.c
parent0a0c38f63d825b352deb819b32a0fb1203eb936c (diff)
downloadhostap-e485286c67b2110862884e40bb93260e34b37721.zip
hostap-e485286c67b2110862884e40bb93260e34b37721.tar.gz
hostap-e485286c67b2110862884e40bb93260e34b37721.tar.bz2
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>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 8f40150..5b70670 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -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);