diff options
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r-- | net/mac80211/wpa.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 9101b48ec2ae..4f8bfea278f2 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c | |||
@@ -196,19 +196,13 @@ ieee80211_tx_result | |||
196 | ieee80211_crypto_tkip_encrypt(struct ieee80211_tx_data *tx) | 196 | ieee80211_crypto_tkip_encrypt(struct ieee80211_tx_data *tx) |
197 | { | 197 | { |
198 | struct sk_buff *skb = tx->skb; | 198 | struct sk_buff *skb = tx->skb; |
199 | int i; | ||
200 | 199 | ||
201 | ieee80211_tx_set_protected(tx); | 200 | ieee80211_tx_set_protected(tx); |
202 | 201 | ||
203 | if (tkip_encrypt_skb(tx, skb) < 0) | 202 | do { |
204 | return TX_DROP; | 203 | if (tkip_encrypt_skb(tx, skb) < 0) |
205 | 204 | return TX_DROP; | |
206 | if (tx->extra_frag) { | 205 | } while ((skb = skb->next)); |
207 | for (i = 0; i < tx->num_extra_frag; i++) { | ||
208 | if (tkip_encrypt_skb(tx, tx->extra_frag[i])) | ||
209 | return TX_DROP; | ||
210 | } | ||
211 | } | ||
212 | 206 | ||
213 | return TX_CONTINUE; | 207 | return TX_CONTINUE; |
214 | } | 208 | } |
@@ -428,19 +422,13 @@ ieee80211_tx_result | |||
428 | ieee80211_crypto_ccmp_encrypt(struct ieee80211_tx_data *tx) | 422 | ieee80211_crypto_ccmp_encrypt(struct ieee80211_tx_data *tx) |
429 | { | 423 | { |
430 | struct sk_buff *skb = tx->skb; | 424 | struct sk_buff *skb = tx->skb; |
431 | int i; | ||
432 | 425 | ||
433 | ieee80211_tx_set_protected(tx); | 426 | ieee80211_tx_set_protected(tx); |
434 | 427 | ||
435 | if (ccmp_encrypt_skb(tx, skb) < 0) | 428 | do { |
436 | return TX_DROP; | 429 | if (ccmp_encrypt_skb(tx, skb) < 0) |
437 | 430 | return TX_DROP; | |
438 | if (tx->extra_frag) { | 431 | } while ((skb = skb->next)); |
439 | for (i = 0; i < tx->num_extra_frag; i++) { | ||
440 | if (ccmp_encrypt_skb(tx, tx->extra_frag[i])) | ||
441 | return TX_DROP; | ||
442 | } | ||
443 | } | ||
444 | 432 | ||
445 | return TX_CONTINUE; | 433 | return TX_CONTINUE; |
446 | } | 434 | } |