svn commit: r329241 - head/sys/dev/bwn
Landon J. Fuller
landonf at FreeBSD.org
Tue Feb 13 20:07:41 UTC 2018
Author: landonf
Date: Tue Feb 13 20:07:40 2018
New Revision: 329241
URL: https://svnweb.freebsd.org/changeset/base/329241
Log:
bwn(4): Conditionalize "RX decryption attempted" message on a new
BWN_DEBUG_HWCRYPTO debug flag.
The MAC will attempt decryption (and set BWN_RX_MAC_DEC) even if a key has
not been supplied to the hardware; this is expected behavior, and there's
no need to spam users' console with this debugging printf.
Modified:
head/sys/dev/bwn/if_bwn.c
head/sys/dev/bwn/if_bwn_debug.h
Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c Tue Feb 13 19:28:02 2018 (r329240)
+++ head/sys/dev/bwn/if_bwn.c Tue Feb 13 20:07:40 2018 (r329241)
@@ -5983,7 +5983,6 @@ bwn_rxeof(struct bwn_mac *mac, struct mbuf *m, const v
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;
BWN_ASSERT_LOCKED(sc);
@@ -6032,11 +6031,12 @@ bwn_rxeof(struct bwn_mac *mac, struct mbuf *m, const v
}
wh = mtod(m, struct ieee80211_frame_min *);
- if (macstat & BWN_RX_MAC_DEC && rx_mac_dec_rpt++ < 50)
- device_printf(sc->sc_dev,
+ if (macstat & BWN_RX_MAC_DEC) {
+ DPRINTF(sc, BWN_DEBUG_HWCRYPTO,
"RX decryption attempted (old %d keyidx %#x)\n",
BWN_ISOLDFMT(mac),
(macstat & BWN_RX_MAC_KEYIDX) >> BWN_RX_MAC_KEYIDX_SHIFT);
+ }
if (phystat0 & BWN_RX_PHYST0_OFDM)
rate = bwn_plcp_get_ofdmrate(mac, plcp,
Modified: head/sys/dev/bwn/if_bwn_debug.h
==============================================================================
--- head/sys/dev/bwn/if_bwn_debug.h Tue Feb 13 19:28:02 2018 (r329240)
+++ head/sys/dev/bwn/if_bwn_debug.h Tue Feb 13 20:07:40 2018 (r329241)
@@ -53,6 +53,7 @@ enum {
BWN_DEBUG_XMIT_POWER = 0x00020000,
BWN_DEBUG_PHY = 0x00040000,
BWN_DEBUG_EEPROM = 0x00080000,
+ BWN_DEBUG_HWCRYPTO = 0x00100000, /* HW crypto */
BWN_DEBUG_FATAL = 0x80000000, /* fatal errors */
BWN_DEBUG_ANY = 0xffffffff
};
More information about the svn-src-head
mailing list