qcacmn: In crypto use QDF api to calculate MIC for OS derivatives

For WLAN_CRYPTO_OMAC1_OS_DERIVATIVE and
WLAN_CRYPTO_GCM_OS_DERIVATIVE set use QDF API to calculate MIC

Change-Id: I5971eb39414a292534981753805df6d9beb54be0
CRs-Fixed: 2664275
这个提交包含在:
Abhishek Singh
2020-04-13 11:41:53 +05:30
提交者 nshrivas
父节点 e2d6e92a68
当前提交 d96c0dbfbf
修改 4 个文件,包含 168 行新增13 行删除

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -47,6 +47,7 @@ extern "C" {
#define FIXED_PARAM_OFFSET_ASSOC_REQ 4
#define FIXED_PARAM_OFFSET_ASSOC_RSP 6
#define CMAC_TLEN 8 /* CMAC TLen = 64 bits (8 octets) */
#define AAD_LEN 20
#define IEEE80211_MMIE_GMAC_MICLEN 16
@@ -152,9 +153,21 @@ int qdf_aes_ctr(const uint8_t *key, unsigned int key_len, uint8_t *siv,
*
* Return: 0 if success else Error number
*/
int qdf_crypto_aes_gmac(uint8_t *key, uint16_t key_length,
uint8_t *iv, uint8_t *aad, uint8_t *data,
uint16_t data_len, uint8_t *mic);
int qdf_crypto_aes_gmac(const uint8_t *key, uint16_t key_length,
uint8_t *iv, const uint8_t *aad,
const uint8_t *data, uint16_t data_len, uint8_t *mic);
/**
* qdf_crypto_aes_128_cmac: This API calculates MIC for AES 128 CMAC
* @key: key used for operation
* @data: Pointer to data
* @len: Length of data
* @mic: Pointer to MIC
*
* Return: 0 if success else Error number
*/
int qdf_crypto_aes_128_cmac(const uint8_t *key, const uint8_t *data,
uint16_t len, uint8_t *mic);
#ifdef __cplusplus
}