1 /* 2 * connInfra.h 3 * 4 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 11 * * Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * * Neither the name Texas Instruments nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34 /** \file connInfra.h 35 * \brief Infra connection header file 36 * 37 * \see connInfra.c 38 */ 39 40 /***************************************************************************/ 41 /* */ 42 /* MODULE: infraConn.h */ 43 /* PURPOSE: Infrastructure connection header file */ 44 /* */ 45 /***************************************************************************/ 46 #ifndef __CONN_INFRA_H__ 47 #define __CONN_INFRA_H__ 48 49 #include "tidef.h" 50 #include "paramOut.h" 51 #include "conn.h" 52 53 /* Infra connection SM events */ 54 typedef enum 55 { 56 CONN_INFRA_CONNECT = 0, 57 CONN_INFRA_SCR_SUCC , 58 CONN_INFRA_JOIN_CMD_CMPLT , 59 CONN_INFRA_DISCONNECT , 60 CONN_INFRA_MLME_SUCC , 61 CONN_INFRA_RSN_SUCC , 62 CONN_INFRA_HW_CONFIGURED , 63 CONN_INFRA_DISCONN_COMPLETE , 64 CONN_INFRA_NUM_EVENTS 65 } connInfraEvent_e; 66 67 /* Infra connection states */ 68 typedef enum 69 { 70 STATE_CONN_INFRA_IDLE = 0, 71 STATE_CONN_INFRA_SCR_WAIT_CONN = 1, 72 STATE_CONN_INFRA_WAIT_JOIN_CMPLT = 2, 73 STATE_CONN_INFRA_MLME_WAIT = 3, 74 STATE_CONN_INFRA_RSN_WAIT = 4, 75 STATE_CONN_INFRA_CONFIG_HW = 5, 76 STATE_CONN_INFRA_CONNECTED = 6, 77 STATE_CONN_INFRA_SCR_WAIT_DISCONN = 7, 78 STATE_CONN_INFRA_WAIT_DISCONNECT = 8, 79 CONN_INFRA_NUM_STATES 80 } infra_state_e; 81 82 TI_STATUS conn_infraConfig(conn_t *pConn); 83 84 TI_STATUS conn_infraSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn); 85 86 TI_STATUS connInfra_JoinCmpltNotification(TI_HANDLE hconn); 87 88 void connInfra_DisconnectComplete (conn_t *pConn, TI_UINT8 *data, TI_UINT8 dataLength); 89 90 #endif /* __CONN_INFRA_H__ */ 91