linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix sw crypto
@ 2010-01-25 10:36 Johannes Berg
  2010-01-25 15:21 ` Maxim Levitsky
  2010-01-25 22:09 ` Fabio Rossi
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2010-01-25 10:36 UTC (permalink / raw)
  To: John Linville; +Cc: Maxim Levitsky, Jochen Friedrich, linux-wireless

What a stupid mistake. In

    commit 813d76694043d00b59475baa1fbfaf54a2eb7fad
    Author: Johannes Berg <johannes@sipsolutions.net>
    Date:   Sun Jan 17 01:47:58 2010 +0100

        mac80211: move control.hw_key assignment

I inserted code testing the wrong flags field,
which means that the test is almost always true
(it's really testing for the peer's WMM support)
and thus the later parts of the stack assume hw
crypto will be done even if that's not true.

Obviously, that broke software crypto. Maxim
said so specifically, and Jochen probably uses
some cipher that iwl3945 doesn't support in
hardware, which might also explain that Maxim
reports that even hw crypto is broken.

Fix this to test the right flags field.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Reported-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/tx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/net/mac80211/tx.c	2010-01-25 11:13:59.000000000 +0100
+++ wireless-testing/net/mac80211/tx.c	2010-01-25 11:29:24.000000000 +0100
@@ -559,7 +559,7 @@ ieee80211_tx_h_select_key(struct ieee802
 		}
 
 		if (!skip_hw && tx->key &&
-		    tx->key->conf.flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
+		    tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
 			info->control.hw_key = &tx->key->conf;
 	}
 



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

* Re: [PATCH] mac80211: fix sw crypto
  2010-01-25 10:36 [PATCH] mac80211: fix sw crypto Johannes Berg
@ 2010-01-25 15:21 ` Maxim Levitsky
  2010-01-25 15:54   ` Johannes Berg
  2010-01-25 22:09 ` Fabio Rossi
  1 sibling, 1 reply; 5+ messages in thread
From: Maxim Levitsky @ 2010-01-25 15:21 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, Jochen Friedrich, linux-wireless

On Mon, 2010-01-25 at 11:36 +0100, Johannes Berg wrote: 
> What a stupid mistake. In
> 
>     commit 813d76694043d00b59475baa1fbfaf54a2eb7fad
>     Author: Johannes Berg <johannes@sipsolutions.net>
>     Date:   Sun Jan 17 01:47:58 2010 +0100
> 
>         mac80211: move control.hw_key assignment
> 
> I inserted code testing the wrong flags field,
> which means that the test is almost always true
> (it's really testing for the peer's WMM support)
> and thus the later parts of the stack assume hw
> crypto will be done even if that's not true.
> 
> Obviously, that broke software crypto. Maxim
> said so specifically, and Jochen probably uses
> some cipher that iwl3945 doesn't support in
> hardware, which might also explain that Maxim
> reports that even hw crypto is broken.
This patch works for me. Thanks.

What chipers does iwl3945 support?
I use CCMP, and I also know that software encryption is used by default.

Best regards,
Maxim Levitsky 
> 
> Fix this to test the right flags field.
> 
> Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
> Reported-by: Jochen Friedrich <jochen@scram.de>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>  net/mac80211/tx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- wireless-testing.orig/net/mac80211/tx.c	2010-01-25 11:13:59.000000000 +0100
> +++ wireless-testing/net/mac80211/tx.c	2010-01-25 11:29:24.000000000 +0100
> @@ -559,7 +559,7 @@ ieee80211_tx_h_select_key(struct ieee802
>  		}
>  
>  		if (!skip_hw && tx->key &&
> -		    tx->key->conf.flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
> +		    tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
>  			info->control.hw_key = &tx->key->conf;
>  	}
>  
> 
> 



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

* Re: [PATCH] mac80211: fix sw crypto
  2010-01-25 15:21 ` Maxim Levitsky
@ 2010-01-25 15:54   ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2010-01-25 15:54 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: John Linville, Jochen Friedrich, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

On Mon, 2010-01-25 at 17:21 +0200, Maxim Levitsky wrote:

> > Obviously, that broke software crypto. Maxim
> > said so specifically, and Jochen probably uses
> > some cipher that iwl3945 doesn't support in
> > hardware, which might also explain that Maxim
> > reports that even hw crypto is broken.
> This patch works for me. Thanks.

Thanks for testing.

> What chipers does iwl3945 support?
> I use CCMP, and I also know that software encryption is used by default.

I don't know off-hand, but I'm pretty sure it doesn't do TKIP, or at
least the driver doesn't.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH] mac80211: fix sw crypto
  2010-01-25 10:36 [PATCH] mac80211: fix sw crypto Johannes Berg
  2010-01-25 15:21 ` Maxim Levitsky
@ 2010-01-25 22:09 ` Fabio Rossi
  2010-01-25 22:16   ` Jochen Friedrich
  1 sibling, 1 reply; 5+ messages in thread
From: Fabio Rossi @ 2010-01-25 22:09 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, John Linville, Maxim Levitsky, Jochen Friedrich

On Monday 25 January 2010 11:36:16 Johannes Berg wrote:

> What a stupid mistake. In
> 
>     commit 813d76694043d00b59475baa1fbfaf54a2eb7fad
>     Author: Johannes Berg <johannes@sipsolutions.net>
>     Date:   Sun Jan 17 01:47:58 2010 +0100
> 
>         mac80211: move control.hw_key assignment
> 
> I inserted code testing the wrong flags field,
> which means that the test is almost always true
> (it's really testing for the peer's WMM support)
> and thus the later parts of the stack assume hw
> crypto will be done even if that's not true.
> 
> Obviously, that broke software crypto. Maxim
> said so specifically, and Jochen probably uses
> some cipher that iwl3945 doesn't support in
> hardware, which might also explain that Maxim
> reports that even hw crypto is broken.
> 
> Fix this to test the right flags field.
> 

Tested-by: Fabio Rossi <rossi.f@inwind.it>


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

* Re: [PATCH] mac80211: fix sw crypto
  2010-01-25 22:09 ` Fabio Rossi
@ 2010-01-25 22:16   ` Jochen Friedrich
  0 siblings, 0 replies; 5+ messages in thread
From: Jochen Friedrich @ 2010-01-25 22:16 UTC (permalink / raw)
  To: Fabio Rossi; +Cc: linux-wireless, Johannes Berg, John Linville, Maxim Levitsky

Fabio Rossi wrote:
> On Monday 25 January 2010 11:36:16 Johannes Berg wrote:
> 
>> What a stupid mistake. In
>>
>>     commit 813d76694043d00b59475baa1fbfaf54a2eb7fad
>>     Author: Johannes Berg <johannes@sipsolutions.net>
>>     Date:   Sun Jan 17 01:47:58 2010 +0100
>>
>>         mac80211: move control.hw_key assignment
>>
>> I inserted code testing the wrong flags field,
>> which means that the test is almost always true
>> (it's really testing for the peer's WMM support)
>> and thus the later parts of the stack assume hw
>> crypto will be done even if that's not true.
>>
>> Obviously, that broke software crypto. Maxim
>> said so specifically, and Jochen probably uses
>> some cipher that iwl3945 doesn't support in
>> hardware, which might also explain that Maxim
>> reports that even hw crypto is broken.
>>
>> Fix this to test the right flags field.
>>
> 
> Tested-by: Fabio Rossi <rossi.f@inwind.it>

Tested-by: Jochen Friedrich <jochen@scram.de>

Thanks,
Jochen

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

end of thread, other threads:[~2010-01-25 22:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-25 10:36 [PATCH] mac80211: fix sw crypto Johannes Berg
2010-01-25 15:21 ` Maxim Levitsky
2010-01-25 15:54   ` Johannes Berg
2010-01-25 22:09 ` Fabio Rossi
2010-01-25 22:16   ` Jochen Friedrich

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).