Skip to content

Commit

Permalink
mac80211: fix panic when using hardware WEP
Browse files Browse the repository at this point in the history
e039fa4 ("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>
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Jun 3, 2008
1 parent 5854a32 commit 2b21214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/wep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2b21214

Please sign in to comment.