2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_2/include/mgmt/hem_mbox.h#3 $
10 /*******************************************************************************
11 * Copyright (c) 2009 MediaTek Inc.
13 * All rights reserved. Copying, compilation, modification, distribution
14 * or any other use whatsoever of this material is strictly prohibited
15 * except in accordance with a Software License Agreement with
17 ********************************************************************************
20 /*******************************************************************************
23 * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND
24 * AGREES THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK
25 * SOFTWARE") RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE
26 * PROVIDED TO BUYER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY
27 * DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
28 * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
29 * PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE
30 * ANY WARRANTY WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY
31 * WHICH MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK
32 * SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY
33 * WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE
34 * FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION OR TO
35 * CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
37 * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
38 * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL
39 * BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT
40 * ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY
41 * BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
43 * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
44 * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT
45 * OF LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING
46 * THEREOF AND RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN
47 * FRANCISCO, CA, UNDER THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE
49 ********************************************************************************
55 * 01 17 2012 yuche.tsai
57 * Update mgmt frame filter setting.
58 * Please also update FW 2.1
60 * 01 13 2012 yuche.tsai
62 * WiFi Hot Spot Tethering for ICS ALPHA testing version.
64 * 10 19 2011 yuche.tsai
65 * [WCXRP00001045] [WiFi Direct][Driver] Check 2.1 branch.
67 * Davinci Maintrunk Label: MT6620_WIFI_DRIVER_FW_TRUNK_MT6620E5_111019_0926.
69 * 08 10 2011 yuche.tsai
70 * [WCXRP00000919] [Volunteer Patch][WiFi Direct][Driver] Invitation New Feature.
71 * Add infitation support.
74 * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
75 * follow-ups for frequency-shifted WAPI AP support
78 * [WCXRP00000577] [MT6620 Wi-Fi][Driver][FW] Create V2.0 branch for firmware and driver
79 * create V2.0 driver release based on label "MT6620_WIFI_DRIVER_V2_0_110318_1600" from main trunk
82 * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument
83 * Allocate system RAM if fixed message or mgmt buffer is not available
86 * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID
87 * Remove CNM channel reover message ID
91 * Remove unused message ID
93 * 09 03 2010 kevin.huang
95 * Refine #include sequence and solve recursive/nested #include issue
99 * eliminate klockwork errors
101 * 08 25 2010 george.huang
103 * update OID/ registry control path for PM related settings
105 * 08 23 2010 chinghwa.yu
111 * add interface for RLM to trigger OBSS-SCAN.
113 * 08 11 2010 yuche.tsai
115 * Add some message ID for P2P FSM under provisioning phase.
117 * 08 11 2010 yuche.tsai
119 * Add Message Event ID for P2P Module.
121 * 08 05 2010 yuche.tsai
123 * Check-in P2P Device Discovery Feature.
127 * remove unused mailbox message definitions.
129 * 08 02 2010 yuche.tsai
131 * P2P Group Negotiation Code Check in.
135 * [WPD00003833] [MT6620 and MT5931] Driver migration.
136 * message table should not be commented out by compilation option without modifying header file
140 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
142 * 07 08 2010 cm.chang
143 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
144 * Rename MID_MNY_CNM_CH_RELEASE to MID_MNY_CNM_CH_ABORT
147 * [WPD00003833][MT6620 and MT5931] Driver migration
148 * AIS-FSM integration with CNM channel request messages
151 * [WPD00003833][MT6620 and MT5931] Driver migration
152 * implementation of DRV-SCN and related mailbox message handling.
154 * 07 01 2010 cm.chang
155 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
156 * Modify CNM message handler for new flow
158 * 06 18 2010 cm.chang
159 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
160 * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf
163 * [WPD00003833][MT6620 and MT5931] Driver migration
164 * restore utility function invoking via hem_mbox to direct calls
167 * [WPD00003833][MT6620 and MT5931] Driver migration
168 * auth.c is migrated.
171 * [WPD00003833][MT6620 and MT5931] Driver migration
172 * add buildable & linkable ais_fsm.c
174 * related reference are still waiting to be resolved
177 * [WPD00003833][MT6620 and MT5931] Driver migration
178 * add definitions for module migration.
181 * [WPD00003833][MT6620 and MT5931] Driver migration
182 * hem_mbox is migrated.
185 * [WPD00003833][MT6620 and MT5931] Driver migration
186 * merge cnm_scan.h and hem_mbox.h
188 * 05 12 2010 kevin.huang
189 * [BORA00000794][WIFISYS][New Feature]Power Management Support
190 * Add Power Management - Legacy PS-POLL support.
192 * 04 29 2010 tehuang.liu
193 * [BORA00000605][WIFISYS] Phase3 Integration
194 * Removed MID_RXM_MQM_QOS_ACTION_FRAME
196 * 04 29 2010 tehuang.liu
197 * [BORA00000605][WIFISYS] Phase3 Integration
198 * Removed MID_RXM_MQM_BA_ACTION_FRAME
200 * 03 30 2010 cm.chang
201 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
202 * Support 2.4G OBSS scan
204 * 03 16 2010 kevin.huang
205 * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
208 * 03 10 2010 kevin.huang
209 * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
211 * * * * * Add Channel Manager for arbitration of JOIN and SCAN Req
213 * 03 05 2010 cm.chang
214 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
215 * Develop partial DPD code
217 * 02 11 2010 tehuang.liu
218 * [BORA00000569][WIFISYS] Phase 2 Integration Test
219 * Added MID_RXM_MQM_QOS_ACTION_FRAME for RXM to indicate QoS Action frames to MQM
221 * 01 11 2010 kevin.huang
222 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
223 * Add Deauth and Disassoc Handler
225 * Dec 7 2009 mtk01461
226 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
227 * Rename the parameter of mboxDummy()
229 * Dec 2 2009 MTK02468
230 * [BORA00000337] To check in codes for FPGA emulation
231 * Added MID_RXM_MQM_BA_ACTION_FRAME
233 * Nov 24 2009 mtk01461
234 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
235 * Remove Dummy MSG ID
237 * Nov 23 2009 mtk01461
238 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
239 * Add JOIN REQ related MSG ID
241 * Nov 16 2009 mtk01461
242 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
243 * Add AIS ABORT MSG ID
245 * Nov 5 2009 mtk01461
246 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
249 * Oct 28 2009 mtk01104
250 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
257 /*******************************************************************************
258 * C O M P I L E R F L A G S
259 ********************************************************************************
262 /*******************************************************************************
263 * E X T E R N A L R E F E R E N C E S
264 ********************************************************************************
267 /*******************************************************************************
269 ********************************************************************************
272 /*******************************************************************************
274 ********************************************************************************
277 typedef enum _ENUM_MSG_ID_T {
278 MID_MNY_CNM_CH_REQ, /* MANY notify CNM to obtain channel privilege */
279 MID_MNY_CNM_CH_ABORT, /* MANY notify CNM to abort/release channel privilege */
281 MID_CNM_AIS_CH_GRANT, /* CNM notify AIS for indicating channel granted */
282 MID_CNM_P2P_CH_GRANT, /* CNM notify P2P for indicating channel granted */
283 MID_CNM_BOW_CH_GRANT, /* CNM notify BOW for indicating channel granted */
285 /*--------------------------------------------------*/
286 /* SCN Module Mailbox Messages */
287 /*--------------------------------------------------*/
288 MID_AIS_SCN_SCAN_REQ, /* AIS notify SCN for starting scan */
289 MID_AIS_SCN_SCAN_REQ_V2, /* AIS notify SCN for starting scan with multiple SSID support */
290 MID_AIS_SCN_SCAN_CANCEL, /* AIS notify SCN for cancelling scan */
291 MID_P2P_SCN_SCAN_REQ, /* P2P notify SCN for starting scan */
292 MID_P2P_SCN_SCAN_REQ_V2, /* P2P notify SCN for starting scan with multiple SSID support */
293 MID_P2P_SCN_SCAN_CANCEL, /* P2P notify SCN for cancelling scan */
294 MID_BOW_SCN_SCAN_REQ, /* BOW notify SCN for starting scan */
295 MID_BOW_SCN_SCAN_REQ_V2, /* BOW notify SCN for starting scan with multiple SSID support */
296 MID_BOW_SCN_SCAN_CANCEL, /* BOW notify SCN for cancelling scan */
297 MID_RLM_SCN_SCAN_REQ, /* RLM notify SCN for starting scan (OBSS-SCAN) */
298 MID_RLM_SCN_SCAN_REQ_V2, /* RLM notify SCN for starting scan (OBSS-SCAN) with multiple SSID support */
299 MID_RLM_SCN_SCAN_CANCEL, /* RLM notify SCN for cancelling scan (OBSS-SCAN)*/
300 MID_SCN_AIS_SCAN_DONE, /* SCN notify AIS for scan completion */
301 MID_SCN_P2P_SCAN_DONE, /* SCN notify P2P for scan completion */
302 MID_SCN_BOW_SCAN_DONE, /* SCN notify BOW for scan completion */
303 MID_SCN_RLM_SCAN_DONE, /* SCN notify RLM for scan completion (OBSS-SCAN) */
305 /*--------------------------------------------------*/
306 /* AIS Module Mailbox Messages */
307 /*--------------------------------------------------*/
308 MID_OID_AIS_FSM_JOIN_REQ, /* OID/IOCTL notify AIS for join */
309 MID_OID_AIS_FSM_ABORT, /* OID/IOCTL notify AIS for abort */
310 MID_AIS_SAA_FSM_START, /* AIS notify SAA for Starting authentication/association fsm */
311 MID_AIS_SAA_FSM_ABORT, /* AIS notify SAA for Aborting authentication/association fsm */
312 MID_SAA_AIS_JOIN_COMPLETE, /* SAA notify AIS for indicating join complete */
314 #if CFG_ENABLE_BT_OVER_WIFI
315 /*--------------------------------------------------*/
316 /* BOW Module Mailbox Messages */
317 /*--------------------------------------------------*/
318 MID_BOW_SAA_FSM_START, /* BOW notify SAA for Starting authentication/association fsm */
319 MID_BOW_SAA_FSM_ABORT, /* BOW notify SAA for Aborting authentication/association fsm */
320 MID_SAA_BOW_JOIN_COMPLETE, /* SAA notify BOW for indicating join complete */
323 #if CFG_ENABLE_WIFI_DIRECT
324 /*--------------------------------------------------*/
325 /* P2P Module Mailbox Messages */
326 /*--------------------------------------------------*/
327 MID_P2P_SAA_FSM_START, /* P2P notify SAA for Starting authentication/association fsm */
328 MID_P2P_SAA_FSM_ABORT, /* P2P notify SAA for Aborting authentication/association fsm */
329 MID_SAA_P2P_JOIN_COMPLETE, /* SAA notify P2P for indicating join complete */
331 MID_MNY_P2P_FUN_SWITCH, /* Enable P2P FSM. */
332 MID_MNY_P2P_DEVICE_DISCOVERY, /* Start device discovery. */
333 MID_MNY_P2P_DISCOVERY_ABORT, /* Start device discovery abort. */
334 MID_MNY_P2P_CONNECTION_REQ, /* Connection request. */
335 MID_MNY_P2P_CONNECTION_ABORT, /* Abort connection request, P2P FSM return to IDLE. */
336 MID_MNY_P2P_CONNECTION_TRIGGER, /* Only if connection request is valid. Trigger P2P FSM to connection target AP. */
337 MID_MNY_P2P_CONNECTION_PAUSE, /* Disconnect from target AP, connection is not complete yet. */
338 MID_MNY_P2P_PROVISION_COMPLETE, /* Provisioning complete. */
339 MID_MNY_P2P_INVITATION_REQ,
340 MID_MNY_P2P_INVITATION_ABORT,
341 MID_MNY_P2P_BEACON_UPDATE,
342 MID_MNY_P2P_BEACON_DEL,
343 MID_MNY_P2P_CHNL_REQ,
344 MID_MNY_P2P_CHNL_ABORT,
346 MID_MNY_P2P_GROUP_DISSOLVE,
347 MID_MNY_P2P_MGMT_FRAME_REGISTER,
350 #if CFG_SUPPORT_ADHOC
351 MID_SCN_AIS_FOUND_IBSS, /* SCN notify AIS that an IBSS Peer has been found and can merge into */
352 #endif /* CFG_SUPPORT_ADHOC */
354 MID_SAA_AIS_FSM_ABORT, /* SAA notify AIS for indicating deauthentication/disassociation */
357 } ENUM_MSG_ID_T, *P_ENUM_MSG_ID_T;
359 /* Message header of inter-components */
361 LINK_ENTRY_T rLinkEntry;
362 ENUM_MSG_ID_T eMsgId;
365 typedef VOID (*PFN_MSG_HNDL_FUNC)(P_ADAPTER_T, P_MSG_HDR_T);
367 typedef struct _MSG_HNDL_ENTRY {
368 ENUM_MSG_ID_T eMsgId;
369 PFN_MSG_HNDL_FUNC pfMsgHndl;
370 } MSG_HNDL_ENTRY_T, *P_MSG_HNDL_ENTRY_T;
372 typedef enum _EUNM_MSG_SEND_METHOD_T {
373 MSG_SEND_METHOD_BUF = 0, /* Message is put in the queue and will be
374 executed when mailbox is checked. */
375 MSG_SEND_METHOD_UNBUF /* The handler function is called immediately
376 in the same context of the sender */
377 } EUNM_MSG_SEND_METHOD_T, *P_EUNM_MSG_SEND_METHOD_T;
380 typedef enum _ENUM_MBOX_ID_T {
383 } ENUM_MBOX_ID_T, *P_ENUM_MBOX_ID_T;
385 /* Define Mailbox structure */
386 typedef struct _MBOX_T {
390 typedef struct _MSG_SAA_FSM_START_T {
391 MSG_HDR_T rMsgHdr; /* Must be the first member */
393 P_STA_RECORD_T prStaRec;
394 } MSG_SAA_FSM_START_T, *P_MSG_SAA_FSM_START_T;
396 typedef struct _MSG_SAA_FSM_COMP_T {
397 MSG_HDR_T rMsgHdr; /* Must be the first member */
399 WLAN_STATUS rJoinStatus;
400 P_STA_RECORD_T prStaRec;
402 } MSG_SAA_FSM_COMP_T, *P_MSG_SAA_FSM_COMP_T;
404 typedef struct _MSG_SAA_FSM_ABORT_T {
405 MSG_HDR_T rMsgHdr; /* Must be the first member */
407 P_STA_RECORD_T prStaRec;
408 } MSG_SAA_FSM_ABORT_T, *P_MSG_SAA_FSM_ABORT_T;
410 typedef struct _MSG_CONNECTION_ABORT_T {
411 MSG_HDR_T rMsgHdr; /* Must be the first member */
412 UINT_8 ucNetTypeIndex;
413 } MSG_CONNECTION_ABORT_T, *P_MSG_CONNECTION_ABORT_T;
417 /* specific message data types */
418 typedef MSG_SAA_FSM_START_T MSG_JOIN_REQ_T, *P_MSG_JOIN_REQ_T;
419 typedef MSG_SAA_FSM_COMP_T MSG_JOIN_COMP_T, *P_MSG_JOIN_COMP_T;
420 typedef MSG_SAA_FSM_ABORT_T MSG_JOIN_ABORT_T, *P_MSG_JOIN_ABORT_T;
423 /*******************************************************************************
424 * P U B L I C D A T A
425 ********************************************************************************
428 /*******************************************************************************
429 * P R I V A T E D A T A
430 ********************************************************************************
433 /*******************************************************************************
435 ********************************************************************************
438 /*******************************************************************************
439 * F U N C T I O N D E C L A R A T I O N S
440 ********************************************************************************
444 IN P_ADAPTER_T prAdapter,
445 IN ENUM_MBOX_ID_T eMboxId
451 IN P_ADAPTER_T prAdapter,
452 IN ENUM_MBOX_ID_T eMboxId,
453 IN P_MSG_HDR_T prMsg,
454 IN EUNM_MSG_SEND_METHOD_T eMethod
459 IN P_ADAPTER_T prAdapter,
460 IN ENUM_MBOX_ID_T eMboxId
465 IN P_ADAPTER_T prAdapter
470 IN P_ADAPTER_T prAdapter
475 IN P_ADAPTER_T prAdapter,
479 /*******************************************************************************
481 ********************************************************************************
484 #endif /* _HEM_MBOX_H */