Hi All,
The original if_bwn driver floods my console with error messages like "unsupported rate 0", "decryption attempted", rxeof, etc. I have made a few changes to the original code, commenting out various device_printf sections in the /usr/src/sys/dev/bwn/if_bwn.c (please see patch below). I wonder if anybody could check if this is an OK action against the console flood, and whether the driver supplied in the FreeBSD by default indeed needs to report all that stuff into the console. The patched driver seems to work fine, and my dmesg finally makes sense now.
The original if_bwn driver floods my console with error messages like "unsupported rate 0", "decryption attempted", rxeof, etc. I have made a few changes to the original code, commenting out various device_printf sections in the /usr/src/sys/dev/bwn/if_bwn.c (please see patch below). I wonder if anybody could check if this is an OK action against the console flood, and whether the driver supplied in the FreeBSD by default indeed needs to report all that stuff into the console. The patched driver seems to work fine, and my dmesg finally makes sense now.
Code:
--- if_bwn.c.orig 2012-12-30 21:37:49.000000000 +0100
+++ if_bwn.c 2013-01-05 14:29:30.000000000 +0100
@@ -9306,8 +9306,8 @@
int padding, rate, rssi = 0, noise = 0, type;
uint16_t phytype, phystat0, phystat3, chanstat;
unsigned char *mp = mtod(m, unsigned char *);
- static int rx_mac_dec_rpt = 0;
-
+/* static int rx_mac_dec_rpt = 0;
+*/
BWN_ASSERT_LOCKED(sc);
phystat0 = le16toh(rxhdr->phy_status0);
@@ -9325,25 +9325,25 @@
padding = (macstat & BWN_RX_MAC_PADDING) ? 2 : 0;
if (m->m_pkthdr.len < (sizeof(struct bwn_plcp6) + padding)) {
- device_printf(sc->sc_dev, "frame too short (length=%d)\n",
- m->m_pkthdr.len);
+ /* device_printf(sc->sc_dev, "frame too short (length=%d)\n",
+ m->m_pkthdr.len); */
goto drop;
}
plcp = (struct bwn_plcp6 *)(mp + padding);
m_adj(m, sizeof(struct bwn_plcp6) + padding);
if (m->m_pkthdr.len < IEEE80211_MIN_LEN) {
- device_printf(sc->sc_dev, "frame too short (length=%d)\n",
- m->m_pkthdr.len);
+ /* device_printf(sc->sc_dev, "frame too short (length=%d)\n",
+ m->m_pkthdr.len); */
goto drop;
}
wh = mtod(m, struct ieee80211_frame_min *);
- if (macstat & BWN_RX_MAC_DEC && rx_mac_dec_rpt++ < 50)
+/* if (macstat & BWN_RX_MAC_DEC && rx_mac_dec_rpt++ < 50)
device_printf(sc->sc_dev,
- "RX decryption attempted (old %d keyidx %#x)\n",
+ "RX decryption attempted (old %d keyidx %#x)\n",
BWN_ISOLDFMT(mac),
(macstat & BWN_RX_MAC_KEYIDX) >> BWN_RX_MAC_KEYIDX_SHIFT);
-
+*/
/* XXX calculating RSSI & noise & antenna */
if (phystat0 & BWN_RX_PHYST0_OFDM)
@@ -9379,7 +9379,10 @@
BWN_LOCK(sc);
return;
drop:
- device_printf(sc->sc_dev, "%s: dropped\n", __func__);
+;
+/* device_printf(sc->sc_dev, "%s: dropped\n", __func__);
+*/
+
}
static void
@@ -9587,6 +9590,8 @@
return (BWN_CCK_RATE_5MB);
case 22:
return (BWN_CCK_RATE_11MB);
+ case 0:
+ return (BWN_CCK_RATE_1MB);
}
device_printf(sc->sc_dev, "unsupported rate %d\n", rate);