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