1  /*
2   * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
3   * Copyright (c) 2022-2023 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  /**
21   * DOC: This file contains centralized definitions of converged configuration.
22   */
23  
24  #ifndef __CFG_FWOL_GENERIC_H
25  #define __CFG_FWOL_GENERIC_H
26  
27  
28  /*
29   *
30   * <ini>
31   * gEnableANI - Enable Adaptive Noise Immunity
32   * @Min: 0
33   * @Max: 1
34   * @Default: 1
35   *
36   * This ini is used to enable or disable Adaptive Noise Immunity.
37   *
38   * Related: None
39   *
40   * Supported Feature: ANI
41   *
42   * Usage: External
43   *
44   * </ini>
45   */
46  #define CFG_ENABLE_ANI CFG_INI_BOOL( \
47  		"gEnableANI", \
48  		1, \
49  		"Enable/Disable Adaptive Noise Immunity")
50  
51  /*
52   * <ini>
53   * gSetRTSForSIFSBursting - set rts for sifs bursting
54   * @Min: 0
55   * @Max: 1
56   * @Default: 0
57   *
58   * This ini set rts for sifs bursting
59   *
60   * Usage: External
61   *
62   * </ini>
63   */
64  #define CFG_SET_RTS_FOR_SIFS_BURSTING CFG_INI_BOOL( \
65  		"gSetRTSForSIFSBursting", \
66  		0, \
67  		"Set rts for sifs bursting")
68  
69  #ifdef WLAN_FEATURE_OFDM_SCRAMBLER_SEED
70  /*
71   * <ini>
72   * gEnableUpdateScramSeed - Enable/Disable OFDM scambler seed
73   * @Min: 0
74   * @Max: 1
75   * @Default: 0
76   *
77   * Usage: External
78   *
79   * </ini>
80   */
81  #define CFG_ENABLE_OFDM_SCRAMBLER_SEED CFG_INI_BOOL( \
82  	"gEnableUpdateScramSeed", \
83  	false, \
84  	"Enable OFDM Scrambler Seed")
85  
86  #define ENABLE_OFDM_SCRAMBLER_SEED CFG(CFG_ENABLE_OFDM_SCRAMBLER_SEED)
87  #else
88  #define ENABLE_OFDM_SCRAMBLER_SEED
89  #endif
90  
91  /*
92   * <ini>
93   * sifs_burst_mask - Set sifs burst mask
94   * @Min: 0
95   * @Max: 3
96   * @Default: 1
97   *
98   * This ini is used to set 11n and legacy(non 11n/wmm)
99   * sifs burst. Especially under running multi stream
100   * traffic test case, it can be useful to let the low
101   * priority AC, or legacy mode device, or the specified
102   * AC to aggressively contend air medium, then have a
103   * obvious improvement of throughput. Bit0 is the switch
104   * of sifs burst, it must be set if want to enable sifs
105   * burst, Bit1 is for legacy mode.
106   * Supported configuration:
107   * 0: disabled
108   * 1: enabled, but disabled for legacy mode
109   * 3: all enabled
110   *
111   * Usage: External
112   *
113   * </ini>
114   */
115  #define CFG_SET_SIFS_BURST CFG_INI_UINT( \
116  		"sifs_burst_mask", \
117  		0, \
118  		3, \
119  		1, \
120  		CFG_VALUE_OR_DEFAULT, \
121  		"Set SIFS burst mask")
122  
123  /*
124   * <ini>
125   * gMaxMPDUsInAMPDU - max mpdus in ampdu
126   * @Min: 0
127   * @Max: 64
128   * @Default: 0
129   *
130   * This ini configure max mpdus in ampdu
131   *
132   * Usage: External
133   *
134   * </ini>
135   */
136  #define CFG_MAX_MPDUS_IN_AMPDU CFG_INI_INT( \
137  		"gMaxMPDUsInAMPDU", \
138  		0, \
139  		64, \
140  		0, \
141  		CFG_VALUE_OR_DEFAULT, \
142  		"This ini configure max mpdus in ampdu")
143  
144  /*
145   * <ini>
146   * gEnableFastPwrTransition - Configuration for fast power transition
147   * @Min: 0
148   * @Max: 2
149   * @Default: 0
150   *
151   * This ini supported values:
152   * 0x0: Phy register retention disabled (Higher timeline, Good for power)
153   * 0x1: Phy register retention statically enabled
154   * 0x2: Phy register retention enabled/disabled dynamically
155   *
156   * Usage: Internal
157   *
158   * </ini>
159   */
160  #define CFG_ENABLE_PHY_REG CFG_INI_UINT( \
161  		"gEnableFastPwrTransition", \
162  		0x0, \
163  		0x2, \
164  		0x0, \
165  		CFG_VALUE_OR_DEFAULT, \
166  		"Configuration for fast power transition")
167  
168  /*
169   * <ini>
170   * gUpperBrssiThresh - Sets Upper threshold for beacon RSSI
171   * @Min: 36
172   * @Max: 66
173   * @Default: 46
174   *
175   * This ini sets Upper beacon threshold for beacon RSSI in FW
176   * Used to reduced RX chainmask in FW, once this threshold is
177   * reached FW will switch to 1X1 (Single chain).
178   *
179   * Supported Feature: STA
180   *
181   * Usage: External
182   *
183   * </ini>
184   */
185  #define CFG_UPPER_BRSSI_THRESH CFG_INI_UINT( \
186  		"gUpperBrssiThresh", \
187  		36, \
188  		66, \
189  		46, \
190  		CFG_VALUE_OR_DEFAULT, \
191  		"Sets Upper threshold for beacon RSSI")
192  
193  /*
194   * <ini>
195   * gLowerBrssiThresh - Sets Lower threshold for beacon RSSI
196   * @Min: 6
197   * @Max: 36
198   * @Default: 26
199   *
200   * This ini sets Lower beacon threshold for beacon RSSI in FW
201   * Used to increase RX chainmask in FW, once this threshold is
202   * reached FW will switch to 2X2 chain.
203   *
204   * Supported Feature: STA
205   *
206   * Usage: External
207   *
208   * </ini>
209   */
210  #define CFG_LOWER_BRSSI_THRESH CFG_INI_UINT( \
211  		"gLowerBrssiThresh", \
212  		6, \
213  		36, \
214  		26, \
215  		CFG_VALUE_OR_DEFAULT, \
216  		"Sets Lower threshold for beacon RSSI")
217  
218  /*
219   * <ini>
220   * gDtim1ChRxEnable - Enable/Disable DTIM 1Chrx feature
221   * @Min: 0
222   * @Max: 1
223   * @Default: 1
224   *
225   * This ini Enables or Disables DTIM 1CHRX feature in FW
226   * If this flag is set FW enables shutting off one chain
227   * while going to power save.
228   *
229   * Supported Feature: STA
230   *
231   * Usage: External
232   *
233   * </ini>
234   */
235  #define CFG_DTIM_1CHRX_ENABLE CFG_INI_BOOL( \
236  		"gDtim1ChRxEnable", \
237  		1, \
238  		"Enable/Disable DTIM 1Chrx feature")
239  
240  /*
241   * <ini>
242   * gEnableAlternativeChainmask - Enable Co-Ex Alternative Chainmask
243   * @Min: 0
244   * @Max: 1
245   * @Default: 0
246   *
247   * This ini is used to enable/disable the Co-ex Alternative Chainmask
248   * feature via the wmi_pdev_param_alternative_chainmask_scheme
249   * firmware parameter.
250   *
251   * Related: None
252   *
253   * Supported Feature: STA
254   *
255   * Usage: Internal/External
256   *
257   * </ini>
258   */
259  #define CFG_ENABLE_COEX_ALT_CHAINMASK CFG_INI_BOOL( \
260  		"gEnableAlternativeChainmask", \
261  		0, \
262  		"Enable Co-Ex Alternative Chainmask")
263  
264  /*
265   * <ini>
266   * gEnableSmartChainmask - Enable Smart Chainmask
267   * @Min: 0
268   * @Max: 1
269   * @Default: 0
270   *
271   * This ini is used to enable/disable the Smart Chainmask feature via
272   * the wmi_pdev_param_smart_chainmask_scheme firmware parameter.
273   *
274   * Related: None
275   *
276   * Supported Feature: STA
277   *
278   * Usage: Internal/External
279   *
280   * </ini>
281   */
282  #define CFG_ENABLE_SMART_CHAINMASK CFG_INI_BOOL( \
283  		"gEnableSmartChainmask", \
284  		0, \
285  		"Enable/disable the Smart Chainmask feature")
286  
287  /*
288   * <ini>
289   * gEnableRTSProfiles - It will use configuring different RTS profiles
290   * @Min: 0
291   * @Max: 66
292   * @Default: 33
293   *
294   * This ini used for configuring different RTS profiles
295   * to firmware.
296   * Following are the valid values for the rts profile:
297   * RTSCTS_DISABLED				0
298   * NOT_ALLOWED					1
299   * NOT_ALLOWED					2
300   * RTSCTS_DISABLED				16
301   * RTSCTS_ENABLED_4_SECOND_RATESERIES		17
302   * CTS2SELF_ENABLED_4_SECOND_RATESERIES		18
303   * RTSCTS_DISABLED				32
304   * RTSCTS_ENABLED_4_SWRETRIES			33
305   * CTS2SELF_ENABLED_4_SWRETRIES			34
306   * NOT_ALLOWED					48
307   * NOT_ALLOWED					49
308   * NOT_ALLOWED					50
309   * RTSCTS_DISABLED				64
310   * RTSCTS_ENABLED_4_ALL_RATESERIES		65
311   * CTS2SELF_ENABLED_4_ALL_RATESERIES		66
312   *
313   * Related: None
314   *
315   * Supported Feature: STA
316   *
317   * Usage: Internal/External
318   *
319   * </ini>
320   */
321  #define CFG_ENABLE_FW_RTS_PROFILE CFG_INI_INT( \
322  		"gEnableRTSProfiles", \
323  		0, \
324  		66, \
325  		33, \
326  		CFG_VALUE_OR_DEFAULT, \
327  		"It is used to configure different RTS profiles")
328  
329  /* <ini>
330   * gFwDebugLogLevel - Firmware debug log level
331   * @Min: 0
332   * @Max: 255
333   * @Default: 3
334   *
335   * This option controls the level of firmware debug log. Default value is
336   * DBGLOG_WARN, which is to enable error and warning logs.
337   *
338   * Related: None
339   *
340   * Supported Features: Debugging
341   *
342   * Usage: Internal
343   *
344   * </ini>
345   */
346  #define CFG_ENABLE_FW_DEBUG_LOG_LEVEL CFG_INI_INT( \
347  		"gFwDebugLogLevel", \
348  		0, \
349  		255, \
350  		3, \
351  		CFG_VALUE_OR_DEFAULT, \
352  		"enable error and warning logs by default")
353  
354  /* <ini>
355   * gFwDebugLogType - Firmware debug log type
356   * @Min: 0
357   * @Max: 255
358   * @Default: 3
359   *
360   * This option controls how driver is to give the firmware logs to net link
361   * when cnss_diag service is started.
362   *
363   * Related: None
364   *
365   * Supported Features: Debugging
366   *
367   * Usage: Internal
368   *
369   * </ini>
370   */
371  #define CFG_ENABLE_FW_LOG_TYPE CFG_INI_INT( \
372  		"gFwDebugLogType", \
373  		0, \
374  		255, \
375  		3, \
376  		CFG_VALUE_OR_DEFAULT, \
377  		"Default value to be given to the net link cnss_diag service")
378  
379  /*
380   * <ini>
381   * gFwDebugModuleLoglevel - modulized firmware debug log level
382   * @Min: N/A
383   * @Max: N/A
384   * @Default: N/A
385   *
386   * This ini is used to set modulized firmware debug log level.
387   * FW module log level input string format looks like below:
388   * gFwDebugModuleLoglevel="<FW Module ID>,<Log Level>,..."
389   * For example:
390   * gFwDebugModuleLoglevel="1,0,2,1,3,2,4,3,5,4,6,5,7,6"
391   * The above input string means:
392   * For FW module ID 1 enable log level 0
393   * For FW module ID 2 enable log level 1
394   * For FW module ID 3 enable log level 2
395   * For FW module ID 4 enable log level 3
396   * For FW module ID 5 enable log level 4
397   * For FW module ID 6 enable log level 5
398   * For FW module ID 7 enable log level 6
399   * For valid values of log levels check enum DBGLOG_LOG_LVL and
400   * for valid values of module ids check enum WLAN_MODULE_ID.
401   *
402   * Related: None
403   *
404   * Supported Feature: Debugging
405   *
406   * Usage: Internal/External
407   *
408   * </ini>
409   */
410  
411  #define FW_MODULE_LOG_LEVEL_STRING_LENGTH  (512)
412  #define CFG_ENABLE_FW_MODULE_LOG_LEVEL CFG_INI_STRING( \
413  	"gFwDebugModuleLoglevel", \
414  	0, \
415  	FW_MODULE_LOG_LEVEL_STRING_LENGTH, \
416  	"1,1,2,1,3,1,4,1,5,1,11,1,9,1,13,1,14,1,17,1,18,1,19,1,22,1,26,1,28,1,"\
417  	"29,1,31,1,36,1,38,1,46,1,47,1,50,1,52,1,53,1,56,1,60,1,61,1,113,1", \
418  	"Set modulized firmware debug log level")
419  
420  /*
421   * <ini>
422   * gFwDebugWowModuleLoglevel - modulized firmware wow debug log level
423   * @Min: N/A
424   * @Max: N/A
425   * @Default: N/A
426   *
427   * This ini is used to set modulized firmware wow debug log level.
428   * FW module log level input string format looks like below:
429   * gFwDebugWowModuleLoglevel="<FW Module ID>,<Log Level>,..."
430   * For example:
431   * gFwDebugWowModuleLoglevel="1,0,2,1,3,2,4,3,5,4,6,5,7,6"
432   * The above input string means:
433   * For FW module ID 1 enable log level 0
434   * For FW module ID 2 enable log level 1
435   * For FW module ID 3 enable log level 2
436   * For FW module ID 4 enable log level 3
437   * For FW module ID 5 enable log level 4
438   * For FW module ID 6 enable log level 5
439   * For FW module ID 7 enable log level 6
440   * For valid values of log levels check enum DBGLOG_LOG_LVL and
441   * for valid values of module ids check enum WLAN_MODULE_ID.
442   *
443   * Related: None
444   *
445   * Supported Feature: Debugging
446   *
447   * Usage: External
448   *
449   * </ini>
450   */
451  #define CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL CFG_INI_STRING( \
452  	"gFwDebugWowModuleLoglevel", \
453  	0, \
454  	FW_MODULE_LOG_LEVEL_STRING_LENGTH, \
455  	"1,3,5,3,18,1,19,3,31,1,36,1,57,3", \
456  	"Set modulized firmware wow debug log level")
457  
458  #ifdef FEATURE_WLAN_RA_FILTERING
459  /* <ini>
460   * gRAFilterEnable
461   * @Min: 0
462   * @Max: 1
463   * @Default: 1
464   *
465   * Related: None
466   *
467   * Usage: Internal
468   *
469   * </ini>
470   */
471  #define CFG_RA_FILTER_ENABLE CFG_INI_BOOL( \
472  		"gRAFilterEnable", \
473  		1, \
474  		"Enable RA Filter")
475  #else
476  #define CFG_RA_FILTER_ENABLE
477  #endif
478  
479  /* <ini>
480   * gtsf_gpio_pin
481   * @Min: 0
482   * @Max: 254
483   * @Default: 255
484   *
485   * GPIO pin to toggle when capture tsf
486   *
487   * Related: None
488   *
489   * Usage: Internal
490   *
491   * </ini>
492   */
493  #define CFG_SET_TSF_GPIO_PIN CFG_INI_INT( \
494  		"gtsf_gpio_pin", \
495  		0, \
496  		255, \
497  		255, \
498  		CFG_VALUE_OR_DEFAULT, \
499  		"GPIO pin to toggle when capture tsf")
500  
501  #ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
502  /* <ini>
503   * gtsf_irq_host_gpio_pin
504   * @Min: 0
505   * @Max: 254
506   * @Default: 255
507   *
508   * TSF irq GPIO pin of host platform
509   *
510   * Related: None
511   *
512   * Usage: Internal
513   *
514   * </ini>
515   */
516  #define CFG_SET_TSF_IRQ_HOST_GPIO_PIN CFG_INI_INT( \
517  		"gtsf_irq_host_gpio_pin", \
518  		0, \
519  		255, \
520  		255, \
521  		CFG_VALUE_OR_DEFAULT, \
522  		"TSF irq GPIO pin of host platform")
523  
524  #define __CFG_SET_TSF_IRQ_HOST_GPIO_PIN CFG(CFG_SET_TSF_IRQ_HOST_GPIO_PIN)
525  #else
526  #define __CFG_SET_TSF_IRQ_HOST_GPIO_PIN
527  #endif
528  
529  #ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_SYNC
530  /*
531   * <ini>
532   * gtsf_sync_host_gpio_pin
533   * @Min: 0
534   * @Max: 254
535   * @Default: 255
536   *
537   * TSF sync GPIO pin of host platform
538   *
539   * The driver will use this gpio on host platform
540   * to drive the TSF sync pin on wlan chip.
541   * Toggling this gpio  will generate a strobe to fw
542   * for latching TSF.
543   *
544   * Related: None
545   *
546   * Usage: External
547   *
548   * </ini>
549   */
550  #define CFG_SET_TSF_SYNC_HOST_GPIO_PIN CFG_INI_UINT( \
551  		"gtsf_sync_host_gpio_pin", \
552  		0, \
553  		254, \
554  		255, \
555  		CFG_VALUE_OR_DEFAULT, \
556  		"TSF sync GPIO pin of host platform")
557  
558  #define __CFG_SET_TSF_SYNC_HOST_GPIO_PIN CFG(CFG_SET_TSF_SYNC_HOST_GPIO_PIN)
559  #else
560  #define __CFG_SET_TSF_SYNC_HOST_GPIO_PIN
561  #endif
562  
563  #if defined(WLAN_FEATURE_TSF) && defined(WLAN_FEATURE_TSF_PLUS)
564  /* <ini>
565   * g_enable_tsf_sync: Enable TSF sync feature
566   * @Min: 0
567   * @Max: 1
568   * @Default: 0
569   *
570   * Enable/disable periodic sync of TSF with firmware.
571   *
572   * Related: None
573   *
574   * Usage: External
575   *
576   * </ini>
577   */
578  #define CFG_TSF_SYNC_ENABLE CFG_INI_BOOL( \
579  		"g_enable_tsf_sync", \
580  		0, \
581  		"Enable TSF sync feature")
582  
583  /* <ini>
584   * gtsf_ptp_options: TSF Plus feature options
585   * @Min: 0
586   * @Max: 0xff
587   * @Default: 0xf
588   *
589   * CFG_SET_TSF_PTP_OPT_RX                    (0x1)
590   * CFG_SET_TSF_PTP_OPT_TX                    (0x2)
591   * CFG_SET_TSF_PTP_OPT_RAW                   (0x4)
592   * CFG_SET_TSF_DBG_FS                        (0x8)
593   * CFG_SET_TSF_PTP_OPT_TSF64_TX              (0x10)
594   * CFG_SET_TSF_PTP_SYNC_PERIOD               (0x20)
595   *
596   * Related: None
597   *
598   * Usage: Internal
599   *
600   * </ini>
601   */
602  #define CFG_SET_TSF_PTP_OPT_RX                    (0x1)
603  #define CFG_SET_TSF_PTP_OPT_TX                    (0x2)
604  #define CFG_SET_TSF_PTP_OPT_RAW                   (0x4)
605  #define CFG_SET_TSF_DBG_FS                        (0x8)
606  #define CFG_SET_TSF_PTP_OPT_TSF64_TX              (0x10)
607  #define CFG_SET_TSF_PTP_SYNC_PERIOD               (0x20)
608  
609  #define CFG_SET_TSF_PTP_OPT CFG_INI_UINT( \
610  		"gtsf_ptp_options", \
611  		0, \
612  		0xff, \
613  		0x2f, \
614  		CFG_VALUE_OR_DEFAULT, \
615  		"TSF Plus feature options")
616  
617  #define __CFG_SET_TSF_PTP_OPT \
618  		CFG(CFG_SET_TSF_PTP_OPT) \
619  		CFG(CFG_TSF_SYNC_ENABLE)
620  #else
621  #define __CFG_SET_TSF_PTP_OPT
622  #endif
623  
624  #if defined(WLAN_FEATURE_TSF_ACCURACY)
625  /* <ini>
626   * g_tsf_accuracy_configs: Enable TSF Accuracy Feature config parameters
627   * @Min: N/A
628   * @Max: N/A
629   * @Default: N/A
630   *
631   * This ini is to configure TSF Accuracy parameters.
632   * The list of mandate CFG_TSF_ACCURACY_CONFIG_LEN elements of type integer are
633   * specified with (,) delimiter.
634   * Param1: Enable/Disable TSF Accuracy Feature.
635   * Param2: GPIO to toggle on TSF sync done
636   * Param3: GPIO to raise pulse on specified period(TSF time domain)
637   * Param4: Periodicity of TSF pulse in milli seconds
638   * For example:
639   * g_tsf_accuracy_configs=1,430,431,100
640   *
641   * Related: None
642   *
643   * Usage: External
644   *
645   * </ini>
646   */
647  #define CFG_TSF_ACCURACY_CONFIG_LEN 4
648  #define CFG_TSF_ACCURACY_CONFIG_STR_LEN 128
649  #define CFG_TSF_ACCURACY_CONFIGS_DEF "0, -1, -1, 0"
650  #define CFG_TSF_ACCURACY_CONFIGS CFG_INI_STRING( \
651  		"g_tsf_accuracy_configs", \
652  		0, \
653  		CFG_TSF_ACCURACY_CONFIG_STR_LEN, \
654  		CFG_TSF_ACCURACY_CONFIGS_DEF, \
655  		"Configure TSF Accuracy parameters")
656  
657  #define __CFG_TSF_ACCURACY_CONFIGS \
658  		CFG(CFG_TSF_ACCURACY_CONFIGS)
659  #else
660  #define __CFG_TSF_ACCURACY_CONFIGS
661  #endif
662  
663  #ifdef DHCP_SERVER_OFFLOAD
664  /* <ini>
665   * gDHCPServerOffloadEnable
666   * @Min: 0
667   * @Max: 1
668   * @Default: 0
669   *
670   * DHCP Server offload support
671   *
672   * Related: None
673   *
674   * Usage: Internal
675   *
676   * </ini>
677   */
678  #define CFG_DHCP_SERVER_OFFLOAD_SUPPORT CFG_INI_BOOL( \
679  		"gDHCPServerOffloadEnable", \
680  		0, \
681  		"DHCP Server offload support")
682  
683  /* <ini>
684   * gDHCPMaxNumClients
685   * @Min: 1
686   * @Max: 8
687   * @Default: 8
688   *
689   * Number of DHCP server offload clients
690   *
691   * Related: None
692   *
693   * Usage: Internal
694   *
695   * </ini>
696   */
697  #define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT CFG_INI_INT( \
698  		"gDHCPMaxNumClients", \
699  		1, \
700  		8, \
701  		8, \
702  		CFG_VALUE_OR_DEFAULT, \
703  		"Number of DHCP server offload clients")
704  
705  #define CFG_FWOL_DHCP \
706  		CFG(CFG_DHCP_SERVER_OFFLOAD_SUPPORT) \
707  		CFG(CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT)
708  
709  #else
710  #define CFG_FWOL_DHCP
711  #endif
712  
713  #ifdef WLAN_FEATURE_SAE
714  /*
715   * <ini>
716   * sae_enabled - Enable/Disable SAE support in driver
717   * @Min: 0
718   * @Max: 1
719   * @Default: 1
720   *
721   * This ini is used to enable/disable SAE support in driver
722   * Driver will update config to supplicant based on this config.
723   *
724   * Related: None
725   *
726   * Supported Feature: SAE
727   * Usage: External
728   *
729   * </ini>
730   */
731  
732  #define CFG_IS_SAE_ENABLED CFG_INI_BOOL( \
733  		"sae_enabled", \
734  		1, \
735  		"SAE feature control")
736  #define __CFG_IS_SAE_ENABLED CFG(CFG_IS_SAE_ENABLED)
737  #else
738  #define __CFG_IS_SAE_ENABLED
739  #endif
740  
741  /*
742   * <ini>
743   * gcmp_enabled - ini to enable/disable GCMP
744   * @Min: 0
745   * @Max: 1
746   * @Default: 1
747   *
748   * Currently Firmware update the sequence number for each TID with 2^3
749   * because of security issues. But with this PN mechanism, throughput drop
750   * is observed. With this ini FW takes the decision to trade off between
751   * security and throughput
752   *
753   * Supported Feature: STA/SAP/P2P
754   *
755   * Usage: External
756   *
757   * </ini>
758   */
759  
760  #define CFG_ENABLE_GCMP CFG_INI_BOOL( \
761  		"gcmp_enabled", \
762  		1, \
763  		"GCMP Feature control param")
764  
765  /*
766   * <ini>
767   * gTxSchDelay - Enable/Disable Tx sch delay
768   * @Min: 0
769   * @Max: 5
770   * @Default: 0
771   *
772   * Usage: Internal/External
773   *
774   * </ini>
775   */
776  #define CFG_TX_SCH_DELAY CFG_INI_UINT( \
777  		"gTxSchDelay", \
778  		0, \
779  		5, \
780  		0, \
781  		CFG_VALUE_OR_DEFAULT, \
782  		"Enable/Disable Tx sch delay")
783  
784  /*
785   * <ini>
786   * gEnableSecondaryRate - Enable/Disable Secondary Retry Rate feature subset
787   *
788   * @Min: 0x0
789   * @Max: 0x3F
790   * @Default: 0x17
791   *
792   * It is a 32 bit value such that the various bits represent as below -
793   * Bit-0 : is Enable/Disable Control for "PPDU Secondary Retry Support"
794   * Bit-1 : is Enable/Disable Control for "RTS Black/White-listing Support"
795   * Bit-2 : is Enable/Disable Control for "Higher MCS retry restriction
796   *         on XRETRY failures"
797   * Bit 3-5 : is "Xretry threshold" to use
798   * Bit 3~31 : reserved for future use.
799   *
800   * Usage: External
801   *
802   * </ini>
803   */
804  #define CFG_ENABLE_SECONDARY_RATE CFG_INI_UINT( \
805  		"gEnableSecondaryRate", \
806  		0, \
807  		0x3f, \
808  		0x17, \
809  		CFG_VALUE_OR_DEFAULT, \
810  		"Secondary Retry Rate feature subset control")
811  
812  /*
813   * <ini>
814   * sap_xlna_bypass - Enable/Disable xLNA bypass
815   * @Min: 0
816   * @Max: 1
817   * @Default: 0
818   *
819   * This ini is used to enable/disable SAP xLNA bypass in the FW
820   *
821   * Related: None
822   *
823   * Supported Feature: SAP
824   *
825   * Usage: Internal
826   *
827   * </ini>
828   */
829  
830  #define CFG_SET_SAP_XLNA_BYPASS CFG_INI_BOOL( \
831  		"xlna_bypass", \
832  		0, \
833  		"SAP xLNA bypass control")
834  
835  /*
836   * <ini>
837   * g_enable_ilp - ILP HW Block Configuration
838   * @Min: 0
839   * @Max: 3
840   * @Default: 2
841   *
842   * This ini is used to configure ILP HW block with various options
843   * 0: disable
844   * 1: perf settings
845   * 2: max power saving
846   * 3: balanced settings
847   *
848   * Related: none
849   *
850   * Supported Feature: STA/SAP
851   *
852   * Usage: Internal
853   *
854   * <ini>
855   */
856  
857  #define CFG_SET_ENABLE_ILP CFG_INI_UINT( \
858  		"g_enable_ilp", \
859  		0, \
860  		3, \
861  		1, \
862  		CFG_VALUE_OR_DEFAULT, \
863  		"ILP configuration")
864  
865  /*
866   *
867   * <ini>
868   * sap_sho_config - Bitmap to Enable/Disable SAP HW offload
869   * @Min: 0
870   * @Max: 3
871   * @Default: 0
872   *
873   * This INI is used to configure sap hw offload.
874   *
875   * bit-0: enable/disable SHO
876   * bit-1: enable for Sta connected state as well.
877   * bit-2 to bit-31: Reserved
878   *
879   * Related: None
880   *
881   * Supported Feature: SAP
882   * Usage: External
883   *
884   * </ini>
885   */
886  #define CFG_SAP_SHO_CONFIG CFG_INI_UINT(\
887  		"sap_sho_config", \
888  		0, \
889  		3, \
890  		1, \
891  		CFG_VALUE_OR_DEFAULT, \
892  		"enable SHO config")
893  
894  /*
895   * <ini>
896   * g_disable_hw_assist - Flag to disable HW assist feature
897   * @Default: 0
898   *
899   * This ini is used to enable/disable the HW assist feature in FW
900   *
901   * Related: none
902   *
903   * Supported Feature: STA/SAP
904   *
905   * Usage: External
906   *
907   * <ini>
908   */
909  
910  #define CFG_DISABLE_HW_ASSIST CFG_INI_BOOL( \
911  		"g_disable_hw_assist", \
912  		0, \
913  		"Disable HW assist feature in FW")
914  
915  /*
916   * <ini>
917   * g_enable_pci_gen - To enable pci gen switch
918   * @Default: 1
919   *
920   * Related: None
921   *
922   * Supported Feature: PCI
923   *
924   * Usage: External
925   *
926   * </ini>
927   */
928  
929  #define CFG_ENABLE_PCI_GEN CFG_INI_BOOL( \
930  		"g_enable_pci_gen", \
931  		1, \
932  		"enable pci gen")
933  
934  /*
935   * <ini>
936   * pcie_config - Ini to control pcie gen and lane params
937   * @Min: 0
938   * @Max: 4
939   * @Default: 0
940   *
941   * This ini is used to control to pcie gen and lane params
942   * 0 - FW controlled
943   * 1 - Force PCIe Gen and lane to max supported value
944   * 2 - Configure PCIE Gen and Lane based on MCS and BW
945   * 3 - Configure PCIE Gen and Lane based on TXRX tput using traffic monitor
946   * 4 - Allow PCIE Gen Speed and Lane width to be configured by host via
947   *     OEM data commands.
948   *
949   * Related: g_enable_pci_gen
950   *
951   * Supported Feature: PCI
952   *
953   * Usage: External
954   *
955   * </ini>
956   */
957  #define CFG_PCIE_CONFIG CFG_INI_UINT( \
958  				"pcie_config", \
959  				0, \
960  				4, \
961  				0, \
962  				CFG_VALUE_OR_DEFAULT, \
963  				"to control pcie gen and lane")
964  
965  #define CFG_FWOL_GENERIC_ALL \
966  	CFG_FWOL_DHCP \
967  	CFG(CFG_ENABLE_ANI) \
968  	CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \
969  	CFG(CFG_SET_SIFS_BURST) \
970  	CFG(CFG_MAX_MPDUS_IN_AMPDU) \
971  	CFG(CFG_ENABLE_PHY_REG) \
972  	CFG(CFG_UPPER_BRSSI_THRESH) \
973  	CFG(CFG_LOWER_BRSSI_THRESH) \
974  	CFG(CFG_DTIM_1CHRX_ENABLE) \
975  	CFG(CFG_ENABLE_COEX_ALT_CHAINMASK) \
976  	CFG(CFG_ENABLE_SMART_CHAINMASK) \
977  	CFG(CFG_ENABLE_FW_RTS_PROFILE) \
978  	CFG(CFG_ENABLE_FW_DEBUG_LOG_LEVEL) \
979  	CFG(CFG_ENABLE_FW_LOG_TYPE) \
980  	CFG(CFG_ENABLE_FW_MODULE_LOG_LEVEL) \
981  	CFG(CFG_RA_FILTER_ENABLE) \
982  	CFG(CFG_SET_TSF_GPIO_PIN) \
983  	__CFG_SET_TSF_IRQ_HOST_GPIO_PIN \
984  	__CFG_SET_TSF_SYNC_HOST_GPIO_PIN \
985  	__CFG_SET_TSF_PTP_OPT \
986  	__CFG_TSF_ACCURACY_CONFIGS \
987  	__CFG_IS_SAE_ENABLED \
988  	CFG(CFG_ENABLE_GCMP) \
989  	CFG(CFG_TX_SCH_DELAY) \
990  	CFG(CFG_ENABLE_SECONDARY_RATE) \
991  	CFG(CFG_SET_SAP_XLNA_BYPASS) \
992  	CFG(CFG_SET_ENABLE_ILP) \
993  	CFG(CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL) \
994  	CFG(CFG_SAP_SHO_CONFIG) \
995  	CFG(CFG_DISABLE_HW_ASSIST) \
996  	CFG(CFG_ENABLE_PCI_GEN) \
997  	CFG(CFG_PCIE_CONFIG) \
998  	ENABLE_OFDM_SCRAMBLER_SEED
999  
1000  #endif
1001