diff options
author | Pavel Roskin <proski@gnu.org> | 2008-06-02 13:54:50 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-03 21:00:29 +0200 |
commit | 2b2121417eff64125bdb7f322d3b533e06d73dae (patch) | |
tree | 281f8693f9c3040ed788f0e3d913e68537646dd2 /net/mac80211/wep.c | |
parent | mac80211: fix rate control initialisation (diff) | |
download | linux-2b2121417eff64125bdb7f322d3b533e06d73dae.tar.xz linux-2b2121417eff64125bdb7f322d3b533e06d73dae.zip |
mac80211: fix panic when using hardware WEP
e039fa4a4195ac4ee895e6f3d1334beed63256fe ("mac80211: move TX info into
skb->cb") 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.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wep.c')
-rw-r--r-- | 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 c9fd1291b19d..e7b6344c900a 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; |