aa_fsm.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /*
  2. ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/aa_fsm.h#1
  3. */
  4. /*! \file aa_fsm.h
  5. \brief Declaration of functions and finite state machine for SAA/AAA Module.
  6. Declaration of functions and finite state machine for SAA/AAA Module.
  7. */
  8. /*
  9. ** Log: aa_fsm.h
  10. **
  11. ** 09 17 2012 cm.chang
  12. ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
  13. ** Duplicate source from MT6620 v2.3 driver branch
  14. ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
  15. *
  16. * 10 13 2011 cp.wu
  17. * [MT6620 Wi-Fi][Driver] Reduce join failure count limit to 2 for faster re-join for other BSS
  18. * 1. short join failure count limit to 2
  19. * 2. treat join timeout as kind of join failure as well
  20. *
  21. * 07 08 2010 cp.wu
  22. *
  23. * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
  24. *
  25. * 06 21 2010 cp.wu
  26. * [WPD00003833][MT6620 and MT5931] Driver migration
  27. * refine TX-DONE callback.
  28. *
  29. * 06 11 2010 cp.wu
  30. * [WPD00003833][MT6620 and MT5931] Driver migration
  31. * 1) migrate assoc.c.
  32. * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness
  33. * 3) add configuration options for CNM_MEM and RSN modules
  34. * 4) add data path for management frames
  35. * 5) eliminate rPacketInfo of MSDU_INFO_T
  36. *
  37. * 06 10 2010 cp.wu
  38. * [WPD00003833][MT6620 and MT5931] Driver migration
  39. * add buildable & linkable ais_fsm.c
  40. *
  41. * related reference are still waiting to be resolved
  42. *
  43. * 06 07 2010 cp.wu
  44. * [WPD00003833][MT6620 and MT5931] Driver migration
  45. * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h.
  46. *
  47. * 03 10 2010 kevin.huang
  48. * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
  49. *
  50. * Add Channel Manager for arbitration of JOIN and SCAN Req
  51. *
  52. * 02 04 2010 kevin.huang
  53. * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
  54. * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup
  55. *
  56. * 01 11 2010 kevin.huang
  57. * [BORA00000018]Integrate WIFI part into BORA for the 1st time
  58. * Add Deauth and Disassoc Handler
  59. *
  60. * Nov 24 2009 mtk01461
  61. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  62. * Revise MGMT Handler with Retain Status
  63. *
  64. * Nov 23 2009 mtk01461
  65. * [BORA00000018] Integrate WIFI part into BORA for the 1st time
  66. *
  67. */
  68. #ifndef _AA_FSM_H
  69. #define _AA_FSM_H
  70. /*******************************************************************************
  71. * C O M P I L E R F L A G S
  72. ********************************************************************************
  73. */
  74. /*******************************************************************************
  75. * E X T E R N A L R E F E R E N C E S
  76. ********************************************************************************
  77. */
  78. /*******************************************************************************
  79. * C O N S T A N T S
  80. ********************************************************************************
  81. */
  82. /* Retry interval for retransmiting authentication-request MMPDU. */
  83. #define TX_AUTHENTICATION_RETRY_TIMEOUT_TU 100 /* TU. */
  84. /* Retry interval for retransmiting association-request MMPDU. */
  85. #define TX_ASSOCIATION_RETRY_TIMEOUT_TU 100 /* TU. */
  86. /* Wait for a response to a transmitted authentication-request MMPDU. */
  87. #define DOT11_AUTHENTICATION_RESPONSE_TIMEOUT_TU 512 /* TU. */
  88. /* Wait for a response to a transmitted association-request MMPDU. */
  89. #define DOT11_ASSOCIATION_RESPONSE_TIMEOUT_TU 512 /* TU. */
  90. /* The maximum time to wait for JOIN process complete. */
  91. #define JOIN_FAILURE_TIMEOUT_BEACON_INTERVAL 20 /* Beacon Interval, 20 * 100TU = 2 sec. */
  92. /* Retry interval for next JOIN request. */
  93. #define JOIN_RETRY_INTERVAL_SEC 10 /* Seconds */
  94. /* Maximum Retry Count for accept a JOIN request. */
  95. #define JOIN_MAX_RETRY_FAILURE_COUNT 2 /* Times */
  96. /*******************************************************************************
  97. * D A T A T Y P E S
  98. ********************************************************************************
  99. */
  100. typedef enum _ENUM_AA_STATE_T {
  101. AA_STATE_IDLE = 0,
  102. SAA_STATE_SEND_AUTH1,
  103. SAA_STATE_WAIT_AUTH2,
  104. SAA_STATE_SEND_AUTH3,
  105. SAA_STATE_WAIT_AUTH4,
  106. SAA_STATE_SEND_ASSOC1,
  107. SAA_STATE_WAIT_ASSOC2,
  108. AAA_STATE_SEND_AUTH2,
  109. AAA_STATE_SEND_AUTH4, /* We may not use, because P2P GO didn't support WEP and 11r */
  110. AAA_STATE_SEND_ASSOC2,
  111. AA_STATE_RESOURCE, /* A state for debugging the case of out of msg buffer. */
  112. AA_STATE_NUM
  113. } ENUM_AA_STATE_T;
  114. typedef enum _ENUM_AA_FRM_TYPE_T {
  115. FRM_DISASSOC = 0,
  116. FRM_DEAUTH
  117. } ENUM_AA_FRM_TYPE_T;
  118. /*******************************************************************************
  119. * P U B L I C D A T A
  120. ********************************************************************************
  121. */
  122. /*******************************************************************************
  123. * P R I V A T E D A T A
  124. ********************************************************************************
  125. */
  126. /*******************************************************************************
  127. * M A C R O S
  128. ********************************************************************************
  129. */
  130. /*******************************************************************************
  131. * F U N C T I O N D E C L A R A T I O N S
  132. ********************************************************************************
  133. */
  134. /*----------------------------------------------------------------------------*/
  135. /* Routines in saa_fsm.c */
  136. /*----------------------------------------------------------------------------*/
  137. VOID
  138. saaFsmSteps(IN P_ADAPTER_T prAdapter,
  139. IN P_STA_RECORD_T prStaRec, IN ENUM_AA_STATE_T eNextState, IN P_SW_RFB_T prRetainedSwRfb);
  140. WLAN_STATUS
  141. saaFsmSendEventJoinComplete(IN P_ADAPTER_T prAdapter,
  142. WLAN_STATUS rJoinStatus, P_STA_RECORD_T prStaRec, P_SW_RFB_T prSwRfb);
  143. VOID saaFsmRunEventStart(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  144. WLAN_STATUS
  145. saaFsmRunEventTxDone(IN P_ADAPTER_T prAdapter, IN P_MSDU_INFO_T prMsduInfo, IN ENUM_TX_RESULT_CODE_T rTxDoneStatus);
  146. VOID saaFsmRunEventTxReqTimeOut(IN P_ADAPTER_T prAdapter, IN ULONG plParamPtr);
  147. VOID saaFsmRunEventRxRespTimeOut(IN P_ADAPTER_T prAdapter, IN ULONG ulParamPtr);
  148. VOID saaFsmRunEventRxAuth(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  149. WLAN_STATUS saaFsmRunEventRxAssoc(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  150. WLAN_STATUS saaFsmRunEventRxDeauth(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  151. WLAN_STATUS saaFsmRunEventRxDisassoc(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  152. VOID saaFsmRunEventAbort(IN P_ADAPTER_T prAdapter, IN P_MSG_HDR_T prMsgHdr);
  153. VOID saaChkDeauthfrmParamHandler(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb, IN P_STA_RECORD_T prStaRec);
  154. VOID
  155. saaChkDisassocfrmParamHandler(IN P_ADAPTER_T prAdapter,
  156. IN P_WLAN_DISASSOC_FRAME_T prDisassocFrame, IN P_STA_RECORD_T prStaRec,
  157. IN P_SW_RFB_T prSwRfb);
  158. VOID
  159. saaSendDisconnectMsgHandler(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec, IN P_BSS_INFO_T prAisBssInfo,
  160. IN ENUM_AA_FRM_TYPE_T eFrmType);
  161. /*----------------------------------------------------------------------------*/
  162. /* Routines in aaa_fsm.c */
  163. /*----------------------------------------------------------------------------*/
  164. VOID aaaFsmRunEventRxAuth(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  165. WLAN_STATUS aaaFsmRunEventRxAssoc(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
  166. WLAN_STATUS
  167. aaaFsmRunEventTxDone(IN P_ADAPTER_T prAdapter, IN P_MSDU_INFO_T prMsduInfo, IN ENUM_TX_RESULT_CODE_T rTxDoneStatus);
  168. /*******************************************************************************
  169. * F U N C T I O N S
  170. ********************************************************************************
  171. */
  172. #endif /* _AA_FSM_H */