linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
@ 2011-05-02 20:57 Fabio Rossi
  2011-05-03  8:31 ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Rossi @ 2011-05-02 20:57 UTC (permalink / raw)
  To: linux-wireless

I get the following WARNING:

WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]
()
Hardware name: System Product Name
Modules linked in: ath5k ath mac80211 cfg80211 vboxnetadp vboxnetflt vboxdrv 
fglrx(P) gspca_zc3xx gspca_main [last unloaded: cfg80211]
Pid: 0, comm: kworker/0:1 Tainted: P        W   2.6.39-rc5-wl #9
Call Trace:
 <IRQ>  [<ffffffff8103af1a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff8103af65>] warn_slowpath_null+0x15/0x20
 [<ffffffffa0566b52>] ieee80211_wep_add_iv+0x52/0x150 [mac80211]
 [<ffffffffa0567090>] ieee80211_crypto_wep_encrypt+0x60/0xc0 [mac80211]
 [<ffffffffa057fce5>] ieee80211_tx_h_encrypt+0x85/0x90 [mac80211]
 [<ffffffffa057fdc6>] invoke_tx_handlers+0xd6/0x150 [mac80211]
 [<ffffffffa05800db>] ieee80211_tx+0x5b/0xb0 [mac80211]
 [<ffffffffa05801cd>] ieee80211_xmit+0x9d/0x1c0 [mac80211]
 [<ffffffffa057def9>] ? ieee80211_skb_resize+0xa9/0x130 [mac80211]
 [<ffffffffa058112e>] ieee80211_subif_start_xmit+0x32e/0x700 [mac80211]
 [<ffffffff81473d0e>] dev_hard_start_xmit+0x31e/0x630
 [<ffffffff814e04fc>] ? iptable_mangle_hook+0x11c/0x140
 [<ffffffff8148b407>] sch_direct_xmit+0xe7/0x1b0
 [<ffffffff81474183>] dev_queue_xmit+0x163/0x5b0
 [<ffffffff814a6570>] ? ip_finish_output2+0x280/0x280
 [<ffffffff814a66a0>] ip_finish_output+0x130/0x310
 [<ffffffff814a6920>] ip_output+0xa0/0xb0
 [<ffffffff814a5a4e>] ? __ip_local_out+0x9e/0xa0
 [<ffffffff814a5a74>] ip_local_out+0x24/0x30
 [<ffffffff814a5eab>] ip_queue_xmit+0x15b/0x3b0
 [<ffffffff814bf059>] ? __tcp_v4_send_check+0x59/0xf0
 [<ffffffff814ba7f2>] tcp_transmit_skb+0x3c2/0x870
 [<ffffffff814bc8fa>] tcp_retransmit_skb+0x1ba/0x5d0
 [<ffffffff814be146>] tcp_retransmit_timer+0x276/0x620
 [<ffffffff814beb08>] tcp_write_timer+0x188/0x200
 [<ffffffff8104707b>] run_timer_softirq+0x11b/0x230
 [<ffffffff810478b1>] ? update_process_times+0x71/0x80
 [<ffffffff814be980>] ? tcp_delack_timer+0x210/0x210
 [<ffffffff810640e8>] ? tick_dev_program_event+0x48/0x110
 [<ffffffff81040d81>] __do_softirq+0x91/0x120
 [<ffffffff810599c5>] ? hrtimer_interrupt+0x155/0x240
 [<ffffffff815716cc>] call_softirq+0x1c/0x30
 [<ffffffff81003f3d>] do_softirq+0x4d/0x80
 [<ffffffff81040c26>] irq_exit+0x86/0xa0
 [<ffffffff8101bc3b>] smp_apic_timer_interrupt+0x6b/0xa0
 [<ffffffff81571193>] apic_timer_interrupt+0x13/0x20
 <EOI>  [<ffffffff8105af91>] ? notifier_call_chain+0x51/0x80
 [<ffffffff81283765>] ? intel_idle+0xb5/0x110
 [<ffffffff81283748>] ? intel_idle+0x98/0x110
 [<ffffffff813f74a2>] cpuidle_idle_call+0x82/0xf0
 [<ffffffff81001579>] cpu_idle+0x59/0xb0
 [<ffffffff81569f25>] start_secondary+0x181/0x185
