aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-03 22:17:41 +0200
committerJouni Malinen <j@w1.fi>2011-11-03 22:17:41 +0200
commitae055af4f7436d0ea2b29d11d23d341eefb918cf (patch)
tree6b6a961889505347092c65312d5cf8698cd2453f /src/ap/ieee802_11.c
parent3ec1e9020f0cd4a0d4603f7cb6a4741f9384f2bb (diff)
downloadexternal_wpa_supplicant_8_ti-ae055af4f7436d0ea2b29d11d23d341eefb918cf.zip
external_wpa_supplicant_8_ti-ae055af4f7436d0ea2b29d11d23d341eefb918cf.tar.gz
external_wpa_supplicant_8_ti-ae055af4f7436d0ea2b29d11d23d341eefb918cf.tar.bz2
Move AP events for STA connected/disconnected into one function
Instead of trying to remember to add wpa_msg() calls for every possible path where a STA becomes authorized or unauthorized, use ap_sta_set_authorized() to send these events more consistently. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ieee802_11.c')
-rw-r--r--src/ap/ieee802_11.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 3471e7c..108261a 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1111,9 +1111,8 @@ static void handle_disassoc(struct hostapd_data *hapd,
return;
}
+ ap_sta_set_authorized(hapd, sta, 0);
sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
- wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR,
- MAC2STR(sta->addr));
wpa_auth_sm_event(sta->wpa_sm, WPA_DISASSOC);
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "disassociated");
@@ -1161,10 +1160,9 @@ static void handle_deauth(struct hostapd_data *hapd,
return;
}
+ ap_sta_set_authorized(hapd, sta, 0);
sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC |
WLAN_STA_ASSOC_REQ_OK);
- wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR,
- MAC2STR(sta->addr));
wpa_auth_sm_event(sta->wpa_sm, WPA_DEAUTH);
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG, "deauthenticated");
@@ -1519,8 +1517,6 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
* step.
*/
ap_sta_set_authorized(hapd, sta, 1);
- wpa_msg(hapd->msg_ctx, MSG_INFO,
- AP_STA_CONNECTED MACSTR, MAC2STR(sta->addr));
}
if (reassoc)