• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** \file mlmeApi.h
2  *  \brief MLME API
3  *
4  *  \see mlmeSm.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:	mlmeApi.h													*/
44 /*    PURPOSE:	MLME API			 										*/
45 /*																			*/
46 /***************************************************************************/
47 #ifndef __MLME_API_H__
48 #define __MLME_API_H__
49 
50 #include "osTIType.h"
51 
52 #include "paramOut.h"
53 
54 #include "802_11Defs.h"
55 #include "memMngrEx.h"
56 
57 #include "whalBus_Defs.h"
58 
59 /* Constants */
60 
61 /* Enumerations */
62 
63 typedef enum
64 {
65 	MSG_BROADCAST,
66 	MSG_MULTICAST,
67 	MSG_UNICAST
68 } mlmeMsgDestType_t;
69 
70 /*
71  * Disconnecting type enum
72  */
73 typedef enum{
74 	DISCONN_TYPE_IMMEDIATE     = 0,  /* Disconnect without disassociation. */
75 	DISCONN_TYPE_DISASSOC,           /* Send disassocciation frame upon disconnecting */
76 	DISCONN_TYPE_DEAUTH              /* Send disassocciation notification upon disconnecting */
77 }disConnType_e;
78 
79 /* Typedefs */
80 
81 
82 typedef struct
83 {
84 	dot11MgmtSubType_e subType;
85 
86 	union
87 	{
88 		beacon_probeRsp_t iePacket;
89 		disAssoc_t	disAssoc;
90 		assocRsp_t 	assocRsp;
91 		authMsg_t	auth;
92 		deAuth_t	deAuth;
93 		action_t	action;
94 	} content;
95 
96 	union
97 	{
98 		mlmeMsgDestType_t	destType;
99 	} extesion;
100 
101 } mlmeFrameInfo_t;
102 
103 typedef struct
104 {
105 	dot11_SSID_t 		ssid;
106 	macAddress_t        bssid;
107     dot11_CHALLENGE_t   challenge;
108     dot11_RATES_t 		rates;
109     dot11_RATES_t 		extRates;
110     dot11_FH_PARAMS_t 	fhParams;
111     dot11_CF_PARAMS_t 	cfParams;
112 	dot11_DS_PARAMS_t 	dsParams;
113     dot11_IBSS_PARAMS_t ibssParams;
114     dot11_COUNTRY_t 	country;
115     dot11_WME_PARAM_t 	WMEParams;
116     dot11_POWER_CONSTRAINT_t powerConstraint;
117     dot11_4X_t 			fourXParams;
118     dot11_CHANNEL_SWITCH_t channelSwitch;
119     dot11_QUIET_t 		quiet;
120     dot11_TPC_REPORT_t 	TPCReport;
121 #ifdef EXC_MODULE_INCLUDED
122 	dot11_CELL_TP_t		cellTP;
123 #endif
124     dot11_RSN_t 		rsnIe[3];
125 	dot11_TIM_t 		tim;
126 	dot11_QOS_CAPABILITY_IE_t	QosCapParams;
127 	UINT8 				rxChannel;
128 	UINT8 				band;
129 	BOOL 				myBssid;
130 	BOOL				myDst;
131 	BOOL				mySa;
132 	BOOL 				recvChannelSwitchAnnoncIE;
133 	mlmeFrameInfo_t		frame;
134 }mlmeIEParsingParams_t;
135 
136 typedef void (*mlme_resultCB_t)( TI_HANDLE hObj, macAddress_t* bssid, mlmeFrameInfo_t* pFrameInfo,
137                                  Rx_attr_t* pRxAttr, UINT8* frame, UINT16 frameLength );
138 
139 /* External data definitions */
140 
141 /* External functions definitions */
142 
143 /* Function prototypes */
144 
145 /* MLME SM API */
146 
147 TI_HANDLE mlme_create(TI_HANDLE hOs);
148 
149 TI_STATUS mlme_unload(TI_HANDLE hMlme);
150 
151 TI_STATUS mlme_config(TI_HANDLE hMlme,
152 				   TI_HANDLE hAuth,
153 				   TI_HANDLE hAssoc,
154 				   TI_HANDLE hSiteMgr,
155 				   TI_HANDLE hCtrlData,
156 				   TI_HANDLE hConn,
157 				   TI_HANDLE hTxData,
158 				   TI_HANDLE hHalCtrl,
159 				   TI_HANDLE hMemMgr,
160 				   TI_HANDLE hMeasurementMgr,
161 				   TI_HANDLE hSwitchChannel,
162 				   TI_HANDLE hRegulatoryDomain,
163 				   TI_HANDLE hReport,
164 				   TI_HANDLE hOs,
165 				   TI_HANDLE hCurrBss,
166 				   TI_HANDLE hApConn,
167 				   TI_HANDLE hScanCncn,
168 				   TI_HANDLE hQosMngr,
169                    TI_HANDLE hConfigMgr);
170 
171 TI_STATUS mlme_setParam(TI_HANDLE			hMlmeSm,
172 						paramInfo_t			*pParam);
173 
174 TI_STATUS mlme_getParam(TI_HANDLE			hMlmeSm,
175 						paramInfo_t			*pParam);
176 
177 TI_STATUS mlme_start(TI_HANDLE hMlme);
178 
179 TI_STATUS mlme_stop(TI_HANDLE hMlme, disConnType_e disConnType, mgmtStatus_e reason);
180 
181 TI_STATUS mlme_reportAuthStatus(TI_HANDLE hMlme, UINT16 status);
182 
183 TI_STATUS mlme_reportAssocStatus(TI_HANDLE hMlme, UINT16 status);
184 
185 /* MLME parser API */
186 
187 TI_STATUS mlmeParser_recv(TI_HANDLE hMlme, mem_MSDU_T *pMSDU, Rx_attr_t* pRxAttr);
188 
189 TI_STATUS mlmeParser_registerForBeaconAndProbeResp( TI_HANDLE hMlme,
190                                                     mlme_resultCB_t resultCBFunc,
191                                                     TI_HANDLE resultCBObj );
192 
193 void mlmeParser_unregisterForBeaconAndProbeResp( TI_HANDLE hMlme );
194 
195 TI_STATUS mlmeParser_parseIEs(TI_HANDLE *hMlme,
196 							  UINT8 *pData,
197 							  INT32 bodyDataLen,
198 							  mlmeIEParsingParams_t *params);
199 
200 #ifdef EXC_MODULE_INCLUDED
201 void mlmeParser_readExcOui (UINT8 *pData,
202 							UINT32 dataLen,
203 							UINT32 *pReadLen,
204 							EXCv4IEs_t *excIEs);
205 #endif
206 
207 mlmeIEParsingParams_t *mlmeParser_getParseIEsBuffer(TI_HANDLE *hMlme);
208 
209 /* Association SM API */
210 
211 TI_HANDLE assoc_create(TI_HANDLE pOs);
212 
213 TI_STATUS assoc_unload(TI_HANDLE pAssoc);
214 
215 TI_STATUS assoc_config(TI_HANDLE hAssoc,
216 					TI_HANDLE hMlme,
217 					TI_HANDLE hRegulatoryDomain,
218 					TI_HANDLE hSiteMgr,
219 					TI_HANDLE hCtrlData,
220 					TI_HANDLE hTxData,
221 					TI_HANDLE hHalCtrl,
222 					TI_HANDLE hRsn,
223 					TI_HANDLE hReport,
224 					TI_HANDLE hOs,
225 					TI_HANDLE hExcMngr,
226 					TI_HANDLE hQosMngr,
227                     TI_HANDLE hMeasurementMgr,
228 					TI_HANDLE hApConn,
229 					assocInitParams_t	*pAssocInitParams);
230 
231 TI_STATUS assoc_setParam(TI_HANDLE hCtrlData, paramInfo_t	*pParam);
232 
233 TI_STATUS assoc_getParam(TI_HANDLE hCtrlData, paramInfo_t	*pParam);
234 
235 TI_STATUS assoc_getParamPartial(TI_HANDLE hAssoc, paramInfoPartial_t *pParam);
236 
237 /* Authentication SM API */
238 
239 TI_HANDLE auth_create(TI_HANDLE hOs);
240 
241 TI_STATUS auth_unload(TI_HANDLE hAuth);
242 
243 TI_STATUS auth_config(TI_HANDLE	 		hAuth,
244                    TI_HANDLE	 		hMlme,
245 				   TI_HANDLE			hRsn,
246 				   TI_HANDLE	 		hReport,
247 				   TI_HANDLE	 		hOs,
248 				   authInitParams_t		*pAuthInitParams);
249 
250 
251 TI_STATUS auth_setParam(TI_HANDLE hCtrlData, paramInfo_t	*pParam);
252 
253 TI_STATUS auth_getParam(TI_HANDLE hCtrlData, paramInfo_t	*pParam);
254 
255 #endif /* __MLME_API_H__*/
256