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