---[ end trace be478a136930e9e5 ]---



Fabio

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
  2011-05-02 20:57 Fabio Rossi
@ 2011-05-03  8:31 ` Johannes Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2011-05-03  8:31 UTC (permalink / raw)
  To: Fabio Rossi; +Cc: linux-wireless, Yogesh Ashok Powar

On Mon, 2011-05-02 at 22:57 +0200, Fabio Rossi wrote:
> I get the following WARNING:
> 
> WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]
> ()

Once, or consistently? Must be caused by 

commit aac6af5534fade2b18682a0b9efad1a6c04c34c6
Author: Yogesh Ashok Powar <yogeshp@marvell.com>
Date:   Wed Apr 27 18:40:29 2011 +0530

    mac80211: Skip tailroom reservation for full HW-crypto devices

Yogesh, please investigate how this happens.

johannes


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
@ 2011-05-03 10:02 rossi.f
  2011-05-03 10:51 ` Yogesh Powar
  0 siblings, 1 reply; 9+ messages in thread
From: rossi.f @ 2011-05-03 10:02 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Yogesh Ashok Powar

>Da: johannes@sipsolutions.net
>Data: 03/05/2011 10.31
>A: "Fabio Rossi"<rossi.f@inwind.it>
>Cc: <linux-wireless@vger.kernel.org>, "Yogesh Ashok Powar"<yogeshp@marvell.
com>
>Ogg: Re: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 
[mac80211]()
>
>On Mon, 2011-05-02 at 22:57 +0200, Fabio Rossi wrote:
>> I get the following WARNING:
>> 
>> WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 
[mac80211]
>> ()
>
>Once, or consistently? Must be caused by 

I get the warning every few seconds.

Fabio

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
  2011-05-03 10:02 rossi.f
@ 2011-05-03 10:51 ` Yogesh Powar
  0 siblings, 0 replies; 9+ messages in thread
From: Yogesh Powar @ 2011-05-03 10:51 UTC (permalink / raw)
  To: rossi.f@inwind.it, johannes@sipsolutions.net
  Cc: linux-wireless@vger.kernel.org

>I get the warning every few seconds.
>
>Fabio
I failed to regenerate the issue on my setup. I am using WEP40 on
Ath5k as station on 32 bit machine. I even tried disabling hw encryption.

Some more details would be helpful.

Thanks
Yogesh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
@ 2011-05-03 11:27 rossi.f
  2011-05-03 11:44 ` Mohammed Shafi
  0 siblings, 1 reply; 9+ messages in thread
From: rossi.f @ 2011-05-03 11:27 UTC (permalink / raw)
  To: yogeshp, johannes@sipsolutions.net; +Cc: linux-wireless@vger.kernel.org

>Da: yogeshp@marvell.com
>Data: 03/05/2011 12.51
>A: "rossi.f@inwind.it"<rossi.f@inwind.it>, "johannes@sipsolutions.net"
<johannes@sipsolutions.net>
>Cc: "linux-wireless@vger.kernel.org"<linux-wireless@vger.kernel.org>
>Ogg: RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 
[mac80211]()
>
>>I get the warning every few seconds.
>>
>>Fabio
>I failed to regenerate the issue on my setup. I am using WEP40 on
>Ath5k as station on 32 bit machine. I even tried disabling hw encryption.
>
>Some more details would be helpful.
>
>Thanks
>Yogesh

I'm using WEP with 128bit key on a 64bit system using ath5k driver. The hw 
encryption is configured with the default value. I don't have access right now 
to the machine, I can provide more details tonight if needed. I can test 
patches to diagnose the problem.

