Go to the documentation of this file.
19 #ifndef __INC_QOS_TYPE_H
20 #define __INC_QOS_TYPE_H
24 #define BIT0 0x00000001
25 #define BIT1 0x00000002
26 #define BIT2 0x00000004
27 #define BIT3 0x00000008
28 #define BIT4 0x00000010
29 #define BIT5 0x00000020
30 #define BIT6 0x00000040
31 #define BIT7 0x00000080
32 #define BIT8 0x00000100
33 #define BIT9 0x00000200
34 #define BIT10 0x00000400
35 #define BIT11 0x00000800
36 #define BIT12 0x00001000
37 #define BIT13 0x00002000
38 #define BIT14 0x00004000
39 #define BIT15 0x00008000
40 #define BIT16 0x00010000
41 #define BIT17 0x00020000
42 #define BIT18 0x00040000
43 #define BIT19 0x00080000
44 #define BIT20 0x00100000
45 #define BIT21 0x00200000
46 #define BIT22 0x00400000
47 #define BIT23 0x00800000
48 #define BIT24 0x01000000
49 #define BIT25 0x02000000
50 #define BIT26 0x04000000
51 #define BIT27 0x08000000
52 #define BIT28 0x10000000
53 #define BIT29 0x20000000
54 #define BIT30 0x40000000
55 #define BIT31 0x80000000
111 #define MAX_WMMELE_LENGTH 64
115 #define QOS_DISABLE 0
120 #define QOS_WMM_UAPSD 16
122 #define WMM_PARAM_ELE_BODY_LEN 18
124 #define MAX_STA_TS_COUNT 16
125 #define MAX_AP_TS_COUNT 32
126 #define QOS_TSTREAM_KEY_SIZE 13
128 #define WMM_ACTION_CATEGORY_CODE 17
129 #define WMM_PARAM_ELE_BODY_LEN 18
131 #define MAX_TSPEC_TSID 15
132 #define SESSION_REJECT_TSID 0xfe
133 #define DEFAULT_TSID 0xff
135 #define ADDTS_TIME_SLOT 100
137 #define ACM_TIMEOUT 1000
138 #define SESSION_REJECT_TIMEOUT 60000
146 #define SET_WMM_QOS_INFO_FIELD(_pStart, _val) \
147 WriteEF1Byte(_pStart, _val)
149 #define GET_WMM_QOS_INFO_FIELD_PARAMETERSET_COUNT(_pStart) \
150 LE_BITS_TO_1BYTE(_pStart, 0, 4)
151 #define SET_WMM_QOS_INFO_FIELD_PARAMETERSET_COUNT(_pStart, _val) \
152 SET_BITS_TO_LE_1BYTE(_pStart, 0, 4, _val)
154 #define GET_WMM_QOS_INFO_FIELD_AP_UAPSD(_pStart) \
155 LE_BITS_TO_1BYTE(_pStart, 7, 1)
156 #define SET_WMM_QOS_INFO_FIELD_AP_UAPSD(_pStart, _val) \
157 SET_BITS_TO_LE_1BYTE(_pStart, 7, 1, _val)
159 #define GET_WMM_QOS_INFO_FIELD_STA_AC_VO_UAPSD(_pStart) \
160 LE_BITS_TO_1BYTE(_pStart, 0, 1)
161 #define SET_WMM_QOS_INFO_FIELD_STA_AC_VO_UAPSD(_pStart, _val) \
162 SET_BITS_TO_LE_1BYTE(_pStart, 0, 1, _val)
164 #define GET_WMM_QOS_INFO_FIELD_STA_AC_VI_UAPSD(_pStart) \
165 LE_BITS_TO_1BYTE(_pStart, 1, 1)
166 #define SET_WMM_QOS_INFO_FIELD_STA_AC_VI_UAPSD(_pStart, _val) \
167 SET_BITS_TO_LE_1BYTE(_pStart, 1, 1, _val)
169 #define GET_WMM_QOS_INFO_FIELD_STA_AC_BE_UAPSD(_pStart) \
170 LE_BITS_TO_1BYTE(_pStart, 2, 1)
171 #define SET_WMM_QOS_INFO_FIELD_STA_AC_BE_UAPSD(_pStart, _val) \
172 SET_BITS_TO_LE_1BYTE(_pStart, 2, 1, _val)
174 #define GET_WMM_QOS_INFO_FIELD_STA_AC_BK_UAPSD(_pStart) \
175 LE_BITS_TO_1BYTE(_pStart, 3, 1)
176 #define SET_WMM_QOS_INFO_FIELD_STA_AC_BK_UAPSD(_pStart, _val) \
177 SET_BITS_TO_LE_1BYTE(_pStart, 3, 1, _val)
179 #define GET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(_pStart) \
180 LE_BITS_TO_1BYTE(_pStart, 5, 2)
181 #define SET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(_pStart, _val) \
182 SET_BITS_TO_LE_1BYTE(_pStart, 5, 2, _val)
193 #define AC_CODING u32
202 #define AC_PARAM_SIZE 4
204 #define GET_WMM_AC_PARAM_AIFSN(_pStart) \
205 ((u8)LE_BITS_TO_4BYTE(_pStart, 0, 4))
206 #define SET_WMM_AC_PARAM_AIFSN(_pStart, _val) \
207 SET_BITS_TO_LE_4BYTE(_pStart, 0, 4, _val)
209 #define GET_WMM_AC_PARAM_ACM(_pStart) \
210 ((u8)LE_BITS_TO_4BYTE(_pStart, 4, 1))
211 #define SET_WMM_AC_PARAM_ACM(_pStart, _val) \
212 SET_BITS_TO_LE_4BYTE(_pStart, 4, 1, _val)
214 #define GET_WMM_AC_PARAM_ACI(_pStart) \
215 ((u8)LE_BITS_TO_4BYTE(_pStart, 5, 2))
216 #define SET_WMM_AC_PARAM_ACI(_pStart, _val) \
217 SET_BITS_TO_LE_4BYTE(_pStart, 5, 2, _val)
219 #define GET_WMM_AC_PARAM_ACI_AIFSN(_pStart) \
220 ((u8)LE_BITS_TO_4BYTE(_pStart, 0, 8))
221 #define SET_WMM_AC_PARAM_ACI_AIFSN(_pStart, _val) \
222 SET_BITS_TO_LE_4BYTE(_pStart, 0, 8, _val)
224 #define GET_WMM_AC_PARAM_ECWMIN(_pStart) \
225 ((u8)LE_BITS_TO_4BYTE(_pStart, 8, 4))
226 #define SET_WMM_AC_PARAM_ECWMIN(_pStart, _val) \
227 SET_BITS_TO_LE_4BYTE(_pStart, 8, 4, _val)
229 #define GET_WMM_AC_PARAM_ECWMAX(_pStart) \
230 ((u8)LE_BITS_TO_4BYTE(_pStart, 12, 4))
231 #define SET_WMM_AC_PARAM_ECWMAX(_pStart, _val) \
232 SET_BITS_TO_LE_4BYTE(_pStart, 12, 4, _val)
234 #define GET_WMM_AC_PARAM_TXOP_LIMIT(_pStart) \
235 ((u8)LE_BITS_TO_4BYTE(_pStart, 16, 16))
236 #define SET_WMM_AC_PARAM_TXOP_LIMIT(_pStart, _val) \
237 SET_BITS_TO_LE_4BYTE(_pStart, 16, 16, _val)
241 #define WMM_PARAM_ELEMENT_SIZE (8+(4*AC_PARAM_SIZE))
273 #define GET_VO_UAPSD(_apsd) ((_apsd) & BIT0)
274 #define SET_VO_UAPSD(_apsd) ((_apsd) |= BIT0)
276 #define GET_VI_UAPSD(_apsd) ((_apsd) & BIT1)
277 #define SET_VI_UAPSD(_apsd) ((_apsd) |= BIT1)
279 #define GET_BK_UAPSD(_apsd) ((_apsd) & BIT2)
280 #define SET_BK_UAPSD(_apsd) ((_apsd) |= BIT2)
282 #define GET_BE_UAPSD(_apsd) ((_apsd) & BIT3)
283 #define SET_BE_UAPSD(_apsd) ((_apsd) |= BIT3)
379 #define QBSS_LOAD_SIZE 5
380 #define GET_QBSS_LOAD_STA_COUNT(__pStart) \
381 ReadEF2Byte(__pStart)
382 #define SET_QBSS_LOAD_STA_COUNT(__pStart, __Value) \
383 WriteEF2Byte(__pStart, __Value)
384 #define GET_QBSS_LOAD_CHNL_UTILIZATION(__pStart) \
385 ReadEF1Byte((u8 *)(__pStart) + 2)
386 #define SET_QBSS_LOAD_CHNL_UTILIZATION(__pStart, __Value) \
387 WriteEF1Byte((u8 *)(__pStart) + 2, __Value)
388 #define GET_QBSS_LOAD_AVAILABLE_CAPACITY(__pStart) \
389 ReadEF2Byte((u8 *)(__pStart) + 3)
390 #define SET_QBSS_LOAD_AVAILABLE_CAPACITY(__pStart, __Value) \
391 WriteEF2Byte((u8 *)(__pStart) + 3, __Value)
408 #define QOS_CTRL_LEN(_QosMode) ((_QosMode > QOS_DISABLE) ? sQoSCtlLng : 0)
411 #define IsACValid(ac) ((ac >= 0 && ac <= 7) ? true : false)