* [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
@ 2018-03-05 7:32 ` Arushi Singhal
0 siblings, 0 replies; 9+ messages in thread
From: Arushi Singhal @ 2018-03-05 7:32 UTC (permalink / raw)
To: gregkh; +Cc: devel, outreachy-kernel, linux-kernel, Larry.Finger
Replace printk having a log level with the appropriate
net_*macro_ratelimited.
It's better to use actual device name as a prefix in error messages.
Indentation is also changed, to fix the checkpatch issue if line is not
exceding 80 characters.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
changes in v2
*change the subject line, in v1 driver name was wrong.
.../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
index e6648f7..200fe5f 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
@@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(priv->tfm)) {
- printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
+ net_dbg_ratelimited("ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
priv->tfm = NULL;
goto fail;
}
@@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
keyidx = pos[3];
if (!(keyidx & (1 << 5))) {
if (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: received packet without ExtIV flag from %pM\n",
- hdr->addr2);
+ net_dbg_ratelimited("CCMP: received packet without ExtIV flag from %pM\n",
+ hdr->addr2);
}
key->dot11RSNAStatsCCMPFormatErrors++;
return -2;
}
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 priv=%p\n",
+ key->key_idx, keyidx, priv);
return -6;
}
if (!key->key_set) {
if (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: received packet from %pM with keyid=%d that does not have a configured key\n",
- hdr->addr2, keyidx);
+ net_dbg_ratelimited("CCMP: received packet from %pM with keyid=%d that does not have a configured key\n",
+ hdr->addr2, keyidx);
}
return -3;
}
@@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: replay detected: STA=%pM previous PN %pm received PN %pm\n",
- hdr->addr2, key->rx_pn, pn);
+ net_dbg_ratelimited("CCMP: replay detected: STA=%pM previous PN %pm received PN %pm\n",
+ hdr->addr2, key->rx_pn, pn);
}
key->dot11RSNAStatsCCMPReplays++;
return -4;
@@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
if (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: decrypt failed: STA=%pM\n",
- hdr->addr2);
+ net_dbg_ratelimited("CCMP: decrypt failed: STA=%pM\n",
+ hdr->addr2);
}
key->dot11RSNAStatsCCMPDecryptErrors++;
return -5;
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
@ 2018-03-05 7:32 ` Arushi Singhal
0 siblings, 0 replies; 9+ messages in thread
From: Arushi Singhal @ 2018-03-05 7:32 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Larry.Finger, outreachy-kernel
Replace printk having a log level with the appropriate
net_*macro_ratelimited.
It's better to use actual device name as a prefix in error messages.
Indentation is also changed, to fix the checkpatch issue if line is not
exceding 80 characters.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
changes in v2
*change the subject line, in v1 driver name was wrong.
.../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
index e6648f7..200fe5f 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
@@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(priv->tfm)) {
- printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
+ net_dbg_ratelimited("ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
priv->tfm = NULL;
goto fail;
}
@@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
keyidx = pos[3];
if (!(keyidx & (1 << 5))) {
if (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: received packet without ExtIV flag from %pM\n",
- hdr->addr2);
+ net_dbg_ratelimited("CCMP: received packet without ExtIV flag from %pM\n",
+ hdr->addr2);
}
key->dot11RSNAStatsCCMPFormatErrors++;
return -2;
}
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 priv=%p\n",
+ key->key_idx, keyidx, priv);
return -6;
}
if (!key->key_set) {
if (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: received packet from %pM with keyid=%d that does not have a configured key\n",
- hdr->addr2, keyidx);
+ net_dbg_ratelimited("CCMP: received packet from %pM with keyid=%d that does not have a configured key\n",
+ hdr->addr2, keyidx);
}
return -3;
}
@@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: replay detected: STA=%pM previous PN %pm received PN %pm\n",
- hdr->addr2, key->rx_pn, pn);
+ net_dbg_ratelimited("CCMP: replay detected: STA=%pM previous PN %pm received PN %pm\n",
+ hdr->addr2, key->rx_pn, pn);
}
key->dot11RSNAStatsCCMPReplays++;
return -4;
@@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
if (net_ratelimit()) {
- printk(KERN_DEBUG "CCMP: decrypt failed: STA=%pM\n",
- hdr->addr2);
+ net_dbg_ratelimited("CCMP: decrypt failed: STA=%pM\n",
+ hdr->addr2);
}
key->dot11RSNAStatsCCMPDecryptErrors++;
return -5;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
2018-03-05 7:32 ` Arushi Singhal
(?)
@ 2018-03-05 7:37 ` Julia Lawall
2018-03-06 17:01 ` Arushi Singhal
-1 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2018-03-05 7:37 UTC (permalink / raw)
To: Arushi Singhal
Cc: gregkh, devel, linux-kernel, Larry.Finger, outreachy-kernel
On Mon, 5 Mar 2018, Arushi Singhal wrote:
> Replace printk having a log level with the appropriate
> net_*macro_ratelimited.
> It's better to use actual device name as a prefix in error messages.
I asked several questions about the above two lines, which as far as I can
see haven't been answered. Please excuse me if I missed the answers, but I
would still like to know what they are.
Namely, why did you choose to change to rate limited output, and what does
the "device name as a prefix" comment mean?
julia
> Indentation is also changed, to fix the checkpatch issue if line is not
> exceding 80 characters.
>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
> changes in v2
> *change the subject line, in v1 driver name was wrong.
>
> .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> index e6648f7..200fe5f 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
>
> priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
> if (IS_ERR(priv->tfm)) {
> - printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
> + net_dbg_ratelimited("ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
> priv->tfm = NULL;
> goto fail;
> }
> @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
> keyidx = pos[3];
> if (!(keyidx & (1 << 5))) {
> if (net_ratelimit()) {
> - printk(KERN_DEBUG "CCMP: received packet without ExtIV flag from %pM\n",
> - hdr->addr2);
> + net_dbg_ratelimited("CCMP: received packet without ExtIV flag from %pM\n",
> + hdr->addr2);
> }
> key->dot11RSNAStatsCCMPFormatErrors++;
> return -2;
> }
> 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 priv=%p\n",
> + key->key_idx, keyidx, priv);
> return -6;
> }
> if (!key->key_set) {
> if (net_ratelimit()) {
> - printk(KERN_DEBUG "CCMP: received packet from %pM with keyid=%d that does not have a configured key\n",
> - hdr->addr2, keyidx);
> + net_dbg_ratelimited("CCMP: received packet from %pM with keyid=%d that does not have a configured key\n",
> + hdr->addr2, keyidx);
> }
> return -3;
> }
> @@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
> - printk(KERN_DEBUG "CCMP: replay detected: STA=%pM previous PN %pm received PN %pm\n",
> - hdr->addr2, key->rx_pn, pn);
> + net_dbg_ratelimited("CCMP: replay detected: STA=%pM previous PN %pm received PN %pm\n",
> + hdr->addr2, key->rx_pn, pn);
> }
> key->dot11RSNAStatsCCMPReplays++;
> return -4;
> @@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
>
> if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
> if (net_ratelimit()) {
> - printk(KERN_DEBUG "CCMP: decrypt failed: STA=%pM\n",
> - hdr->addr2);
> + net_dbg_ratelimited("CCMP: decrypt failed: STA=%pM\n",
> + hdr->addr2);
> }
> key->dot11RSNAStatsCCMPDecryptErrors++;
> return -5;
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180305073256.GA4347%40seema-Inspiron-15-3567.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Outreachy kernel] Re: [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
2018-03-05 7:32 ` Arushi Singhal
@ 2018-03-06 12:05 ` Greg KH
-1 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2018-03-06 12:05 UTC (permalink / raw)
To: Arushi Singhal; +Cc: devel, outreachy-kernel, linux-kernel, Larry.Finger
On Mon, Mar 05, 2018 at 01:02:56PM +0530, Arushi Singhal wrote:
> Replace printk having a log level with the appropriate
> net_*macro_ratelimited.
> It's better to use actual device name as a prefix in error messages.
> Indentation is also changed, to fix the checkpatch issue if line is not
> exceding 80 characters.
>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
> changes in v2
> *change the subject line, in v1 driver name was wrong.
>
> .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> index e6648f7..200fe5f 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
>
> priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
> if (IS_ERR(priv->tfm)) {
> - printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
> + net_dbg_ratelimited("ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
Why would this need to be ratelimited at all?
Same for the other changes in this file. Only use the _ratelimited()
calls if the message can be triggered a lot.
> @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
> keyidx = pos[3];
> if (!(keyidx & (1 << 5))) {
> if (net_ratelimit()) {
> - printk(KERN_DEBUG "CCMP: received packet without ExtIV flag from %pM\n",
> - hdr->addr2);
> + net_dbg_ratelimited("CCMP: received packet without ExtIV flag from %pM\n",
> + hdr->addr2);
Also, "ratelimit" is already checked right above this, so that's a hint
you don't need to check it again :)
thanks,
greg k-h
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
To post to this group, send email to outreachy-kernel@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180306120506.GA26600%40kroah.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
@ 2018-03-06 12:05 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2018-03-06 12:05 UTC (permalink / raw)
To: Arushi Singhal; +Cc: devel, outreachy-kernel, linux-kernel, Larry.Finger
On Mon, Mar 05, 2018 at 01:02:56PM +0530, Arushi Singhal wrote:
> Replace printk having a log level with the appropriate
> net_*macro_ratelimited.
> It's better to use actual device name as a prefix in error messages.
> Indentation is also changed, to fix the checkpatch issue if line is not
> exceding 80 characters.
>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
> changes in v2
> *change the subject line, in v1 driver name was wrong.
>
> .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> index e6648f7..200fe5f 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
>
> priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
> if (IS_ERR(priv->tfm)) {
> - printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
> + net_dbg_ratelimited("ieee80211_crypt_ccmp: could not allocate crypto API aes\n");
Why would this need to be ratelimited at all?
Same for the other changes in this file. Only use the _ratelimited()
calls if the message can be triggered a lot.
> @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
> keyidx = pos[3];
> if (!(keyidx & (1 << 5))) {
> if (net_ratelimit()) {
> - printk(KERN_DEBUG "CCMP: received packet without ExtIV flag from %pM\n",
> - hdr->addr2);
> + net_dbg_ratelimited("CCMP: received packet without ExtIV flag from %pM\n",
> + hdr->addr2);
Also, "ratelimit" is already checked right above this, so that's a hint
you don't need to check it again :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
2018-03-05 7:37 ` [Outreachy kernel] " Julia Lawall
@ 2018-03-06 17:01 ` Arushi Singhal
0 siblings, 0 replies; 9+ messages in thread
From: Arushi Singhal @ 2018-03-06 17:01 UTC (permalink / raw)
To: Julia Lawall; +Cc: Greg KH, driverdevel, LKML, Larry.Finger, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 6678 bytes --]
On Mon, Mar 5, 2018 at 1:07 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Mon, 5 Mar 2018, Arushi Singhal wrote:
>
> > Replace printk having a log level with the appropriate
> > net_*macro_ratelimited.
> > It's better to use actual device name as a prefix in error messages.
>
> I asked several questions about the above two lines, which as far as I can
> see haven't been answered. Please excuse me if I missed the answers, but I
> would still like to know what they are.
>
Hi Julia
Sorry, I missed your above two question on my last patch and only saw the
suggestions :(.
-Why did I choose this function?
Here we are using printk() which is the raw way to print something and it
is always preferred to use dev_*macro() and netdev_*macro() because of the
benefits they provide like dynamic debugging interface.
And as we are using network subsystem so, netdev_*macro() or
net_*ratelimited() can be used to standardized the output within the
network subsystem.
>
>
> Namely, why did you choose to change to rate limited output, and what does
> the "device name as a prefix" comment mean?
Yes your point is correct, as before function used is printk(), so changing
it to ratelimit is not a good idea. So here I should have preferred
changing it to netdev_*macro().
As every kernel subsystem has its own printk format like net_* for
network subsystem. And it is preferred to use them to standardize the
format of the output within the subsystem.
Best
Arushi
> julia
>
> > Indentation is also changed, to fix the checkpatch issue if line is not
> > exceding 80 characters.
> >
> > Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> > ---
> > changes in v2
> > *change the subject line, in v1 driver name was wrong.
> >
> > .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22
> +++++++++++-----------
> > 1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > index e6648f7..200fe5f 100644
> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
> >
> > priv->tfm = (void *)crypto_alloc_cipher("aes", 0,
> CRYPTO_ALG_ASYNC);
> > if (IS_ERR(priv->tfm)) {
> > - printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not
> allocate crypto API aes\n");
> > + net_dbg_ratelimited("ieee80211_crypt_ccmp: could not
> allocate crypto API aes\n");
> > priv->tfm = NULL;
> > goto fail;
> > }
> > @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff
> *skb, int hdr_len, void *priv)
> > keyidx = pos[3];
> > if (!(keyidx & (1 << 5))) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: received packet without
> ExtIV flag from %pM\n",
> > - hdr->addr2);
> > + net_dbg_ratelimited("CCMP: received packet without
> ExtIV flag from %pM\n",
> > + hdr->addr2);
> > }
> > key->dot11RSNAStatsCCMPFormatErrors++;
> > return -2;
> > }
> > 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 priv=%p\n",
> > + key->key_idx, keyidx, priv);
> > return -6;
> > }
> > if (!key->key_set) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: received packet from %pM
> with keyid=%d that does not have a configured key\n",
> > - hdr->addr2, keyidx);
> > + net_dbg_ratelimited("CCMP: received packet from
> %pM with keyid=%d that does not have a configured key\n",
> > + hdr->addr2, keyidx);
> > }
> > return -3;
> > }
> > @@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: replay detected: STA=%pM
> previous PN %pm received PN %pm\n",
> > - hdr->addr2, key->rx_pn, pn);
> > + net_dbg_ratelimited("CCMP: replay detected:
> STA=%pM previous PN %pm received PN %pm\n",
> > + hdr->addr2, key->rx_pn, pn);
> > }
> > key->dot11RSNAStatsCCMPReplays++;
> > return -4;
> > @@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct sk_buff
> *skb, int hdr_len, void *priv)
> >
> > if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: decrypt failed:
> STA=%pM\n",
> > - hdr->addr2);
> > + net_dbg_ratelimited("CCMP: decrypt failed:
> STA=%pM\n",
> > + hdr->addr2);
> > }
> > key->dot11RSNAStatsCCMPDecryptErrors++;
> > return -5;
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/ms
> gid/outreachy-kernel/20180305073256.GA4347%40seema-Inspiron-15-3567.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
To post to this group, send email to outreachy-kernel@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CA%2BXqjF8PSF0rP%2BbOAuUSM8xadHPzDjhZcKE%3DTauJgUyMdeNgsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 12333 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
@ 2018-03-06 17:01 ` Arushi Singhal
0 siblings, 0 replies; 9+ messages in thread
From: Arushi Singhal @ 2018-03-06 17:01 UTC (permalink / raw)
To: Julia Lawall; +Cc: Greg KH, driverdevel, LKML, Larry.Finger, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 6143 bytes --]
On Mon, Mar 5, 2018 at 1:07 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Mon, 5 Mar 2018, Arushi Singhal wrote:
>
> > Replace printk having a log level with the appropriate
> > net_*macro_ratelimited.
> > It's better to use actual device name as a prefix in error messages.
>
> I asked several questions about the above two lines, which as far as I can
> see haven't been answered. Please excuse me if I missed the answers, but I
> would still like to know what they are.
>
Hi Julia
Sorry, I missed your above two question on my last patch and only saw the
suggestions :(.
-Why did I choose this function?
Here we are using printk() which is the raw way to print something and it
is always preferred to use dev_*macro() and netdev_*macro() because of the
benefits they provide like dynamic debugging interface.
And as we are using network subsystem so, netdev_*macro() or
net_*ratelimited() can be used to standardized the output within the
network subsystem.
>
>
> Namely, why did you choose to change to rate limited output, and what does
> the "device name as a prefix" comment mean?
Yes your point is correct, as before function used is printk(), so changing
it to ratelimit is not a good idea. So here I should have preferred
changing it to netdev_*macro().
As every kernel subsystem has its own printk format like net_* for
network subsystem. And it is preferred to use them to standardize the
format of the output within the subsystem.
Best
Arushi
> julia
>
> > Indentation is also changed, to fix the checkpatch issue if line is not
> > exceding 80 characters.
> >
> > Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> > ---
> > changes in v2
> > *change the subject line, in v1 driver name was wrong.
> >
> > .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22
> +++++++++++-----------
> > 1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > index e6648f7..200fe5f 100644
> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int key_idx)
> >
> > priv->tfm = (void *)crypto_alloc_cipher("aes", 0,
> CRYPTO_ALG_ASYNC);
> > if (IS_ERR(priv->tfm)) {
> > - printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not
> allocate crypto API aes\n");
> > + net_dbg_ratelimited("ieee80211_crypt_ccmp: could not
> allocate crypto API aes\n");
> > priv->tfm = NULL;
> > goto fail;
> > }
> > @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct sk_buff
> *skb, int hdr_len, void *priv)
> > keyidx = pos[3];
> > if (!(keyidx & (1 << 5))) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: received packet without
> ExtIV flag from %pM\n",
> > - hdr->addr2);
> > + net_dbg_ratelimited("CCMP: received packet without
> ExtIV flag from %pM\n",
> > + hdr->addr2);
> > }
> > key->dot11RSNAStatsCCMPFormatErrors++;
> > return -2;
> > }
> > 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 priv=%p\n",
> > + key->key_idx, keyidx, priv);
> > return -6;
> > }
> > if (!key->key_set) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: received packet from %pM
> with keyid=%d that does not have a configured key\n",
> > - hdr->addr2, keyidx);
> > + net_dbg_ratelimited("CCMP: received packet from
> %pM with keyid=%d that does not have a configured key\n",
> > + hdr->addr2, keyidx);
> > }
> > return -3;
> > }
> > @@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: replay detected: STA=%pM
> previous PN %pm received PN %pm\n",
> > - hdr->addr2, key->rx_pn, pn);
> > + net_dbg_ratelimited("CCMP: replay detected:
> STA=%pM previous PN %pm received PN %pm\n",
> > + hdr->addr2, key->rx_pn, pn);
> > }
> > key->dot11RSNAStatsCCMPReplays++;
> > return -4;
> > @@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct sk_buff
> *skb, int hdr_len, void *priv)
> >
> > if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: decrypt failed:
> STA=%pM\n",
> > - hdr->addr2);
> > + net_dbg_ratelimited("CCMP: decrypt failed:
> STA=%pM\n",
> > + hdr->addr2);
> > }
> > key->dot11RSNAStatsCCMPDecryptErrors++;
> > return -5;
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/ms
> gid/outreachy-kernel/20180305073256.GA4347%40seema-Inspiron-15-3567.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #2: Type: text/html, Size: 11388 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
2018-03-06 17:01 ` Arushi Singhal
@ 2018-03-06 17:08 ` Julia Lawall
-1 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2018-03-06 17:08 UTC (permalink / raw)
To: Arushi Singhal; +Cc: driverdevel, Greg KH, outreachy-kernel, LKML, Larry.Finger
[-- Attachment #1: Type: text/plain, Size: 7677 bytes --]
On Tue, 6 Mar 2018, Arushi Singhal wrote:
>
>
> On Mon, Mar 5, 2018 at 1:07 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Mon, 5 Mar 2018, Arushi Singhal wrote:
>
> > Replace printk having a log level with the appropriate
> > net_*macro_ratelimited.
> > It's better to use actual device name as a prefix in error
> messages.
>
> I asked several questions about the above two lines, which as
> far as I can
> see haven't been answered. Please excuse me if I missed the
> answers, but I
> would still like to know what they are.
>
>
> Hi Julia
> Sorry, I missed your above two question on my last patch and only saw the
> suggestions :(.
>
> -Why did I choose this function?
>
> Here we are using printk() which is the raw way to print something and it is
> always preferred to use dev_*macro() and netdev_*macro() because of the
> benefits they provide like dynamic debugging interface.
>
> And as we are using network subsystem so, netdev_*macro() or
> net_*ratelimited() can be used to standardized the output within the network
> subsystem.
>
>
>
> Namely, why did you choose to change to rate limited output, and
> what does
> the "device name as a prefix" comment mean?
>
>
> Yes your point is correct, as before function used is printk(), so changing
> it to ratelimit is not a good idea. So here I should have preferred changing
> it to netdev_*macro().
>
> As every kernel subsystem has its own printk format like net_* for network s
> ubsystem. And it is preferred to use them to standardize the format of the o
> utput within the subsystem.
Sure, but I don't think the ratelimited function does that. At least, it
doesn't seem to take any arguments that will help it with that.
julia
> Best
> Arushi
>
> julia
>
> > Indentation is also changed, to fix the checkpatch issue if
> line is not
> > exceding 80 characters.
> >
> > Signed-off-by: Arushi Singhal
> <arushisinghal19971997@gmail.com>
> > ---
> > changes in v2
> > *change the subject line, in v1 driver name was wrong.
> >
> > .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 22
> +++++++++++-----------
> > 1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git
> a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > index e6648f7..200fe5f 100644
> > ---
> a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > +++
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int
> key_idx)
> >
> > priv->tfm = (void *)crypto_alloc_cipher("aes", 0,
> CRYPTO_ALG_ASYNC);
> > if (IS_ERR(priv->tfm)) {
> > - printk(KERN_DEBUG "ieee80211_crypt_ccmp: could
> not allocate crypto API aes\n");
> > + net_dbg_ratelimited("ieee80211_crypt_ccmp: could
> not allocate crypto API aes\n");
> > priv->tfm = NULL;
> > goto fail;
> > }
> > @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct
> sk_buff *skb, int hdr_len, void *priv)
> > keyidx = pos[3];
> > if (!(keyidx & (1 << 5))) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: received packet
> without ExtIV flag from %pM\n",
> > - hdr->addr2);
> > + net_dbg_ratelimited("CCMP: received
> packet without ExtIV flag from %pM\n",
> > + hdr->addr2);
> > }
> > key->dot11RSNAStatsCCMPFormatErrors++;
> > return -2;
> > }
> > 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 priv=%p\n",
> > + key->key_idx, keyidx, priv);
> > return -6;
> > }
> > if (!key->key_set) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: received packet
> from %pM with keyid=%d that does not have a configured key\n",
> > - hdr->addr2, keyidx);
> > + net_dbg_ratelimited("CCMP: received
> packet from %pM with keyid=%d that does not have a configured
> key\n",
> > + hdr->addr2, keyidx);
> > }
> > return -3;
> > }
> > @@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: replay
> detected: STA=%pM previous PN %pm received PN %pm\n",
> > - hdr->addr2, key->rx_pn, pn);
> > + net_dbg_ratelimited("CCMP: replay
> detected: STA=%pM previous PN %pm received PN %pm\n",
> > + hdr->addr2,
> key->rx_pn, pn);
> > }
> > key->dot11RSNAStatsCCMPReplays++;
> > return -4;
> > @@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct
> sk_buff *skb, int hdr_len, void *priv)
> >
> > if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
> > if (net_ratelimit()) {
> > - printk(KERN_DEBUG "CCMP: decrypt
> failed: STA=%pM\n",
> > - hdr->addr2);
> > + net_dbg_ratelimited("CCMP:
> decrypt failed: STA=%pM\n",
> > + hdr->addr2);
> > }
> > key->dot11RSNAStatsCCMPDecryptErrors++;
> > return -5;
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to
> outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20180305073256.GA4347%40
> seema-Inspiron-15-3567.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CA%2BXqjF8PSF0rP%2BbOAuU
> SM8xadHPzDjhZcKE%3DTauJgUyMdeNgsg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
[-- Attachment #2: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited()
@ 2018-03-06 17:08 ` Julia Lawall
0 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2018-03-06 17:08 UTC (permalink / raw)
To: Arushi Singhal; +Cc: Greg KH, driverdevel, LKML, Larry.Finger, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 8731 bytes --]
On Tue, 6 Mar 2018, Arushi Singhal wrote:
>
>
> On Mon, Mar 5, 2018 at 1:07 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Mon, 5 Mar 2018, Arushi Singhal wrote:
>
> > Replace printk having a log level with the appropriate
> > net_*macro_ratelimited.
> > It's better to use actual device name as a prefix in error
> messages.
>
> I asked several questions about the above two lines, which as
> far as I can
> see haven't been answered. Please excuse me if I missed the
> answers, but I
> would still like to know what they are.
>
>
> Hi Julia
> Sorry, I missed your above two question on my last patch and only saw the
> suggestions :(.
>
> -Why did I choose this function?
>
> Here we are using printk() which is the raw way to print something and it is
> always preferred to use dev_*macro() and netdev_*macro() because of the
> benefits they provide like dynamic debugging interface.
>
> And as we are using network subsystem so, netdev_*macro() or
> net_*ratelimited() can be used to standardized the output within the network
> subsystem.
>
> ᅵ
>
> Namely, why did you choose to change to rate limited output, and
> what does
> the "device name as a prefix" comment mean?
>
> ᅵ
> Yes your point is correct, as before function used is printk(), so changing
> it to ratelimit is not a good idea. So here I should have preferred changing
> it to netdev_*macro().
>
> As every kernel subsystem has its own printk format like net_* for network s
> ubsystem. And it is preferred to use them to standardize the format of the o
> utput within the subsystem.
Sure, but I don't think the ratelimited function does that. At least, it
doesn't seem to take any arguments that will help it with that.
julia
> Best
> Arushi
>
> julia
>
> > Indentation is also changed, to fix theᅵ checkpatch issue if
> line is not
> > exceding 80 characters.
> >
> > Signed-off-by: Arushi Singhal
> <arushisinghal19971997@gmail.com>
> > ---
> > changes in v2
> > *change the subject line, in v1 driver name was wrong.
> >
> >ᅵ .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.cᅵ ᅵ ᅵ | 22
> +++++++++++-----------
> >ᅵ 1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git
> a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > index e6648f7..200fe5f 100644
> > ---
> a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > +++
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
> > @@ -73,7 +73,7 @@ static void *ieee80211_ccmp_init(int
> key_idx)
> >
> >ᅵ ᅵ ᅵ ᅵpriv->tfm = (void *)crypto_alloc_cipher("aes", 0,
> CRYPTO_ALG_ASYNC);
> >ᅵ ᅵ ᅵ ᅵif (IS_ERR(priv->tfm)) {
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵprintk(KERN_DEBUG "ieee80211_crypt_ccmp: could
> not allocate crypto API aes\n");
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵnet_dbg_ratelimited("ieee80211_crypt_ccmp: could
> not allocate crypto API aes\n");
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵpriv->tfm = NULL;
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵgoto fail;
> >ᅵ ᅵ ᅵ ᅵ}
> > @@ -276,22 +276,22 @@ static int ieee80211_ccmp_decrypt(struct
> sk_buff *skb, int hdr_len, void *priv)
> >ᅵ ᅵ ᅵ ᅵkeyidx = pos[3];
> >ᅵ ᅵ ᅵ ᅵif (!(keyidx & (1 << 5))) {
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵif (net_ratelimit()) {
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵprintk(KERN_DEBUG "CCMP: received packet
> without ExtIV flag from %pM\n",
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2);
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵnet_dbg_ratelimited("CCMP: received
> packet without ExtIV flag from %pM\n",
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2);
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ}
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵkey->dot11RSNAStatsCCMPFormatErrors++;
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵreturn -2;
> >ᅵ ᅵ ᅵ ᅵ}
> >ᅵ ᅵ ᅵ ᅵ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 priv=%p\n",
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵkey->key_idx, keyidx, priv);
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵreturn -6;
> >ᅵ ᅵ ᅵ ᅵ}
> >ᅵ ᅵ ᅵ ᅵif (!key->key_set) {
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵif (net_ratelimit()) {
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵprintk(KERN_DEBUG "CCMP: received packet
> from %pM with keyid=%d that does not have a configured key\n",
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2, keyidx);
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵnet_dbg_ratelimited("CCMP: received
> packet from %pM with keyid=%d that does not have a configured
> key\n",
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2, keyidx);
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ}
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵreturn -3;
> >ᅵ ᅵ ᅵ ᅵ}
> > @@ -306,8 +306,8 @@ 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 (net_ratelimit()) {
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵprintk(KERN_DEBUG "CCMP: replay
> detected: STA=%pM previous PN %pm received PN %pm\n",
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ hdr->addr2, key->rx_pn, pn);
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵnet_dbg_ratelimited("CCMP: replay
> detected: STA=%pM previous PN %pm received PN %pm\n",
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2,
> key->rx_pn, pn);
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ}
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵkey->dot11RSNAStatsCCMPReplays++;
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵreturn -4;
> > @@ -341,8 +341,8 @@ static int ieee80211_ccmp_decrypt(struct
> sk_buff *skb, int hdr_len, void *priv)
> >
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵif (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵif (net_ratelimit()) {
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵprintk(KERN_DEBUG "CCMP: decrypt
> failed: STA=%pM\n",
> > -ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2);
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵnet_dbg_ratelimited("CCMP:
> decrypt failed: STA=%pM\n",
> > +ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵhdr->addr2);
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ}
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵkey->dot11RSNAStatsCCMPDecryptErrors++;
> >ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵreturn -5;
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to
> outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20180305073256.GA4347%40
> seema-Inspiron-15-3567.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CA%2BXqjF8PSF0rP%2BbOAuU
> SM8xadHPzDjhZcKE%3DTauJgUyMdeNgsg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-03-06 17:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 7:32 [PATCH v2] staging: rtl8192u: Replace printk() with appropriate net_*macro_ratelimited() Arushi Singhal
2018-03-05 7:32 ` Arushi Singhal
2018-03-05 7:37 ` [Outreachy kernel] " Julia Lawall
2018-03-06 17:01 ` Arushi Singhal
2018-03-06 17:01 ` Arushi Singhal
2018-03-06 17:08 ` Julia Lawall
2018-03-06 17:08 ` Julia Lawall
2018-03-06 12:05 ` [Outreachy kernel] " Greg KH
2018-03-06 12:05 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.