Regards,
Fabio



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
  2011-05-03 11:27 WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]() rossi.f
@ 2011-05-03 11:44 ` Mohammed Shafi
  2011-05-03 14:25   ` Yogesh Powar
  0 siblings, 1 reply; 9+ messages in thread
From: Mohammed Shafi @ 2011-05-03 11:44 UTC (permalink / raw)
  To: rossi.f@inwind.it, yogeshp
  Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org

On Tue, May 3, 2011 at 4:57 PM, rossi.f@inwind.it <rossi.f@inwind.it> wrote:
>>Da: yogeshp@marvell.com
>>Data: 03/05/2011 12.51
>>A: "rossi.f@inwind.it"<rossi.f@inwind.it>, "johannes@sipsolutions.net"
> <johannes@sipsolutions.net>
>>Cc: "linux-wireless@vger.kernel.org"<linux-wireless@vger.kernel.org>
>>Ogg: RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150
> [mac80211]()
>>
>>>I get the warning every few seconds.
>>>
>>>Fabio
>>I failed to regenerate the issue on my setup. I am using WEP40 on
>>Ath5k as station on 32 bit machine. I even tried disabling hw encryption.
>>
>>Some more details would be helpful.
>>
>>Thanks
>>Yogesh
>
> I'm using WEP with 128bit key on a 64bit system using ath5k driver. The hw
> encryption is configured with the default value. I don't have access right now
> to the machine, I can provide more details tonight if needed. I can test
> patches to diagnose the problem.
>
> Regards,
> Fabio

this also hits ath9k i think.
just running a traffic between WEP secured AP will reproduce this issue.
saw in set_key call back in ath9k/ath5k

            key->hw_key_idx = ret;
                        /* push IV and Michael MIC generation to stack */
                        key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
                        if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
                                key->flags |= IEEE80211_KEY_FLAG_GENERATE_MM

so may will this help? I don't know whether its a correct and with a
quick test the warning gets fixed.

diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index ca3c626..49444c8 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -102,7 +102,8 @@ static int ieee80211_key_enable_hw_accel(struct
ieee80211_key *key)
        if (!ret) {
                key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;

-               if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
+               if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)||
+                                       (key->conf.flags &
IEEE80211_KEY_FLAG_GENERATE_IV)))
                        key->local->crypto_tx_tailroom_needed_cnt--;

                return 0;
@@ -161,7 +162,8 @@ static void ieee80211_key_disable_hw_accel(struct
ieee80211_key *key)

        key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;

-       if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
+               if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)||
+                                       (key->conf.flags &
IEEE80211_KEY_FLAG_GENERATE_IV)))
                key->local->crypto_tx_tailroom_needed_cnt++;
 }



>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
  2011-05-03 11:44 ` Mohammed Shafi
@ 2011-05-03 14:25   ` Yogesh Powar
  2011-05-03 14:28     ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Yogesh Powar @ 2011-05-03 14:25 UTC (permalink / raw)
  To: Mohammed Shafi, rossi.f@inwind.it
  Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org

>so may will this help? I don't know whether its a correct and with a
>quick test the warning gets fixed.
That should solve our problem with following explanation. 

The devices that require IV generation in software need tailroom reservation
for ICVs used in TKIP or WEP encryptions.

Currently, decision to skip the tailroom reservation in the tx
path was taken only on whether driver wants MMIC to be generated
in software or not. Following patch appends IV generation check for such
decisions.

diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index ca3c626..f3c4deb 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -102,7 +102,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
 	if (!ret) {
 		key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
 
-		if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
+		if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) ||
+				(key->conf.flags &
+					IEEE80211_KEY_FLAG_GENERATE_IV)))
 			key->local->crypto_tx_tailroom_needed_cnt--;
 
 		return 0;
@@ -161,7 +163,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
 
 	key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;
 
-	if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
+	if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) ||
+				(key->conf.flags &
+					IEEE80211_KEY_FLAG_GENERATE_IV)))
 		key->local->crypto_tx_tailroom_needed_cnt++;
 }
 
