2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/sec_fsm.h#1 $
6 \brief Declaration of functions and finite state machine for SECURITY Module.
8 Function declaration for privacy.c and SEC_STATE for SECURITY FSM.
17 * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue
18 * [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue.
20 * 09 21 2010 kevin.huang
21 * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning
22 * Eliminate Linux Compile Warning
24 * 09 03 2010 kevin.huang
26 * Refine #include sequence and solve recursive/nested #include issue
30 * adding the eapol callback setting.
34 * adding the tx pkt call back handle for countermeasure.
38 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
41 * [WPD00003840][MT6620 5931] Security migration
42 * modify some code for concurrent network.
45 * [WPD00003840][MT6620 5931] Security migration
46 * consdier the concurrent network setting.
49 * [BORA00000605][WIFISYS] Phase3 Integration
50 * Code refine, and remove non-used code.
53 * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize
54 * Fixed the pre-authentication timer not correctly init issue, and modify the security related callback function prototype.
57 * [BORA00000605][WIFISYS] Phase3 Integration
58 * Refine the variable and parameter for security.
61 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
65 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
66 * fixed the deauth Tx done callback parameter
69 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
70 * adding the reference function declaration
73 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
74 * delete non-used code
77 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
78 * adjust the function prototype
80 * Nov 23 2009 mtk01088
81 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
82 * adjust the function declaration
84 * Nov 19 2009 mtk01088
85 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
86 * adding the security variable
88 * Nov 18 2009 mtk01088
89 * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
91 ** \main\maintrunk.MT5921\14 2009-04-06 15:35:47 GMT mtk01088
92 ** add the variable to set the disable AP selection for privacy check, for wps open networking.
93 ** \main\maintrunk.MT5921\13 2008-11-19 11:46:01 GMT mtk01088
94 ** rename some variable with pre-fix to avoid the misunderstanding
95 ** \main\maintrunk.MT5921\12 2008-08-28 20:37:11 GMT mtk01088
96 ** remove non-used code
98 ** \main\maintrunk.MT5921\11 2008-03-18 09:51:52 GMT mtk01088
99 ** Add function declaration for timer to indicate pmkid candidate
100 ** \main\maintrunk.MT5921\10 2008-02-29 15:12:08 GMT mtk01088
101 ** add variable for sw port control
102 ** \main\maintrunk.MT5921\9 2008-02-29 12:37:30 GMT mtk01088
103 ** rename the security related function declaration
104 ** \main\maintrunk.MT5921\8 2007-12-27 13:59:08 GMT mtk01088
105 ** adjust the wlan table and sec fsm init timing
106 ** \main\maintrunk.MT5921\7 2007-11-20 10:39:49 GMT mtk01088
107 ** add function timer for wait EAPoL Error timeout
108 ** \main\maintrunk.MT5921\6 2007-11-06 20:39:08 GMT mtk01088
109 ** rename the counter measure timer
110 ** \main\maintrunk.MT5921\5 2007-11-06 20:14:31 GMT mtk01088
111 ** add a abort function
112 ** Revision 1.5 2007/07/16 02:33:42 MTK01088
113 ** change the ENUM declaration structure prefix from r to e
115 ** Revision 1.4 2007/07/09 06:23:10 MTK01088
118 ** Revision 1.3 2007/07/04 10:09:04 MTK01088
119 ** adjust the state for security fsm
120 ** change function name
122 ** Revision 1.2 2007/07/03 08:13:22 MTK01088
123 ** change the sec fsm state
124 ** add the event for sec fsm
126 ** Revision 1.1 2007/06/27 06:20:35 MTK01088
127 ** add the sec fsm header file
134 /*******************************************************************************
135 * C O M P I L E R F L A G S
136 ********************************************************************************
139 /*******************************************************************************
140 * E X T E R N A L R E F E R E N C E S
141 ********************************************************************************
144 /*******************************************************************************
146 ********************************************************************************
149 /* TKIP CounterMeasure interval for Rejoin to Network. */
150 #define COUNTER_MEASURE_TIMEOUT_INTERVAL_SEC 60
152 /* Timeout to wait the EAPoL Error Report frame Send out. */
153 #define EAPOL_REPORT_SEND_TIMEOUT_INTERVAL_SEC 1
155 /*******************************************************************************
157 ********************************************************************************
160 typedef UINT_32 SEC_STATUS, *P_SEC_STATUS;
163 /* WPA2 PMKID candicate structure */
164 typedef struct _PMKID_CANDICATE_T {
165 UINT_8 aucBssid[MAC_ADDR_LEN]; /* MAC address */
166 UINT_32 u4PreAuthFlags;
167 } PMKID_CANDICATE_T, *P_PMKID_CANDICATE_T;
170 typedef SEC_STATUS (*PFN_SEC_FSM_STATE_HANDLER)(VOID);
172 /*******************************************************************************
173 * P U B L I C D A T A
174 ********************************************************************************
177 /*******************************************************************************
178 * P R I V A T E D A T A
179 ********************************************************************************
182 /*******************************************************************************
184 ********************************************************************************
186 #define SEC_STATE_TRANSITION_FLAG fgIsTransition
187 #define SEC_NEXT_STATE_VAR eNextState
189 #define SEC_STATE_TRANSITION(prAdapter, prSta, eFromState, eToState) \
190 { secFsmTrans_ ## eFromState ## _to_ ## eToState(prAdapter, prSta); \
191 SEC_NEXT_STATE_VAR = SEC_STATE_ ## eToState; \
192 SEC_STATE_TRANSITION_FLAG = (BOOLEAN)TRUE; \
195 /*******************************************************************************
196 * F U N C T I O N D E C L A R A T I O N S
197 ********************************************************************************
200 /*--------------------------------------------------------------*/
201 /* Routines to handle the sec check */
202 /*--------------------------------------------------------------*/
203 /***** Routines in sec_fsm.c *****/
206 IN P_ADAPTER_T prAdapter,
207 IN P_STA_RECORD_T prSta
212 IN P_ADAPTER_T prAdapter,
213 IN P_STA_RECORD_T prSta
218 IN P_ADAPTER_T prAdapter,
219 IN P_STA_RECORD_T prSta
224 IN P_ADAPTER_T prAdapter,
225 IN P_STA_RECORD_T prSta
229 secFsmEventPTKInstalled(
230 IN P_ADAPTER_T prAdapter,
231 IN P_STA_RECORD_T prSta
235 secFsmEvent2ndEapolTx(
236 IN P_ADAPTER_T prAdapter,
237 IN P_STA_RECORD_T prSta
241 secFsmEvent4ndEapolTxDone(
242 IN P_ADAPTER_T prAdapter,
243 IN P_STA_RECORD_T prSta
247 secFsmEventEapolTxDone (
248 IN P_ADAPTER_T prAdapter,
249 IN P_STA_RECORD_T prStaRec,
250 IN ENUM_TX_RESULT_CODE_T rTxDoneStatus
254 secFsmEventEapolTxTimeout (
255 IN P_ADAPTER_T prAdapter,
260 secFsmEventDeauthTxDone(
261 IN P_ADAPTER_T prAdapter,
262 IN P_MSDU_INFO_T prMsduInfo,
263 IN ENUM_TX_RESULT_CODE_T rTxDoneStatus
267 secFsmEventStartCounterMeasure(
268 IN P_ADAPTER_T prAdapter,
269 IN P_STA_RECORD_T prSta
273 secFsmEventEndOfCounterMeasure(
274 IN P_ADAPTER_T prAdapter,
278 /*******************************************************************************
280 ********************************************************************************
282 #endif /* _SEC_FSM_H */