Commit 2b212141 authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville

mac80211: fix panic when using hardware WEP

e039fa4a ("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: default avatarPavel Roskin <proski@gnu.org>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5854a32e
...@@ -335,10 +335,10 @@ static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) ...@@ -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; info->control.icv_len = WEP_ICV_LEN;
if (!(tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) { 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)) if (ieee80211_wep_encrypt(tx->local, skb, tx->key))
return -1; return -1;
} else { } else {
info->control.hw_key = &tx->key->conf;
if (tx->key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) { if (tx->key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) {
if (!ieee80211_wep_add_iv(tx->local, skb, tx->key)) if (!ieee80211_wep_add_iv(tx->local, skb, tx->key))
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment