aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-12-18 19:48:25 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-18 19:48:25 (GMT)
commit74781dfc7ba976b5ed4a1a29a3b07037ff934cc5 (patch)
tree3f86d26fb72297d3b3c1a3c4db774c352f9f27ab /src
parent300ab0556cea9dde9adb7928c4aa4ef5f29a90d3 (diff)
downloadhostap-74781dfc7ba976b5ed4a1a29a3b07037ff934cc5.zip
hostap-74781dfc7ba976b5ed4a1a29a3b07037ff934cc5.tar.gz
hostap-74781dfc7ba976b5ed4a1a29a3b07037ff934cc5.tar.bz2
Lower RX_MGMT driver event debug level for Beacon frames
This event can be very frequent in AP mode when Beacon frames from neighboring BSSes are delivered to user space. Drop the debug message priority from DEBUG to EXCESSIVE for Beacon frames. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/ap/drv_callbacks.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index ba107de..b7febdc 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -469,9 +469,23 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
union wpa_event_data *data)
{
struct hostapd_data *hapd = ctx;
+#ifndef CONFIG_NO_STDOUT_DEBUG
+ int level = MSG_DEBUG;
- wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Event %s (%d) received",
+ if (event == EVENT_RX_MGMT && data && data->rx_mgmt.frame &&
+ data->rx_mgmt.frame_len >= 24) {
+ const struct ieee80211_hdr *hdr;
+ u16 fc;
+ hdr = (const struct ieee80211_hdr *) data->rx_mgmt.frame;
+ fc = le_to_host16(hdr->frame_control);
+ if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT &&
+ WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_BEACON)
+ level = MSG_EXCESSIVE;
+ }
+
+ wpa_dbg(hapd->msg_ctx, level, "Event %s (%d) received",
event_to_string(event), event);
+#endif /* CONFIG_NO_STDOUT_DEBUG */
switch (event) {
case EVENT_MICHAEL_MIC_FAILURE: