xref: /wlan-driver/qcacld-3.0/core/sap/src/sap_ch_select.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2012-2015, 2017-2019 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022-2023 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(__SAP_CH_SELECT_H)
21*5113495bSYour Name #define __SAP_CH_SELECT_H
22*5113495bSYour Name 
23*5113495bSYour Name /*===========================================================================
24*5113495bSYour Name 
25*5113495bSYour Name 				sapChSelect.h
26*5113495bSYour Name 
27*5113495bSYour Name    OVERVIEW:
28*5113495bSYour Name 
29*5113495bSYour Name    This software unit holds the implementation of the WLAN SAP modules
30*5113495bSYour Name    functions for channel selection.
31*5113495bSYour Name 
32*5113495bSYour Name    DEPENDENCIES:
33*5113495bSYour Name 
34*5113495bSYour Name    Are listed for each API below.
35*5113495bSYour Name    ===========================================================================*/
36*5113495bSYour Name 
37*5113495bSYour Name /*--------------------------------------------------------------------------
38*5113495bSYour Name    Include Files
39*5113495bSYour Name    ------------------------------------------------------------------------*/
40*5113495bSYour Name #include "ani_global.h"
41*5113495bSYour Name /*--------------------------------------------------------------------------
42*5113495bSYour Name    defines and enum
43*5113495bSYour Name    --------------------------------------------------------------------------*/
44*5113495bSYour Name 
45*5113495bSYour Name #define SAPDFS_NORMALISE_1000      (1000/9)     /* Case of spec20 with channel diff = 0 */
46*5113495bSYour Name #define SOFTAP_MIN_RSSI         (-100)
47*5113495bSYour Name #define SOFTAP_MAX_RSSI         (0)
48*5113495bSYour Name #define SOFTAP_MIN_COUNT        (0)
49*5113495bSYour Name #define SOFTAP_MAX_COUNT        (60)
50*5113495bSYour Name 
51*5113495bSYour Name #define SOFTAP_MIN_NF           (-120)
52*5113495bSYour Name #define SOFTAP_MAX_NF           (-60)
53*5113495bSYour Name #define SOFTAP_MIN_CHNFREE      (0)
54*5113495bSYour Name #define SOFTAP_MAX_CHNFREE      (1)
55*5113495bSYour Name #define SOFTAP_MIN_TXPWR        (0)
56*5113495bSYour Name #define SOFTAP_MAX_TXPWR        (63)
57*5113495bSYour Name 
58*5113495bSYour Name #define REG_MAX_EIRP_POWER 36
59*5113495bSYour Name #define REG_MIN_EIRP_POWER 14
60*5113495bSYour Name 
61*5113495bSYour Name #define SAP_NORMALISE_ACS_WEIGHT 5
62*5113495bSYour Name 
63*5113495bSYour Name /* In HT40/VHT80, Effect of primary Channel RSSi on Subband1 */
64*5113495bSYour Name #define SAP_SUBBAND1_RSSI_EFFECT_PRIMARY  (-20)
65*5113495bSYour Name /* In VHT80, Effect of primary Channel RSSI on Subband2 */
66*5113495bSYour Name #define SAP_SUBBAND2_RSSI_EFFECT_PRIMARY  (-30)
67*5113495bSYour Name /* In VHT80, Effect of Primary Channel RSSI on Subband3 */
68*5113495bSYour Name #define SAP_SUBBAND3_RSSI_EFFECT_PRIMARY  (-40)
69*5113495bSYour Name /* In VHT80, Effect of Primary Channel RSSI on Subband4 */
70*5113495bSYour Name #define SAP_SUBBAND4_RSSI_EFFECT_PRIMARY  (-50)
71*5113495bSYour Name /* In VHT80, Effect of Primary Channel RSSI on Subband5 */
72*5113495bSYour Name #define SAP_SUBBAND5_RSSI_EFFECT_PRIMARY  (-60)
73*5113495bSYour Name /* In VHT80, Effect of Primary Channel RSSI on Subband6 */
74*5113495bSYour Name #define SAP_SUBBAND6_RSSI_EFFECT_PRIMARY  (-70)
75*5113495bSYour Name /* In VHT80, Effect of Primary Channel RSSI on Subband7 */
76*5113495bSYour Name #define SAP_SUBBAND7_RSSI_EFFECT_PRIMARY  (-80)
77*5113495bSYour Name 
78*5113495bSYour Name #define SAP_24GHZ_FIRST_OVERLAP_CHAN_RSSI_EFFECT_PRIMARY      (-10)     /* In 2.4GHZ, Effect of Primary  Channel RSSI on First Overlapping Channel */
79*5113495bSYour Name #define SAP_24GHZ_SEC_OVERLAP_CHAN_RSSI_EFFECT_PRIMARY        (-20)     /* In 2.4GHZ, Effect of Primary  Channel RSSI on Second Overlapping Channel */
80*5113495bSYour Name #define SAP_24GHZ_THIRD_OVERLAP_CHAN_RSSI_EFFECT_PRIMARY      (-30)     /* In 2.4GHZ, Effect of Primary  Channel RSSI on Third Overlapping Channel */
81*5113495bSYour Name #define SAP_24GHZ_FOURTH_OVERLAP_CHAN_RSSI_EFFECT_PRIMARY     (-40)     /* In 2.4GHZ, Effect of Primary  Channel RSSI on Fourth Overlapping Channel */
82*5113495bSYour Name 
83*5113495bSYour Name typedef enum {
84*5113495bSYour Name 	CHANNEL_1 = 1,
85*5113495bSYour Name 	CHANNEL_2,
86*5113495bSYour Name 	CHANNEL_3,
87*5113495bSYour Name 	CHANNEL_4,
88*5113495bSYour Name 	CHANNEL_5,
89*5113495bSYour Name 	CHANNEL_6,
90*5113495bSYour Name 	CHANNEL_7,
91*5113495bSYour Name 	CHANNEL_8,
92*5113495bSYour Name 	CHANNEL_9,
93*5113495bSYour Name 	CHANNEL_10,
94*5113495bSYour Name 	CHANNEL_11,
95*5113495bSYour Name 	CHANNEL_12,
96*5113495bSYour Name 	CHANNEL_13,
97*5113495bSYour Name 	CHANNEL_14
98*5113495bSYour Name } tSapChannel;
99*5113495bSYour Name #endif /* if !defined __SAP_CH_SELECT_H */
100