|
1 /* |
|
2 * tiQosTypes.h |
|
3 * |
|
4 * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved. |
|
5 * All rights reserved. |
|
6 * |
|
7 * This program and the accompanying materials are made available under the |
|
8 * terms of the Eclipse Public License v1.0 or BSD License which accompanies |
|
9 * this distribution. The Eclipse Public License is available at |
|
10 * http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below. |
|
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 /* Module: tiQosTypes.h*/ |
|
42 /**/ |
|
43 /* Purpose: */ |
|
44 /**/ |
|
45 /*--------------------------------------------------------------------------*/ |
|
46 |
|
47 #ifndef TI_QOS_TYPES_H |
|
48 #define TI_QOS_TYPES_H |
|
49 |
|
50 |
|
51 #include "TWDriver.h" |
|
52 |
|
53 /* |
|
54 * This enum defines the protocol modes of the QOS management object |
|
55 */ |
|
56 typedef enum |
|
57 { |
|
58 QOS_WME, |
|
59 QOS_NONE |
|
60 |
|
61 } EQosProtocol; |
|
62 |
|
63 |
|
64 /* |
|
65 * This enum includes the header converting modes configured to dataCtrl object. |
|
66 */ |
|
67 typedef enum |
|
68 { |
|
69 HDR_CONVERT_NONE, |
|
70 HDR_CONVERT_QOS, |
|
71 HDR_CONVERT_LEGACY |
|
72 |
|
73 } EHeaderConvertMode; |
|
74 |
|
75 |
|
76 typedef enum |
|
77 { |
|
78 QOS_AC_BE = 0, |
|
79 QOS_AC_BK, |
|
80 QOS_AC_VI, |
|
81 QOS_AC_VO, |
|
82 QOS_HIGHEST_AC_INDEX = QOS_AC_VO |
|
83 |
|
84 } EAcTrfcType; |
|
85 |
|
86 |
|
87 #define FIRST_AC_INDEX QOS_AC_BE |
|
88 #define AC_PARAMS_MAX_TSID 15 |
|
89 #define MAX_APSD_CONF 0xffff |
|
90 |
|
91 |
|
92 typedef enum |
|
93 { |
|
94 DROP_NEW_PACKET = 0, |
|
95 DROP_OLD_PACKET |
|
96 |
|
97 } EQOverflowPolicy; |
|
98 |
|
99 |
|
100 typedef enum |
|
101 { |
|
102 AC_NOT_ADMITTED, |
|
103 AC_WAIT_ADMISSION, |
|
104 AC_ADMITTED |
|
105 |
|
106 } ETrafficAdmState; |
|
107 |
|
108 |
|
109 /* |
|
110 * This enum defines the admission state configured to dataCtrl object. |
|
111 */ |
|
112 typedef enum |
|
113 { |
|
114 ADMISSION_NOT_REQUIRED, |
|
115 ADMISSION_REQUIRED |
|
116 |
|
117 } EAdmissionState; |
|
118 |
|
119 |
|
120 typedef struct |
|
121 { |
|
122 /* Power save mode */ |
|
123 TI_UINT8 PsMode; |
|
124 TI_UINT16 TxQueueSize; |
|
125 TI_UINT8 QueueIndex; |
|
126 EQOverflowPolicy QueueOvFlowPolicy; |
|
127 TI_UINT8 ackPolicy; |
|
128 TI_UINT32 MsduLifeTime; |
|
129 |
|
130 } TAcTrfcCtrl; |
|
131 |
|
132 typedef struct |
|
133 { |
|
134 /* header converting mode */ |
|
135 EHeaderConvertMode headerConverMode; |
|
136 /* flag for converting zero tags */ |
|
137 TI_BOOL convertTagZeroFrames; |
|
138 /* AC admission state */ |
|
139 ETrafficAdmState admissionState; |
|
140 /* AC admission is mandatory */ |
|
141 EAdmissionState admissionRequired; |
|
142 /* Tag to AC classification */ |
|
143 EAcTrfcType tag_ToAcClsfrTable[MAX_NUM_OF_802_1d_TAGS]; |
|
144 |
|
145 } TQosParams; |
|
146 |
|
147 |
|
148 typedef struct |
|
149 { |
|
150 TAcTrfcCtrl acTrfcCtrl; |
|
151 TQosParams qosParams; |
|
152 TI_UINT8 *tsrsArr; |
|
153 TI_UINT8 tsrsArrLen; |
|
154 TI_UINT8 acID; |
|
155 |
|
156 } TTxDataQosParams; |
|
157 |
|
158 |
|
159 typedef struct _OS_802_11_QOS_PARAMS |
|
160 { |
|
161 TI_UINT32 acID; |
|
162 TI_UINT32 MaxLifeTime; |
|
163 TI_UINT32 PSDeliveryProtocol; |
|
164 TI_UINT32 VoiceDeliveryProtocol; |
|
165 |
|
166 } OS_802_11_QOS_PARAMS; |
|
167 |
|
168 |
|
169 typedef struct |
|
170 { |
|
171 TI_UINT32 psPoll; |
|
172 TI_UINT32 UPSD; |
|
173 |
|
174 } OS_802_11_QOS_RX_TIMEOUT_PARAMS; |
|
175 |
|
176 |
|
177 typedef struct _OS_802_11_AC_QOS_PARAMS |
|
178 { |
|
179 TI_UINT32 uAC; |
|
180 TI_UINT32 uAssocAdmissionCtrlFlag; |
|
181 TI_UINT32 uAIFS; |
|
182 TI_UINT32 uCwMin; |
|
183 TI_UINT32 uCwMax; |
|
184 TI_UINT32 uTXOPLimit; |
|
185 |
|
186 } OS_802_11_AC_QOS_PARAMS; |
|
187 |
|
188 |
|
189 typedef struct _OS_802_11_AP_QOS_CAPABILITIES_PARAMS |
|
190 { |
|
191 TI_UINT32 uQOSFlag; |
|
192 TI_UINT32 uAPSDFlag; |
|
193 |
|
194 } OS_802_11_AP_QOS_CAPABILITIES_PARAMS; |
|
195 |
|
196 |
|
197 typedef struct _OS_802_11_QOS_TSPEC_PARAMS |
|
198 { |
|
199 TI_UINT32 uUserPriority; |
|
200 TI_UINT32 uNominalMSDUsize; /* in bytes */ |
|
201 TI_UINT32 uMeanDataRate; /* bits per second */ |
|
202 TI_UINT32 uMinimumPHYRate; /* 1,2,5,6,9,11,12,18,......*/ |
|
203 TI_UINT32 uSurplusBandwidthAllowance; |
|
204 TI_UINT32 uAPSDFlag; |
|
205 TI_UINT32 uMediumTime; |
|
206 TI_UINT32 uReasonCode; |
|
207 |
|
208 } OS_802_11_QOS_TSPEC_PARAMS; |
|
209 |
|
210 |
|
211 typedef struct _OS_802_11_QOS_DELETE_TSPEC_PARAMS |
|
212 { |
|
213 TI_UINT32 uUserPriority; |
|
214 TI_UINT32 uReasonCode; |
|
215 } OS_802_11_QOS_DELETE_TSPEC_PARAMS; |
|
216 |
|
217 |
|
218 typedef struct _OS_802_11_QOS_DESIRED_PS_MODE |
|
219 { |
|
220 TI_UINT32 uDesiredPsMode; |
|
221 TI_UINT32 uDesiredWmeAcPsMode[QOS_HIGHEST_AC_INDEX + 1]; |
|
222 |
|
223 } OS_802_11_QOS_DESIRED_PS_MODE; |
|
224 |
|
225 |
|
226 /* When this value is added to reason code in TSPEC events, it indicates a TSPEC response which was unexpected at the time */ |
|
227 /* For example, a TSPEC response arrives after a TSPEC timeout */ |
|
228 #define TSPEC_RESPONSE_UNEXPECTED 0x1000 |
|
229 |
|
230 |
|
231 typedef enum |
|
232 { |
|
233 ADDTS_RESPONSE_ACCEPT = 0, |
|
234 /* ADDTS_RESPONSE_REJECT, - according to the standard*/ |
|
235 ADDTS_RESPONSE_AP_PARAM_INVALID = 253, |
|
236 ADDTS_RESPONSE_TIMEOUT = 254, |
|
237 TSPEC_DELETED_BY_AP = 255 |
|
238 |
|
239 } ETspecStatus; |
|
240 |
|
241 |
|
242 typedef struct _OS_802_11_AC_UPSD_STATUS_PARAMS |
|
243 { |
|
244 TI_UINT32 uAC; |
|
245 TI_UINT32 uCurrentUAPSDStatus; |
|
246 TI_UINT32 pCurrentAdmissionStatus; |
|
247 |
|
248 } OS_802_11_AC_UPSD_STATUS_PARAMS; |
|
249 |
|
250 |
|
251 typedef struct _OS_802_11_THRESHOLD_CROSS_PARAMS |
|
252 { |
|
253 TI_UINT32 uAC; |
|
254 TI_UINT32 uHighThreshold; |
|
255 TI_UINT32 uLowThreshold; |
|
256 |
|
257 } OS_802_11_THRESHOLD_CROSS_PARAMS; |
|
258 |
|
259 |
|
260 typedef struct OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS |
|
261 { |
|
262 TI_UINT32 uAC; |
|
263 TI_UINT32 uHighOrLowThresholdFlag; /* According to thresholdCross_e enum */ |
|
264 TI_UINT32 uAboveOrBelowFlag; /* According to thresholdCrossDirection_e enum */ |
|
265 |
|
266 } OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS; |
|
267 |
|
268 |
|
269 typedef enum |
|
270 { |
|
271 HIGH_THRESHOLD_CROSS, |
|
272 LOW_THRESHOLD_CROSS |
|
273 |
|
274 } EThresholdCross; |
|
275 |
|
276 |
|
277 typedef enum |
|
278 { |
|
279 CROSS_ABOVE, |
|
280 CROSS_BELOW |
|
281 |
|
282 } EThresholdCrossDirection; |
|
283 |
|
284 |
|
285 typedef struct |
|
286 { |
|
287 TI_UINT32 dstIpAddress; |
|
288 TI_UINT32 dstPort; |
|
289 TI_UINT32 PktTag; |
|
290 TI_UINT32 userPriority; |
|
291 |
|
292 } TStreamTrafficProperties; |
|
293 |
|
294 |
|
295 typedef enum |
|
296 { |
|
297 UPLINK_DIRECTION = 0, |
|
298 DOWNLINK_DIRECTION = 1, |
|
299 RESERVED_DIRECTION = 2, |
|
300 BI_DIRECTIONAL = 3 |
|
301 |
|
302 } EStreamDirection; |
|
303 |
|
304 |
|
305 /* classification algorithms: |
|
306 0) D-tag to D-tag |
|
307 1) DSCP to D-tag |
|
308 2) Destination port number to D-tag |
|
309 3) Destination IP&Port to D-tag |
|
310 */ |
|
311 typedef enum |
|
312 { |
|
313 D_TAG_CLSFR = 0, |
|
314 DSCP_CLSFR = 1, |
|
315 PORT_CLSFR = 2, |
|
316 IPPORT_CLSFR = 3, |
|
317 CLSFR_MAX_TYPE = IPPORT_CLSFR |
|
318 |
|
319 } EClsfrType; |
|
320 |
|
321 |
|
322 |
|
323 /*************************/ |
|
324 /* classifier params */ |
|
325 /*************************/ |
|
326 |
|
327 /* Destination IP address and port number */ |
|
328 typedef struct |
|
329 { |
|
330 TI_UINT32 DstIPAddress; |
|
331 TI_UINT16 DstPortNum; |
|
332 |
|
333 } TIpPort; |
|
334 |
|
335 /* Classification mapping table */ |
|
336 typedef struct |
|
337 { |
|
338 union |
|
339 { |
|
340 TIpPort DstIPPort; /* for destination IP&Port classifier*/ |
|
341 TI_UINT16 DstPortNum; /* for destination Port classifier*/ |
|
342 TI_UINT8 CodePoint; /* for DSCP classifier*/ |
|
343 } Dscp; |
|
344 |
|
345 TI_UINT8 DTag; |
|
346 |
|
347 } TClsfrTableEntry; |
|
348 |
|
349 /* number of classifier entries in the classification table */ |
|
350 #define NUM_OF_CLSFR_TABLE_ENTRIES 16 |
|
351 |
|
352 typedef struct |
|
353 { |
|
354 EClsfrType eClsfrType; /* The type of the classifier: D-tag, DSCP, Port or IP&Port */ |
|
355 TI_UINT32 uNumActiveEntries; /* The number of active entries in the classification table */ |
|
356 TClsfrTableEntry ClsfrTable[NUM_OF_CLSFR_TABLE_ENTRIES]; /* Classification table - size changed from 15 to 16*/ |
|
357 |
|
358 } TClsfrParams; |
|
359 |
|
360 typedef struct{ |
|
361 TI_UINT8 voiceTspecConfigure; |
|
362 TI_UINT8 videoTspecConfigure; |
|
363 }TSpecConfigure; |
|
364 |
|
365 #endif /* TI_QOS_TYPES_H */ |
|
366 |