diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-11-06 06:02:31 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-12-04 08:43:32 -0500 |
commit | 996bf99c71944590e4f56504d5ec99ddd0d85e9c (patch) | |
tree | f3005d5342de2b3dafdf8adf114a2bbdcaa9b0a7 /net/wireless | |
parent | d671b2a077a92ff71ad76fba0e8bfd1b7c5ca820 (diff) |
lib80211: ratelimit key index mismatch
This indicates a driver key selection issue, but even then there's
no point in printing it all the time, so ratelimit it. Also remove
the priv pointer from it -- people debugging will only have a single
device anyway and it's useless as anything but a cookie.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/lib80211_crypt_ccmp.c | 4 | ||||
-rw-r--r-- | net/wireless/lib80211_crypt_tkip.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/lib80211_crypt_ccmp.c b/net/wireless/lib80211_crypt_ccmp.c index dc0e59e53dbf..6beab0cfcb99 100644 --- a/net/wireless/lib80211_crypt_ccmp.c +++ b/net/wireless/lib80211_crypt_ccmp.c | |||
@@ -311,8 +311,8 @@ static int lib80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
311 | } | 311 | } |
312 | keyidx >>= 6; | 312 | keyidx >>= 6; |
313 | if (key->key_idx != keyidx) { | 313 | if (key->key_idx != keyidx) { |
314 | printk(KERN_DEBUG "CCMP: RX tkey->key_idx=%d frame " | 314 | net_dbg_ratelimited("CCMP: RX tkey->key_idx=%d frame keyidx=%d\n", |
315 | "keyidx=%d priv=%p\n", key->key_idx, keyidx, priv); | 315 | key->key_idx, keyidx); |
316 | return -6; | 316 | return -6; |
317 | } | 317 | } |
318 | if (!key->key_set) { | 318 | if (!key->key_set) { |
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c index 8c90ba79e56e..3cd819539241 100644 --- a/net/wireless/lib80211_crypt_tkip.c +++ b/net/wireless/lib80211_crypt_tkip.c | |||
@@ -434,8 +434,8 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
434 | } | 434 | } |
435 | keyidx >>= 6; | 435 | keyidx >>= 6; |
436 | if (tkey->key_idx != keyidx) { | 436 | if (tkey->key_idx != keyidx) { |
437 | printk(KERN_DEBUG "TKIP: RX tkey->key_idx=%d frame " | 437 | net_dbg_ratelimited("TKIP: RX tkey->key_idx=%d frame keyidx=%d\n", |
438 | "keyidx=%d priv=%p\n", tkey->key_idx, keyidx, priv); | 438 | tkey->key_idx, keyidx); |
439 | return -6; | 439 | return -6; |
440 | } | 440 | } |
441 | if (!tkey->key_set) { | 441 | if (!tkey->key_set) { |