projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0dea9c
)
mac80211: use CMAC_PN_LEN
author
Johannes Berg
<johannes.berg@intel.com>
Wed, 14 Nov 2012 22:15:11 +0000
(23:15 +0100)
committer
Johannes Berg
<johannes.berg@intel.com>
Mon, 19 Nov 2012 14:43:55 +0000
(15:43 +0100)
Instead of hardcoding its value (6), use the constant.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/key.c
patch
|
blob
|
blame
|
history
diff --git
a/net/mac80211/key.c
b/net/mac80211/key.c
index d27e61aaa71bd7200c527606820f5d5d82c39ff0..0f18ef59392de2f622bd71d2e1d939d633218543 100644
(file)
--- 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,
key->conf.iv_len = 0;
key->conf.icv_len = sizeof(struct ieee80211_mmie);
if (seq)
- for (j = 0; j < 6; j++)
- key->u.aes_cmac.rx_pn[j] = seq[6 - j - 1];
+ for (j = 0; j < CMAC_PN_LEN; j++)
+ key->u.aes_cmac.rx_pn[j] =
+ seq[CMAC_PN_LEN - j - 1];
/*
* Initialize AES key state here as an optimization so that
* it does not need to be initialized for every packet.