1 /** \file assocSm.h 2 * \brief 802.11 authentication SM 3 * 4 * \see assocSm.c 5 */ 6 7 /**************************************************************************** 8 **+-----------------------------------------------------------------------+** 9 **| |** 10 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 11 **| All rights reserved. |** 12 **| |** 13 **| Redistribution and use in source and binary forms, with or without |** 14 **| modification, are permitted provided that the following conditions |** 15 **| are met: |** 16 **| |** 17 **| * Redistributions of source code must retain the above copyright |** 18 **| notice, this list of conditions and the following disclaimer. |** 19 **| * Redistributions in binary form must reproduce the above copyright |** 20 **| notice, this list of conditions and the following disclaimer in |** 21 **| the documentation and/or other materials provided with the |** 22 **| distribution. |** 23 **| * Neither the name Texas Instruments nor the names of its |** 24 **| contributors may be used to endorse or promote products derived |** 25 **| from this software without specific prior written permission. |** 26 **| |** 27 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 28 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 29 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 30 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 31 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 32 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 33 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 34 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 35 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 36 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 37 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 38 **| |** 39 **+-----------------------------------------------------------------------+** 40 ****************************************************************************/ 41 42 /***************************************************************************/ 43 /* */ 44 /* MODULE: assocSm.h */ 45 /* PURPOSE: 802.11 authentication SM */ 46 /* */ 47 /***************************************************************************/ 48 49 #ifndef _OPEN_AUTH_SM_H 50 #define _OPEN_AUTH_SM_H 51 52 #include "fsm.h" 53 #include "mlmeApi.h" 54 #include "../authSm.h" 55 56 /* Constants */ 57 58 /* Enumerations */ 59 60 /* state machine states */ 61 typedef enum 62 { 63 OPEN_AUTH_SM_STATE_IDLE = 0, 64 OPEN_AUTH_SM_STATE_WAIT = 1, 65 OPEN_AUTH_SM_STATE_AUTH = 2 66 } openAuth_smStates_t; 67 68 /* State machine inputs */ 69 typedef enum 70 { 71 OPEN_AUTH_SM_EVENT_START = 0, 72 OPEN_AUTH_SM_EVENT_STOP = 1, 73 OPEN_AUTH_SM_EVENT_SUCCESS = 2, 74 OPEN_AUTH_SM_EVENT_FAIL = 3, 75 OPEN_AUTH_SM_EVENT_TIMEOUT = 4, 76 OPEN_AUTH_SM_EVENT_MAX_RETRY = 5 77 } openAuth_smEvents_t; 78 79 /* Typedefs */ 80 81 /* Structures */ 82 83 /* External data definitions */ 84 85 /* External functions definitions */ 86 87 /* Function prototypes */ 88 89 TI_STATUS openAuth_Config(TI_HANDLE hAuth, 90 TI_HANDLE pOs); 91 92 TI_STATUS openAuth_Recv(TI_HANDLE pAssoc, mlmeFrameInfo_t *pFrame); 93 94 TI_STATUS openAuth_Timeout(auth_t *pAuth); 95 96 TI_STATUS auth_osSMEvent(UINT8 *currentState, UINT8 event, TI_HANDLE hAuth); 97 98 /* state machine functions */ 99 100 TI_STATUS openAuth_smStartIdle(auth_t *hAuth); 101 TI_STATUS openAuth_smStopWait(auth_t *hAuth); 102 TI_STATUS openAuth_smSuccessWait(auth_t *hAuth); 103 TI_STATUS openAuth_smFailureWait(auth_t *hAuth); 104 TI_STATUS openAuth_smTimeoutWait(auth_t *hAuth); 105 TI_STATUS openAuth_smMaxRetryWait(auth_t *hAuth); 106 TI_STATUS openAuth_smStopAuth(auth_t *hAuth); 107 TI_STATUS openAuth_smActionUnexpected(auth_t *hAuth); 108 109 TI_STATUS openAuth_smResetRetry(auth_t *hAuth); 110 TI_STATUS openAuth_smIncRetry(auth_t *hAuth); 111 TI_STATUS openAuth_smReportSuccess(auth_t *hAuth); 112 TI_STATUS openAuth_smReportFailure(auth_t *hAuth); 113 TI_STATUS openAuth_smSendAuthReq(auth_t *hAuth); 114 TI_STATUS openAuth_smStartTimer(auth_t *hAuth); 115 TI_STATUS openAuth_smStopTimer(auth_t *hAuth); 116 117 #endif 118 119