ais_fsm.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. /*
  2. ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/ais_fsm.h#2
  3. */
  4. /*! \file ais_fsm.h
  5. \brief Declaration of functions and finite state machine for AIS Module.
  6. Declaration of functions and finite state machine for AIS Module.
  7. */
  8. /*
  9. ** Log: ais_fsm.h
  10. **
  11. ** 01 06 2015 eason.tsai
  12. ** [ALPS01886576] [A55ML][WIFI][Miracast] Group format time out
  13. ** actiontec dongle MCC connect
  14. **
  15. ** 08 12 2013 cp.wu
  16. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  17. ** use separate SSID container for roaming scan requests
  18. **
  19. ** 08 09 2013 cp.wu
  20. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  21. ** 1. integrate scheduled scan functionality
  22. ** 2. condition compilation for linux-3.4 & linux-3.8 compatibility
  23. ** 3. correct CMD queue access to reduce lock scope
  24. **
  25. ** 07 29 2013 cp.wu
  26. ** [BORA00002725] [MT6630][Wi-Fi] Add MGMT TX/RX support for Linux port
  27. ** Preparation for porting remain_on_channel support
  28. **
  29. ** 02 07 2013 cp.wu
  30. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  31. ** add join timeout check for retrying
  32. **
  33. ** 01 23 2013 cp.wu
  34. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  35. ** modify AIS behavior: stop join trial if failed
  36. **
  37. ** 01 22 2013 cp.wu
  38. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  39. ** modification for ucBssIndex migration
  40. **
  41. ** 09 17 2012 cm.chang
  42. ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
  43. ** Duplicate source from MT6620 v2.3 driver branch
  44. ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
  45. **
  46. ** 08 24 2012 cp.wu
  47. ** [WCXRP00001269] [MT6620 Wi-Fi][Driver] cfg80211 porting merge back to DaVinci
  48. ** .
  49. **
  50. ** 08 24 2012 cp.wu
  51. ** [WCXRP00001269] [MT6620 Wi-Fi][Driver] cfg80211 porting merge back to DaVinci
  52. ** cfg80211 support merge back from ALPS.JB to DaVinci - MT6620 Driver v2.3 branch.
  53. *
  54. * 11 22 2011 cp.wu
  55. * [WCXRP00001120] [MT6620 Wi-Fi][Driver] Modify roaming to AIS state transition
  56. * from synchronous to asynchronous approach to avoid incomplete state termination
  57. * 1. change RDD related compile option brace position.
  58. * 2. when roaming is triggered, ask AIS to transit immediately only when AIS
  59. * is in Normal TR state without join timeout timer ticking
  60. * 3. otherwise, insert AIS_REQUEST into pending request queue
  61. *
  62. * 04 25 2011 cp.wu
  63. * [WCXRP00000676] [MT6620 Wi-Fi][Driver] AIS to reduce request channel period from 5 seconds to 2 seconds
  64. * channel interval for joining is shortened to 2 seconds to avoid interruption of concurrent operating network.
  65. *
  66. * 02 26 2011 tsaiyuan.hsu
  67. * [WCXRP00000391] [MT6620 Wi-Fi][FW] Add Roaming Support
  68. * not send disassoc or deauth to leaving AP so as to improve performace of roaming.
  69. *
  70. * 02 22 2011 cp.wu
  71. * [WCXRP00000487] [MT6620 Wi-Fi][Driver][AIS] Serve scan and connect request with
  72. * a queue-based approach to improve response time for scanning request
  73. * handle SCAN and RECONNECT with a FIFO approach.
  74. *
  75. * 01 27 2011 tsaiyuan.hsu
  76. * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
  77. * add roaming fsm
  78. * 1. not support 11r, only use strength of signal to determine roaming.
  79. * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
  80. * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
  81. * 4. assume that change of link quality in smooth way.
  82. *
  83. * 01 14 2011 cp.wu
  84. * [WCXRP00000359] [MT6620 Wi-Fi][Driver] add an extra state to ensure DEAUTH frame is always sent
  85. * Add an extra state to guarantee DEAUTH frame is sent then connect to new BSS.
  86. * This change is due to WAPI AP needs DEAUTH frame as a necessary step in handshaking protocol.
  87. *
  88. * 11 25 2010 cp.wu
  89. * [WCXRP00000208] [MT6620 Wi-Fi][Driver] Add scanning with specified SSID to AIS FSM
  90. * add scanning with specified SSID facility to AIS-FSM
  91. *
  92. * 11 01 2010 cp.wu
  93. * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
  94. * [WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate from firmware auto rate module
  95. * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead
  96. * 2) Remove CNM CH-RECOVER event handling
  97. * 3) cfg read/write API renamed with kal prefix for unified naming rules.
  98. *
  99. * 09 06 2010 cp.wu
  100. * NULL
  101. * 1) initialize for correct parameter even for disassociation.
  102. * 2) AIS-FSM should have a limit on trials to build connection
  103. *
  104. * 09 03 2010 kevin.huang
  105. * NULL
  106. * Refine #include sequence and solve recursive/nested #include issue
  107. *
  108. * 08 25 2010 cp.wu
  109. * NULL
  110. * [AIS-FSM] IBSS no longer needs to acquire channel for beaconing, RLM/CNM will handle
  111. * the channel switching when BSS information is updated
  112. *
  113. * 08 12 2010 kevin.huang
  114. * NULL
  115. * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse()
  116. *
  117. * 08 12 2010 cp.wu
  118. * NULL
  119. * [AIS-FSM] honor registry setting for adhoc running mode. (A/B/G)
  120. *
  121. * 08 03 2010 cp.wu
  122. * NULL
  123. * surpress compilation warning.
  124. *
  125. * 07 30 2010 cp.wu
  126. * NULL
  127. * 1) BoW wrapper: use definitions instead of hard-coded constant for error code
  128. * 2) AIS-FSM: eliminate use of desired RF parameters, use prTargetBssDesc instead
  129. * 3) add handling for RX_PKT_DESTINATION_HOST_WITH_FORWARD for GO-broadcast frames
  130. *
  131. * 07 26 2010 cp.wu
  132. *
  133. * AIS-FSM: when scan request is coming in the 1st 5 seconds of channel privilege period,
  134. * just pend it til 5-sec. period finishes
  135. *
  136. * 07 26 2010 cp.wu
  137. *
  138. * AIS-FSM FIX: return channel privilege even when the privilege is not granted yet
  139. * QM: qmGetFrameAction() won't assert when corresponding STA-REC index is not found
  140. *
  141. * 07 23 2010 cp.wu
  142. *
  143. * add AIS-FSM handling for beacon timeout event.
  144. *
  145. * 07 21 2010 cp.wu
  146. *
  147. * separate AIS-FSM states into different cases of channel request.
  148. *
  149. * 07 21 2010 cp.wu
  150. *
  151. * 1) change BG_SCAN to ONLINE_SCAN for consistent term
  152. * 2) only clear scanning result when scan is permitted to do
  153. *
  154. * 07 19 2010 cp.wu
  155. *
  156. * [WPD00003833] [MT6620 and MT5931] Driver migration.
  157. * Add Ad-Hoc support to AIS-FSM
  158. *
  159. * 07 14 2010 cp.wu
  160. *
  161. * [WPD00003833] [MT6620 and MT5931] Driver migration.
  162. * Refine AIS-FSM by divided into more states
  163. *
  164. * 07 09 2010 cp.wu
  165. *
  166. * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection)
  167. * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass
  168. * 3) implment DRV-SCN module, currently only accepts single scan request,
  169. * other request will be directly dropped by returning BUSY
  170. *
  171. * 07 08 2010 cp.wu
  172. *
  173. * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
  174. *
  175. * 07 01 2010 cp.wu
  176. * [WPD00003833][MT6620 and MT5931] Driver migration
  177. * AIS-FSM integration with CNM channel request messages
  178. *
  179. * 07 01 2010 cp.wu
  180. * [WPD00003833][MT6620 and MT5931] Driver migration
  181. * implementation of DRV-SCN and related mailbox message handling.
  182. *
  183. * 06 10 2010 cp.wu
  184. * [WPD00003833][MT6620 and MT5931] Driver migration
  185. * add buildable & linkable ais_fsm.c
  186. *
  187. * related reference are still waiting to be resolved
  188. *
  189. * 06 09 2010 cp.wu
  190. * [WPD00003833][MT6620 and MT5931] Driver migration
  191. * add definitions for module migration.
  192. *
  193. * 06 07 2010 cp.wu
  194. * [WPD00003833][MT6620 and MT5931] Driver migration
  195. * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h.
  196. *
  197. * 05 12 2010 kevin.huang
  198. * [BORA00000794][WIFISYS][New Feature]Power Management Support
  199. * Add Power Management - Legacy PS-POLL support.
  200. *
  201. * 04 23 2010 wh.su
  202. * [BORA00000605][WIFISYS] Phase3 Integration
  203. * reduce the background ssid idle time min and max value
  204. *
  205. * 04 19 2010 kevin.huang
  206. * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support
  207. * Add Beacon Timeout Support
  208. * * and will send Null frame to diagnose connection
  209. *
  210. * 03 16 2010 kevin.huang
  211. * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
  212. * Add AdHoc Mode
  213. *
  214. * 03 10 2010 kevin.huang
  215. * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
  216. *
  217. * * Add Channel Manager for arbitration of JOIN and SCAN Req
  218. *
  219. * 02 26 2010 kevin.huang
  220. * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
  221. * Remove CFG_TEST_VIRTUAL_CMD and add support of Driver STA_RECORD_T activation
  222. *
  223. * 02 23 2010 kevin.huang
  224. * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
  225. * Support dynamic channel selection
  226. *
  227. * 02 04 2010 kevin.huang
  228. * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
  229. * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup
  230. *
  231. * 01 11 2010 kevin.huang
  232. * [BORA00000018]Integrate WIFI part into BORA for the 1st time
  233. * Add Deauth and Disassoc Handler
  234. *
  235. * 01 07 2010 kevin.huang
  236. * [BORA00000018]Integrate WIFI part into BORA for the 1st time
  237. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  238. * Add Media disconnect indication and related postpone functions
  239. *
  240. * Dec 3 2009 mtk01461
  241. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  242. * Add aisFsmRunEventJoinComplete()
  243. *
  244. * Nov 25 2009 mtk01461
  245. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  246. * Add Virtual CMD & RESP for testing CMD PATH
  247. *
  248. * Nov 23 2009 mtk01461
  249. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  250. * add aisFsmInitializeConnectionSettings()
  251. *
  252. * Nov 20 2009 mtk01461
  253. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  254. * Add CFG_TEST_MGMT_FSM for aisFsmTest()
  255. *
  256. * Nov 18 2009 mtk01104
  257. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  258. * Add function prototype of aisFsmInit()
  259. *
  260. * Nov 16 2009 mtk01461
  261. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  262. *
  263. */
  264. #ifndef _AIS_FSM_H
  265. #define _AIS_FSM_H
  266. /*******************************************************************************
  267. * C O M P I L E R F L A G S
  268. ********************************************************************************
  269. */
  270. /*******************************************************************************
  271. * E X T E R N A L R E F E R E N C E S
  272. ********************************************************************************
  273. */
  274. /*******************************************************************************
  275. * C O N S T A N T S
  276. ********************************************************************************
  277. */
  278. #define AIS_BG_SCAN_INTERVAL_MIN_SEC 2 /* 30 // exponential to 960 */
  279. #define AIS_BG_SCAN_INTERVAL_MAX_SEC 2 /* 960 // 16min */
  280. #define AIS_DELAY_TIME_OF_DISCONNECT_SEC 5 /* 10 */
  281. #define AIS_IBSS_ALONE_TIMEOUT_SEC 20 /* seconds */
  282. #define AIS_BEACON_TIMEOUT_COUNT_ADHOC 30
  283. #define AIS_BEACON_TIMEOUT_COUNT_INFRA 10
  284. #define AIS_BEACON_TIMEOUT_GUARD_TIME_SEC 1 /* Second */
  285. #define AIS_BEACON_MAX_TIMEOUT_TU 100
  286. #define AIS_BEACON_MIN_TIMEOUT_TU 5
  287. #define AIS_BEACON_MAX_TIMEOUT_VALID TRUE
  288. #define AIS_BEACON_MIN_TIMEOUT_VALID TRUE
  289. #define AIS_BMC_MAX_TIMEOUT_TU 100
  290. #define AIS_BMC_MIN_TIMEOUT_TU 5
  291. #define AIS_BMC_MAX_TIMEOUT_VALID TRUE
  292. #define AIS_BMC_MIN_TIMEOUT_VALID TRUE
  293. #define AIS_JOIN_CH_GRANT_THRESHOLD 10
  294. #define AIS_JOIN_CH_REQUEST_INTERVAL 4000
  295. #define AIS_SCN_DONE_TIMEOUT_SEC 15 /* 15 for 2.4G + 5G */ /* 5 */
  296. /*******************************************************************************
  297. * D A T A T Y P E S
  298. ********************************************************************************
  299. */
  300. typedef enum _ENUM_AIS_STATE_T {
  301. AIS_STATE_IDLE = 0,
  302. AIS_STATE_SEARCH,
  303. AIS_STATE_SCAN,
  304. AIS_STATE_ONLINE_SCAN,
  305. AIS_STATE_LOOKING_FOR,
  306. AIS_STATE_WAIT_FOR_NEXT_SCAN,
  307. AIS_STATE_REQ_CHANNEL_JOIN,
  308. AIS_STATE_JOIN,
  309. AIS_STATE_JOIN_FAILURE,
  310. AIS_STATE_IBSS_ALONE,
  311. AIS_STATE_IBSS_MERGE,
  312. AIS_STATE_NORMAL_TR,
  313. AIS_STATE_DISCONNECTING,
  314. AIS_STATE_REQ_REMAIN_ON_CHANNEL,
  315. AIS_STATE_REMAIN_ON_CHANNEL,
  316. AIS_STATE_NUM
  317. } ENUM_AIS_STATE_T;
  318. typedef struct _MSG_AIS_ABORT_T {
  319. MSG_HDR_T rMsgHdr; /* Must be the first member */
  320. UINT_8 ucReasonOfDisconnect;
  321. BOOLEAN fgDelayIndication;
  322. } MSG_AIS_ABORT_T, *P_MSG_AIS_ABORT_T;
  323. typedef struct _MSG_AIS_IBSS_PEER_FOUND_T {
  324. MSG_HDR_T rMsgHdr; /* Must be the first member */
  325. UINT_8 ucBssIndex;
  326. BOOLEAN fgIsMergeIn; /* TRUE: Merge In, FALSE: Merge Out */
  327. P_STA_RECORD_T prStaRec;
  328. } MSG_AIS_IBSS_PEER_FOUND_T, *P_MSG_AIS_IBSS_PEER_FOUND_T;
  329. typedef enum _ENUM_AIS_REQUEST_TYPE_T {
  330. AIS_REQUEST_SCAN,
  331. AIS_REQUEST_RECONNECT,
  332. AIS_REQUEST_ROAMING_SEARCH,
  333. AIS_REQUEST_ROAMING_CONNECT,
  334. AIS_REQUEST_REMAIN_ON_CHANNEL,
  335. AIS_REQUEST_NUM
  336. } ENUM_AIS_REQUEST_TYPE_T;
  337. typedef struct _AIS_REQ_HDR_T {
  338. LINK_ENTRY_T rLinkEntry;
  339. ENUM_AIS_REQUEST_TYPE_T eReqType;
  340. } AIS_REQ_HDR_T, *P_AIS_REQ_HDR_T;
  341. typedef struct _AIS_REQ_CHNL_INFO {
  342. ENUM_BAND_T eBand;
  343. ENUM_CHNL_EXT_T eSco;
  344. UINT_8 ucChannelNum;
  345. UINT_32 u4DurationMs;
  346. UINT_64 u8Cookie;
  347. } AIS_REQ_CHNL_INFO, *P_AIS_REQ_CHNL_INFO;
  348. typedef struct _AIS_MGMT_TX_REQ_INFO_T {
  349. BOOLEAN fgIsMgmtTxRequested;
  350. P_MSDU_INFO_T prMgmtTxMsdu;
  351. UINT_64 u8Cookie;
  352. } AIS_MGMT_TX_REQ_INFO_T, *P_AIS_MGMT_TX_REQ_INFO_T;
  353. typedef struct _AIS_FSM_INFO_T {
  354. ENUM_AIS_STATE_T ePreviousState;
  355. ENUM_AIS_STATE_T eCurrentState;
  356. BOOLEAN fgTryScan;
  357. BOOLEAN fgIsInfraChannelFinished;
  358. BOOLEAN fgIsChannelRequested;
  359. BOOLEAN fgIsChannelGranted;
  360. #if CFG_SUPPORT_ROAMING
  361. BOOLEAN fgIsRoamingScanPending;
  362. #endif /* CFG_SUPPORT_ROAMING */
  363. UINT_8 ucAvailableAuthTypes; /* Used for AUTH_MODE_AUTO_SWITCH */
  364. P_BSS_DESC_T prTargetBssDesc; /* For destination */
  365. P_STA_RECORD_T prTargetStaRec; /* For JOIN Abort */
  366. UINT_32 u4SleepInterval;
  367. TIMER_T rBGScanTimer;
  368. TIMER_T rIbssAloneTimer;
  369. TIMER_T rIndicationOfDisconnectTimer;
  370. TIMER_T rJoinTimeoutTimer;
  371. TIMER_T rChannelTimeoutTimer;
  372. TIMER_T rScanDoneTimer;
  373. TIMER_T rDeauthDoneTimer;
  374. UINT_8 ucSeqNumOfReqMsg;
  375. UINT_8 ucSeqNumOfChReq;
  376. UINT_8 ucSeqNumOfScanReq;
  377. UINT_32 u4ChGrantedInterval;
  378. UINT_8 ucConnTrialCount;
  379. UINT_8 ucScanSSIDNum;
  380. PARAM_SSID_T arScanSSID[SCN_SSID_MAX_NUM];
  381. UINT_32 u4ScanIELength;
  382. UINT_8 aucScanIEBuf[MAX_IE_LENGTH];
  383. /* Pending Request List */
  384. LINK_T rPendingReqList;
  385. /* Join Request Timestamp */
  386. OS_SYSTIME rJoinReqTime;
  387. /* for cfg80211 REMAIN_ON_CHANNEL support */
  388. AIS_REQ_CHNL_INFO rChReqInfo;
  389. /* Mgmt tx related. */
  390. AIS_MGMT_TX_REQ_INFO_T rMgmtTxInfo;
  391. /* Packet filter for AIS module. */
  392. UINT_32 u4AisPacketFilter;
  393. /* for roaming target */
  394. PARAM_SSID_T rRoamingSSID;
  395. } AIS_FSM_INFO_T, *P_AIS_FSM_INFO_T;
  396. /*******************************************************************************
  397. * P U B L I C D A T A
  398. ********************************************************************************
  399. */
  400. /*******************************************************************************
  401. * P R I V A T E D A T A
  402. ********************************************************************************
  403. */
  404. /*******************************************************************************
  405. * M A C R O S
  406. ********************************************************************************
  407. */
  408. #define aisChangeMediaState(_prAdapter, _eNewMediaState) \
  409. (_prAdapter->prAisBssInfo->eConnectionState = (_eNewMediaState))
  410. /*******************************************************************************
  411. * F U N C T I O N D E C L A R A T I O N S
  412. ********************************************************************************
  413. */
  414. VOID aisInitializeConnectionSettings(IN P_ADAPTER_T prAdapter, IN P_REG_INFO_T prRegInfo);
  415. VOID aisFsmInit(IN P_ADAPTER_T prAdapter);
  416. VOID aisFsmUninit(IN P_ADAPTER_T prAdapter);
  417. VOID aisFsmStateInit_JOIN(IN P_ADAPTER_T prAdapter, P_BSS_DESC_T prBssDesc);
  418. BOOLEAN aisFsmStateInit_RetryJOIN(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec);
  419. VOID aisFsmStateInit_IBSS_ALONE(IN P_ADAPTER_T prAdapter);
  420. VOID aisFsmStateInit_IBSS_MERGE(IN P_ADAPTER_T prAdapter, P_BSS_DESC_T prBssDesc);
  421. VOID aisFsmStateAbort(IN P_ADAPTER_T prAdapter, UINT_8 ucReasonOfDisconnect, BOOLEAN fgDelayIndication);
  422. VOID aisFsmStateAbort_JOIN(IN P_ADAPTER_T prAdapter);
  423. VOID aisFsmStateAbort_SCAN(IN P_ADAPTER_T prAdapter);
  424. VOID aisFsmStateAbort_NORMAL_TR(IN P_ADAPTER_T prAdapter);
  425. VOID aisFsmStateAbort_IBSS(IN P_ADAPTER_T prAdapter);
  426. VOID aisFsmSteps(IN P_ADAPTER_T prAdapter, ENUM_AIS_STATE_T eNextState);
  427. /*----------------------------------------------------------------------------*/
  428. /* Mailbox Message Handling */
  429. /*----------------------------------------------------------------------------*/
  430. VOID aisFsmRunEventScanDone(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  431. VOID aisFsmRunEventAbort(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  432. VOID aisFsmRunEventJoinComplete(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  433. enum _ENUM_AIS_STATE_T aisFsmJoinCompleteAction(IN struct _ADAPTER_T *prAdapter, IN struct _MSG_HDR_T *prMsgHdr);
  434. VOID aisFsmRunEventFoundIBSSPeer(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  435. VOID aisFsmRunEventRemainOnChannel(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  436. VOID aisFsmRunEventCancelRemainOnChannel(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  437. /*----------------------------------------------------------------------------*/
  438. /* Handling for Ad-Hoc Network */
  439. /*----------------------------------------------------------------------------*/
  440. VOID aisFsmCreateIBSS(IN P_ADAPTER_T prAdapter);
  441. VOID aisFsmMergeIBSS(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec);
  442. /*----------------------------------------------------------------------------*/
  443. /* Handling of Incoming Mailbox Message from CNM */
  444. /*----------------------------------------------------------------------------*/
  445. VOID aisFsmRunEventChGrant(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  446. /*----------------------------------------------------------------------------*/
  447. /* Generating Outgoing Mailbox Message to CNM */
  448. /*----------------------------------------------------------------------------*/
  449. VOID aisFsmReleaseCh(IN P_ADAPTER_T prAdapter);
  450. /*----------------------------------------------------------------------------*/
  451. /* Event Indication */
  452. /*----------------------------------------------------------------------------*/
  453. VOID
  454. aisIndicationOfMediaStateToHost(IN P_ADAPTER_T prAdapter,
  455. ENUM_PARAM_MEDIA_STATE_T eConnectionState, BOOLEAN fgDelayIndication);
  456. VOID aisPostponedEventOfDisconnTimeout(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr);
  457. VOID aisUpdateBssInfoForJOIN(IN P_ADAPTER_T prAdapter, P_STA_RECORD_T prStaRec, P_SW_RFB_T prAssocRspSwRfb);
  458. VOID aisUpdateBssInfoForCreateIBSS(IN P_ADAPTER_T prAdapter);
  459. VOID aisUpdateBssInfoForMergeIBSS(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec);
  460. BOOLEAN aisValidateProbeReq(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb, OUT PUINT_32 pu4ControlFlags);
  461. WLAN_STATUS
  462. aisFsmRunEventMgmtFrameTxDone(IN P_ADAPTER_T prAdapter,
  463. IN P_MSDU_INFO_T prMsduInfo, IN ENUM_TX_RESULT_CODE_T rTxDoneStatus);
  464. /*----------------------------------------------------------------------------*/
  465. /* Disconnection Handling */
  466. /*----------------------------------------------------------------------------*/
  467. VOID aisFsmDisconnect(IN P_ADAPTER_T prAdapter, IN BOOLEAN fgDelayIndication);
  468. /*----------------------------------------------------------------------------*/
  469. /* Event Handling */
  470. /*----------------------------------------------------------------------------*/
  471. VOID aisBssBeaconTimeout(IN P_ADAPTER_T prAdapter);
  472. WLAN_STATUS
  473. aisDeauthXmitComplete(IN P_ADAPTER_T prAdapter, IN P_MSDU_INFO_T prMsduInfo, IN ENUM_TX_RESULT_CODE_T rTxDoneStatus);
  474. #if CFG_SUPPORT_ROAMING
  475. VOID aisFsmRunEventRoamingDiscovery(IN P_ADAPTER_T prAdapter, UINT_32 u4ReqScan);
  476. ENUM_AIS_STATE_T aisFsmRoamingScanResultsUpdate(IN P_ADAPTER_T prAdapter);
  477. VOID aisFsmRoamingDisconnectPrevAP(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prTargetStaRec);
  478. VOID aisUpdateBssInfoForRoamingAP(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec, IN P_SW_RFB_T prAssocRspSwRfb);
  479. #endif /*CFG_SUPPORT_ROAMING */
  480. /*----------------------------------------------------------------------------*/
  481. /* Timeout Handling */
  482. /*----------------------------------------------------------------------------*/
  483. VOID aisFsmRunEventBGSleepTimeOut(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr);
  484. VOID aisFsmRunEventIbssAloneTimeOut(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr);
  485. VOID aisFsmRunEventJoinTimeout(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr);
  486. VOID aisFsmRunEventChannelTimeout(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr);
  487. VOID aisFsmRunEventDeauthTimeout(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr);
  488. /*----------------------------------------------------------------------------*/
  489. /* OID/IOCTL Handling */
  490. /*----------------------------------------------------------------------------*/
  491. VOID aisFsmScanRequest(IN P_ADAPTER_T prAdapter, IN P_PARAM_SSID_T prSsid, IN PUINT_8 pucIe, IN UINT_32 u4IeLength);
  492. VOID
  493. aisFsmScanRequestAdv(IN P_ADAPTER_T prAdapter,
  494. IN UINT_8 ucSsidNum, IN P_PARAM_SSID_T prSsid, IN PUINT_8 pucIe, IN UINT_32 u4IeLength);
  495. /*----------------------------------------------------------------------------*/
  496. /* Internal State Checking */
  497. /*----------------------------------------------------------------------------*/
  498. BOOLEAN aisFsmIsRequestPending(IN P_ADAPTER_T prAdapter, IN ENUM_AIS_REQUEST_TYPE_T eReqType, IN BOOLEAN bRemove);
  499. P_AIS_REQ_HDR_T aisFsmGetNextRequest(IN P_ADAPTER_T prAdapter);
  500. BOOLEAN aisFsmInsertRequest(IN P_ADAPTER_T prAdapter, IN ENUM_AIS_REQUEST_TYPE_T eReqType);
  501. VOID aisFsmFlushRequest(IN P_ADAPTER_T prAdapter);
  502. WLAN_STATUS
  503. aisFuncTxMgmtFrame(IN P_ADAPTER_T prAdapter,
  504. IN P_AIS_MGMT_TX_REQ_INFO_T prMgmtTxReqInfo, IN P_MSDU_INFO_T prMgmtTxMsdu, IN UINT_64 u8Cookie);
  505. VOID aisFsmRunEventMgmtFrameTx(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  506. VOID aisFuncValidateRxActionFrame(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  507. enum _ENUM_AIS_STATE_T aisFsmStateSearchAction(IN struct _ADAPTER_T *prAdapter, UINT_8 ucPhase);
  508. #if defined(CFG_TEST_MGMT_FSM) && (CFG_TEST_MGMT_FSM != 0)
  509. VOID aisTest(VOID);
  510. #endif /* CFG_TEST_MGMT_FSM */
  511. /*******************************************************************************
  512. * F U N C T I O N S
  513. ********************************************************************************
  514. */
  515. #endif /* _AIS_FSM_H */