diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 06c64744df27..37294a657f8b 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -809,6 +809,16 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
809 | info->flags |= IEEE80211_TX_STAT_TX_FILTERED; | 809 | info->flags |= IEEE80211_TX_STAT_TX_FILTERED; |
810 | info->status.ack_signal = p54_rssi_to_dbm(dev, | 810 | info->status.ack_signal = p54_rssi_to_dbm(dev, |
811 | (int)payload->ack_rssi); | 811 | (int)payload->ack_rssi); |
812 | |||
813 | if (entry_data->key_type == P54_CRYPTO_TKIPMICHAEL) { | ||
814 | u8 *iv = (u8 *)(entry_data->align + pad + | ||
815 | entry_data->crypt_offset); | ||
816 | |||
817 | /* Restore the original TKIP IV. */ | ||
818 | iv[2] = iv[0]; | ||
819 | iv[0] = iv[1]; | ||
820 | iv[1] = (iv[0] | 0x20) & 0x7f; /* WEPSeed - 8.3.2.2 */ | ||
821 | } | ||
812 | skb_pull(entry, sizeof(*hdr) + pad + sizeof(*entry_data)); | 822 | skb_pull(entry, sizeof(*hdr) + pad + sizeof(*entry_data)); |
813 | ieee80211_tx_status_irqsafe(dev, entry); | 823 | ieee80211_tx_status_irqsafe(dev, entry); |
814 | goto out; | 824 | goto out; |
@@ -1394,7 +1404,6 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
1394 | hdr->tries = ridx; | 1404 | hdr->tries = ridx; |
1395 | txhdr->rts_rate_idx = 0; | 1405 | txhdr->rts_rate_idx = 0; |
1396 | if (info->control.hw_key) { | 1406 | if (info->control.hw_key) { |
1397 | crypt_offset += info->control.hw_key->iv_len; | ||
1398 | txhdr->key_type = p54_convert_algo(info->control.hw_key->alg); | 1407 | txhdr->key_type = p54_convert_algo(info->control.hw_key->alg); |
1399 | txhdr->key_len = min((u8)16, info->control.hw_key->keylen); | 1408 | txhdr->key_len = min((u8)16, info->control.hw_key->keylen); |
1400 | memcpy(txhdr->key, info->control.hw_key->key, txhdr->key_len); | 1409 | memcpy(txhdr->key, info->control.hw_key->key, txhdr->key_len); |
@@ -1408,6 +1417,8 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
1408 | } | 1417 | } |
1409 | /* reserve some space for ICV */ | 1418 | /* reserve some space for ICV */ |
1410 | len += info->control.hw_key->icv_len; | 1419 | len += info->control.hw_key->icv_len; |
1420 | memset(skb_put(skb, info->control.hw_key->icv_len), 0, | ||
1421 | info->control.hw_key->icv_len); | ||
1411 | } else { | 1422 | } else { |
1412 | txhdr->key_type = 0; | 1423 | txhdr->key_type = 0; |
1413 | txhdr->key_len = 0; | 1424 | txhdr->key_len = 0; |