6 \brief In this file we define the function prototype used in BSS/IBSS.
8 The file contains the function declarations and defines for used in BSS/IBSS.
16 * 07 17 2012 yuche.tsai
18 * Let netdev bring up.
20 * 07 17 2012 yuche.tsai
22 * Compile no error before trial run.
26 * Sync CFG80211 modification from branch 2,2.
28 * 09 14 2011 yuche.tsai
30 * Add P2P IE in assoc response.
32 * 03 19 2011 yuche.tsai
33 * [WCXRP00000581] [Volunteer Patch][MT6620][Driver] P2P IE in Assoc Req Issue
34 * Make assoc req to append P2P IE if wifi direct is enabled.
37 * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request
38 * Add code to send beacon and probe response WSC IE at Auto GO.
40 * 02 23 2011 eddie.chen
41 * [WCXRP00000463] [MT6620 Wi-Fi][FW/Driver][Hotspot] Cannot update WMM PS STA's partital bitmap
42 * Fix parsing WMM INFO and bmp delivery bitmap definition.
44 * 01 31 2011 george.huang
45 * [WCXRP00000333] [MT5931][FW] support SRAM power control drivers
46 * Extend TIM PVB, from 2 to 3 octets.
49 * [WCXRP00000210] [MT6620 Wi-Fi][Driver][FW] Set RCPI value in STA_REC for initial TX rate selection of auto-rate algorithm
50 * update ucRcpi of STA_RECORD_T for AIS when
51 * 1) Beacons for IBSS merge is received
52 * 2) Associate Response for a connecting peer is received
54 * 09 03 2010 kevin.huang
56 * Refine #include sequence and solve recursive/nested #include issue
58 * 08 12 2010 kevin.huang
60 * Update bssProcessProbeRequest() and bssSendBeaconProbeResponse() declarations
64 * [WPD00003833] [MT6620 and MT5931] Driver migration.
65 * when IBSS is being merged-in, send command packet to PM for connected indication
69 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
71 * 06 25 2010 george.huang
72 * [WPD00001556]Basic power managemenet function
73 * Create beacon update path, with expose bssUpdateBeaconContent()
75 * 06 17 2010 yuche.tsai
76 * [WPD00003839][MT6620 5931][P2P] Feature migration
77 * Add CTRL FLAGS for Probe Response.
80 * [WPD00003833][MT6620 and MT5931] Driver migration
81 * add necessary changes to driver data paths.
84 * [WPD00003833][MT6620 and MT5931] Driver migration
85 * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h.
87 * 06 04 2010 george.huang
88 * [BORA00000678][MT6620]WiFi LP integration
89 * [PM] Support U-APSD for STA mode
91 * 05 28 2010 kevin.huang
92 * [BORA00000794][WIFISYS][New Feature]Power Management Support
93 * Add ClientList handling API - bssClearClientList, bssAddStaRecToClientList
95 * 05 14 2010 kevin.huang
96 * [BORA00000794][WIFISYS][New Feature]Power Management Support
97 * Remove unused typedef.
99 * 05 12 2010 kevin.huang
100 * [BORA00000794][WIFISYS][New Feature]Power Management Support
101 * Fix file merge error
103 * 05 12 2010 kevin.huang
104 * [BORA00000794][WIFISYS][New Feature]Power Management Support
105 * Add Power Management - Legacy PS-POLL support.
107 * 04 19 2010 kevin.huang
108 * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support
109 * Add Beacon Timeout Support
110 * * * and will send Null frame to diagnose connection
112 * 03 16 2010 kevin.huang
113 * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
116 * 02 23 2010 kevin.huang
117 * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
118 * Add DTIM count update while TX Beacon
120 * 02 04 2010 kevin.huang
121 * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
122 * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup
128 /*******************************************************************************
129 * C O M P I L E R F L A G S
130 ********************************************************************************
133 /*******************************************************************************
134 * E X T E R N A L R E F E R E N C E S
135 ********************************************************************************
138 /*******************************************************************************
140 ********************************************************************************
142 //NOTE(Kevin): change define for george
143 //#define MAX_LEN_TIM_PARTIAL_BMP (((MAX_ASSOC_ID + 1) + 7) / 8) /* Required bits = (MAX_ASSOC_ID + 1) */
144 #define MAX_LEN_TIM_PARTIAL_BMP ((CFG_STA_REC_NUM + 7) / 8) /* reserve length greater than maximum size of STA_REC */ //obsoleted: Assume we only use AID:1~15
146 /* CTRL FLAGS for Probe Response */
147 #define BSS_PROBE_RESP_USE_P2P_DEV_ADDR BIT(0)
148 #define BSS_PROBE_RESP_INCLUDE_P2P_IE BIT(1)
150 /*******************************************************************************
152 ********************************************************************************
155 /*******************************************************************************
156 * P U B L I C D A T A
157 ********************************************************************************
160 /*******************************************************************************
161 * P R I V A T E D A T A
162 ********************************************************************************
165 /*******************************************************************************
167 ********************************************************************************
169 #define bssAssignAssocID(_prStaRec) ((_prStaRec)->ucIndex + 1)
171 /*******************************************************************************
172 * F U N C T I O N D E C L A R A T I O N S
173 ********************************************************************************
175 /*----------------------------------------------------------------------------*/
176 /* Routines for all Operation Modes */
177 /*----------------------------------------------------------------------------*/
179 bssCreateStaRecFromBssDesc (
180 IN P_ADAPTER_T prAdapter,
181 IN ENUM_STA_TYPE_T eStaType,
182 IN ENUM_NETWORK_TYPE_INDEX_T eNetTypeIndex,
183 IN P_BSS_DESC_T prBssDesc
187 bssComposeNullFrame (
188 IN P_ADAPTER_T prAdapter,
189 IN PUINT_8 pucBuffer,
190 IN P_STA_RECORD_T prStaRec
194 bssComposeQoSNullFrame (
195 IN P_ADAPTER_T prAdapter,
196 IN PUINT_8 pucBuffer,
197 IN P_STA_RECORD_T prStaRec,
204 IN P_ADAPTER_T prAdapter,
205 IN P_STA_RECORD_T prStaRec,
206 IN PFN_TX_DONE_HANDLER pfTxDoneHandler
210 bssSendQoSNullFrame (
211 IN P_ADAPTER_T prAdapter,
212 IN P_STA_RECORD_T prStaRec,
214 IN PFN_TX_DONE_HANDLER pfTxDoneHandler
218 /*----------------------------------------------------------------------------*/
219 /* Routines for both IBSS(AdHoc) and BSS(AP) */
220 /*----------------------------------------------------------------------------*/
222 bssGenerateExtSuppRate_IE (
223 IN P_ADAPTER_T prAdapter,
224 IN P_MSDU_INFO_T prMsduInfo
228 bssBuildBeaconProbeRespFrameCommonIEs (
229 IN P_MSDU_INFO_T prMsduInfo,
230 IN P_BSS_INFO_T prBssInfo,
231 IN PUINT_8 pucDestAddr
235 bssComposeBeaconProbeRespFrameHeaderAndFF (
236 IN PUINT_8 pucBuffer,
237 IN PUINT_8 pucDestAddr,
238 IN PUINT_8 pucOwnMACAddress,
240 IN UINT_16 u2BeaconInterval,
245 bssSendBeaconProbeResponse (
246 IN P_ADAPTER_T prAdapter,
247 IN ENUM_NETWORK_TYPE_INDEX_T eNetTypeIndex,
248 IN PUINT_8 pucDestAddr,
249 IN UINT_32 u4ControlFlags
253 bssProcessProbeRequest (
254 IN P_ADAPTER_T prAdapter,
255 IN P_SW_RFB_T prSwRfb
260 IN P_ADAPTER_T prAdapter,
261 IN P_BSS_INFO_T prBssInfo
265 bssAddStaRecToClientList (
266 IN P_ADAPTER_T prAdapter,
267 IN P_BSS_INFO_T prBssInfo,
268 IN P_STA_RECORD_T prStaRec
272 bssRemoveStaRecFromClientList (
273 IN P_ADAPTER_T prAdapter,
274 IN P_BSS_INFO_T prBssInfo,
275 IN P_STA_RECORD_T prStaRec
279 /*----------------------------------------------------------------------------*/
280 /* Routines for IBSS(AdHoc) only */
281 /*----------------------------------------------------------------------------*/
283 ibssProcessMatchedBeacon (
284 IN P_ADAPTER_T prAdapter,
285 IN P_BSS_INFO_T prBssInfo,
286 IN P_BSS_DESC_T prBssDesc,
291 ibssCheckCapabilityForAdHocMode (
292 IN P_ADAPTER_T prAdapter,
293 IN P_BSS_DESC_T prBssDesc
298 IN P_ADAPTER_T prAdapter,
299 IN P_BSS_INFO_T prBssInfo
303 bssUpdateBeaconContent (
304 IN P_ADAPTER_T prAdapter,
305 IN ENUM_NETWORK_TYPE_INDEX_T eNetTypeIndex
309 /*----------------------------------------------------------------------------*/
310 /* Routines for BSS(AP) only */
311 /*----------------------------------------------------------------------------*/
314 IN P_ADAPTER_T prAdapter,
315 IN P_BSS_INFO_T prBssInfo,
316 IN BOOLEAN fgIsRateUpdate
321 IN P_ADAPTER_T prAdapter,
322 IN ENUM_NETWORK_TYPE_INDEX_T eNetTypeIndex
327 IN P_ADAPTER_T prAdapter,
328 IN P_BSS_INFO_T prBssInfo,
333 /*link function to p2p module for txBcnIETable*/
335 /* WMM-2.2.2 WMM ACI to AC coding */
336 typedef enum _ENUM_ACI_T {
342 } ENUM_ACI_T, *P_ENUM_ACI_T;
344 typedef enum _ENUM_AC_PRIORITY_T {
349 } ENUM_AC_PRIORITY_T, *P_ENUM_AC_PRIORITY_T;