1 /** \file smeSmApi.h 2 * \brief SME SM module API 3 * 4 * \see smeSmApi.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: smeSmApi.h */ 44 /* PURPOSE: SME SM API */ 45 /* */ 46 /***************************************************************************/ 47 #ifndef __SME_SM_API_H__ 48 #define __SME_SM_API_H__ 49 50 #include "osTIType.h" 51 #include "paramOut.h" 52 #include "paramIn.h" 53 #include "ScanCncnApi.h" 54 55 /* SME SM status definitions */ 56 57 typedef enum 58 { 59 CONN_STATUS_SUCCESS = 0, 60 CONN_STATUS_FAILURE = 1, 61 CONN_STATUS_RECONNECTING = 2, 62 } connStatus_e; 63 64 typedef enum 65 { 66 SELECT_STATUS_SUCCESS = 0, 67 SELECT_STATUS_FAILURE = 1, 68 } selectStatus_t; 69 70 /* SME SM interface functions prototypes */ 71 72 /************************************************************ 73 Function: smeSm_create 74 Description: 75 ************************************************************/ 76 TI_HANDLE smeSm_create(TI_HANDLE hOs); 77 78 /************************************************************ 79 Function: smeSm_config 80 Description: 81 ************************************************************/ 82 TI_STATUS smeSm_config(TI_HANDLE hSmeSm, 83 TI_HANDLE hConn, 84 TI_HANDLE hScanCncn, 85 TI_HANDLE hSiteMgr, 86 TI_HANDLE hHalCtrl, 87 TI_HANDLE hReport, 88 TI_HANDLE hOs, 89 TI_HANDLE hEvHandler, 90 TI_HANDLE hScr, 91 TI_HANDLE hApConn, 92 TI_HANDLE hCurrBss, 93 TI_HANDLE hPowerMgr, 94 TI_HANDLE hRegulatoryDomain, 95 smeInitParams_t* smeInitParams); 96 97 /************************************************************ 98 Function: smeSm_unLoad 99 Description: 100 ************************************************************/ 101 TI_STATUS smeSm_unLoad(TI_HANDLE hSmeSm); 102 103 /************************************************************ 104 Function: smeSm_start 105 Description: Called by configMgr_start 106 ************************************************************/ 107 TI_STATUS smeSm_start(TI_HANDLE hSmeSm); 108 109 110 /************************************************************ 111 Function: smeSm_reselect 112 Description: 113 ************************************************************/ 114 TI_STATUS smeSm_reselect(TI_HANDLE hSmeSm); 115 116 /************************************************************ 117 Function: smeSm_stop 118 Description: 119 ************************************************************/ 120 TI_STATUS smeSm_stop(TI_HANDLE hSmeSm); 121 122 /************************************************************ 123 Function: smeSm_stopAndShutdown 124 Description: 125 ************************************************************/ 126 void smeSm_stopAndShutdown(TI_HANDLE hSmeSm); 127 128 /************************************************************ 129 Function: smeSm_getDriverShutdownStatus 130 Description: 131 ************************************************************/ 132 UINT8 smeSm_getDriverShutdownStatus (TI_HANDLE hSmeSm); 133 134 /************************************************************ 135 Function: smeSm_scanComplete 136 Description: 137 ************************************************************/ 138 void smeSm_scanComplete( TI_HANDLE hSmeSm, scan_cncnResultStatus_e status, 139 scan_frameInfo_t *frameInfo, UINT16 SPSStatus ); 140 141 142 /************************************************************ 143 Function: smeSm_reportConnStatus 144 Description: 145 ************************************************************/ 146 TI_STATUS smeSm_reportConnStatus(TI_HANDLE hSmeSm, 147 mgmtStatus_e status, 148 UINT32 uStatusCode); 149 150 /************************************************************ 151 Function: smeSm_reportSelectStatus 152 Description: 153 ************************************************************/ 154 TI_STATUS smeSm_reportSelectStatus(TI_HANDLE hSmeSm, 155 mgmtStatus_e status); 156 157 158 /************************************************************ 159 Function: smeSm_setParam 160 Description: 161 ************************************************************/ 162 TI_STATUS smeSm_setParam(TI_HANDLE hSmeSm, 163 paramInfo_t *pParam); 164 165 166 /************************************************************ 167 Function: smeSm_getParam 168 Description: 169 ************************************************************/ 170 TI_STATUS smeSm_getParam(TI_HANDLE hSmeSm, 171 paramInfo_t *pParam); 172 173 174 #ifdef TI_DBG 175 /************************************************************ 176 Function: smeSm_dbgPrintObject 177 Description: 178 ************************************************************/ 179 void smeSm_dbgPrintObject( TI_HANDLE hSmeSm ); 180 181 /************************************************************ 182 Function: smeSm_resetStats 183 Description: 184 ************************************************************/ 185 void smeSm_resetStats( TI_HANDLE hSmeSm ); 186 187 /************************************************************ 188 Function: smeSm_printStats 189 Description: 190 ************************************************************/ 191 void smeSm_printStats( TI_HANDLE hSmeSm ); 192 #endif /* TI_DBG */ 193 194 #endif /* __SME_SM_API_H__ */ 195