Commit d6f272c2 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Greg Kroah-Hartman

staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt_ccmp.c

The following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bd6e9e0
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* more details. * more details.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
//#include <linux/config.h> //#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -75,8 +77,7 @@ static void *ieee80211_ccmp_init(int key_idx) ...@@ -75,8 +77,7 @@ static void *ieee80211_ccmp_init(int key_idx)
priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(priv->tfm)) { if (IS_ERR(priv->tfm)) {
printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate " pr_debug("could not allocate crypto API aes\n");
"crypto API aes\n");
priv->tfm = NULL; priv->tfm = NULL;
goto fail; goto fail;
} }
...@@ -282,23 +283,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -282,23 +283,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
keyidx = pos[3]; keyidx = pos[3];
if (!(keyidx & (1 << 5))) { if (!(keyidx & (1 << 5))) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: received packet without ExtIV" pr_debug("received packet without ExtIV flag from %pM\n",
" flag from %pM\n", hdr->addr2); hdr->addr2);
} }
key->dot11RSNAStatsCCMPFormatErrors++; key->dot11RSNAStatsCCMPFormatErrors++;
return -2; return -2;
} }
keyidx >>= 6; keyidx >>= 6;
if (key->key_idx != keyidx) { if (key->key_idx != keyidx) {
printk(KERN_DEBUG "CCMP: RX tkey->key_idx=%d frame " pr_debug("RX tkey->key_idx=%d frame keyidx=%d priv=%p\n",
"keyidx=%d priv=%p\n", key->key_idx, keyidx, priv); key->key_idx, keyidx, priv);
return -6; return -6;
} }
if (!key->key_set) { if (!key->key_set) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: received packet from %pM" pr_debug("received packet from %pM with keyid=%d that does not have a configured key\n",
" with keyid=%d that does not have a configured" hdr->addr2, keyidx);
" key\n", hdr->addr2, keyidx);
} }
return -3; return -3;
} }
...@@ -313,8 +313,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -313,8 +313,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) { if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" pr_debug("replay detected: STA=%pM previous PN %pm received PN %pm\n",
" previous PN %pm received PN %pm\n",
hdr->addr2, key->rx_pn, pn); hdr->addr2, key->rx_pn, pn);
} }
key->dot11RSNAStatsCCMPReplays++; key->dot11RSNAStatsCCMPReplays++;
...@@ -342,8 +341,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -342,8 +341,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: decrypt failed: STA=" pr_debug("decrypt failed: STA=%pM\n", hdr->addr2);
"%pM\n", hdr->addr2);
} }
key->dot11RSNAStatsCCMPDecryptErrors++; key->dot11RSNAStatsCCMPDecryptErrors++;
return -5; return -5;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment