1 /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
13 #ifndef __QCOM_WLAN_SECIF_H__
14 #define __QCOM_WLAN_SECIF_H__
16 #include <crypto/hash.h>
18 #define CMAC_TLEN 8 /* CMAC TLen = 64 bits (8 octets) */
21 * Prototypes for WLAN Security Interface Functions
24 extern struct crypto_ahash *
25 wcnss_wlan_crypto_alloc_ahash(const char *alg_name, u32 type, u32 mask);
27 extern int wcnss_wlan_crypto_ahash_digest(struct ahash_request *req);
28 extern void wcnss_wlan_crypto_free_ahash(struct crypto_ahash *tfm);
29 extern int wcnss_wlan_crypto_ahash_setkey(struct crypto_ahash *tfm,
30 const u8 *key, unsigned int keylen);
31 extern struct crypto_ablkcipher *
32 wcnss_wlan_crypto_alloc_ablkcipher(const char *alg_name, u32 type, u32 mask);
33 extern void wcnss_wlan_ablkcipher_request_free(struct ablkcipher_request *req);
34 extern void wcnss_wlan_crypto_free_cipher(struct crypto_cipher *tfm);
35 extern void wcnss_wlan_crypto_free_ablkcipher(struct crypto_ablkcipher *tfm);
36 extern struct crypto_cipher *
37 wcnss_wlan_crypto_alloc_cipher(const char *alg_name, u32 type, u32 mask);
38 extern void wcnss_wlan_cmac_calc_mic(struct crypto_cipher *tfm, u8 *m,
41 #endif /* __QCOM_WLAN_SECIF_H__ */