Make use of the added constants to reduce duplication. Signed-off-by: Chien Wong --- net/mac80211/aes_cmac.c | 4 ++-- net/mac80211/aes_gmac.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c index adce68ea0981..01fb8b6c5dfb 100644 --- a/net/mac80211/aes_cmac.c +++ b/net/mac80211/aes_cmac.c @@ -16,8 +16,8 @@ #include "key.h" #include "aes_cmac.h" -#define CMAC_TLEN 8 /* CMAC TLen = 64 bits (8 octets) */ -#define CMAC_TLEN_256 16 /* CMAC TLen = 128 bits (16 octets) */ +#define CMAC_TLEN IEEE80211_CMAC_128_MIC_LEN +#define CMAC_TLEN_256 IEEE80211_CMAC_256_MIC_LEN #define AAD_LEN 20 static const u8 zero[CMAC_TLEN_256]; diff --git a/net/mac80211/aes_gmac.h b/net/mac80211/aes_gmac.h index c739356bae2a..09378e52c7a6 100644 --- a/net/mac80211/aes_gmac.h +++ b/net/mac80211/aes_gmac.h @@ -9,7 +9,7 @@ #include #define GMAC_AAD_LEN 20 -#define GMAC_MIC_LEN 16 +#define GMAC_MIC_LEN IEEE80211_GMAC_MIC_LEN #define GMAC_NONCE_LEN 12 struct crypto_aead *ieee80211_aes_gmac_key_setup(const u8 key[], -- 2.51.2