aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/sta_info.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2011-02-24 15:44:45 (GMT)
committerJouni Malinen <j@w1.fi>2011-02-24 15:44:45 (GMT)
commit24d75245bdade189ac20ee276403ac4572e62cd9 (patch)
treebf9fc936cf473ed5e3cee0fa69925dc88a8add5e /src/ap/sta_info.c
parent1aae01fc0450f5f6cd0119bb0c319e3fc990101e (diff)
downloadhostap-24d75245bdade189ac20ee276403ac4572e62cd9.zip
hostap-24d75245bdade189ac20ee276403ac4572e62cd9.tar.gz
hostap-24d75245bdade189ac20ee276403ac4572e62cd9.tar.bz2
AP: Update logging related to inactivity and disassociation
Add MAC addresses for stations and use wpa_msg instead of printf methods to make it easier to grep logs and find messages for the station in question. Signed-off-by: Ben Greear <greearb@candelatech.com>
Diffstat (limited to 'src/ap/sta_info.c')
-rw-r--r--src/ap/sta_info.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 3818d06..e829447 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -273,27 +273,33 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
(sta->timeout_next == STA_NULLFUNC ||
sta->timeout_next == STA_DISASSOC)) {
int inactive_sec;
- wpa_printf(MSG_DEBUG, "Checking STA " MACSTR " inactivity:",
- MAC2STR(sta->addr));
inactive_sec = hostapd_drv_get_inact_sec(hapd, sta->addr);
if (inactive_sec == -1) {
- wpa_printf(MSG_DEBUG, "Could not get station info "
- "from kernel driver for " MACSTR ".",
- MAC2STR(sta->addr));
+ wpa_msg(hapd, MSG_DEBUG, "Check inactivity: Could not "
+ "get station info rom kernel driver for "
+ MACSTR, MAC2STR(sta->addr));
} else if (inactive_sec < hapd->conf->ap_max_inactivity &&
sta->flags & WLAN_STA_ASSOC) {
/* station activity detected; reset timeout state */
- wpa_printf(MSG_DEBUG, " Station has been active");
+ wpa_msg(hapd, MSG_DEBUG, "Station " MACSTR " has been "
+ "active %is ago",
+ MAC2STR(sta->addr), inactive_sec);
sta->timeout_next = STA_NULLFUNC;
next_time = hapd->conf->ap_max_inactivity -
inactive_sec;
+ } else {
+ wpa_msg(hapd, MSG_DEBUG, "Station " MACSTR " has been "
+ "inactive too long: %d sec, max allowed: %d",
+ MAC2STR(sta->addr), inactive_sec,
+ hapd->conf->ap_max_inactivity);
}
}
if ((sta->flags & WLAN_STA_ASSOC) &&
sta->timeout_next == STA_DISASSOC &&
!(sta->flags & WLAN_STA_PENDING_POLL)) {
- wpa_printf(MSG_DEBUG, " Station has ACKed data poll");
+ wpa_msg(hapd, MSG_DEBUG, "Station " MACSTR " has ACKed data "
+ "poll", MAC2STR(sta->addr));
/* data nullfunc frame poll did not produce TX errors; assume
* station ACKed it */
sta->timeout_next = STA_NULLFUNC;