89f76530e6c6e0d2b9fe7a64a40a3090a4765fbe
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / combo_mt66xx / mt6628 / wlan / include / mgmt / ais_fsm.h
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/ais_fsm.h#1 $
3 */
4
5 /*! \file   ais_fsm.h
6     \brief  Declaration of functions and finite state machine for AIS Module.
7
8     Declaration of functions and finite state machine for AIS Module.
9 */
10
11
12
13 /*
14 ** $Log: ais_fsm.h $
15  *
16  * 11 22 2011 cp.wu
17  * [WCXRP00001120] [MT6620 Wi-Fi][Driver] Modify roaming to AIS state transition from synchronous to asynchronous approach to avoid incomplete state termination
18  * 1. change RDD related compile option brace position.
19  * 2. when roaming is triggered, ask AIS to transit immediately only when AIS is in Normal TR state without join timeout timer ticking
20  * 3. otherwise, insert AIS_REQUEST into pending request queue
21  *
22  * 04 25 2011 cp.wu
23  * [WCXRP00000676] [MT6620 Wi-Fi][Driver] AIS to reduce request channel period from 5 seconds to 2 seconds
24  * channel interval for joining is shortened to 2 seconds to avoid interruption of concurrent operating network.
25  *
26  * 02 26 2011 tsaiyuan.hsu
27  * [WCXRP00000391] [MT6620 Wi-Fi][FW] Add Roaming Support
28  * not send disassoc or deauth to leaving AP so as to improve performace of roaming.
29  *
30  * 02 22 2011 cp.wu
31  * [WCXRP00000487] [MT6620 Wi-Fi][Driver][AIS] Serve scan and connect request with a queue-based approach to improve response time for scanning request
32  * handle SCAN and RECONNECT with a FIFO approach.
33  *
34  * 01 27 2011 tsaiyuan.hsu
35  * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
36  * add roaming fsm
37  * 1. not support 11r, only use strength of signal to determine roaming.
38  * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
39  * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
40  * 4. assume that change of link quality in smooth way.
41  *
42  * 01 14 2011 cp.wu
43  * [WCXRP00000359] [MT6620 Wi-Fi][Driver] add an extra state to ensure DEAUTH frame is always sent
44  * Add an extra state to guarantee DEAUTH frame is sent then connect to new BSS.
45  * This change is due to WAPI AP needs DEAUTH frame as a necessary step in handshaking protocol.
46  *
47  * 11 25 2010 cp.wu
48  * [WCXRP00000208] [MT6620 Wi-Fi][Driver] Add scanning with specified SSID to AIS FSM
49  * add scanning with specified SSID facility to AIS-FSM
50  *
51  * 11 01 2010 cp.wu
52  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate from firmware auto rate module
53  * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead
54  * 2) Remove CNM CH-RECOVER event handling
55  * 3) cfg read/write API renamed with kal prefix for unified naming rules.
56  *
57  * 09 06 2010 cp.wu
58  * NULL
59  * 1) initialize for correct parameter even for disassociation.
60  * 2) AIS-FSM should have a limit on trials to build connection
61  *
62  * 09 03 2010 kevin.huang
63  * NULL
64  * Refine #include sequence and solve recursive/nested #include issue
65  *
66  * 08 25 2010 cp.wu
67  * NULL
68  * [AIS-FSM] IBSS no longer needs to acquire channel for beaconing, RLM/CNM will handle the channel switching when BSS information is updated
69  *
70  * 08 12 2010 kevin.huang
71  * NULL
72  * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse()
73  *
74  * 08 12 2010 cp.wu
75  * NULL
76  * [AIS-FSM] honor registry setting for adhoc running mode. (A/B/G)
77  *
78  * 08 03 2010 cp.wu
79  * NULL
80  * surpress compilation warning.
81  *
82  * 07 30 2010 cp.wu
83  * NULL
84  * 1) BoW wrapper: use definitions instead of hard-coded constant for error code
85  * 2) AIS-FSM: eliminate use of desired RF parameters, use prTargetBssDesc instead
86  * 3) add handling for RX_PKT_DESTINATION_HOST_WITH_FORWARD for GO-broadcast frames
87  *
88  * 07 26 2010 cp.wu
89  * 
90  * AIS-FSM: when scan request is coming in the 1st 5 seconds of channel privilege period, just pend it til 5-sec. period finishes
91  *
92  * 07 26 2010 cp.wu
93  * 
94  * AIS-FSM FIX: return channel privilege even when the privilege is not granted yet
95  * QM: qmGetFrameAction() won't assert when corresponding STA-REC index is not found
96  *
97  * 07 23 2010 cp.wu
98  * 
99  * add AIS-FSM handling for beacon timeout event.
100  *
101  * 07 21 2010 cp.wu
102  * 
103  * separate AIS-FSM states into different cases of channel request.
104  *
105  * 07 21 2010 cp.wu
106  * 
107  * 1) change BG_SCAN to ONLINE_SCAN for consistent term
108  * 2) only clear scanning result when scan is permitted to do
109  *
110  * 07 19 2010 cp.wu
111  * 
112  * [WPD00003833] [MT6620 and MT5931] Driver migration.
113  * Add Ad-Hoc support to AIS-FSM
114  *
115  * 07 14 2010 cp.wu
116  * 
117  * [WPD00003833] [MT6620 and MT5931] Driver migration.
118  * Refine AIS-FSM by divided into more states
119  *
120  * 07 09 2010 cp.wu
121  * 
122  * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection)
123  * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass
124  * 3) implment DRV-SCN module, currently only accepts single scan request, other request will be directly dropped by returning BUSY
125  *
126  * 07 08 2010 cp.wu
127  * 
128  * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
129  *
130  * 07 01 2010 cp.wu
131  * [WPD00003833][MT6620 and MT5931] Driver migration 
132  * AIS-FSM integration with CNM channel request messages
133  *
134  * 07 01 2010 cp.wu
135  * [WPD00003833][MT6620 and MT5931] Driver migration 
136  * implementation of DRV-SCN and related mailbox message handling.
137  *
138  * 06 10 2010 cp.wu
139  * [WPD00003833][MT6620 and MT5931] Driver migration 
140  * add buildable & linkable ais_fsm.c
141  * 
142  * related reference are still waiting to be resolved
143  *
144  * 06 09 2010 cp.wu
145  * [WPD00003833][MT6620 and MT5931] Driver migration 
146  * add definitions for module migration.
147  *
148  * 06 07 2010 cp.wu
149  * [WPD00003833][MT6620 and MT5931] Driver migration 
150  * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h.
151  *
152  * 05 12 2010 kevin.huang
153  * [BORA00000794][WIFISYS][New Feature]Power Management Support 
154  * Add Power Management - Legacy PS-POLL support.
155  *
156  * 04 23 2010 wh.su
157  * [BORA00000605][WIFISYS] Phase3 Integration 
158  * reduce the backgroud ssid idle time min and max value
159  *
160  * 04 19 2010 kevin.huang
161  * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support
162  * Add Beacon Timeout Support
163  *  *  and will send Null frame to diagnose connection
164  *
165  * 03 16 2010 kevin.huang
166  * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
167  * Add AdHoc Mode
168  *
169  * 03 10 2010 kevin.huang
170  * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
171  *
172  *  * Add Channel Manager for arbitration of JOIN and SCAN Req
173  *
174  * 02 26 2010 kevin.huang
175  * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
176  * Remove CFG_TEST_VIRTUAL_CMD and add support of Driver STA_RECORD_T activation
177  *
178  * 02 23 2010 kevin.huang
179  * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
180  * Support dynamic channel selection
181  *
182  * 02 04 2010 kevin.huang
183  * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
184  * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup
185  *
186  * 01 11 2010 kevin.huang
187  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
188  * Add Deauth and Disassoc Handler
189  *
190  * 01 07 2010 kevin.huang
191  * [BORA00000018]Integrate WIFI part into BORA for the 1st time
192  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
193  * Add Media disconnect indication and related postpone functions
194  *
195  * Dec 3 2009 mtk01461
196  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
197  * Add aisFsmRunEventJoinComplete()
198  *
199  * Nov 25 2009 mtk01461
200  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
201  * Add Virtual CMD & RESP for testing CMD PATH
202  *
203  * Nov 23 2009 mtk01461
204  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
205  * add aisFsmInitializeConnectionSettings()
206  *
207  * Nov 20 2009 mtk01461
208  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
209  * Add CFG_TEST_MGMT_FSM for aisFsmTest()
210  *
211  * Nov 18 2009 mtk01104
212  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
213  * Add function prototype of aisFsmInit()
214  *
215  * Nov 16 2009 mtk01461
216  * [BORA00000018] Integrate WIFI part into BORA for the 1st time
217  *
218 */
219
220 #ifndef _AIS_FSM_H
221 #define _AIS_FSM_H
222
223 /*******************************************************************************
224 *                         C O M P I L E R   F L A G S
225 ********************************************************************************
226 */
227
228 /*******************************************************************************
229 *                    E X T E R N A L   R E F E R E N C E S
230 ********************************************************************************
231 */
232
233 /*******************************************************************************
234 *                              C O N S T A N T S
235 ********************************************************************************
236 */
237 #define AIS_BG_SCAN_INTERVAL_MIN_SEC        2 //30 // exponential to 960
238 #define AIS_BG_SCAN_INTERVAL_MAX_SEC        2 //960 // 16min
239
240 #define AIS_DELAY_TIME_OF_DISCONNECT_SEC    10
241
242 #define AIS_IBSS_ALONE_TIMEOUT_SEC          20 // seconds
243
244 #define AIS_BEACON_TIMEOUT_COUNT_ADHOC      30
245 #define AIS_BEACON_TIMEOUT_COUNT_INFRA      10
246 #define AIS_BEACON_TIMEOUT_GUARD_TIME_SEC   1 /* Second */
247
248 #define AIS_BEACON_MAX_TIMEOUT_TU           100
249 #define AIS_BEACON_MIN_TIMEOUT_TU           5
250 #define AIS_BEACON_MAX_TIMEOUT_VALID        TRUE
251 #define AIS_BEACON_MIN_TIMEOUT_VALID        TRUE
252
253 #define AIS_BMC_MAX_TIMEOUT_TU              100
254 #define AIS_BMC_MIN_TIMEOUT_TU              5
255 #define AIS_BMC_MAX_TIMEOUT_VALID           TRUE
256 #define AIS_BMC_MIN_TIMEOUT_VALID           TRUE
257
258 #define AIS_JOIN_CH_GRANT_THRESHOLD         10
259 #define AIS_JOIN_CH_REQUEST_INTERVAL        2000
260
261 #define AIS_SCN_DONE_TIMEOUT_SEC            5
262
263 /*******************************************************************************
264 *                             D A T A   T Y P E S
265 ********************************************************************************
266 */
267 typedef enum _ENUM_AIS_STATE_T {
268     AIS_STATE_IDLE = 0,
269     AIS_STATE_SEARCH,
270     AIS_STATE_SCAN,
271     AIS_STATE_ONLINE_SCAN,
272     AIS_STATE_LOOKING_FOR,
273     AIS_STATE_WAIT_FOR_NEXT_SCAN,
274     AIS_STATE_REQ_CHANNEL_JOIN,
275     AIS_STATE_JOIN,
276     AIS_STATE_IBSS_ALONE,
277     AIS_STATE_IBSS_MERGE,
278     AIS_STATE_NORMAL_TR,
279     AIS_STATE_DISCONNECTING,
280     AIS_STATE_NUM
281 } ENUM_AIS_STATE_T;
282
283
284 typedef struct _MSG_AIS_ABORT_T {
285     MSG_HDR_T           rMsgHdr;        /* Must be the first member */
286     UINT_8              ucReasonOfDisconnect;
287     BOOLEAN             fgDelayIndication;
288 } MSG_AIS_ABORT_T, *P_MSG_AIS_ABORT_T;
289
290
291 typedef struct _MSG_AIS_IBSS_PEER_FOUND_T {
292     MSG_HDR_T       rMsgHdr;    /* Must be the first member */
293     UINT_8          ucNetTypeIndex;
294     BOOLEAN         fgIsMergeIn; /* TRUE: Merge In, FALSE: Merge Out */
295     P_STA_RECORD_T  prStaRec;
296 } MSG_AIS_IBSS_PEER_FOUND_T, *P_MSG_AIS_IBSS_PEER_FOUND_T;
297
298 typedef enum _ENUM_AIS_REQUEST_TYPE_T {
299     AIS_REQUEST_SCAN,
300     AIS_REQUEST_RECONNECT,
301     AIS_REQUEST_ROAMING_SEARCH,
302     AIS_REQUEST_ROAMING_CONNECT,
303     AIS_REQUEST_NUM
304 } ENUM_AIS_REQUEST_TYPE_T;
305
306 typedef struct _AIS_REQ_HDR_T {
307     LINK_ENTRY_T            rLinkEntry;
308     ENUM_AIS_REQUEST_TYPE_T eReqType;
309 } AIS_REQ_HDR_T, *P_AIS_REQ_HDR_T;
310
311
312 typedef struct _AIS_FSM_INFO_T {
313     ENUM_AIS_STATE_T    ePreviousState;
314     ENUM_AIS_STATE_T    eCurrentState;
315
316     BOOLEAN             fgTryScan;
317
318     BOOLEAN             fgIsInfraChannelFinished;
319     BOOLEAN             fgIsChannelRequested;
320     BOOLEAN             fgIsChannelGranted;
321
322 #if CFG_SUPPORT_ROAMING
323     BOOLEAN             fgIsRoamingScanPending;
324 #endif /* CFG_SUPPORT_ROAMING */
325
326     UINT_8              ucAvailableAuthTypes;       /* Used for AUTH_MODE_AUTO_SWITCH */
327
328     P_BSS_DESC_T        prTargetBssDesc;            /* For destination */
329
330     P_STA_RECORD_T      prTargetStaRec;             /* For JOIN Abort */
331
332     UINT_32             u4SleepInterval;
333
334     TIMER_T             rBGScanTimer;
335
336     TIMER_T             rIbssAloneTimer;
337
338     TIMER_T             rIndicationOfDisconnectTimer;
339
340     TIMER_T             rJoinTimeoutTimer;
341
342
343     TIMER_T             rScanDoneTimer; 
344
345     UINT_8              ucSeqNumOfReqMsg;
346     UINT_8              ucSeqNumOfChReq;
347     UINT_8              ucSeqNumOfScanReq;
348
349     UINT_32             u4ChGrantedInterval;
350
351     UINT_8              ucConnTrialCount;
352
353     UINT_8              ucScanSSIDLen;
354     UINT_8              aucScanSSID[ELEM_MAX_LEN_SSID];
355
356     UINT_32             u4ScanIELength;
357     UINT_8              aucScanIEBuf[MAX_IE_LENGTH];
358
359     /* Pending Request List */
360     LINK_T              rPendingReqList;
361
362 } AIS_FSM_INFO_T, *P_AIS_FSM_INFO_T;
363
364
365 /*******************************************************************************
366 *                            P U B L I C   D A T A
367 ********************************************************************************
368 */
369
370 /*******************************************************************************
371 *                           P R I V A T E   D A T A
372 ********************************************************************************
373 */
374
375 /*******************************************************************************
376 *                                 M A C R O S
377 ********************************************************************************
378 */
379 #define aisChangeMediaState(_prAdapter, _eNewMediaState) \
380             (_prAdapter->rWifiVar.arBssInfo[NETWORK_TYPE_AIS_INDEX].eConnectionState = (_eNewMediaState));
381
382
383 /*******************************************************************************
384 *                  F U N C T I O N   D E C L A R A T I O N S
385 ********************************************************************************
386 */
387 VOID
388 aisInitializeConnectionSettings (
389     IN P_ADAPTER_T prAdapter,
390     IN P_REG_INFO_T prRegInfo
391     );
392
393 VOID
394 aisFsmInit (
395     IN P_ADAPTER_T prAdapter
396     );
397
398 VOID
399 aisFsmUninit (
400     IN P_ADAPTER_T prAdapter
401     );
402
403 VOID
404 aisFsmStateInit_JOIN (
405     IN P_ADAPTER_T prAdapter,
406     P_BSS_DESC_T prBssDesc
407     );
408
409 BOOLEAN
410 aisFsmStateInit_RetryJOIN (
411     IN P_ADAPTER_T      prAdapter,
412     IN P_STA_RECORD_T   prStaRec
413     );
414
415 VOID
416 aisFsmStateInit_IBSS_ALONE (
417     IN P_ADAPTER_T prAdapter
418     );
419
420 VOID
421 aisFsmStateInit_IBSS_MERGE (
422     IN P_ADAPTER_T prAdapter,
423     P_BSS_DESC_T prBssDesc
424     );
425
426 VOID
427 aisFsmStateAbort (
428     IN P_ADAPTER_T prAdapter,
429     UINT_8         ucReasonOfDisconnect,
430     BOOLEAN        fgDelayIndication
431     );
432
433 VOID
434 aisFsmStateAbort_JOIN (
435     IN P_ADAPTER_T prAdapter
436     );
437
438 VOID
439 aisFsmStateAbort_SCAN (
440     IN P_ADAPTER_T prAdapter
441     );
442
443 VOID
444 aisFsmStateAbort_NORMAL_TR (
445     IN P_ADAPTER_T prAdapter
446     );
447
448 VOID
449 aisFsmStateAbort_IBSS (
450     IN P_ADAPTER_T prAdapter
451     );
452
453 VOID
454 aisFsmSteps (
455     IN P_ADAPTER_T prAdapter,
456     ENUM_AIS_STATE_T eNextState
457     );
458
459 /*----------------------------------------------------------------------------*/
460 /* Mailbox Message Handling                                                   */
461 /*----------------------------------------------------------------------------*/
462 VOID
463 aisFsmRunEventScanDone (
464     IN P_ADAPTER_T prAdapter,
465     IN P_MSG_HDR_T prMsgHdr
466     );
467
468 VOID
469 aisFsmRunEventAbort (
470     IN P_ADAPTER_T prAdapter,
471     IN P_MSG_HDR_T prMsgHdr
472     );
473
474 VOID
475 aisFsmRunEventJoinComplete (
476     IN P_ADAPTER_T prAdapter,
477     IN P_MSG_HDR_T prMsgHdr
478     );
479
480 VOID
481 aisFsmRunEventFoundIBSSPeer (
482     IN P_ADAPTER_T prAdapter,
483     IN P_MSG_HDR_T prMsgHdr
484     );
485
486 /*----------------------------------------------------------------------------*/
487 /* Handling for Ad-Hoc Network                                                */
488 /*----------------------------------------------------------------------------*/
489 VOID
490 aisFsmCreateIBSS (
491     IN P_ADAPTER_T prAdapter
492     );
493
494 VOID
495 aisFsmMergeIBSS (
496     IN P_ADAPTER_T prAdapter,
497     IN P_STA_RECORD_T prStaRec
498     );
499
500 /*----------------------------------------------------------------------------*/
501 /* Handling of Incoming Mailbox Message from CNM                              */
502 /*----------------------------------------------------------------------------*/
503 VOID
504 aisFsmRunEventChGrant (
505     IN P_ADAPTER_T prAdapter,
506     IN P_MSG_HDR_T prMsgHdr
507     );
508
509
510 /*----------------------------------------------------------------------------*/
511 /* Generating Outgoing Mailbox Message to CNM                                 */
512 /*----------------------------------------------------------------------------*/
513 VOID
514 aisFsmReleaseCh (
515     IN P_ADAPTER_T prAdapter
516     );
517
518
519 /*----------------------------------------------------------------------------*/
520 /* Event Indication                                                           */
521 /*----------------------------------------------------------------------------*/
522 VOID
523 aisIndicationOfMediaStateToHost (
524     IN P_ADAPTER_T prAdapter,
525     ENUM_PARAM_MEDIA_STATE_T eConnectionState,
526     BOOLEAN fgDelayIndication
527     );
528
529 VOID
530 aisPostponedEventOfDisconnTimeout (
531     IN P_ADAPTER_T prAdapter,
532     UINT_32 u4Param
533     );
534
535 VOID
536 aisUpdateBssInfoForJOIN (
537     IN P_ADAPTER_T prAdapter,
538     P_STA_RECORD_T prStaRec,
539     P_SW_RFB_T prAssocRspSwRfb
540     );
541
542 VOID
543 aisUpdateBssInfoForCreateIBSS (
544     IN P_ADAPTER_T prAdapter
545     );
546
547 VOID
548 aisUpdateBssInfoForMergeIBSS (
549     IN P_ADAPTER_T prAdapter,
550     IN P_STA_RECORD_T prStaRec
551     );
552
553 BOOLEAN
554 aisValidateProbeReq (
555     IN P_ADAPTER_T prAdapter,
556     IN P_SW_RFB_T prSwRfb,
557     OUT PUINT_32 pu4ControlFlags
558     );
559
560 /*----------------------------------------------------------------------------*/
561 /* Disconnection Handling                                                     */
562 /*----------------------------------------------------------------------------*/
563 VOID
564 aisFsmDisconnect (
565     IN P_ADAPTER_T prAdapter,
566     IN BOOLEAN     fgDelayIndication
567     );
568
569
570 /*----------------------------------------------------------------------------*/
571 /* Event Handling                                                             */
572 /*----------------------------------------------------------------------------*/
573 VOID
574 aisBssBeaconTimeout (
575     IN P_ADAPTER_T prAdapter
576     );
577
578 WLAN_STATUS
579 aisDeauthXmitComplete (
580     IN P_ADAPTER_T              prAdapter,
581     IN P_MSDU_INFO_T            prMsduInfo,
582     IN ENUM_TX_RESULT_CODE_T    rTxDoneStatus
583     );
584
585 #if CFG_SUPPORT_ROAMING
586 VOID
587 aisFsmRunEventRoamingDiscovery (
588     IN P_ADAPTER_T prAdapter,
589     UINT_32 u4ReqScan
590     );
591     
592 ENUM_AIS_STATE_T
593 aisFsmRoamingScanResultsUpdate (
594     IN P_ADAPTER_T prAdapter    
595     );
596
597 VOID
598 aisFsmRoamingDisconnectPrevAP (
599     IN P_ADAPTER_T prAdapter,
600     IN P_STA_RECORD_T prTargetStaRec
601     );
602
603 VOID
604 aisUpdateBssInfoForRoamingAP (
605     IN P_ADAPTER_T prAdapter,
606     IN P_STA_RECORD_T prStaRec,
607     IN P_SW_RFB_T prAssocRspSwRfb
608     );
609 #endif /*CFG_SUPPORT_ROAMING */
610
611 /*----------------------------------------------------------------------------*/
612 /* Timeout Handling                                                           */
613 /*----------------------------------------------------------------------------*/
614 VOID
615 aisFsmRunEventBGSleepTimeOut (
616     IN P_ADAPTER_T prAdapter,
617     UINT_32 u4Param
618     );
619
620 VOID
621 aisFsmRunEventIbssAloneTimeOut (
622     IN P_ADAPTER_T prAdapter,
623     UINT_32 u4Param
624     );
625
626 VOID
627 aisFsmRunEventJoinTimeout (
628     IN P_ADAPTER_T prAdapter,
629     UINT_32 u4Param
630     );
631
632 VOID
633 aisFsmRunEventScanDoneTimeOut (
634     IN P_ADAPTER_T prAdapter,
635     UINT_32 u4Param
636     );
637
638
639 /*----------------------------------------------------------------------------*/
640 /* OID/IOCTL Handling                                                         */
641 /*----------------------------------------------------------------------------*/
642 VOID
643 aisFsmScanRequest (
644     IN P_ADAPTER_T prAdapter,
645     IN P_PARAM_SSID_T prSsid,
646     IN PUINT_8  pucIe,
647     IN UINT_32  u4IeLength
648     );
649
650 /*----------------------------------------------------------------------------*/
651 /* Internal State Checking                                                    */
652 /*----------------------------------------------------------------------------*/
653 BOOLEAN
654 aisFsmIsRequestPending (
655     IN P_ADAPTER_T prAdapter,
656     IN ENUM_AIS_REQUEST_TYPE_T eReqType,
657     IN BOOLEAN bRemove
658     );
659
660 P_AIS_REQ_HDR_T
661 aisFsmGetNextRequest (
662     IN P_ADAPTER_T prAdapter
663     );
664
665 BOOLEAN
666 aisFsmInsertRequest (
667     IN P_ADAPTER_T prAdapter,
668     IN ENUM_AIS_REQUEST_TYPE_T eReqType
669     );
670
671 VOID
672 aisFsmFlushRequest (
673     IN P_ADAPTER_T prAdapter
674     );
675
676
677 #if defined(CFG_TEST_MGMT_FSM) && (CFG_TEST_MGMT_FSM != 0)
678 VOID
679 aisTest (
680     VOID
681     );
682 #endif /* CFG_TEST_MGMT_FSM */
683 /*******************************************************************************
684 *                              F U N C T I O N S
685 ********************************************************************************
686 */
687
688 #endif /* _AIS_FSM_H */
689
690
691
692