diff options
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r-- | net/mac80211/wpa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 0ae23c60968..4d05ad9403a 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c | |||
@@ -183,7 +183,8 @@ static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) | |||
183 | u8 *pos; | 183 | u8 *pos; |
184 | 184 | ||
185 | if (info->control.hw_key && | 185 | if (info->control.hw_key && |
186 | !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV)) { | 186 | !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) && |
187 | !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)) { | ||
187 | /* hwaccel - with no need for software-generated IV */ | 188 | /* hwaccel - with no need for software-generated IV */ |
188 | return 0; | 189 | return 0; |
189 | } | 190 | } |
@@ -204,6 +205,11 @@ static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) | |||
204 | memmove(pos, pos + TKIP_IV_LEN, hdrlen); | 205 | memmove(pos, pos + TKIP_IV_LEN, hdrlen); |
205 | pos += hdrlen; | 206 | pos += hdrlen; |
206 | 207 | ||
208 | /* the HW only needs room for the IV, but not the actual IV */ | ||
209 | if (info->control.hw_key && | ||
210 | (info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)) | ||
211 | return 0; | ||
212 | |||
207 | /* Increase IV for the frame */ | 213 | /* Increase IV for the frame */ |
208 | spin_lock_irqsave(&key->u.tkip.txlock, flags); | 214 | spin_lock_irqsave(&key->u.tkip.txlock, flags); |
209 | key->u.tkip.tx.iv16++; | 215 | key->u.tkip.tx.iv16++; |