-- 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
  2011-05-03 14:25   ` Yogesh Powar
@ 2011-05-03 14:28     ` Johannes Berg
  2011-05-03 15:18       ` Mohammed Shafi
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2011-05-03 14:28 UTC (permalink / raw)
  To: Yogesh Powar
  Cc: Mohammed Shafi, rossi.f@inwind.it, linux-wireless@vger.kernel.org

On Tue, 2011-05-03 at 07:25 -0700, Yogesh Powar wrote:
> >so may will this help? I don't know whether its a correct and with a
> >quick test the warning gets fixed.
> That should solve our problem with following explanation. 
> 
> The devices that require IV generation in software need tailroom reservation
> for ICVs used in TKIP or WEP encryptions.
> 
> Currently, decision to skip the tailroom reservation in the tx
> path was taken only on whether driver wants MMIC to be generated
> in software or not. Following patch appends IV generation check for such
> decisions.
> 
> diff --git a/net/mac80211/key.c b/net/mac80211/key.c
> index ca3c626..f3c4deb 100644
> --- a/net/mac80211/key.c
> +++ b/net/mac80211/key.c
> @@ -102,7 +102,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
>  	if (!ret) {
>  		key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
>  
> -		if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
> +		if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) ||
> +				(key->conf.flags &
> +					IEEE80211_KEY_FLAG_GENERATE_IV)))
>  			key->local->crypto_tx_tailroom_needed_cnt--;

Can we have a bit nicer code style? :)

Also, need to submit a proper patch with S-o-b etc, and reported-by
rossi.

johannes


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()
  2011-05-03 14:28     ` Johannes Berg
@ 2011-05-03 15:18       ` Mohammed Shafi
  0 siblings, 0 replies; 9+ messages in thread
From: Mohammed Shafi @ 2011-05-03 15:18 UTC (permalink / raw)
  To: Johannes Berg, Yogesh Powar
  Cc: rossi.f@inwind.it, linux-wireless@vger.kernel.org

On Tue, May 3, 2011 at 7:58 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2011-05-03 at 07:25 -0700, Yogesh Powar wrote:
>> >so may will this help? I don't know whether its a correct and with a
>> >quick test the warning gets fixed.
>> That should solve our problem with following explanation.
>>
>> The devices that require IV generation in software need tailroom reservation
>> for ICVs used in TKIP or WEP encryptions.
>>
>> Currently, decision to skip the tailroom reservation in the tx
>> path was taken only on whether driver wants MMIC to be generated
>> in software or not. Following patch appends IV generation check for such
>> decisions.
>>
>> diff --git a/net/mac80211/key.c b/net/mac80211/key.c
>> index ca3c626..f3c4deb 100644
>> --- a/net/mac80211/key.c
>> +++ b/net/mac80211/key.c
>> @@ -102,7 +102,9 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
>>       if (!ret) {
>>               key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
>>
>> -             if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
>> +             if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) ||
>> +                             (key->conf.flags &
>> +                                     IEEE80211_KEY_FLAG_GENERATE_IV)))
>>                       key->local->crypto_tx_tailroom_needed_cnt--;
>
> Can we have a bit nicer code style? :)
>
> Also, need to submit a proper patch with S-o-b etc, and reported-by
> rossi.

Can please send the patch, with some more testing.


>
> johannes
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-05-03 15:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-03 11:27 WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]() rossi.f
2011-05-03 11:44 ` Mohammed Shafi
2011-05-03 14:25   ` Yogesh Powar
2011-05-03 14:28     ` Johannes Berg
2011-05-03 15:18       ` Mohammed Shafi
  -- strict thread matches above, loose matches on Subject: below --
2011-05-03 10:02 rossi.f
2011-05-03 10:51 ` Yogesh Powar
2011-05-02 20:57 Fabio Rossi
2011-05-03  8:31 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).