20533c95762fe50b9d3a3ef5e40b9f60f4610741
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / combo_mt66xx / mt6628 / wlan / include / mgmt / rlm_obss.h
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/rlm_obss.h#1 $
3 */
4
5 /*! \file   "rlm_obss.h"
6     \brief
7 */
8
9
10
11 /*
12 ** $Log: rlm_obss.h $
13  *
14  * 01 24 2011 cm.chang
15  * [WCXRP00000384] [MT6620 Wi-Fi][Driver][FW] Handle 20/40 action frame in AP mode and stop ampdu timer when sta_rec is freed
16  * Process received 20/40 coexistence action frame for AP mode
17  *
18  * 01 13 2011 cm.chang
19  * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module
20  * Refine function when rcv a 20/40M public action frame
21  *
22  * 01 12 2011 cm.chang
23  * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting
24  * User-defined bandwidth is for 2.4G and 5G individually
25  *
26  * 08 24 2010 cm.chang
27  * NULL
28  * Support RLM initail channel of Ad-hoc, P2P and BOW
29  *
30  * 07 08 2010 cp.wu
31  *
32  * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
33  *
34  * 06 28 2010 cm.chang
35  * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
36  * 1st draft code for RLM module
37  *
38  * 05 07 2010 cm.chang
39  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
40  * Process 20/40 coexistence public action frame in AP mode
41  *
42  * 05 05 2010 cm.chang
43  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
44  * First draft support for 20/40M bandwidth for AP mode
45  *
46  * 04 07 2010 cm.chang
47  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
48  * Add virtual test for OBSS scan
49  *
50  * 03 30 2010 cm.chang
51  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
52  * Support 2.4G OBSS scan
53  *
54  * 02 13 2010 cm.chang
55  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
56  * Support PCO in STA mode
57  *
58  * 02 12 2010 cm.chang
59  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
60  * Use bss info array for concurrent handle
61  *
62  * 01 25 2010 cm.chang
63  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
64  * Support protection and bandwidth switch
65 */
66
67 #ifndef _RLM_OBSS_H
68 #define _RLM_OBSS_H
69
70 /*******************************************************************************
71 *                         C O M P I L E R   F L A G S
72 ********************************************************************************
73 */
74
75 /*******************************************************************************
76 *                    E X T E R N A L   R E F E R E N C E S
77 ********************************************************************************
78 */
79
80 /*******************************************************************************
81 *                              C O N S T A N T S
82 ********************************************************************************
83 */
84 #define CHNL_LIST_SZ_2G         14
85 #define CHNL_LIST_SZ_5G         14
86
87
88 #define CHNL_LEVEL0             0
89 #define CHNL_LEVEL1             1
90 #define CHNL_LEVEL2             2
91
92 #define AFFECTED_CHNL_OFFSET    5
93
94 #define OBSS_SCAN_MIN_INTERVAL  10      /* In unit of sec */
95
96 #define PUBLIC_ACTION_MAX_LEN   200     /* In unit of byte */
97
98 /* P2P GO only */
99 /* Define default OBSS Scan parameters (from MIB in spec.) */
100 #define dot11OBSSScanPassiveDwell                   20
101 #define dot11OBSSScanActiveDwell                    10
102 #define dot11OBSSScanPassiveTotalPerChannel         200
103 #define dot11OBSSScanActiveTotalPerChannel          20
104 #define dot11BSSWidthTriggerScanInterval            300     /* Unit: sec */
105 #define dot11BSSWidthChannelTransitionDelayFactor   5
106 #define dot11OBSSScanActivityThreshold              25
107
108 #define OBSS_20_40M_TIMEOUT     (dot11BSSWidthTriggerScanInterval + 10)
109
110 /*******************************************************************************
111 *                             D A T A   T Y P E S
112 ********************************************************************************
113 */
114
115 /* Control MAC PCO function */
116 typedef enum _ENUM_SYS_PCO_PHASE_T {
117     SYS_PCO_PHASE_DISABLED = 0,
118     SYS_PCO_PHASE_20M,
119     SYS_PCO_PHASE_40M
120 } ENUM_SYS_PCO_PHASE_T, *P_ENUM_SYS_PCO_PHASE_T;
121
122 /*******************************************************************************
123 *                            P U B L I C   D A T A
124 ********************************************************************************
125 */
126
127 /*******************************************************************************
128 *                           P R I V A T E   D A T A
129 ********************************************************************************
130 */
131
132 /*******************************************************************************
133 *                                 M A C R O S
134 ********************************************************************************
135 */
136
137 /*******************************************************************************
138 *                   F U N C T I O N   D E C L A R A T I O N S
139 ********************************************************************************
140 */
141 VOID
142 rlmObssInit (
143     P_ADAPTER_T     prAdapter
144     );
145
146 VOID
147 rlmObssScanDone (
148     P_ADAPTER_T prAdapter,
149     P_MSG_HDR_T prMsgHdr
150     );
151
152 VOID
153 rlmObssTriggerScan (
154     P_ADAPTER_T         prAdapter,
155     P_BSS_INFO_T        prBssInfo
156     );
157
158 /*******************************************************************************
159 *                              F U N C T I O N S
160 ********************************************************************************
161 */
162
163 #endif /* _RLM_OBSS_H */
164