diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-27 17:35:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 17:35:07 -0700 |
commit | 0870352bc6e0dee485c86a0c99dd60e7089c8917 (patch) | |
tree | 0c6259b663350594bff4f128e12f8bd6d4c769c1 /net/mac80211/wep.c | |
parent | c44a4366649aca4f5b4a51ff71d4c9cde3b7c9da (diff) | |
parent | 8a5117d80fe93de5df5b56480054f7df1fd20755 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/mac80211/wep.c')
-rw-r--r-- | net/mac80211/wep.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 7043ddc7549..ef73105b306 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c @@ -329,24 +329,17 @@ static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) ieee80211_tx_result ieee80211_crypto_wep_encrypt(struct ieee80211_tx_data *tx) { - int i; + struct sk_buff *skb; ieee80211_tx_set_protected(tx); - if (wep_encrypt_skb(tx, tx->skb) < 0) { - I802_DEBUG_INC(tx->local->tx_handlers_drop_wep); - return TX_DROP; - } - - if (tx->extra_frag) { - for (i = 0; i < tx->num_extra_frag; i++) { - if (wep_encrypt_skb(tx, tx->extra_frag[i])) { - I802_DEBUG_INC(tx->local-> - tx_handlers_drop_wep); - return TX_DROP; - } + skb = tx->skb; + do { + if (wep_encrypt_skb(tx, skb) < 0) { + I802_DEBUG_INC(tx->local->tx_handlers_drop_wep); + return TX_DROP; } - } + } while ((skb = skb->next)); return TX_CONTINUE; } |