linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Pavel Roskin <proski@gnu.org>
Cc: linux-wireless@vger.kernel.org,
	John W Linville <linville@tuxdriver.com>,
	bcm43xx-dev@lists.berlios.de
Subject: Re: [PATCH] mac80211: fix panic when using hardware WEP
Date: Mon, 02 Jun 2008 14:19:43 +0200	[thread overview]
Message-ID: <1212409183.4148.14.camel@johannes.berg> (raw)
In-Reply-To: <20080602115437.12734.42209.stgit@dv.roinet.com>

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

On Mon, 2008-06-02 at 07:54 -0400, Pavel Roskin wrote:
> 57ccbb1cbe3f8e10a500ff8b9fb26dc1a542fe99 misplaced code for setting
> hardware WEP keys.  Move it back.  This fixes kernel panic in b43 if WEP
> is used and hardware encryption is enabled.

Oh wow, yes, sorry about that, and thanks for tracking it down!

> Signed-off-by: Pavel Roskin <proski@gnu.org>

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
> 
>  net/mac80211/wep.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
> index c9fd129..e7b6344 100644
> --- a/net/mac80211/wep.c
> +++ b/net/mac80211/wep.c
> @@ -335,10 +335,10 @@ static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
>  	info->control.icv_len = WEP_ICV_LEN;
>  
>  	if (!(tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) {
> -		info->control.hw_key = &tx->key->conf;
>  		if (ieee80211_wep_encrypt(tx->local, skb, tx->key))
>  			return -1;
>  	} else {
> +		info->control.hw_key = &tx->key->conf;
>  		if (tx->key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) {
>  			if (!ieee80211_wep_add_iv(tx->local, skb, tx->key))
>  				return -1;
> 

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

      reply	other threads:[~2008-06-02 12:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 11:54 [PATCH] mac80211: fix panic when using hardware WEP Pavel Roskin
2008-06-02 12:19 ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1212409183.4148.14.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=proski@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).