1 /* 2 * connApi.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 connApi.h 35 * \brief connection module API 36 * 37 * \see conn.c 38 */ 39 40 /***************************************************************************/ 41 /* */ 42 /* MODULE: connApi.h */ 43 /* PURPOSE: connection module API */ 44 /* */ 45 /***************************************************************************/ 46 #ifndef __CONN_API_H__ 47 #define __CONN_API_H__ 48 49 #include "tidef.h" 50 #include "paramOut.h" 51 #include "802_11Defs.h" 52 #include "mlmeApi.h" 53 #include "DrvMainModules.h" 54 55 /* 56 * Connection type enum 57 */ 58 typedef enum 59 { 60 CONN_TYPE_FIRST_CONN = 0, /* Standart 802.11 association */ 61 CONN_TYPE_ROAM /* Perform roaming connection. (Re Association) */ 62 63 } EConnType; 64 65 66 typedef enum 67 { 68 CONN_TYPE_PARAM = 0x01 69 70 } EConnParam; 71 72 73 /* 74 Prototype for connection status announcment, this function is called upon connection 75 lost or connection establishment. 76 */ 77 typedef void (*conn_status_callback_t)( TI_HANDLE hObj, mgmtStatus_e status, TI_UINT32 uStatusCode); 78 79 /* Connection interface functions prototypes */ 80 81 TI_HANDLE conn_create (TI_HANDLE hOs); 82 83 void conn_init (TStadHandlesList *pStadHandles); 84 85 TI_STATUS conn_SetDefaults (TI_HANDLE hConn, connInitParams_t *pConnInitParams); 86 87 TI_STATUS conn_unLoad (TI_HANDLE hConn); 88 89 TI_STATUS conn_setParam (TI_HANDLE hConn, paramInfo_t *pParam); 90 91 TI_STATUS conn_getParam (TI_HANDLE hConn, paramInfo_t *pParam); 92 93 TI_STATUS conn_start(TI_HANDLE hConn, 94 EConnType connType, 95 conn_status_callback_t pConnStatusCB, 96 TI_HANDLE connStatCbObj, 97 TI_BOOL disConEraseKeys, 98 TI_BOOL reNegotiateTspec); 99 100 void connInfraJoinCmdCmpltNotification(TI_HANDLE CB_handle); 101 102 TI_STATUS conn_stop (TI_HANDLE hConn, 103 DisconnectType_e disConnType, 104 mgmtStatus_e reason, 105 TI_BOOL disConEraseKeys, 106 conn_status_callback_t pConnStatusCB, 107 TI_HANDLE connStatCbObj ); 108 109 void conn_timeout (TI_HANDLE hConn, TI_BOOL bTwdInitOccured); 110 111 TI_STATUS conn_ibssStaJoined (TI_HANDLE hConn); 112 TI_STATUS conn_ibssMerge (TI_HANDLE hConn); 113 114 TI_STATUS conn_reportMlmeStatus(TI_HANDLE hConn, 115 mgmtStatus_e status, 116 TI_UINT16 uStatusCode); 117 118 TI_STATUS conn_reportRsnStatus(TI_HANDLE hConn, 119 mgmtStatus_e status); 120 121 #ifdef REPORT_LOG 122 void conn_ibssPrintStatistics (TI_HANDLE hConn); 123 #endif /*TI_DBG*/ 124 125 #endif /* __CONN_API_H__ */ 126