blob: 32b14db4e7462e699ea3b14865896a8224ea2fc0 [file] [log] [blame]
Sourav Mohapatra113685f2018-08-29 14:21:55 +05301/*
Harprit Chhabadad59ae762019-01-08 16:40:43 -08002 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
Sourav Mohapatra113685f2018-08-29 14:21:55 +05303 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18/**
19 * DOC: declare internal API related to the fwol component
20 */
21
22#ifndef _WLAN_FWOL_UCFG_API_H_
23#define _WLAN_FWOL_UCFG_API_H_
24
25#include <wlan_objmgr_psoc_obj.h>
26#include <wlan_objmgr_global_obj.h>
27#include <wlan_cmn.h>
Dundi Raviteja47ac7092018-09-07 10:40:28 +053028#include "wlan_fw_offload_main.h"
Sourav Mohapatra113685f2018-08-29 14:21:55 +053029
30/**
31 * ucfg_fwol_psoc_open() - FWOL component Open
32 * @psoc: pointer to psoc object
33 *
34 * Open the FWOL component and initialize the FWOL structure
35 *
36 * Return: QDF Status
37 */
38QDF_STATUS ucfg_fwol_psoc_open(struct wlan_objmgr_psoc *psoc);
39
40/**
41 * ucfg_fwol_psoc_close() - FWOL component close
42 * @psoc: pointer to psoc object
43 *
44 * Close the FWOL component and clear the FWOL structures
45 *
46 * Return: None
47 */
48void ucfg_fwol_psoc_close(struct wlan_objmgr_psoc *psoc);
49
50/**
51 * ucfg_fwol_init() - initialize fwol_ctx context.
52 *
53 * This function initializes the fwol context.
54 *
55 * Return: QDF_STATUS_SUCCESS - in case of success else return error
56 */
57QDF_STATUS ucfg_fwol_init(void);
58
59/**
60 * ucfg_fwol_deinit() - De initialize fwol_ctx context.
61 *
62 * This function De initializes fwol contex.
63 *
64 * Return: QDF_STATUS_SUCCESS - in case of success else return error
65 */
66void ucfg_fwol_deinit(void);
67
Dundi Raviteja3b637092018-09-12 13:42:50 +053068/**
69 * ucfg_fwol_get_coex_config_params() - Get coex config params
70 * @psoc: Pointer to psoc object
71 * @coex_config: Pointer to struct wlan_fwol_coex_config
72 *
73 * Return: QDF_STATUS
74 */
75QDF_STATUS
76ucfg_fwol_get_coex_config_params(struct wlan_objmgr_psoc *psoc,
77 struct wlan_fwol_coex_config *coex_config);
78
Dundi Raviteja47ac7092018-09-07 10:40:28 +053079/**
80 * ucfg_fwol_get_thermal_temp() - Get thermal temperature config params
81 * @psoc: Pointer to psoc object
82 * @thermal_temp: Pointer to struct wlan_fwol_thermal_temp
83 *
84 * Return: QDF Status
85 */
86QDF_STATUS
87ucfg_fwol_get_thermal_temp(struct wlan_objmgr_psoc *psoc,
88 struct wlan_fwol_thermal_temp *thermal_temp);
89
Dundi Raviteja85a240a2018-09-10 15:03:07 +053090/**
Manikandan Mohan06d38d82018-11-26 18:36:58 -080091 * ucfg_fwol_get_neighbor_report_cfg() - Get neighbor report config params
92 * @psoc: Pointer to psoc object
93 * @fwol_neighbor_report_cfg: Pointer to return neighbor report config
94 *
95 * Return: QDF Status
96 */
97QDF_STATUS
98ucfg_fwol_get_neighbor_report_cfg(struct wlan_objmgr_psoc *psoc,
99 struct wlan_fwol_neighbor_report_cfg
100 *fwol_neighbor_report_cfg);
101
102/**
103 * ucfg_fwol_get_neighbor_report_req() - Get neighbor report request bit
104 * @psoc: Pointer to psoc object
105 * @neighbor_report_req: Pointer to return value
106 *
107 * Return: QDF Status
108 */
109QDF_STATUS
110ucfg_fwol_is_neighbor_report_req_supported(struct wlan_objmgr_psoc *psoc,
111 bool *neighbor_report_req);
112
113/**
Dundi Raviteja85a240a2018-09-10 15:03:07 +0530114 * ucfg_fwol_get_ie_whitelist() - Get IE whitelist param value
115 * @psoc: Pointer to psoc object
116 * @ie_whitelist: Pointer to return the IE whitelist param value
117 *
118 * Return: QDF Status
119 */
120QDF_STATUS
121ucfg_fwol_get_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool *ie_whitelist);
122
123/**
124 * ucfg_fwol_set_ie_whitelist() - Set IE whitelist param value
125 * @psoc: Pointer to psoc object
126 * @ie_whitelist: Value to set IE whitelist param
127 *
128 * Return: QDF Status
129 */
130QDF_STATUS
131ucfg_fwol_set_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool ie_whitelist);
132
133/**
Dundi Raviteja85a240a2018-09-10 15:03:07 +0530134 * ucfg_fwol_get_all_whitelist_params() - Get all IE whitelist param values
135 * @psoc: Pointer to psoc object
136 * @whitelist: Pointer to struct wlan_fwol_ie_whitelist
137 *
138 * Return: QDF Status
139 */
140QDF_STATUS
141ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
142 struct wlan_fwol_ie_whitelist *whitelist);
143
Sourav Mohapatrad9387d82018-09-07 12:28:52 +0530144/** ucfg_fwol_get_ani_enabled() - Assigns the ani_enabled value
145 * @psoc: pointer to the psoc object
146 *
147 * Return: QDF Status
148 */
149QDF_STATUS ucfg_fwol_get_ani_enabled(struct wlan_objmgr_psoc *psoc,
150 bool *ani_enabled);
151
152/**
153 * ucfg_fwol_get_ani_enabled() - Assigns the enable_rts_sifsbursting value
154 * @psoc: pointer to the psoc object
155 *
156 * Return: QDF Status
157 */
158QDF_STATUS ucfg_get_enable_rts_sifsbursting(struct wlan_objmgr_psoc *psoc,
159 bool *enable_rts_sifsbursting);
160
161/**
162 * ucfg_get_max_mpdus_inampdu() - Assigns the max_mpdus_inampdu value
163 * @psoc: pointer to the psoc object
164 *
165 * Return: QDF Status
166 */
167QDF_STATUS ucfg_get_max_mpdus_inampdu(struct wlan_objmgr_psoc *psoc,
168 uint8_t *max_mpdus_inampdu);
169
170/**
171 * ucfg_get_arp_ac_category() - Assigns the arp_ac_category value
172 * @psoc: pointer to the psoc object
173 *
174 * Return: QDF Status
175 */
176QDF_STATUS ucfg_get_arp_ac_category(struct wlan_objmgr_psoc *psoc,
177 uint32_t *arp_ac_category);
178
179/**
180 * ucfg_get_enable_phy_reg_retention() - Assigns enable_phy_reg_retention value
181 * @psoc: pointer to the psoc object
182 *
183 * Return: QDF Status
184 */
185QDF_STATUS ucfg_get_enable_phy_reg_retention(struct wlan_objmgr_psoc *psoc,
186 uint8_t *enable_phy_reg_retention);
187
188/**
189 * ucfg_get_upper_brssi_thresh() - Assigns upper_brssi_thresh value
190 * @psoc: pointer to the psoc object
191 *
192 * Return: QDF Status
193 */
194QDF_STATUS ucfg_get_upper_brssi_thresh(struct wlan_objmgr_psoc *psoc,
195 uint16_t *upper_brssi_thresh);
196
197/**
198 * ucfg_get_lower_brssi_thresh() - Assigns lower_brssi_thresh value
199 * @psoc: pointer to the psoc object
200 *
201 * Return: QDF Status
202 */
203QDF_STATUS ucfg_get_lower_brssi_thresh(struct wlan_objmgr_psoc *psoc,
204 uint16_t *lower_brssi_thresh);
205
206/**
207 * ucfg_get_enable_dtim_1chrx() - Assigns enable_dtim_1chrx value
208 * @psoc: pointer to the psoc object
209 *
210 * Return: QDF Status
211 */
212QDF_STATUS ucfg_get_enable_dtim_1chrx(struct wlan_objmgr_psoc *psoc,
213 bool *enable_dtim_1chrx);
214
215/**
216 * ucfg_get_alternate_chainmask_enabled() - Assigns alt chainmask_enabled value
217 * @psoc: pointer to the psoc object
218 *
219 * Return: QDF Status
220 */
221QDF_STATUS
222ucfg_get_alternative_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
223 bool *alternative_chainmask_enabled);
224
Sourav Mohapatra0f3b8572018-09-12 10:03:51 +0530225/**
226 * ucfg_get_smart_chainmask_enabled() - Assigns smart_chainmask_enabled value
227 * @psoc: pointer to the psoc object
228 *
229 * Return: QDF Status
230 */
231QDF_STATUS ucfg_get_smart_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
232 bool *smart_chainmask_enabled);
233
234/**
235 * ucfg_fwol_get_rts_profile() - Assigns get_rts_profile value
236 * @psoc: pointer to the psoc object
237 *
238 * Return: QDF Status
239 */
240QDF_STATUS ucfg_fwol_get_rts_profile(struct wlan_objmgr_psoc *psoc,
241 uint16_t *get_rts_profile);
242
243/**
244 * ucfg_fwol_get_enable_fw_log_level() - Assigns enable_fw_log_level value
245 * @psoc: pointer to the psoc object
246 *
247 * Return: QDF Status
248 */
249QDF_STATUS ucfg_fwol_get_enable_fw_log_level(struct wlan_objmgr_psoc *psoc,
250 uint16_t *enable_fw_log_level);
251
252/**
253 * ucfg_fwol_get_enable_fw_log_type() - Assigns enable_fw_log_type value
254 * @psoc: pointer to the psoc object
255 *
256 * Return: QDF Status
257 */
258QDF_STATUS ucfg_fwol_get_enable_fw_log_type(struct wlan_objmgr_psoc *psoc,
259 uint16_t *enable_fw_log_type);
lifengfaa83cb2018-11-24 01:53:56 +0800260/**
261 * ucfg_fwol_get_enable_fw_module_log_level() - Assigns
262 * enable_fw_module_log_level string
263 * @psoc: pointer to the psoc object
264 * @enable_fw_module_log_level:
265 * pointer to enable_fw_module_log_level array
266 * @enable_fw_module_log_level_num:
267 * pointer to enable_fw_module_log_leve array element num
268 *
269 * Return: QDF Status
270 */
271QDF_STATUS ucfg_fwol_get_enable_fw_module_log_level(
272 struct wlan_objmgr_psoc *psoc,
273 uint8_t **enable_fw_module_log_level,
274 uint8_t *enable_fw_module_log_level_num);
Sourav Mohapatra0f3b8572018-09-12 10:03:51 +0530275
276#ifdef FEATURE_WLAN_RA_FILTERING
277/**
278 * ucfg_fwol_set_is_rate_limit_enabled() - Sets the is_rate_limit_enabled value
279 * @psoc: pointer to the psoc object
280 *
281 * Return: QDF Status
282 */
283QDF_STATUS ucfg_fwol_set_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
284 bool is_rate_limit_enabled);
285
286/**
287 * ucfg_fwol_get_is_rate_limit_enabled() - Assigns is_rate_limit_enabled value
288 * @psoc: pointer to the psoc object
289 *
290 * Return: QDF Status
291 */
292QDF_STATUS ucfg_fwol_get_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
293 bool *is_rate_limit_enabled);
294
295#endif /* FEATURE_WLAN_RA_FILTERING */
296
297/**
298 * ucfg_fwol_get_tsf_gpio_pin() - Assigns tsf_gpio_pin value
299 * @psoc: pointer to the psoc object
300 *
301 * Return: QDF Status
302 */
303
304QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
305 uint32_t *tsf_gpio_pin);
306
Subrat Dash5f36fbe2019-02-12 16:28:14 +0530307#ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
308/**
309 * ucfg_fwol_get_tsf_irq_host_gpio_pin() - Assigns tsf_irq_host_gpio_pin value
310 * @psoc: pointer to the psoc object
311 *
312 * Return: QDF Status
313 */
314
315QDF_STATUS
316ucfg_fwol_get_tsf_irq_host_gpio_pin(struct wlan_objmgr_psoc *psoc,
317 uint32_t *tsf_irq_host_gpio_pin);
318#endif
319
Sourav Mohapatra0f3b8572018-09-12 10:03:51 +0530320#ifdef DHCP_SERVER_OFFLOAD
321/**
322 * ucfg_fwol_get_enable_dhcp_server_offload()-Assign enable_dhcp_server_offload
323 * @psoc: pointer to the psoc object
324 *
325 * Return: QDF Status
326 */
327QDF_STATUS
328ucfg_fwol_get_enable_dhcp_server_offload(struct wlan_objmgr_psoc *psoc,
329 bool *enable_dhcp_server_offload);
330
331/**
332 * ucfg_fwol_get_dhcp_max_num_clients() - Assigns dhcp_max_num_clients value
333 * @psoc: pointer to the psoc object
334 *
335 * Return: QDF Status
336 */
337QDF_STATUS ucfg_fwol_get_dhcp_max_num_clients(struct wlan_objmgr_psoc *psoc,
338 uint32_t *dhcp_max_num_clients);
Sourav Mohapatra0f3b8572018-09-12 10:03:51 +0530339#endif
Manikandan Mohand350c192018-11-29 14:01:12 -0800340
341/**
342 * ucfg_fwol_get_tsf_ptp_options() - Get TSF Plus feature options
343 * @psoc: pointer to the psoc object
344 * @tsf_ptp_options: Pointer to return tsf ptp options
345 *
346 * Return: QDF Status
347 */
348QDF_STATUS ucfg_fwol_get_tsf_ptp_options(struct wlan_objmgr_psoc *psoc,
349 uint32_t *tsf_ptp_options);
350/**
351 * ucfg_fwol_get_lprx_enable() - Get LPRx feature enable status
352 * @psoc: pointer to the psoc object
353 * @lprx_enable: Pointer to return LPRX feature enable status
354 *
355 * Return: QDF Status
356 */
357QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc,
358 bool *lprx_enable);
359
360/**
361 * ucfg_fwol_get_sae_enable() - Get SAE feature enable status
362 * @psoc: pointer to the psoc object
Manikandan Mohand350c192018-11-29 14:01:12 -0800363 *
Manikandan Mohan66df7fc2019-01-08 17:57:05 -0800364 * Return: True if enabled else false
Manikandan Mohand350c192018-11-29 14:01:12 -0800365 */
Manikandan Mohan66df7fc2019-01-08 17:57:05 -0800366bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc);
Manikandan Mohand350c192018-11-29 14:01:12 -0800367
368/**
369 * ucfg_fwol_get_gcmp_enable() - Get GCMP feature enable status
370 * @psoc: pointer to the psoc object
Manikandan Mohand350c192018-11-29 14:01:12 -0800371 *
Manikandan Mohan66df7fc2019-01-08 17:57:05 -0800372 * Return: True if enabled else false
Manikandan Mohand350c192018-11-29 14:01:12 -0800373 */
Manikandan Mohan66df7fc2019-01-08 17:57:05 -0800374bool ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc);
Manikandan Mohand350c192018-11-29 14:01:12 -0800375
376/**
377 * ucfg_fwol_get_enable_tx_sch_delay() - Get enable tx sch delay
378 * @psoc: pointer to the psoc object
379 * @enable_tx_sch_delay: Pointer to return enable_tx_sch_delay value
380 *
381 * Return: QDF Status
382 */
383QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc,
384 uint8_t *enable_tx_sch_delay);
385
386/**
387 * ucfg_fwol_get_enable_secondary_rate() - Get enable secondary rate
388 * @psoc: pointer to the psoc object
389 * @enable_tx_sch_delay: Pointer to return enable secondary rate value
390 *
391 * Return: QDF Status
392 */
393QDF_STATUS ucfg_fwol_get_enable_secondary_rate(struct wlan_objmgr_psoc *psoc,
394 uint32_t *enable_secondary_rate);
Harprit Chhabadad59ae762019-01-08 16:40:43 -0800395/**
396 * ucfg_fwol_get_all_adaptive_dwelltime_params() - Get all adaptive
397 dwelltime_params
398 * @psoc: Pointer to psoc object
399 * @dwelltime_params: Pointer to struct adaptive_dwelltime_params
400 *
401 * Return: QDF Status
402 */
403QDF_STATUS
404ucfg_fwol_get_all_adaptive_dwelltime_params(
405 struct wlan_objmgr_psoc *psoc,
406 struct adaptive_dwelltime_params *dwelltime_params);
407/**
408 * ucfg_fwol_get_adaptive_dwell_mode_enabled() - API to globally disable/enable
409 * the adaptive dwell config.
410 * Acceptable values for this:
411 * 0: Config is disabled
412 * 1: Config is enabled
413 *
414 * @psoc: pointer to psoc object
415 * @adaptive_dwell_mode_enabled: adaptive dwell mode enable/disable
416 *
417 * Return: QDF Status
418 */
419QDF_STATUS
420ucfg_fwol_get_adaptive_dwell_mode_enabled(struct wlan_objmgr_psoc *psoc,
421 bool *adaptive_dwell_mode_enabled);
422
423/**
424 * ucfg_fwol_get_global_adapt_dwelltime_mode() - API to set default
425 * adaptive mode.
426 * It will be used if any of the scan dwell mode is set to default.
427 * For uses : see enum scan_dwelltime_adaptive_mode
428 *
429 * @psoc: pointer to psoc object
430 * global_adapt_dwelltime_mode@: global adaptive dwell mode value
431 *
432 * Return: QDF Status
433 */
434QDF_STATUS
435ucfg_fwol_get_global_adapt_dwelltime_mode(struct wlan_objmgr_psoc *psoc,
436 uint8_t *global_adapt_dwelltime_mode);
437/**
438 * ucfg_fwol_get_adapt_dwell_lpf_weight() - API to get weight to calculate
439 * the average low pass filter for channel congestion
440 * @psoc: pointer to psoc object
441 * @adapt_dwell_lpf_weight: adaptive low pass filter weight
442 *
443 * Return: QDF Status
444 */
445QDF_STATUS
446ucfg_fwol_get_adapt_dwell_lpf_weight(struct wlan_objmgr_psoc *psoc,
447 uint8_t *adapt_dwell_lpf_weight);
448
449/**
450 * ucfg_fwol_get_adapt_dwell_passive_mon_intval() - API to get interval value
451 * for montitoring wifi activity in passive scan in msec.
452 * @psoc: pointer to psoc object
453 * @adapt_dwell_passive_mon_intval: adaptive monitor interval in passive scan
454 *
455 * Return: QDF Status
456 */
457QDF_STATUS
458ucfg_fwol_get_adapt_dwell_passive_mon_intval(
459 struct wlan_objmgr_psoc *psoc,
460 uint8_t *adapt_dwell_passive_mon_intval);
461
462/**
463 * ucfg_fwol_get_adapt_dwell_wifi_act_threshold - API to get % of wifi activity
464 * used in passive scan
465 * @psoc: pointer to psoc object
466 * @adapt_dwell_wifi_act_threshold: percent of wifi activity in passive scan
467 *
468 * Return: QDF Status
469 */
470QDF_STATUS ucfg_fwol_get_adapt_dwell_wifi_act_threshold(
471 struct wlan_objmgr_psoc *psoc,
472 uint8_t *adapt_dwell_wifi_act_threshold);
473
474/**
475 * ucfg_fwol_init_adapt_dwelltime_in_cfg - API to initialize adaptive
476 * dwell params
477 * @psoc: pointer to psoc object
478 * @adaptive_dwelltime_params: pointer to adaptive_dwelltime_params structure
479 *
480 * Return: QDF Status
481 */
482static inline QDF_STATUS
483ucfg_fwol_init_adapt_dwelltime_in_cfg(
484 struct wlan_objmgr_psoc *psoc,
485 struct adaptive_dwelltime_params *dwelltime_params)
486{
487 return fwol_init_adapt_dwelltime_in_cfg(psoc, dwelltime_params);
488}
489
490/**
491 * ucfg_fwol_set_adaptive_dwelltime_config - API to set adaptive
492 * dwell params config
493 * @adaptive_dwelltime_params: adaptive_dwelltime_params structure
494 *
495 * Return: QDF Status
496 */
497static inline QDF_STATUS
498ucfg_fwol_set_adaptive_dwelltime_config(
499 struct adaptive_dwelltime_params *dwelltime_params)
500{
501 return fwol_set_adaptive_dwelltime_config(dwelltime_params);
502}
Sourav Mohapatra113685f2018-08-29 14:21:55 +0530503#endif /* _WLAN_FWOL_UCFG_API_H_ */