xref: /wlan-driver/qcacld-3.0/components/p2p/dispatcher/inc/cfg_p2p.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name #if !defined(CONFIG_P2P_H__)
21*5113495bSYour Name #define CONFIG_P2P_H__
22*5113495bSYour Name 
23*5113495bSYour Name #include "cfg_define.h"
24*5113495bSYour Name #include "cfg_converged.h"
25*5113495bSYour Name #include "qdf_types.h"
26*5113495bSYour Name 
27*5113495bSYour Name /*
28*5113495bSYour Name  * <ini>
29*5113495bSYour Name  * gGoKeepAlivePeriod - P2P GO keep alive period.
30*5113495bSYour Name  * @Min: 1
31*5113495bSYour Name  * @Max: 65535
32*5113495bSYour Name  * @Default: 20
33*5113495bSYour Name  *
34*5113495bSYour Name  * This is P2P GO keep alive period.
35*5113495bSYour Name  *
36*5113495bSYour Name  * Related: None.
37*5113495bSYour Name  *
38*5113495bSYour Name  * Supported Feature: P2P
39*5113495bSYour Name  *
40*5113495bSYour Name  * Usage: External
41*5113495bSYour Name  *
42*5113495bSYour Name  * </ini>
43*5113495bSYour Name  */
44*5113495bSYour Name #define CFG_GO_KEEP_ALIVE_PERIOD CFG_INI_UINT( \
45*5113495bSYour Name 	"gGoKeepAlivePeriod", \
46*5113495bSYour Name 	1, \
47*5113495bSYour Name 	65535, \
48*5113495bSYour Name 	20, \
49*5113495bSYour Name 	CFG_VALUE_OR_DEFAULT, \
50*5113495bSYour Name 	"P2P GO keep alive period")
51*5113495bSYour Name 
52*5113495bSYour Name /*
53*5113495bSYour Name  * <ini>
54*5113495bSYour Name  * gGoLinkMonitorPeriod - period where link is idle and where
55*5113495bSYour Name  * we send NULL frame
56*5113495bSYour Name  * @Min: 3
57*5113495bSYour Name  * @Max: 50
58*5113495bSYour Name  * @Default: 10
59*5113495bSYour Name  *
60*5113495bSYour Name  * This is period where link is idle and where we send NULL frame for P2P GO.
61*5113495bSYour Name  *
62*5113495bSYour Name  * Related: None.
63*5113495bSYour Name  *
64*5113495bSYour Name  * Supported Feature: P2P
65*5113495bSYour Name  *
66*5113495bSYour Name  * Usage: External
67*5113495bSYour Name  *
68*5113495bSYour Name  * </ini>
69*5113495bSYour Name  */
70*5113495bSYour Name #define CFG_GO_LINK_MONITOR_PERIOD CFG_INI_UINT( \
71*5113495bSYour Name 	"gGoLinkMonitorPeriod", \
72*5113495bSYour Name 	3, \
73*5113495bSYour Name 	50, \
74*5113495bSYour Name 	10, \
75*5113495bSYour Name 	CFG_VALUE_OR_DEFAULT, \
76*5113495bSYour Name 	"period where link is idle and where we send NULL frame")
77*5113495bSYour Name 
78*5113495bSYour Name /*
79*5113495bSYour Name  * <ini>
80*5113495bSYour Name  * isP2pDeviceAddrAdministrated - Enables to derive the P2P MAC address from
81*5113495bSYour Name  * the primary MAC address
82*5113495bSYour Name  * @Min: 0
83*5113495bSYour Name  * @Max: 1
84*5113495bSYour Name  * @Default: 1
85*5113495bSYour Name  *
86*5113495bSYour Name  * This ini is used to enable/disable to derive the P2P MAC address from the
87*5113495bSYour Name  * primary MAC address.
88*5113495bSYour Name  *
89*5113495bSYour Name  * Related: None.
90*5113495bSYour Name  *
91*5113495bSYour Name  * Supported Feature: P2P
92*5113495bSYour Name  *
93*5113495bSYour Name  * Usage: External
94*5113495bSYour Name  *
95*5113495bSYour Name  * </ini>
96*5113495bSYour Name  */
97*5113495bSYour Name #define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED CFG_INI_BOOL( \
98*5113495bSYour Name 	"isP2pDeviceAddrAdministrated", \
99*5113495bSYour Name 	1, \
100*5113495bSYour Name 	"derive the P2P MAC address from the primary MAC address")
101*5113495bSYour Name 
102*5113495bSYour Name /*
103*5113495bSYour Name  * <ini>
104*5113495bSYour Name  * action_frame_random_seq_num_enabled - Enables random sequence number
105*5113495bSYour Name  *                                       generation for action frames
106*5113495bSYour Name  * @Min: 0
107*5113495bSYour Name  * @Max: 1
108*5113495bSYour Name  * @Default: 1
109*5113495bSYour Name  *
110*5113495bSYour Name  * This ini is used to enable/disable random sequence number generation for
111*5113495bSYour Name  * action frames.
112*5113495bSYour Name  *
113*5113495bSYour Name  * Related: None.
114*5113495bSYour Name  *
115*5113495bSYour Name  * Supported Feature: P2P
116*5113495bSYour Name  *
117*5113495bSYour Name  * Usage: external
118*5113495bSYour Name  *
119*5113495bSYour Name  * </ini>
120*5113495bSYour Name  */
121*5113495bSYour Name #define CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED CFG_INI_BOOL( \
122*5113495bSYour Name 	"action_frame_random_seq_num_enabled", \
123*5113495bSYour Name 	1, \
124*5113495bSYour Name 	"Enable random seq nums for action frames")
125*5113495bSYour Name 
126*5113495bSYour Name /*
127*5113495bSYour Name  * <ini>
128*5113495bSYour Name  * p2p_go_on_5ghz_indoor_chan - Allow P2P GO to operate on 5 GHz indoor channels
129*5113495bSYour Name  *
130*5113495bSYour Name  * @Min: 0
131*5113495bSYour Name  * @Max: 1
132*5113495bSYour Name  * @Default: 0
133*5113495bSYour Name  *
134*5113495bSYour Name  * This ini is used to enable/disable P2P-GO operation on 5 GHz
135*5113495bSYour Name  * indoor channels.
136*5113495bSYour Name  *
137*5113495bSYour Name  * Related: sta_sap_scc_on_indoor_channel, gindoor_channel_support
138*5113495bSYour Name  *
139*5113495bSYour Name  * Supported Feature: P2P GO
140*5113495bSYour Name  *
141*5113495bSYour Name  * Usage: external
142*5113495bSYour Name  *
143*5113495bSYour Name  * </ini>
144*5113495bSYour Name  */
145*5113495bSYour Name #define CFG_P2P_GO_ON_5GHZ_INDOOR_CHANNEL CFG_INI_BOOL(\
146*5113495bSYour Name 					"p2p_go_on_5ghz_indoor_chan", \
147*5113495bSYour Name 					0, \
148*5113495bSYour Name 					"Allow P2P GO on 5 GHz indoor channels")
149*5113495bSYour Name 
150*5113495bSYour Name /*
151*5113495bSYour Name  * <ini>
152*5113495bSYour Name  * p2p_go_ignore_non_p2p_probe_req - P2P GO ignore non-P2P probe req
153*5113495bSYour Name  *
154*5113495bSYour Name  * @Min: 0
155*5113495bSYour Name  * @Max: 1
156*5113495bSYour Name  * @Default: 0
157*5113495bSYour Name  *
158*5113495bSYour Name  * This ini is used to enable/disable P2P GO ignore non-P2P probe req and don't
159*5113495bSYour Name  * send probe rsp to non-p2p device like STA.
160*5113495bSYour Name  *
161*5113495bSYour Name  *
162*5113495bSYour Name  * Supported Feature: P2P GO
163*5113495bSYour Name  *
164*5113495bSYour Name  * Usage: external
165*5113495bSYour Name  *
166*5113495bSYour Name  * </ini>
167*5113495bSYour Name  */
168*5113495bSYour Name #define CFG_GO_IGNORE_NON_P2P_PROBE_REQ CFG_INI_BOOL(\
169*5113495bSYour Name 					"go_ignore_non_p2p_probe_req", \
170*5113495bSYour Name 					0, \
171*5113495bSYour Name 					"P2P GO ignore non-P2P probe req")
172*5113495bSYour Name 
173*5113495bSYour Name #define CFG_P2P_ALL \
174*5113495bSYour Name 	CFG(CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED) \
175*5113495bSYour Name 	CFG(CFG_GO_KEEP_ALIVE_PERIOD) \
176*5113495bSYour Name 	CFG(CFG_GO_LINK_MONITOR_PERIOD) \
177*5113495bSYour Name 	CFG(CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED) \
178*5113495bSYour Name 	CFG(CFG_P2P_GO_ON_5GHZ_INDOOR_CHANNEL) \
179*5113495bSYour Name 	CFG(CFG_GO_IGNORE_NON_P2P_PROBE_REQ)
180*5113495bSYour Name 
181*5113495bSYour Name #endif
182