diff options
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r-- | net/mac80211/key.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 0f18ef59392d..619c5d697999 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -339,7 +339,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
339 | key->conf.iv_len = TKIP_IV_LEN; | 339 | key->conf.iv_len = TKIP_IV_LEN; |
340 | key->conf.icv_len = TKIP_ICV_LEN; | 340 | key->conf.icv_len = TKIP_ICV_LEN; |
341 | if (seq) { | 341 | if (seq) { |
342 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) { | 342 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) { |
343 | key->u.tkip.rx[i].iv32 = | 343 | key->u.tkip.rx[i].iv32 = |
344 | get_unaligned_le32(&seq[2]); | 344 | get_unaligned_le32(&seq[2]); |
345 | key->u.tkip.rx[i].iv16 = | 345 | key->u.tkip.rx[i].iv16 = |
@@ -352,7 +352,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
352 | key->conf.iv_len = CCMP_HDR_LEN; | 352 | key->conf.iv_len = CCMP_HDR_LEN; |
353 | key->conf.icv_len = CCMP_MIC_LEN; | 353 | key->conf.icv_len = CCMP_MIC_LEN; |
354 | if (seq) { | 354 | if (seq) { |
355 | for (i = 0; i < NUM_RX_DATA_QUEUES + 1; i++) | 355 | for (i = 0; i < IEEE80211_NUM_TIDS + 1; i++) |
356 | for (j = 0; j < CCMP_PN_LEN; j++) | 356 | for (j = 0; j < CCMP_PN_LEN; j++) |
357 | key->u.ccmp.rx_pn[i][j] = | 357 | key->u.ccmp.rx_pn[i][j] = |
358 | seq[CCMP_PN_LEN - j - 1]; | 358 | seq[CCMP_PN_LEN - j - 1]; |
@@ -655,16 +655,16 @@ void ieee80211_get_key_rx_seq(struct ieee80211_key_conf *keyconf, | |||
655 | 655 | ||
656 | switch (key->conf.cipher) { | 656 | switch (key->conf.cipher) { |
657 | case WLAN_CIPHER_SUITE_TKIP: | 657 | case WLAN_CIPHER_SUITE_TKIP: |
658 | if (WARN_ON(tid < 0 || tid >= NUM_RX_DATA_QUEUES)) | 658 | if (WARN_ON(tid < 0 || tid >= IEEE80211_NUM_TIDS)) |
659 | return; | 659 | return; |
660 | seq->tkip.iv32 = key->u.tkip.rx[tid].iv32; | 660 | seq->tkip.iv32 = key->u.tkip.rx[tid].iv32; |
661 | seq->tkip.iv16 = key->u.tkip.rx[tid].iv16; | 661 | seq->tkip.iv16 = key->u.tkip.rx[tid].iv16; |
662 | break; | 662 | break; |
663 | case WLAN_CIPHER_SUITE_CCMP: | 663 | case WLAN_CIPHER_SUITE_CCMP: |
664 | if (WARN_ON(tid < -1 || tid >= NUM_RX_DATA_QUEUES)) | 664 | if (WARN_ON(tid < -1 || tid >= IEEE80211_NUM_TIDS)) |
665 | return; | 665 | return; |
666 | if (tid < 0) | 666 | if (tid < 0) |
667 | pn = key->u.ccmp.rx_pn[NUM_RX_DATA_QUEUES]; | 667 | pn = key->u.ccmp.rx_pn[IEEE80211_NUM_TIDS]; |
668 | else | 668 | else |
669 | pn = key->u.ccmp.rx_pn[tid]; | 669 | pn = key->u.ccmp.rx_pn[tid]; |
670 | memcpy(seq->ccmp.pn, pn, CCMP_PN_LEN); | 670 | memcpy(seq->ccmp.pn, pn, CCMP_PN_LEN); |