sec_fsm.c 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125
  1. /*
  2. ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/sec_fsm.c#1
  3. */
  4. /*! \file "sec_fsm.c"
  5. \brief This is the file implement security check state machine.
  6. In security module, do the port control check after success join to an AP,
  7. and the path to NORMAL TR, the state machine handle these state transition.
  8. */
  9. /*
  10. ** Log: sec_fsm.c
  11. **
  12. ** 03 27 2013 wh.su
  13. ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
  14. ** add default ket handler
  15. **
  16. ** 01 22 2013 cp.wu
  17. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  18. ** modification for ucBssIndex migration
  19. **
  20. ** 09 17 2012 cm.chang
  21. ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
  22. ** Duplicate source from MT6620 v2.3 driver branch
  23. ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
  24. *
  25. * 11 24 2011 wh.su
  26. * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
  27. * Adjust code for DBG and CONFIG_XLOG.
  28. *
  29. * 11 11 2011 wh.su
  30. * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
  31. * modify the xlog related code.
  32. *
  33. * 11 10 2011 wh.su
  34. * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
  35. * change the debug module level.
  36. *
  37. * 11 02 2011 wh.su
  38. * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
  39. * adding the code for XLOG.
  40. *
  41. * 03 29 2011 wh.su
  42. * [WCXRP00000248] [MT6620 Wi-Fi][FW]Fixed the Klockwork error
  43. * fixed the kclocwork error.
  44. *
  45. * 01 26 2011 yuche.tsai
  46. * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record.
  47. * .
  48. *
  49. * 01 25 2011 yuche.tsai
  50. * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record.
  51. * Fix Compile Error when DBG is disabled.
  52. *
  53. * 01 25 2011 yuche.tsai
  54. * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record.
  55. * Change Station Type in Station Record, Modify MACRO definition for getting station type & network type index & Role.
  56. *
  57. * 09 29 2010 wh.su
  58. * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue
  59. * [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue.
  60. *
  61. * 09 24 2010 wh.su
  62. * NULL
  63. * [WCXRP00005002][MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning.
  64. *
  65. * 09 03 2010 kevin.huang
  66. * NULL
  67. * Refine #include sequence and solve recursive/nested #include issue
  68. *
  69. * 08 20 2010 wh.su
  70. * NULL
  71. * adding the eapol callback setting.
  72. *
  73. * 08 19 2010 wh.su
  74. * NULL
  75. * adding the tx pkt call back handle for countermeasure.
  76. *
  77. * 07 19 2010 wh.su
  78. *
  79. * fixed the compilng error at debug mode.
  80. *
  81. * 07 08 2010 cp.wu
  82. *
  83. * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
  84. *
  85. * 06 21 2010 wh.su
  86. * [WPD00003840][MT6620 5931] Security migration
  87. * modify some code for concurrent network.
  88. *
  89. * 06 19 2010 wh.su
  90. * [WPD00003840][MT6620 5931] Security migration
  91. * consdier the concurrent network setting.
  92. *
  93. * 05 28 2010 wh.su
  94. * [BORA00000626][MT6620] Refine the remove key flow for WHQL testing
  95. * fixed the ad-hoc wpa-none send non-encrypted frame issue.
  96. *
  97. * 05 24 2010 kevin.huang
  98. * [BORA00000794][WIFISYS][New Feature]Power Management Support
  99. * Refine authSendAuthFrame() for NULL STA_RECORD_T case and minimum deauth interval.
  100. *
  101. * 04 24 2010 cm.chang
  102. * [BORA00000018]Integrate WIFI part into BORA for the 1st time
  103. * g_aprBssInfo[] depends on CFG_SUPPORT_P2P and CFG_SUPPORT_BOW
  104. *
  105. * 04 13 2010 wh.su
  106. * [BORA00000680][MT6620] Support the statistic for Microsoft os query
  107. * fixed the Klocwork error and refine the class error message.
  108. *
  109. * 03 03 2010 wh.su
  110. * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize
  111. * move the AIS specific variable for security to AIS specific structure.
  112. *
  113. * 03 03 2010 wh.su
  114. * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize
  115. * Fixed the pre-authentication timer not correctly init issue,
  116. * and modify the security related callback function prototype.
  117. *
  118. * 03 01 2010 wh.su
  119. * [BORA00000605][WIFISYS] Phase3 Integration
  120. * Refine the variable and parameter for security.
  121. *
  122. * 01 27 2010 wh.su
  123. * [BORA00000476][Wi-Fi][firmware] Add the security module initialize code
  124. * add and fixed some security function.
  125. *
  126. * 01 13 2010 wh.su
  127. * [BORA00000476][Wi-Fi][firmware] Add the security module initialize code
  128. * fixed the compiling warning
  129. *
  130. * 12 18 2009 cm.chang
  131. * [BORA00000018]Integrate WIFI part into BORA for the 1st time
  132. * .
  133. *
  134. * Dec 7 2009 mtk01088
  135. * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
  136. * refine some code
  137. *
  138. * Dec 4 2009 mtk01088
  139. * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
  140. * refine the code
  141. *
  142. * Dec 1 2009 mtk01088
  143. * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
  144. * code refine
  145. *
  146. * Nov 23 2009 mtk01088
  147. * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
  148. * adjust the function name
  149. *
  150. * Nov 19 2009 mtk01088
  151. * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
  152. * adjust the state machine, to meet the firmware security design v1.1
  153. *
  154. * Nov 18 2009 mtk01088
  155. * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code
  156. *
  157. **
  158. */
  159. /*******************************************************************************
  160. * C O M P I L E R F L A G S
  161. ********************************************************************************
  162. */
  163. /*******************************************************************************
  164. * E X T E R N A L R E F E R E N C E S
  165. ********************************************************************************
  166. */
  167. #include "precomp.h"
  168. /*******************************************************************************
  169. * C O N S T A N T S
  170. ********************************************************************************
  171. */
  172. /*******************************************************************************
  173. * D A T A T Y P E S
  174. ********************************************************************************
  175. */
  176. /*******************************************************************************
  177. * P U B L I C D A T A
  178. ********************************************************************************
  179. */
  180. /*******************************************************************************
  181. * P R I V A T E D A T A
  182. ********************************************************************************
  183. */
  184. #if DBG
  185. /*lint -save -e64 Type mismatch */
  186. static PUINT_8 apucDebugSecState[SEC_STATE_NUM] = {
  187. (PUINT_8) DISP_STRING("SEC_STATE_INIT"),
  188. (PUINT_8) DISP_STRING("SEC_STATE_INITIATOR_PORT_BLOCKED"),
  189. (PUINT_8) DISP_STRING("SEC_STATE_RESPONDER_PORT_BLOCKED"),
  190. (PUINT_8) DISP_STRING("SEC_STATE_CHECK_OK"),
  191. (PUINT_8) DISP_STRING("SEC_STATE_SEND_EAPOL"),
  192. (PUINT_8) DISP_STRING("SEC_STATE_SEND_DEAUTH"),
  193. (PUINT_8) DISP_STRING("SEC_STATE_COUNTERMEASURE"),
  194. };
  195. /*lint -restore */
  196. #endif /* DBG */
  197. /*******************************************************************************
  198. * M A C R O S
  199. ********************************************************************************
  200. */
  201. /*******************************************************************************
  202. * F U N C T I O N D E C L A R A T I O N S
  203. ********************************************************************************
  204. */
  205. /*******************************************************************************
  206. * F U N C T I O N S
  207. ********************************************************************************
  208. */
  209. /*----------------------------------------------------------------------------*/
  210. /*!
  211. * \brief This function will do initialization of Security FSM and all variables in
  212. * SEC_INFO_T.
  213. *
  214. * \param[in] prSta Pointer to the STA record
  215. *
  216. * \return none
  217. */
  218. /*----------------------------------------------------------------------------*/
  219. VOID secFsmInit(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  220. {
  221. P_SEC_INFO_T prSecInfo;
  222. P_AIS_SPECIFIC_BSS_INFO_T prAisSpecBssInfo;
  223. ASSERT(prSta);
  224. prSecInfo = &prSta->rSecInfo;
  225. #if 1 /* MT6620 */
  226. /* At MT5921, is ok, but at MT6620, firmware base ASIC, the firmware */
  227. /* will lost these data, thus, driver have to keep the wep material and */
  228. /* setting to firmware while awake from D3. */
  229. #endif
  230. prSecInfo->eCurrentState = SEC_STATE_INIT;
  231. prSecInfo->fg2nd1xSend = FALSE;
  232. prSecInfo->fgKeyStored = FALSE;
  233. if (IS_STA_IN_AIS(prSta)) {
  234. prAisSpecBssInfo = &prAdapter->rWifiVar.rAisSpecificBssInfo;
  235. prAisSpecBssInfo->u4RsnaLastMICFailTime = 0;
  236. prAisSpecBssInfo->fgCheckEAPoLTxDone = FALSE;
  237. cnmTimerInitTimer(prAdapter,
  238. &prAdapter->rWifiVar.rAisSpecificBssInfo.rRsnaEAPoLReportTimeoutTimer,
  239. (PFN_MGMT_TIMEOUT_FUNC) secFsmEventEapolTxTimeout, (ULONG) prSta);
  240. cnmTimerInitTimer(prAdapter,
  241. &prAdapter->rWifiVar.rAisSpecificBssInfo.rRsnaBlockTrafficTimer,
  242. (PFN_MGMT_TIMEOUT_FUNC) secFsmEventEndOfCounterMeasure, (ULONG) prSta);
  243. }
  244. }
  245. /*----------------------------------------------------------------------------*/
  246. /*!
  247. * \brief This function will do uninitialization of Security FSM and all variables in
  248. * SEC_INFO_T.
  249. *
  250. * \param[in] prSta Pointer to the STA record
  251. *
  252. * \return none
  253. */
  254. /*----------------------------------------------------------------------------*/
  255. VOID /* whsu:Todo: */
  256. secFsmUnInit(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  257. {
  258. P_SEC_INFO_T prSecInfo;
  259. ASSERT(prSta);
  260. prSecInfo = &prSta->rSecInfo;
  261. prSecInfo->fg2nd1xSend = FALSE;
  262. prSecInfo->fgKeyStored = FALSE;
  263. /* nicPrivacyRemoveWlanTable(prSta->ucWlanIndex); */
  264. if (IS_STA_IN_AIS(prSta)) {
  265. cnmTimerStopTimer(prAdapter, &prAdapter->rWifiVar.rAisSpecificBssInfo.rRsnaEAPoLReportTimeoutTimer);
  266. cnmTimerStopTimer(prAdapter, &prAdapter->rWifiVar.rAisSpecificBssInfo.rRsnaBlockTrafficTimer);
  267. }
  268. }
  269. /*----------------------------------------------------------------------------*/
  270. /*!
  271. * \brief This function will do action part while in STATE transition of
  272. * STANDBY to CHECK_OK.
  273. *
  274. * \param[in] prSta Pointer to the Sta record
  275. *
  276. * \return - none
  277. */
  278. /*----------------------------------------------------------------------------*/
  279. __KAL_INLINE__ VOID secFsmTrans_INIT_to_CHECK_OK(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  280. {
  281. secSetPortBlocked(prAdapter, prSta, FALSE);
  282. }
  283. /*----------------------------------------------------------------------------*/
  284. /*!
  285. * \brief This function will do action part while in STATE transition of
  286. * INIT to INITIATOR_PORT_BLOCKED.
  287. *
  288. * \param[in] prSta Pointer to the Sta record
  289. *
  290. * \return - none
  291. */
  292. /*----------------------------------------------------------------------------*/
  293. __KAL_INLINE__ VOID secFsmTrans_INIT_to_INITIATOR_PORT_BLOCKED(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  294. {
  295. }
  296. /*----------------------------------------------------------------------------*/
  297. /*!
  298. * \brief This function will do action part while in STATE transition of
  299. * INIT to RESPONDER_PORT_BLOCKED.
  300. *
  301. * \param[in] prSta Pointer to the Sta record
  302. *
  303. * \return - none
  304. */
  305. /*----------------------------------------------------------------------------*/
  306. __KAL_INLINE__ VOID secFsmTrans_INIT_to_RESPONDER_PORT_BLOCKED(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  307. {
  308. }
  309. /*----------------------------------------------------------------------------*/
  310. /*!
  311. * \brief This function will do action part while in STATE transition of
  312. * INITIATOR_PORT_BLOCKED to CHECK_OK.
  313. *
  314. * \param[in] prSta Pointer to the Sta record
  315. *
  316. * \return - none
  317. */
  318. /*----------------------------------------------------------------------------*/
  319. __KAL_INLINE__ VOID secFsmTrans_INITIATOR_PORT_BLOCKED_to_CHECK_OK(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  320. {
  321. secSetPortBlocked(prAdapter, prSta, FALSE);
  322. }
  323. /*----------------------------------------------------------------------------*/
  324. /*!
  325. * \brief This function will do action part while in STATE transition of
  326. * RESPONDER_PORT_BLOCKED to CHECK_OK.
  327. *
  328. * \param[in] prSta Pointer to the Sta record
  329. *
  330. * \return - none
  331. */
  332. /*----------------------------------------------------------------------------*/
  333. __KAL_INLINE__ VOID secFsmTrans_RESPONDER_PORT_BLOCKED_to_CHECK_OK(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  334. {
  335. secSetPortBlocked(prAdapter, prSta, FALSE);
  336. }
  337. /*----------------------------------------------------------------------------*/
  338. /*!
  339. * \brief This function will do action part while in STATE transition of
  340. * CHECK_OK to SEND_EAPOL
  341. *
  342. * \param[in] prSta Pointer to the Sta record
  343. *
  344. * \return -
  345. */
  346. /*----------------------------------------------------------------------------*/
  347. __KAL_INLINE__ VOID secFsmTrans_CHECK_OK_to_SEND_EAPOL(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  348. {
  349. P_AIS_SPECIFIC_BSS_INFO_T prAisBssInfo;
  350. ASSERT(prAdapter);
  351. ASSERT(prSta);
  352. prAisBssInfo = &prAdapter->rWifiVar.rAisSpecificBssInfo;
  353. ASSERT(prAisBssInfo);
  354. if (!IS_STA_IN_AIS(prSta)) {
  355. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  356. /* ASSERT(0); */
  357. return;
  358. }
  359. prAisBssInfo->fgCheckEAPoLTxDone = TRUE;
  360. /* cnmTimerStartTimer(prAdapter, */
  361. /* &prAisBssInfo->rRsnaEAPoLReportTimeoutTimer, */
  362. /* SEC_TO_MSEC(EAPOL_REPORT_SEND_TIMEOUT_INTERVAL_SEC)); */
  363. }
  364. /*----------------------------------------------------------------------------*/
  365. /*!
  366. * \brief This function will do action part while in STATE transition of
  367. * SEND_EAPOL to SEND_DEAUTH.
  368. *
  369. * \param[in] prSta Pointer to the Sta record
  370. *
  371. * \return - none
  372. */
  373. /*----------------------------------------------------------------------------*/
  374. __KAL_INLINE__ VOID secFsmTrans_SEND_EAPOL_to_SEND_DEAUTH(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  375. {
  376. if (!IS_STA_IN_AIS(prSta)) {
  377. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  378. /* ASSERT(0); */
  379. return;
  380. }
  381. /* Compose deauth frame to AP, a call back function for tx done */
  382. if (authSendDeauthFrame(prAdapter,
  383. NULL, prSta, (P_SW_RFB_T) NULL, REASON_CODE_MIC_FAILURE, (PFN_TX_DONE_HANDLER) NULL
  384. /* secFsmEventDeauthTxDone left upper layer handle the 60 timer */)
  385. != WLAN_STATUS_SUCCESS) {
  386. ASSERT(FALSE);
  387. }
  388. }
  389. /*----------------------------------------------------------------------------*/
  390. /*!
  391. * \brief This function will do action part while in STATE transition of
  392. * SEND_DEAUTH to COUNTERMEASURE.
  393. *
  394. * \param[in] prSta Pointer to the Sta record
  395. *
  396. * \return -
  397. */
  398. /*----------------------------------------------------------------------------*/
  399. __KAL_INLINE__ VOID secFsmTrans_SEND_DEAUTH_to_COUNTERMEASURE(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  400. {
  401. ASSERT(prAdapter);
  402. ASSERT(prSta);
  403. if (!IS_STA_IN_AIS(prSta)) {
  404. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  405. /* ASSERT(0); */
  406. return;
  407. }
  408. /* Start the 60 sec timer */
  409. cnmTimerStartTimer(prAdapter,
  410. &prAdapter->rWifiVar.rAisSpecificBssInfo.rRsnaBlockTrafficTimer,
  411. SEC_TO_MSEC(COUNTER_MEASURE_TIMEOUT_INTERVAL_SEC));
  412. }
  413. /*----------------------------------------------------------------------------*/
  414. /*!
  415. * \brief This function will do action part while in STATE transition of
  416. * SEND_DEAUTH to COUNTERMEASURE.
  417. *
  418. * \param[in] prSta Pointer to the Sta record
  419. *
  420. * \return -
  421. */
  422. /*----------------------------------------------------------------------------*/
  423. __KAL_INLINE__ VOID secFsmTrans_COUNTERMEASURE_to_INIT(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  424. {
  425. /* Clear the counter measure flag */
  426. }
  427. /*----------------------------------------------------------------------------*/
  428. /*!
  429. * \brief The Core FSM engine of security module.
  430. *
  431. * \param[in] prSta Pointer to the Sta record
  432. * \param[in] eNextState Enum value of next sec STATE
  433. *
  434. * \return -
  435. */
  436. /*----------------------------------------------------------------------------*/
  437. VOID secFsmSteps(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta, IN ENUM_SEC_STATE_T eNextState)
  438. {
  439. P_SEC_INFO_T prSecInfo;
  440. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  441. ASSERT(prSta);
  442. prSecInfo = &prSta->rSecInfo;
  443. ASSERT(prSecInfo);
  444. DEBUGFUNC("secFsmSteps");
  445. do {
  446. /* Do entering Next State */
  447. prSecInfo->ePreviousState = prSecInfo->eCurrentState;
  448. /* Do entering Next State */
  449. #if DBG
  450. DBGLOG(RSN, STATE, "\n" MACSTR " TRANSITION: [%s] -> [%s]\n\n",
  451. MAC2STR(prSta->aucMacAddr),
  452. apucDebugSecState[prSecInfo->eCurrentState], apucDebugSecState[eNextState];
  453. #else
  454. DBGLOG(RSN, STATE, "\n" MACSTR " [%d] TRANSITION: [%d] -> [%d]\n\n",
  455. MAC2STR(prSta->aucMacAddr),
  456. DBG_RSN_IDX, prSecInfo->eCurrentState, eNextState;
  457. #endif
  458. prSecInfo->eCurrentState = eNextState;
  459. fgIsTransition = (BOOLEAN) FALSE;
  460. #if 0
  461. /* Do tasks of the State that we just entered */
  462. switch (prSecInfo->eCurrentState) {
  463. case SEC_STATE_INIT:
  464. break;
  465. case SEC_STATE_INITIATOR_PORT_BLOCKED:
  466. break;
  467. case SEC_STATE_RESPONDER_PORT_BLOCKED:
  468. break;
  469. case SEC_STATE_CHECK_OK:
  470. break;
  471. case SEC_STATE_SEND_EAPOL:
  472. break;
  473. case SEC_STATE_SEND_DEAUTH:
  474. break;
  475. case SEC_STATE_COUNTERMEASURE:
  476. break;
  477. default:
  478. ASSERT(0); /* Make sure we have handle all STATEs */
  479. break;
  480. }
  481. #endif
  482. } while (fgIsTransition);
  483. return;
  484. }
  485. /*----------------------------------------------------------------------------*/
  486. /*!
  487. * \brief This function will do initialization of Security FSM and all variables in
  488. * SEC_INFO_T.
  489. *
  490. * \param[in] prSta Pointer to the Sta record
  491. *
  492. * \return none
  493. */
  494. /*----------------------------------------------------------------------------*/
  495. VOID secFsmEventStart(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  496. {
  497. P_SEC_INFO_T prSecInfo;
  498. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  499. ENUM_SEC_STATE_T eNextState;
  500. DBGLOG(RSN, TRACE, "secFsmRunEventStart\n");
  501. ASSERT(prSta);
  502. if (!prSta)
  503. return;
  504. if (!IS_STA_IN_AIS(prSta))
  505. return;
  506. DBGLOG(RSN, TRACE, "secFsmRunEventStart for sta " MACSTR " bss %d\n",
  507. MAC2STR(prSta->aucMacAddr),
  508. prSta->ucBssIndex;
  509. prSecInfo = (P_SEC_INFO_T) &prSta->rSecInfo;
  510. eNextState = prSecInfo->eCurrentState;
  511. secSetPortBlocked(prAdapter, prSta, TRUE);
  512. /* prSta->fgTransmitKeyExist = FALSE; */
  513. /* whsu:: nicPrivacySetStaDefaultWTIdx(prSta); */
  514. #if 1 /* Since the 1x and key can set to firmware in order, always enter the check ok state */
  515. SEC_STATE_TRANSITION(prAdapter, prSta, INIT, CHECK_OK);
  516. #else
  517. if (IS_STA_IN_AIS(prSta->eStaType)) {
  518. if (secRsnKeyHandshakeEnabled(prAdapter) == TRUE
  519. #if CFG_SUPPORT_WAPI
  520. || (prAdapter->rWifiVar.rConnSettings.fgWapiMode)
  521. #endif
  522. ) {
  523. prSta->fgTransmitKeyExist = FALSE;
  524. /* nicPrivacyInitialize(prSta->ucNetTypeIndex); */
  525. SEC_STATE_TRANSITION(prAdapter, prSta, INIT, INITIATOR_PORT_BLOCKED);
  526. } else {
  527. SEC_STATE_TRANSITION(prAdapter, prSta, INIT, CHECK_OK);
  528. }
  529. }
  530. #if CFG_ENABLE_WIFI_DIRECT || CFG_ENABLE_BT_OVER_WIFI
  531. #if CFG_ENABLE_WIFI_DIRECT && CFG_ENABLE_BT_OVER_WIFI
  532. else if ((prSta->eStaType == STA_TYPE_BOW_CLIENT) || (prSta->eStaType == STA_TYPE_P2P_GC)) {
  533. #elif CFG_ENABLE_WIFI_DIRECT
  534. else if (prSta->eStaType == STA_TYPE_P2P_GC) {
  535. #elif CFG_ENABLE_BT_OVER_WIFI
  536. else if (prSta->eStaType == STA_TYPE_BOW_CLIENT) {
  537. #endif
  538. SEC_STATE_TRANSITION(prAdapter, prSta, INIT, RESPONDER_PORT_BLOCKED);
  539. }
  540. #endif
  541. else
  542. SEC_STATE_TRANSITION(prAdapter, prSta, INIT, INITIATOR_PORT_BLOCKED);
  543. #endif
  544. if (prSecInfo->eCurrentState != eNextState)
  545. secFsmSteps(prAdapter, prSta, eNextState);
  546. } /* secFsmRunEventStart */
  547. /*----------------------------------------------------------------------------*/
  548. /*!
  549. * \brief This function called by reset procedure to force the sec fsm enter
  550. * idle state
  551. *
  552. * \param[in] ucNetTypeIdx The Specific Network type index
  553. * \param[in] prSta Pointer to the Sta record
  554. *
  555. * \return none
  556. */
  557. /*----------------------------------------------------------------------------*/
  558. VOID secFsmEventAbort(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  559. {
  560. P_SEC_INFO_T prSecInfo;
  561. DBGLOG(RSN, TRACE, "secFsmEventAbort for sta " MACSTR " bss %d\n",
  562. MAC2STR(prSta->aucMacAddr),
  563. prSta->ucBssIndex;
  564. ASSERT(prSta;
  565. if (!prSta)
  566. return;
  567. if (!IS_STA_IN_AIS(prSta))
  568. return;
  569. prSecInfo = (P_SEC_INFO_T) &prSta->rSecInfo;
  570. prSta->fgTransmitKeyExist = FALSE;
  571. secSetPortBlocked(prAdapter, prSta, TRUE);
  572. if (prSecInfo == NULL)
  573. return;
  574. if (IS_STA_IN_AIS(prSta)) {
  575. prAdapter->rWifiVar.rAisSpecificBssInfo.fgTransmitKeyExist = FALSE;
  576. if (prSecInfo->eCurrentState == SEC_STATE_SEND_EAPOL) {
  577. if (prAdapter->rWifiVar.rAisSpecificBssInfo.fgCheckEAPoLTxDone == FALSE) {
  578. DBGLOG(RSN, TRACE, "EAPOL STATE not match the flag\n");
  579. /* cnmTimerStopTimer(prAdapter,
  580. * &prAdapter->rWifiVar.rAisSpecificBssInfo.rRsnaEAPoLReportTimeoutTimer); */
  581. }
  582. }
  583. }
  584. prSecInfo->eCurrentState = SEC_STATE_INIT;
  585. }
  586. /*----------------------------------------------------------------------------*/
  587. /*!
  588. * \brief This function will indicate an Event of "2nd EAPoL Tx is sending" to Sec FSM.
  589. *
  590. * \param[in] prSta Pointer to the Sta record
  591. *
  592. * \return -
  593. */
  594. /*----------------------------------------------------------------------------*/
  595. VOID secFsmEvent2ndEapolTx(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  596. {
  597. P_SEC_INFO_T prSecInfo;
  598. ENUM_SEC_STATE_T eNextState;
  599. /* BOOLEAN fgIsTransition = (BOOLEAN)FALSE; */
  600. DEBUGFUNC("secFsmRunEvent2ndEapolTx");
  601. ASSERT(prSta);
  602. prSecInfo = &prSta->rSecInfo;
  603. eNextState = prSecInfo->eCurrentState;
  604. #if DBG
  605. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n", MAC2STR(prSta->aucMacAddr),
  606. apucDebugSecState[prSecInfo->eCurrentState]);
  607. #else
  608. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prSta->aucMacAddr),
  609. prSecInfo->eCurrentState);
  610. #endif
  611. switch (prSecInfo->eCurrentState) {
  612. case SEC_STATE_INITIATOR_PORT_BLOCKED:
  613. case SEC_STATE_CHECK_OK:
  614. prSecInfo->fg2nd1xSend = TRUE;
  615. break;
  616. default:
  617. #if DBG
  618. DBGLOG(RSN, WARN, "Rcv 2nd EAPoL at %s\n", apucDebugSecState[prSecInfo->eCurrentState]);
  619. #else
  620. DBGLOG(RSN, WARN, "Rcv 2nd EAPoL at [%d]\n", prSecInfo->eCurrentState);
  621. #endif
  622. break;
  623. }
  624. if (prSecInfo->eCurrentState != eNextState)
  625. secFsmSteps(prAdapter, prSta, eNextState);
  626. return;
  627. } /* secFsmRunEvent2ndEapolTx */
  628. /*----------------------------------------------------------------------------*/
  629. /*!
  630. * \brief This function will indicate an Event of "4th EAPoL Tx is Tx done" to Sec FSM.
  631. *
  632. * \param[in] prSta Pointer to the Sta record
  633. *
  634. * \return -
  635. */
  636. /*----------------------------------------------------------------------------*/
  637. VOID secFsmEvent4ndEapolTxDone(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  638. {
  639. P_SEC_INFO_T prSecInfo;
  640. ENUM_SEC_STATE_T eNextState;
  641. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  642. P_CMD_802_11_KEY prStoredKey;
  643. DEBUGFUNC("secFsmRunEvent4ndEapolTx");
  644. ASSERT(prSta);
  645. prSecInfo = &prSta->rSecInfo;
  646. eNextState = prSecInfo->eCurrentState;
  647. #if DBG
  648. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n",
  649. MAC2STR(prSta->aucMacAddr),
  650. apucDebugSecState[prSecInfo->eCurrentState]);
  651. #else
  652. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prSta->aucMacAddr),
  653. prSecInfo->eCurrentState);
  654. #endif
  655. switch (prSecInfo->eCurrentState) {
  656. case SEC_STATE_INITIATOR_PORT_BLOCKED:
  657. case SEC_STATE_CHECK_OK:
  658. prSecInfo->fg2nd1xSend = FALSE;
  659. if (prSecInfo->fgKeyStored) {
  660. prStoredKey = (P_CMD_802_11_KEY) prSecInfo->aucStoredKey;
  661. /* prSta = rxmLookupStaRecIndexFromTA(prStoredKey->aucPeerAddr); */
  662. /* if (nicPrivacySetKeyEntry(prStoredKey, prSta->ucWlanIndex) == FALSE) */
  663. /* DBGLOG(RSN, WARN, ("nicPrivacySetKeyEntry() fail,..\n")); */
  664. /* key update */
  665. prSecInfo->fgKeyStored = FALSE;
  666. prSta->fgTransmitKeyExist = TRUE;
  667. }
  668. if (prSecInfo->eCurrentState == SEC_STATE_INITIATOR_PORT_BLOCKED)
  669. SEC_STATE_TRANSITION(prAdapter, prSta, INITIATOR_PORT_BLOCKED, CHECK_OK);
  670. break;
  671. default:
  672. #if DBG
  673. DBGLOG(RSN, WARN, "Rcv thh EAPoL Tx done at %s\n", apucDebugSecState[prSecInfo->eCurrentState]);
  674. #else
  675. DBGLOG(RSN, WARN, "Rcv thh EAPoL Tx done at [%d]\n", prSecInfo->eCurrentState);
  676. #endif
  677. break;
  678. }
  679. if (prSecInfo->eCurrentState != eNextState)
  680. secFsmSteps(prAdapter, prSta, eNextState);
  681. return;
  682. } /* secFsmRunEvent4ndEapolTx */
  683. /*----------------------------------------------------------------------------*/
  684. /*!
  685. * \brief This function will indicate an Event of "Pairwise key installed" to SEC FSM.
  686. *
  687. * \param[in] prSta Pointer to the Sta record
  688. *
  689. * \retval TRUE The key can be installed to HW
  690. * \retval FALSE The kay conflict with the current key, abort it
  691. */
  692. /*----------------------------------------------------------------------------*/
  693. BOOLEAN secFsmEventPTKInstalled(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  694. {
  695. P_SEC_INFO_T prSecInfo;
  696. ENUM_SEC_STATE_T eNextState;
  697. BOOLEAN fgStatus = TRUE;
  698. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  699. ASSERT(prSta);
  700. prSecInfo = &prSta->rSecInfo;
  701. if (prSecInfo == NULL)
  702. return TRUE; /* Not PTK */
  703. #if DBG
  704. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n", MAC2STR(prSta->aucMacAddr),
  705. apucDebugSecState[prSecInfo->eCurrentState]);
  706. #else
  707. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prSta->aucMacAddr),
  708. prSecInfo->eCurrentState);
  709. #endif
  710. eNextState = prSecInfo->eCurrentState;
  711. switch (prSecInfo->eCurrentState) {
  712. case SEC_STATE_INIT:
  713. /* Legacy wep, wpa-none */
  714. break;
  715. case SEC_STATE_INITIATOR_PORT_BLOCKED:
  716. if (prSecInfo->fg2nd1xSend == FALSE)
  717. SEC_STATE_TRANSITION(prAdapter, prSta, INITIATOR_PORT_BLOCKED, CHECK_OK);
  718. break;
  719. case SEC_STATE_RESPONDER_PORT_BLOCKED:
  720. SEC_STATE_TRANSITION(prAdapter, prSta, RESPONDER_PORT_BLOCKED, CHECK_OK);
  721. break;
  722. case SEC_STATE_CHECK_OK:
  723. break;
  724. default:
  725. fgStatus = FALSE;
  726. break;
  727. }
  728. if (prSecInfo->eCurrentState != eNextState)
  729. secFsmSteps(prAdapter, prSta, eNextState);
  730. return fgStatus;
  731. } /* end of secFsmRunEventPTKInstalled() */
  732. /*----------------------------------------------------------------------------*/
  733. /*!
  734. * \brief This function will indicate an Event of "Counter Measure" to SEC FSM.
  735. *
  736. * \param[in] prSta Pointer to the Sta record
  737. *
  738. * \return -
  739. */
  740. /*----------------------------------------------------------------------------*/
  741. VOID secFsmEventStartCounterMeasure(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prSta)
  742. {
  743. P_SEC_INFO_T prSecInfo;
  744. ENUM_SEC_STATE_T eNextState;
  745. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  746. DEBUGFUNC("secFsmRunEventStartCounterMeasure");
  747. ASSERT(prSta);
  748. if (!IS_STA_IN_AIS(prSta)) {
  749. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  750. /* ASSERT(0); */
  751. return;
  752. }
  753. prSecInfo = &prSta->rSecInfo;
  754. eNextState = prSecInfo->eCurrentState;
  755. #if DBG
  756. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n", MAC2STR(prSta->aucMacAddr),
  757. apucDebugSecState[prSecInfo->eCurrentState]);
  758. #else
  759. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prSta->aucMacAddr),
  760. prSecInfo->eCurrentState);
  761. #endif
  762. prAdapter->rWifiVar.rAisSpecificBssInfo.u4RsnaLastMICFailTime = 0;
  763. switch (prSecInfo->eCurrentState) {
  764. case SEC_STATE_CHECK_OK:
  765. {
  766. prAdapter->rWifiVar.rAisSpecificBssInfo.fgCounterMeasure = TRUE;
  767. /* <Todo> dls port control */
  768. SEC_STATE_TRANSITION(prAdapter, prSta, CHECK_OK, SEND_EAPOL);
  769. }
  770. break;
  771. default:
  772. break;
  773. }
  774. /* Call arbFsmSteps() when we are going to change ARB STATE */
  775. if (prSecInfo->eCurrentState != eNextState)
  776. secFsmSteps(prAdapter, prSta, eNextState);
  777. return;
  778. } /* secFsmRunEventStartCounterMeasure */
  779. /*----------------------------------------------------------------------------*/
  780. /*!
  781. * \brief This function will indicate an Event of "802.1x EAPoL Tx Done" to Sec FSM.
  782. *
  783. * \param[in] prSta Pointer to the Sta record
  784. *
  785. * \return -
  786. */
  787. /*----------------------------------------------------------------------------*/
  788. VOID
  789. secFsmEventEapolTxDone(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec, IN ENUM_TX_RESULT_CODE_T rTxDoneStatus)
  790. {
  791. P_SEC_INFO_T prSecInfo;
  792. ENUM_SEC_STATE_T eNextState;
  793. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  794. P_AIS_SPECIFIC_BSS_INFO_T prAisBssInfo;
  795. DEBUGFUNC("secFsmRunEventEapolTxDone");
  796. ASSERT(prStaRec);
  797. if (rTxDoneStatus != TX_RESULT_SUCCESS) {
  798. DBGLOG(RSN, INFO, "Error EAPoL fram fail to send!!\n");
  799. /* ASSERT(0); */
  800. return;
  801. }
  802. if (!IS_STA_IN_AIS(prStaRec)) {
  803. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  804. /* ASSERT(0); */
  805. return;
  806. }
  807. prAisBssInfo = &prAdapter->rWifiVar.rAisSpecificBssInfo;
  808. ASSERT(prAisBssInfo);
  809. prSecInfo = &prStaRec->rSecInfo;
  810. eNextState = prSecInfo->eCurrentState;
  811. #if DBG
  812. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n", MAC2STR(prStaRec->aucMacAddr),
  813. apucDebugSecState[prSecInfo->eCurrentState]);
  814. #else
  815. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prStaRec->aucMacAddr),
  816. prSecInfo->eCurrentState);
  817. #endif
  818. switch (prSecInfo->eCurrentState) {
  819. case SEC_STATE_SEND_EAPOL:
  820. if (prAisBssInfo->fgCheckEAPoLTxDone == FALSE)
  821. ASSERT(0);
  822. prAisBssInfo->fgCheckEAPoLTxDone = FALSE;
  823. /* cnmTimerStopTimer(prAdapter, &prAisBssInfo->rRsnaEAPoLReportTimeoutTimer); */
  824. SEC_STATE_TRANSITION(prAdapter, prStaRec, SEND_EAPOL, SEND_DEAUTH);
  825. break;
  826. default:
  827. break;
  828. }
  829. if (prSecInfo->eCurrentState != eNextState)
  830. secFsmSteps(prAdapter, prStaRec, eNextState);
  831. return;
  832. } /* secFsmRunEventEapolTxDone */
  833. /*----------------------------------------------------------------------------*/
  834. /*!
  835. * \brief This function will indicate an Event of "Deauth frame Tx Done" to Sec FSM.
  836. *
  837. * \param[in] pMsduInfo Pointer to the Msdu Info
  838. * \param[in] rStatus The Tx done status
  839. *
  840. * \return -
  841. *
  842. * \note after receive deauth frame, callback function call this
  843. */
  844. /*----------------------------------------------------------------------------*/
  845. VOID
  846. secFsmEventDeauthTxDone(IN P_ADAPTER_T prAdapter, IN P_MSDU_INFO_T prMsduInfo, IN ENUM_TX_RESULT_CODE_T rTxDoneStatus)
  847. {
  848. P_STA_RECORD_T prStaRec;
  849. P_SEC_INFO_T prSecInfo;
  850. ENUM_SEC_STATE_T eNextState;
  851. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  852. DEBUGFUNC("secFsmRunEventDeauthTxDone");
  853. ASSERT(prMsduInfo);
  854. prStaRec = cnmGetStaRecByIndex(prAdapter, prMsduInfo->ucStaRecIndex);
  855. ASSERT(prStaRec);
  856. if (!prStaRec)
  857. return;
  858. if (!IS_STA_IN_AIS(prStaRec)) {
  859. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  860. /* ASSERT(0); */
  861. return;
  862. }
  863. prSecInfo = (P_SEC_INFO_T) &prStaRec->rSecInfo;
  864. #if DBG
  865. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n", MAC2STR(prStaRec->aucMacAddr),
  866. apucDebugSecState[prSecInfo->eCurrentState]);
  867. #else
  868. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prStaRec->aucMacAddr),
  869. prSecInfo->eCurrentState);
  870. #endif
  871. switch (prSecInfo->eCurrentState) {
  872. case SEC_STATE_SEND_DEAUTH:
  873. DBGLOG(RSN, TRACE, "Set timer %d\n", COUNTER_MEASURE_TIMEOUT_INTERVAL_SEC);
  874. SEC_STATE_TRANSITION(prAdapter, prStaRec, SEND_DEAUTH, COUNTERMEASURE);
  875. break;
  876. default:
  877. ASSERT(0);
  878. break;
  879. }
  880. } /* secFsmRunEventDeauthTxDone */
  881. /*----------------------------------------------------------------------------*/
  882. /*!
  883. * \brief This function will check the eapol error frame fail to send issue.
  884. *
  885. * \param[in] prSta Pointer to the Sta record
  886. *
  887. * \return -
  888. */
  889. /*----------------------------------------------------------------------------*/
  890. VOID secFsmEventEapolTxTimeout(IN P_ADAPTER_T prAdapter, IN ULONG ulParamPtr)
  891. {
  892. P_STA_RECORD_T prStaRec;
  893. DEBUGFUNC("secFsmRunEventEapolTxTimeout");
  894. prStaRec = (P_STA_RECORD_T) ulParamPtr;
  895. ASSERT(prStaRec);
  896. /* Todo:: How to handle the Eapol Error fail to send case? */
  897. ASSERT(0);
  898. } /* secFsmEventEapolTxTimeout */
  899. /*----------------------------------------------------------------------------*/
  900. /*!
  901. * \brief This function will stop the counterMeasure duration.
  902. *
  903. * \param[in] prSta Pointer to the Sta record
  904. *
  905. * \return -
  906. */
  907. /*----------------------------------------------------------------------------*/
  908. VOID secFsmEventEndOfCounterMeasure(IN P_ADAPTER_T prAdapter, ULONG ulParamPtr)
  909. {
  910. P_STA_RECORD_T prSta;
  911. P_SEC_INFO_T prSecInfo;
  912. ENUM_SEC_STATE_T eNextState;
  913. BOOLEAN fgIsTransition = (BOOLEAN) FALSE;
  914. DEBUGFUNC("secFsmRunEventEndOfCounterMeasure");
  915. prSta = (P_STA_RECORD_T) ulParamPtr;
  916. ASSERT(prSta);
  917. if (!IS_STA_IN_AIS(prSta)) {
  918. DBGLOG(RSN, INFO, "Counter Measure should occur at AIS network!!\n");
  919. /* ASSERT(0); */
  920. return;
  921. }
  922. prSecInfo = &prSta->rSecInfo;
  923. eNextState = prSecInfo->eCurrentState;
  924. #if DBG
  925. DBGLOG(RSN, TRACE, MACSTR " Sec state %s\n", MAC2STR(prSta->aucMacAddr),
  926. apucDebugSecState[prSecInfo->eCurrentState]);
  927. #else
  928. DBGLOG(RSN, TRACE, MACSTR " Sec state [%d]\n", MAC2STR(prSta->aucMacAddr),
  929. prSecInfo->eCurrentState);
  930. #endif
  931. switch (prSecInfo->eCurrentState) {
  932. case SEC_STATE_SEND_DEAUTH:
  933. {
  934. prAdapter->rWifiVar.rAisSpecificBssInfo.fgCounterMeasure = FALSE;
  935. SEC_STATE_TRANSITION(prAdapter, prSta, COUNTERMEASURE, INIT);
  936. }
  937. break;
  938. default:
  939. ASSERT(0);
  940. }
  941. /* Call arbFsmSteps() when we are going to change ARB STATE */
  942. if (prSecInfo->eCurrentState != eNextState)
  943. secFsmSteps(prAdapter, prSta, eNextState);
  944. } /* end of secFsmRunEventEndOfCounterMeasure */