xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/include/802.11r.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (C) 2020, Broadcom.
3  *
4  *      Unless you and Broadcom execute a separate written software license
5  * agreement governing use of this software, this software is licensed to you
6  * under the terms of the GNU General Public License version 2 (the "GPL"),
7  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
8  * following added to such license:
9  *
10  *      As a special exception, the copyright holders of this software give you
11  * permission to link this software with independent modules, and to copy and
12  * distribute the resulting executable under terms of your choice, provided that
13  * you also meet, for each linked independent module, the terms and conditions of
14  * the license of that module.  An independent module is a module which is not
15  * derived from this software.  The special exception does not apply to any
16  * modifications of the software.
17  *
18  *
19  * <<Broadcom-WL-IPTag/Dual:>>
20  *
21  * Fundamental constants relating to 802.11r
22  */
23 
24 #ifndef _802_11r_H_
25 #define _802_11r_H_
26 
27 #define FBT_R0KH_ID_LEN 49 /* includes null termination */
28 #define FBT_REASSOC_TIME_DEF	1000
29 
30 #define DOT11_FBT_SUBELEM_ID_R1KH_ID		1
31 #define DOT11_FBT_SUBELEM_ID_GTK		2
32 #define DOT11_FBT_SUBELEM_ID_R0KH_ID		3
33 #define DOT11_FBT_SUBELEM_ID_IGTK		4
34 #define DOT11_FBT_SUBELEM_ID_OCI		5u
35 
36 /*
37 * FBT Subelement id lenths
38 */
39 
40 #define DOT11_FBT_SUBELEM_R1KH_LEN		6
41 /* GTK_FIXED_LEN = Key_Info (2Bytes) + Key_Length (1Byte) + RSC (8Bytes) */
42 #define DOT11_FBT_SUBELEM_GTK_FIXED_LEN		11
43 /* GTK_MIN_LEN = GTK_FIXED_LEN + key (min 16 Bytes) + key_wrap (8Bytes) */
44 #define DOT11_FBT_SUBELEM_GTK_MIN_LEN		(DOT11_FBT_SUBELEM_GTK_FIXED_LEN + 24)
45 /* GTK_MAX_LEN = GTK_FIXED_LEN + key (max 32 Bytes) + key_wrap (8Bytes) */
46 #define DOT11_FBT_SUBELEM_GTK_MAX_LEN		(DOT11_FBT_SUBELEM_GTK_FIXED_LEN + 40)
47 #define DOT11_FBT_SUBELEM_R0KH_MIN_LEN		1
48 #define DOT11_FBT_SUBELEM_R0KH_MAX_LEN		48
49 /* IGTK_LEN = KeyID (2Bytes) + IPN (6Bytes) + Key_Length (1Byte) +
50 *		Wrapped_Key (key (16Bytes) + key_wrap (8Bytes))
51 */
52 #define DOT11_FBT_SUBELEM_IGTK_LEN		33
53 #define DOT11_FBT_SUBELEM_OCI_LEN		3u
54 
55 #endif	/* #ifndef _802_11r_H_ */
56