aa_fsm.h 7.1 KB

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