linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"bcm43xx-dev@lists.berlios.de" <bcm43xx-dev@lists.berlios.de>,
	Michael Buesch <mb@bu3sch.de>,
	linux-kernel@vger.kernel.org
Subject: Re: Wireless-testing's b43 panics in b43_generate_txhdr on packet transmit
Date: Mon, 02 Jun 2008 00:33:04 -0400	[thread overview]
Message-ID: <1212381184.2894.3.camel@rd> (raw)
In-Reply-To: <20080602000841.qjrd66s3esgscko0-cebfxv@fcnzpbc.arg@webmail.spamcop.net>

On Mon, 2008-06-02 at 00:08 -0400, Pavel Roskin wrote:

> wep_encrypt_skb() in wep.c would not return TX_CONTINUE.  But most  
> importantly, there is a suspicious change in wep_encrypt_skb() - the  
> key is set in the other branch of the condition.
> 
> I'll try to restore the original logic in wep.c.  I'll post a patch if  
> it works.

That was it!  Here's the patch (I'll submit it to John tomorrow if nobody objects).


mac80211: fix hardware WEP support

Setting hardware WEP key was accidentally moved to a wrong place in
57ccbb1cbe3f8e10a500ff8b9fb26dc1a542fe99.  Move it back.  This fixes
kernel panic in b43 if WEP is used.

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

 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;


-- 
Regards,
Pavel Roskin

  parent reply	other threads:[~2008-06-02  4:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-31 14:23 Wireless-testing's b43 panics in b43_generate_txhdr on packet transmit Stefanik Gábor
2008-05-31 15:11 ` Michael Buesch
2008-05-31 16:34   ` Stefanik Gábor
2008-05-31 16:41     ` Michael Buesch
2008-05-31 16:50       ` Pavel Roskin
2008-05-31 17:54         ` Michael Buesch
2008-05-31 20:22           ` Johannes Berg
2008-05-31 20:29             ` Stefanik Gábor
2008-05-31 20:48               ` Michael Buesch
     [not found]             ` <20080602000841.qjrd66s3esgscko0-cebfxv@fcnzpbc.arg@webmail.spamcop.net>
2008-06-02  4:33               ` Pavel Roskin [this message]
2008-06-02  7:47           ` Johannes Berg
2008-05-31 16:48 ` Pavel Roskin
2008-05-31 16:54   ` Stefanik Gábor
2008-05-31 17:06     ` Pavel Roskin
2008-05-31 17:59   ` Michael Buesch

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=1212381184.2894.3.camel@rd \
    --to=proski@gnu.org \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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).