2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/hem_mbox.h#3 $
16 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
17 ** 1. integrate scheduled scan functionality
18 ** 2. condition compilation for linux-3.4 & linux-3.8 compatibility
19 ** 3. correct CMD queue access to reduce lock scope
22 ** [BORA00002725] [MT6630][Wi-Fi] Add MGMT TX/RX support for Linux port
23 ** Preparation for porting remain_on_channel support
26 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
27 ** modification for ucBssIndex migration
29 ** 09 17 2012 cm.chang
30 ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
31 ** Duplicate source from MT6620 v2.3 driver branch
32 ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
34 ** 07 24 2012 yuche.tsai
38 ** 07 19 2012 yuche.tsai
40 ** Code update for JB.
44 * Sync CFG80211 modification from branch 2,2.
47 * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search for more than one SSID in a single scanning request
48 * add framework in driver domain for supporting new SCAN_REQ_V2 for more than 1 SSID support as well as uProbeDelay in NDIS 6.x driver model
50 * 06 07 2011 yuche.tsai
51 * [WCXRP00000696] [Volunteer Patch][MT6620][Driver] Infinite loop issue when RX invitation response.[WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue
52 * Add invitation support.
55 * [WCXRP00000681] [MT5931][Firmware] HIF code size reduction
56 * eliminate unused parameters for SAA-FSM
59 * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument
60 * Allocate system RAM if fixed message or mgmt buffer is not available
63 * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID
64 * Remove CNM channel reover message ID
68 * Remove unused message ID
70 * 09 03 2010 kevin.huang
72 * Refine #include sequence and solve recursive/nested #include issue
76 * eliminate klockwork errors
78 * 08 25 2010 george.huang
80 * update OID/ registry control path for PM related settings
82 * 08 23 2010 chinghwa.yu
88 * add interface for RLM to trigger OBSS-SCAN.
90 * 08 11 2010 yuche.tsai
92 * Add some message ID for P2P FSM under provisioning phase.
94 * 08 11 2010 yuche.tsai
96 * Add Message Event ID for P2P Module.
98 * 08 05 2010 yuche.tsai
100 * Check-in P2P Device Discovery Feature.
104 * remove unused mailbox message definitions.
106 * 08 02 2010 yuche.tsai
108 * P2P Group Negotiation Code Check in.
112 * [WPD00003833] [MT6620 and MT5931] Driver migration.
113 * message table should not be commented out by compilation option without modifying header file
117 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
119 * 07 08 2010 cm.chang
120 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
121 * Rename MID_MNY_CNM_CH_RELEASE to MID_MNY_CNM_CH_ABORT
124 * [WPD00003833][MT6620 and MT5931] Driver migration
125 * AIS-FSM integration with CNM channel request messages
128 * [WPD00003833][MT6620 and MT5931] Driver migration
129 * implementation of DRV-SCN and related mailbox message handling.
131 * 07 01 2010 cm.chang
132 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
133 * Modify CNM message handler for new flow
135 * 06 18 2010 cm.chang
136 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
137 * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf
140 * [WPD00003833][MT6620 and MT5931] Driver migration
141 * restore utility function invoking via hem_mbox to direct calls
144 * [WPD00003833][MT6620 and MT5931] Driver migration
145 * auth.c is migrated.
148 * [WPD00003833][MT6620 and MT5931] Driver migration
149 * add buildable & linkable ais_fsm.c
151 * related reference are still waiting to be resolved
154 * [WPD00003833][MT6620 and MT5931] Driver migration
155 * add definitions for module migration.
158 * [WPD00003833][MT6620 and MT5931] Driver migration
159 * hem_mbox is migrated.
162 * [WPD00003833][MT6620 and MT5931] Driver migration
163 * merge cnm_scan.h and hem_mbox.h
165 * 05 12 2010 kevin.huang
166 * [BORA00000794][WIFISYS][New Feature]Power Management Support
167 * Add Power Management - Legacy PS-POLL support.
169 * 04 29 2010 tehuang.liu
170 * [BORA00000605][WIFISYS] Phase3 Integration
171 * Removed MID_RXM_MQM_QOS_ACTION_FRAME
173 * 04 29 2010 tehuang.liu
174 * [BORA00000605][WIFISYS] Phase3 Integration
175 * Removed MID_RXM_MQM_BA_ACTION_FRAME
177 * 03 30 2010 cm.chang
178 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
179 * Support 2.4G OBSS scan
181 * 03 16 2010 kevin.huang
182 * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
185 * 03 10 2010 kevin.huang
186 * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
188 * * * * * Add Channel Manager for arbitration of JOIN and SCAN Req
190 * 03 05 2010 cm.chang
191 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
192 * Develop partial DPD code
194 * 02 11 2010 tehuang.liu
195 * [BORA00000569][WIFISYS] Phase 2 Integration Test
196 * Added MID_RXM_MQM_QOS_ACTION_FRAME for RXM to indicate QoS Action frames to MQM
198 * 01 11 2010 kevin.huang
199 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
200 * Add Deauth and Disassoc Handler
202 * Dec 7 2009 mtk01461
203 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
204 * Rename the parameter of mboxDummy()
206 * Dec 2 2009 MTK02468
207 * [BORA00000337] To check in codes for FPGA emulation
208 * Added MID_RXM_MQM_BA_ACTION_FRAME
210 * Nov 24 2009 mtk01461
211 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
212 * Remove Dummy MSG ID
214 * Nov 23 2009 mtk01461
215 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
216 * Add JOIN REQ related MSG ID
218 * Nov 16 2009 mtk01461
219 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
220 * Add AIS ABORT MSG ID
222 * Nov 5 2009 mtk01461
223 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
226 * Oct 28 2009 mtk01104
227 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
234 /*******************************************************************************
235 * C O M P I L E R F L A G S
236 ********************************************************************************
239 /*******************************************************************************
240 * E X T E R N A L R E F E R E N C E S
241 ********************************************************************************
244 /*******************************************************************************
246 ********************************************************************************
249 /*******************************************************************************
251 ********************************************************************************
254 typedef enum _ENUM_MSG_ID_T
{
255 MID_MNY_CNM_CH_REQ
, /* MANY notify CNM to obtain channel privilege */
256 MID_MNY_CNM_CH_ABORT
, /* MANY notify CNM to abort/release channel privilege */
258 MID_CNM_AIS_CH_GRANT
, /* CNM notify AIS for indicating channel granted */
259 MID_CNM_P2P_CH_GRANT
, /* CNM notify P2P for indicating channel granted */
260 MID_CNM_BOW_CH_GRANT
, /* CNM notify BOW for indicating channel granted */
262 /*--------------------------------------------------*/
263 /* SCN Module Mailbox Messages */
264 /*--------------------------------------------------*/
265 MID_AIS_SCN_SCAN_REQ
, /* AIS notify SCN for starting scan */
266 MID_AIS_SCN_SCAN_REQ_V2
, /* AIS notify SCN for starting scan with multiple SSID support */
267 MID_AIS_SCN_SCAN_CANCEL
, /* AIS notify SCN for cancelling scan */
268 MID_P2P_SCN_SCAN_REQ
, /* P2P notify SCN for starting scan */
269 MID_P2P_SCN_SCAN_REQ_V2
, /* P2P notify SCN for starting scan with multiple SSID support */
270 MID_P2P_SCN_SCAN_CANCEL
, /* P2P notify SCN for cancelling scan */
271 MID_BOW_SCN_SCAN_REQ
, /* BOW notify SCN for starting scan */
272 MID_BOW_SCN_SCAN_REQ_V2
, /* BOW notify SCN for starting scan with multiple SSID support */
273 MID_BOW_SCN_SCAN_CANCEL
, /* BOW notify SCN for cancelling scan */
274 MID_RLM_SCN_SCAN_REQ
, /* RLM notify SCN for starting scan (OBSS-SCAN) */
275 MID_RLM_SCN_SCAN_REQ_V2
, /* RLM notify SCN for starting scan (OBSS-SCAN) with multiple SSID support */
276 MID_RLM_SCN_SCAN_CANCEL
, /* RLM notify SCN for cancelling scan (OBSS-SCAN) */
277 MID_SCN_AIS_SCAN_DONE
, /* SCN notify AIS for scan completion */
278 MID_SCN_P2P_SCAN_DONE
, /* SCN notify P2P for scan completion */
279 MID_SCN_BOW_SCAN_DONE
, /* SCN notify BOW for scan completion */
280 MID_SCN_RLM_SCAN_DONE
, /* SCN notify RLM for scan completion (OBSS-SCAN) */
282 /*--------------------------------------------------*/
283 /* AIS Module Mailbox Messages */
284 /*--------------------------------------------------*/
285 MID_OID_AIS_FSM_JOIN_REQ
, /* OID/IOCTL notify AIS for join */
286 MID_OID_AIS_FSM_ABORT
, /* OID/IOCTL notify AIS for abort */
287 MID_AIS_SAA_FSM_START
, /* AIS notify SAA for Starting authentication/association fsm */
288 MID_AIS_SAA_FSM_ABORT
, /* AIS notify SAA for Aborting authentication/association fsm */
289 MID_SAA_AIS_JOIN_COMPLETE
, /* SAA notify AIS for indicating join complete */
291 #if CFG_ENABLE_BT_OVER_WIFI
292 /*--------------------------------------------------*/
293 /* BOW Module Mailbox Messages */
294 /*--------------------------------------------------*/
295 MID_BOW_SAA_FSM_START
, /* BOW notify SAA for Starting authentication/association fsm */
296 MID_BOW_SAA_FSM_ABORT
, /* BOW notify SAA for Aborting authentication/association fsm */
297 MID_SAA_BOW_JOIN_COMPLETE
, /* SAA notify BOW for indicating join complete */
300 #if CFG_ENABLE_WIFI_DIRECT
301 /*--------------------------------------------------*/
302 /* P2P Module Mailbox Messages */
303 /*--------------------------------------------------*/
304 MID_P2P_SAA_FSM_START
, /* P2P notify SAA for Starting authentication/association fsm */
305 MID_P2P_SAA_FSM_ABORT
, /* P2P notify SAA for Aborting authentication/association fsm */
306 MID_SAA_P2P_JOIN_COMPLETE
, /* SAA notify P2P for indicating join complete */
308 MID_MNY_P2P_FUN_SWITCH
, /* Enable P2P FSM. */
309 MID_MNY_P2P_DEVICE_DISCOVERY
, /* Start device discovery. */
310 MID_MNY_P2P_CONNECTION_REQ
, /* Connection request. */
311 MID_MNY_P2P_CONNECTION_ABORT
, /* Abort connection request, P2P FSM return to IDLE. */
312 MID_MNY_P2P_BEACON_UPDATE
,
314 MID_MNY_P2P_CHNL_REQ
,
315 MID_MNY_P2P_CHNL_ABORT
,
317 MID_MNY_P2P_GROUP_DISSOLVE
,
318 MID_MNY_P2P_MGMT_FRAME_REGISTER
,
319 MID_MNY_P2P_NET_DEV_REGISTER
,
320 MID_MNY_P2P_START_AP
,
321 MID_MNY_P2P_MGMT_FRAME_UPDATE
,
323 MID_MNY_P2P_WFD_CFG_UPDATE
,
327 #if CFG_SUPPORT_ADHOC
328 MID_SCN_AIS_FOUND_IBSS
, /* SCN notify AIS that an IBSS Peer has been found and can merge into */
329 #endif /* CFG_SUPPORT_ADHOC */
331 MID_SAA_AIS_FSM_ABORT
, /* SAA notify AIS for indicating deauthentication/disassociation */
333 /*--------------------------------------------------*/
334 /* AIS MGMT-TX Support */
335 /*--------------------------------------------------*/
336 MID_MNY_AIS_REMAIN_ON_CHANNEL
,
337 MID_MNY_AIS_CANCEL_REMAIN_ON_CHANNEL
,
341 } ENUM_MSG_ID_T
, *P_ENUM_MSG_ID_T
;
343 /* Message header of inter-components */
345 LINK_ENTRY_T rLinkEntry
;
346 ENUM_MSG_ID_T eMsgId
;
349 typedef VOID(*PFN_MSG_HNDL_FUNC
) (P_ADAPTER_T
, P_MSG_HDR_T
);
351 typedef struct _MSG_HNDL_ENTRY
{
352 ENUM_MSG_ID_T eMsgId
;
353 PFN_MSG_HNDL_FUNC pfMsgHndl
;
354 } MSG_HNDL_ENTRY_T
, *P_MSG_HNDL_ENTRY_T
;
356 typedef enum _EUNM_MSG_SEND_METHOD_T
{
357 MSG_SEND_METHOD_BUF
= 0, /* Message is put in the queue and will be
358 executed when mailbox is checked. */
359 MSG_SEND_METHOD_UNBUF
/* The handler function is called immediately
360 in the same context of the sender */
361 } EUNM_MSG_SEND_METHOD_T
, *P_EUNM_MSG_SEND_METHOD_T
;
364 typedef enum _ENUM_MBOX_ID_T
{
367 } ENUM_MBOX_ID_T
, *P_ENUM_MBOX_ID_T
;
369 /* Define Mailbox structure */
370 typedef struct _MBOX_T
{
374 typedef struct _MSG_SAA_FSM_START_T
{
375 MSG_HDR_T rMsgHdr
; /* Must be the first member */
377 P_STA_RECORD_T prStaRec
;
378 } MSG_SAA_FSM_START_T
, *P_MSG_SAA_FSM_START_T
;
380 typedef struct _MSG_SAA_FSM_COMP_T
{
381 MSG_HDR_T rMsgHdr
; /* Must be the first member */
383 WLAN_STATUS rJoinStatus
;
384 P_STA_RECORD_T prStaRec
;
386 } MSG_SAA_FSM_COMP_T
, *P_MSG_SAA_FSM_COMP_T
;
388 typedef struct _MSG_SAA_FSM_ABORT_T
{
389 MSG_HDR_T rMsgHdr
; /* Must be the first member */
391 P_STA_RECORD_T prStaRec
;
392 } MSG_SAA_FSM_ABORT_T
, *P_MSG_SAA_FSM_ABORT_T
;
394 typedef struct _MSG_CONNECTION_ABORT_T
{
395 MSG_HDR_T rMsgHdr
; /* Must be the first member */
396 UINT_8 ucNetTypeIndex
;
397 } MSG_CONNECTION_ABORT_T
, *P_MSG_CONNECTION_ABORT_T
;
399 typedef struct _MSG_REMAIN_ON_CHANNEL_T
{
400 MSG_HDR_T rMsgHdr
; /* Must be the first member */
402 ENUM_CHNL_EXT_T eSco
;
404 UINT_32 u4DurationMs
;
406 } MSG_REMAIN_ON_CHANNEL_T
, *P_MSG_REMAIN_ON_CHANNEL_T
;
408 typedef struct _MSG_CANCEL_REMAIN_ON_CHANNEL_T
{
409 MSG_HDR_T rMsgHdr
; /* Must be the first member */
411 } MSG_CANCEL_REMAIN_ON_CHANNEL_T
, *P_MSG_CANCEL_REMAIN_ON_CHANNEL_T
;
413 typedef struct _MSG_MGMT_TX_REQUEST_T
{
415 P_MSDU_INFO_T prMgmtMsduInfo
;
416 UINT_64 u8Cookie
; /* For indication. */
417 BOOLEAN fgNoneCckRate
;
419 } MSG_MGMT_TX_REQUEST_T
, *P_MSG_MGMT_TX_REQUEST_T
;
421 /* specific message data types */
422 typedef MSG_SAA_FSM_START_T MSG_JOIN_REQ_T
, *P_MSG_JOIN_REQ_T
;
423 typedef MSG_SAA_FSM_COMP_T MSG_JOIN_COMP_T
, *P_MSG_JOIN_COMP_T
;
424 typedef MSG_SAA_FSM_ABORT_T MSG_JOIN_ABORT_T
, *P_MSG_JOIN_ABORT_T
;
427 /*******************************************************************************
428 * P U B L I C D A T A
429 ********************************************************************************
432 /*******************************************************************************
433 * P R I V A T E D A T A
434 ********************************************************************************
437 /*******************************************************************************
439 ********************************************************************************
442 /*******************************************************************************
443 * F U N C T I O N D E C L A R A T I O N S
444 ********************************************************************************
446 VOID
mboxSetup(IN P_ADAPTER_T prAdapter
, IN ENUM_MBOX_ID_T eMboxId
);
450 mboxSendMsg(IN P_ADAPTER_T prAdapter
,
451 IN ENUM_MBOX_ID_T eMboxId
, IN P_MSG_HDR_T prMsg
, IN EUNM_MSG_SEND_METHOD_T eMethod
);
453 VOID
mboxRcvAllMsg(IN P_ADAPTER_T prAdapter
, IN ENUM_MBOX_ID_T eMboxId
);
455 VOID
mboxInitialize(IN P_ADAPTER_T prAdapter
);
457 VOID
mboxDestroy(IN P_ADAPTER_T prAdapter
);
459 VOID
mboxDummy(IN P_ADAPTER_T prAdapter
, P_MSG_HDR_T prMsgHdr
);
461 /*******************************************************************************
463 ********************************************************************************
466 #endif /* _HEM_MBOX_H */