xref: /wlan-driver/qcacld-3.0/components/mlme/dispatcher/inc/cfg_sap_protection.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name 
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: This file contains centralized definitions of sap erp protection related
21*5113495bSYour Name  * converged configurations.
22*5113495bSYour Name  */
23*5113495bSYour Name 
24*5113495bSYour Name #ifndef __CFG_MLME_SAP_PROTECTION_H
25*5113495bSYour Name #define __CFG_MLME_SAP_PROTECTION_H
26*5113495bSYour Name 
27*5113495bSYour Name #define CFG_PROTECTION_ENABLED CFG_UINT( \
28*5113495bSYour Name 		"protection_enabled", \
29*5113495bSYour Name 		0, \
30*5113495bSYour Name 		65535, \
31*5113495bSYour Name 		65535, \
32*5113495bSYour Name 		CFG_VALUE_OR_DEFAULT, \
33*5113495bSYour Name 		"sap protection enabled")
34*5113495bSYour Name 
35*5113495bSYour Name #define CFG_FORCE_POLICY_PROTECTION CFG_UINT( \
36*5113495bSYour Name 		"protection_force_policy", \
37*5113495bSYour Name 		0, \
38*5113495bSYour Name 		5, \
39*5113495bSYour Name 		5, \
40*5113495bSYour Name 		CFG_VALUE_OR_DEFAULT, \
41*5113495bSYour Name 		"force policy protection")
42*5113495bSYour Name 
43*5113495bSYour Name /*
44*5113495bSYour Name  * <ini>
45*5113495bSYour Name  * gignore_peer_ht_opmode
46*5113495bSYour Name  *
47*5113495bSYour Name  * @min 0
48*5113495bSYour Name  * @max 1
49*5113495bSYour Name  * @default 1
50*5113495bSYour Name  *
51*5113495bSYour Name  * Enabling gignore_peer_ht_opmode will enable 11g
52*5113495bSYour Name  * protection only when there is a 11g AP in vicinity.
53*5113495bSYour Name  *
54*5113495bSYour Name  * Related: None
55*5113495bSYour Name  *
56*5113495bSYour Name  * Supported Feature: SAP Protection
57*5113495bSYour Name  * </ini>
58*5113495bSYour Name  */
59*5113495bSYour Name #define CFG_IGNORE_PEER_HT_MODE CFG_INI_BOOL( \
60*5113495bSYour Name 		"gignore_peer_ht_opmode", \
61*5113495bSYour Name 		false, \
62*5113495bSYour Name 		"ignore the peer ht mode")
63*5113495bSYour Name 
64*5113495bSYour Name /*
65*5113495bSYour Name  * <ini>
66*5113495bSYour Name  * gEnableApProt - Enable/Disable AP protection
67*5113495bSYour Name  * @Min: 0
68*5113495bSYour Name  * @Max: 1
69*5113495bSYour Name  * @Default: 1
70*5113495bSYour Name  *
71*5113495bSYour Name  * This ini is used to enable/disable AP protection
72*5113495bSYour Name  *
73*5113495bSYour Name  * Related: None.
74*5113495bSYour Name  *
75*5113495bSYour Name  * Supported Feature: SAP
76*5113495bSYour Name  *
77*5113495bSYour Name  * Usage: Internal/External
78*5113495bSYour Name  *
79*5113495bSYour Name  * </ini>
80*5113495bSYour Name  */
81*5113495bSYour Name #define CFG_AP_ENABLE_PROTECTION_MODE CFG_INI_BOOL( \
82*5113495bSYour Name 		"gEnableApProt", \
83*5113495bSYour Name 		true, \
84*5113495bSYour Name 		"enable protection on sap")
85*5113495bSYour Name 
86*5113495bSYour Name /*
87*5113495bSYour Name  * <ini>
88*5113495bSYour Name  * gApProtection - Set AP protection parameter
89*5113495bSYour Name  * @Min: 0x0
90*5113495bSYour Name  * @Max: 0xFFFF
91*5113495bSYour Name  * @Default: 0xBFFF
92*5113495bSYour Name  *
93*5113495bSYour Name  * This ini is used to set AP protection parameter
94*5113495bSYour Name  * Bit map for CFG_AP_PROTECTION_MODE_DEFAULT
95*5113495bSYour Name  * LOWER byte for associated stations
96*5113495bSYour Name  * UPPER byte for overlapping stations
97*5113495bSYour Name  * each byte will have the following info
98*5113495bSYour Name  * bit15 bit14 bit13     bit12  bit11 bit10    bit9     bit8
99*5113495bSYour Name  * OBSS  RIFS  LSIG_TXOP NON_GF HT20  FROM_11G FROM_11B FROM_11A
100*5113495bSYour Name  * bit7  bit6  bit5      bit4   bit3  bit2     bit1     bit0
101*5113495bSYour Name  * OBSS  RIFS  LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A
102*5113495bSYour Name  *
103*5113495bSYour Name  * Related: None.
104*5113495bSYour Name  *
105*5113495bSYour Name  * Supported Feature: SAP
106*5113495bSYour Name  *
107*5113495bSYour Name  * Usage: Internal/External
108*5113495bSYour Name  *
109*5113495bSYour Name  * </ini>
110*5113495bSYour Name  */
111*5113495bSYour Name #define CFG_AP_PROTECTION_MODE CFG_INI_UINT( \
112*5113495bSYour Name 				"gApProtection", \
113*5113495bSYour Name 				0x0, \
114*5113495bSYour Name 				0xFFFF, \
115*5113495bSYour Name 				0xBFFF, \
116*5113495bSYour Name 				CFG_VALUE_OR_DEFAULT, \
117*5113495bSYour Name 				"AP protection mode bitmap")
118*5113495bSYour Name 
119*5113495bSYour Name /*
120*5113495bSYour Name  * <ini>
121*5113495bSYour Name  * gEnableApOBSSProt - Enable/Disable AP OBSS protection
122*5113495bSYour Name  * @Min: 0
123*5113495bSYour Name  * @Max: 1
124*5113495bSYour Name  * @Default: 0
125*5113495bSYour Name  *
126*5113495bSYour Name  * This ini is used to enable/disable AP OBSS protection
127*5113495bSYour Name  *
128*5113495bSYour Name  * Related: None.
129*5113495bSYour Name  *
130*5113495bSYour Name  * Supported Feature: SAP
131*5113495bSYour Name  *
132*5113495bSYour Name  * Usage: Internal/External
133*5113495bSYour Name  *
134*5113495bSYour Name  * </ini>
135*5113495bSYour Name  */
136*5113495bSYour Name #define CFG_AP_OBSS_PROTECTION_ENABLE CFG_INI_BOOL( \
137*5113495bSYour Name 		"gEnableApOBSSProt", \
138*5113495bSYour Name 		false, \
139*5113495bSYour Name 		"Enable/Disable AP OBSS protection")
140*5113495bSYour Name 
141*5113495bSYour Name #define CFG_SAP_PROTECTION_ALL \
142*5113495bSYour Name 	CFG(CFG_PROTECTION_ENABLED) \
143*5113495bSYour Name 	CFG(CFG_FORCE_POLICY_PROTECTION) \
144*5113495bSYour Name 	CFG(CFG_IGNORE_PEER_HT_MODE) \
145*5113495bSYour Name 	CFG(CFG_AP_ENABLE_PROTECTION_MODE) \
146*5113495bSYour Name 	CFG(CFG_AP_PROTECTION_MODE) \
147*5113495bSYour Name 	CFG(CFG_AP_OBSS_PROTECTION_ENABLE)
148*5113495bSYour Name 
149*5113495bSYour Name #endif /* __CFG_MLME_SAP_PROTECTION_H */
150