diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-11-14 17:15:11 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-19 09:43:55 -0500 |
commit | 0f92732344e88023807342fef4c566e0660c2fd9 (patch) | |
tree | 6c22b92d74e6dc18fae1a1389bfcc532c886e65f /net | |
parent | f0dea9c73a16caac6b46886eb08f51dd82894ca4 (diff) |
mac80211: use CMAC_PN_LEN
Instead of hardcoding its value (6), use the constant.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/key.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index d27e61aaa71b..0f18ef59392d 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -372,8 +372,9 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
372 | key->conf.iv_len = 0; | 372 | key->conf.iv_len = 0; |
373 | key->conf.icv_len = sizeof(struct ieee80211_mmie); | 373 | key->conf.icv_len = sizeof(struct ieee80211_mmie); |
374 | if (seq) | 374 | if (seq) |
375 | for (j = 0; j < 6; j++) | 375 | for (j = 0; j < CMAC_PN_LEN; j++) |
376 | key->u.aes_cmac.rx_pn[j] = seq[6 - j - 1]; | 376 | key->u.aes_cmac.rx_pn[j] = |
377 | seq[CMAC_PN_LEN - j - 1]; | ||
377 | /* | 378 | /* |
378 | * Initialize AES key state here as an optimization so that | 379 | * Initialize AES key state here as an optimization so that |
379 | * it does not need to be initialized for every packet. | 380 | * it does not need to be initialized for every packet. |