xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/mvl88w8977/mlan/esa/common/aes_cmac_rom.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file aes_cmac_rom.h
2  *
3  *  @brief This file contains the define for aes_cmac_rom
4  *
5  * Copyright (C) 2014-2017, Marvell International Ltd.
6  *
7  * This software file (the "File") is distributed by Marvell International
8  * Ltd. under the terms of the GNU General Public License Version 2, June 1991
9  * (the "License").  You may use, redistribute and/or modify this File in
10  * accordance with the terms and conditions of the License, a copy of which
11  * is available by writing to the Free Software Foundation, Inc.,
12  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
13  * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
14  *
15  * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
17  * ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
18  * this warranty disclaimer.
19  */
20 
21 /******************************************************
22 Change log:
23     03/07/2014: Initial version
24 ******************************************************/
25 #ifndef _AES_CMAC_ROM_H_
26 #define _AES_CMAC_ROM_H_
27 
28 #include "wltypes.h"
29 
30 extern BOOLEAN (*mrvl_aes_cmac_hook) (UINT8 *key, UINT8 *input, int length,
31 				      UINT8 *mac);
32 extern void mrvl_aes_cmac(phostsa_private priv, UINT8 *key, UINT8 *input,
33 			  int length, UINT8 *mac);
34 
35 extern BOOLEAN (*mrvl_aes_128_hook) (UINT8 *key, UINT8 *input, UINT8 *output);
36 extern void mrvl_aes_128(UINT8 *key, UINT8 *input, UINT8 *output);
37 
38 /* RAM Linkages */
39 extern void (*rom_hal_EnableWEU) (void);
40 extern void (*rom_hal_DisableWEU) (void);
41 
42 extern void xor_128(UINT8 *a, UINT8 *b, UINT8 *out);
43 extern void leftshift_onebit(UINT8 *input, UINT8 *output);
44 extern void padding(UINT8 *lastb, UINT8 *pad, int length);
45 
46 #endif
47