lib80211: ratelimit key index mismatch
authorJohannes Berg <johannes.berg@intel.com>
Fri, 6 Nov 2015 11:02:31 +0000 (12:02 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 4 Dec 2015 13:43:32 +0000 (14:43 +0100)
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>
net/wireless/lib80211_crypt_ccmp.c
net/wireless/lib80211_crypt_tkip.c

index dc0e59e53dbf3a3ea581ab5652cbac7d614e77ff..6beab0cfcb99e4fece6f8cbf9ca10f3c7c0e61eb 100644 (file)
@@ -311,8 +311,8 @@ static int lib80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        keyidx >>= 6;
        if (key->key_idx != keyidx) {
-               printk(KERN_DEBUG "CCMP: RX tkey->key_idx=%d frame "
-                      "keyidx=%d priv=%p\n", key->key_idx, keyidx, priv);
+               net_dbg_ratelimited("CCMP: RX tkey->key_idx=%d frame keyidx=%d\n",
+                                   key->key_idx, keyidx);
                return -6;
        }
        if (!key->key_set) {
index 8c90ba79e56e33bfefba9b014d35f7d48bbe45ed..3cd8195392416c1ee7f89884c3e0045ede182d41 100644 (file)
@@ -434,8 +434,8 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        keyidx >>= 6;
        if (tkey->key_idx != keyidx) {
-               printk(KERN_DEBUG "TKIP: RX tkey->key_idx=%d frame "
-                      "keyidx=%d priv=%p\n", tkey->key_idx, keyidx, priv);
+               net_dbg_ratelimited("TKIP: RX tkey->key_idx=%d frame keyidx=%d\n",
+                                   tkey->key_idx, keyidx);
                return -6;
        }
        if (!tkey->key_set) {