From 8a755100a64f182efeb2e8dd367a16401f0b43b0 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 12 Jul 2007 02:53:29 -0400 Subject: [PATCH] Don't print misleading messages about unexpected frames "mgmt, but not beacon" is wrong, as we handle more than just beacons. Print full framectl, and tell the user it's framectl, not a "frame from mars". Use KERN_DEBUG for both messages, as there are many weird frames on the air, and we don't want to pollute the console unnecessarily. Signed-off-by: Pavel Roskin --- at76_usb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/at76_usb.c b/at76_usb.c index e49d0db..05d3b85 100644 --- a/at76_usb.c +++ b/at76_usb.c @@ -5202,7 +5202,7 @@ static void at76_rx_mgmt(struct at76_priv *priv, struct at76_rx_buffer *buf) { struct ieee80211_hdr_3addr *mgmt = (struct ieee80211_hdr_3addr *)buf->packet; - u16 subtype = le16_to_cpu(mgmt->frame_ctl) & IEEE80211_FCTL_STYPE; + u16 framectl = le16_to_cpu(mgmt->frame_ctl); /* update wstats */ if (priv->istate != INIT && priv->istate != SCANNING) { @@ -5219,11 +5219,11 @@ static void at76_rx_mgmt(struct at76_priv *priv, struct at76_rx_buffer *buf) } } - at76_dbg(DBG_RX_MGMT_CONTENT, "%s rx mgmt subtype 0x%x %s", - priv->netdev->name, subtype, + at76_dbg(DBG_RX_MGMT_CONTENT, "%s rx mgmt framectl 0x%x %s", + priv->netdev->name, framectl, hex2str(mgmt, le16_to_cpu(buf->wlength))); - switch (subtype) { + switch (framectl & IEEE80211_FCTL_STYPE) { case IEEE80211_STYPE_BEACON: case IEEE80211_STYPE_PROBE_RESP: at76_rx_mgmt_beacon(priv, buf); @@ -5250,8 +5250,8 @@ static void at76_rx_mgmt(struct at76_priv *priv, struct at76_rx_buffer *buf) break; default: - printk(KERN_INFO "%s: mgmt, but not beacon, subtype = %x\n", - priv->netdev->name, subtype); + printk(KERN_DEBUG "%s: ignoring frame with framectl 0x%04x\n", + priv->netdev->name, framectl); } return; @@ -5780,7 +5780,7 @@ static void at76_rx_tasklet(unsigned long param) break; default: - printk(KERN_INFO "%s: it's a frame from mars: %2x\n", + printk(KERN_DEBUG "%s: ignoring frame with framectl 0x%04x\n", priv->netdev->name, frame_ctl); } finish: -- cgit v1.2.3