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.
This commit is contained in:
Landon J. Fuller 2018-02-13 20:07:40 +00:00
parent 6026dcd7ca
commit 0f18e6f6d6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329241
2 changed files with 4 additions and 3 deletions

View File

@ -5983,7 +5983,6 @@ bwn_rxeof(struct bwn_mac *mac, struct mbuf *m, const void *_rxhdr)
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 void *_rxhdr)
}
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,

View File

@ -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
};