Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved. |
| 3 | * |
| 4 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 5 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 6 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 7 | * more details. |
| 8 | * |
| 9 | * You should have received a copy of the GNU General Public License along with |
| 10 | * this program; if not, write to the Free Software Foundation, Inc., |
| 11 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA |
| 12 | * |
| 13 | * The full GNU General Public License is included in this distribution in the |
| 14 | * file called LICENSE. |
| 15 | * |
| 16 | * Contact Information: |
| 17 | * wlanfae <wlanfae@realtek.com> |
| 18 | ******************************************************************************/ |
| 19 | #ifndef __INC_QOS_TYPE_H |
| 20 | #define __INC_QOS_TYPE_H |
| 21 | |
| 22 | #include "rtllib_endianfree.h" |
| 23 | |
| 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 |
| 56 | |
Larry Finger | 42c53e7 | 2011-07-19 10:24:09 -0500 | [diff] [blame] | 57 | union qos_tsinfo { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 58 | u8 charData[3]; |
| 59 | struct { |
| 60 | u8 ucTrafficType:1; |
| 61 | u8 ucTSID:4; |
| 62 | u8 ucDirection:2; |
| 63 | u8 ucAccessPolicy:2; |
| 64 | u8 ucAggregation:1; |
| 65 | u8 ucPSB:1; |
| 66 | u8 ucUP:3; |
| 67 | u8 ucTSInfoAckPolicy:2; |
| 68 | u8 ucSchedule:1; |
| 69 | u8 ucReserved:7; |
| 70 | }field; |
Larry Finger | 42c53e7 | 2011-07-19 10:24:09 -0500 | [diff] [blame] | 71 | }; |
| 72 | |
Larry Finger | ed306e4 | 2011-07-19 10:25:55 -0500 | [diff] [blame] | 73 | union tspec_body { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 74 | u8 charData[55]; |
| 75 | |
| 76 | struct |
| 77 | { |
Larry Finger | 42c53e7 | 2011-07-19 10:24:09 -0500 | [diff] [blame] | 78 | union qos_tsinfo TSInfo; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 79 | u16 NominalMSDUsize; |
| 80 | u16 MaxMSDUsize; |
| 81 | u32 MinServiceItv; |
| 82 | u32 MaxServiceItv; |
| 83 | u32 InactivityItv; |
| 84 | u32 SuspenItv; |
| 85 | u32 ServiceStartTime; |
| 86 | u32 MinDataRate; |
| 87 | u32 MeanDataRate; |
| 88 | u32 PeakDataRate; |
| 89 | u32 MaxBurstSize; |
| 90 | u32 DelayBound; |
| 91 | u32 MinPhyRate; |
| 92 | u16 SurplusBandwidthAllowance; |
| 93 | u16 MediumTime; |
| 94 | } f; |
Larry Finger | ed306e4 | 2011-07-19 10:25:55 -0500 | [diff] [blame] | 95 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 96 | |
Larry Finger | 95ce5fc | 2011-07-18 21:55:05 -0500 | [diff] [blame] | 97 | struct wmm_tspec { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 98 | u8 ID; |
| 99 | u8 Length; |
| 100 | u8 OUI[3]; |
| 101 | u8 OUI_Type; |
| 102 | u8 OUI_SubType; |
| 103 | u8 Version; |
Larry Finger | ed306e4 | 2011-07-19 10:25:55 -0500 | [diff] [blame] | 104 | union tspec_body Body; |
Larry Finger | 95ce5fc | 2011-07-18 21:55:05 -0500 | [diff] [blame] | 105 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 106 | |
Larry Finger | 8310b6c0 | 2011-07-18 21:57:13 -0500 | [diff] [blame] | 107 | struct octet_string { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 108 | u8 *Octet; |
| 109 | u16 Length; |
Larry Finger | d3b2c17 | 2011-07-19 12:50:41 -0500 | [diff] [blame] | 110 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 111 | #define MAX_WMMELE_LENGTH 64 |
| 112 | |
Larry Finger | 9de9f96 | 2011-07-19 21:17:25 -0500 | [diff] [blame^] | 113 | #define QOS_MODE u32 |
| 114 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 115 | #define QOS_DISABLE 0 |
| 116 | #define QOS_WMM 1 |
| 117 | #define QOS_WMMSA 2 |
| 118 | #define QOS_EDCA 4 |
| 119 | #define QOS_HCCA 8 |
| 120 | #define QOS_WMM_UAPSD 16 |
| 121 | |
| 122 | #define WMM_PARAM_ELE_BODY_LEN 18 |
| 123 | |
| 124 | #define MAX_STA_TS_COUNT 16 |
| 125 | #define MAX_AP_TS_COUNT 32 |
| 126 | #define QOS_TSTREAM_KEY_SIZE 13 |
| 127 | |
| 128 | #define WMM_ACTION_CATEGORY_CODE 17 |
| 129 | #define WMM_PARAM_ELE_BODY_LEN 18 |
| 130 | |
| 131 | #define MAX_TSPEC_TSID 15 |
| 132 | #define SESSION_REJECT_TSID 0xfe |
| 133 | #define DEFAULT_TSID 0xff |
| 134 | |
| 135 | #define ADDTS_TIME_SLOT 100 |
| 136 | |
| 137 | #define ACM_TIMEOUT 1000 |
| 138 | #define SESSION_REJECT_TIMEOUT 60000 |
| 139 | |
Larry Finger | 4164e4d | 2011-07-19 19:24:06 -0500 | [diff] [blame] | 140 | enum ack_policy { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 141 | eAckPlc0_ACK = 0x00, |
| 142 | eAckPlc1_NoACK = 0x01, |
Larry Finger | 4164e4d | 2011-07-19 19:24:06 -0500 | [diff] [blame] | 143 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 144 | |
| 145 | |
| 146 | #define SET_WMM_QOS_INFO_FIELD(_pStart, _val) WriteEF1Byte(_pStart, _val) |
| 147 | |
| 148 | #define GET_WMM_QOS_INFO_FIELD_PARAMETERSET_COUNT(_pStart) LE_BITS_TO_1BYTE(_pStart, 0, 4) |
| 149 | #define SET_WMM_QOS_INFO_FIELD_PARAMETERSET_COUNT(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 0, 4, _val) |
| 150 | |
| 151 | #define GET_WMM_QOS_INFO_FIELD_AP_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 7, 1) |
| 152 | #define SET_WMM_QOS_INFO_FIELD_AP_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 7, 1, _val) |
| 153 | |
| 154 | #define GET_WMM_QOS_INFO_FIELD_STA_AC_VO_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 0, 1) |
| 155 | #define SET_WMM_QOS_INFO_FIELD_STA_AC_VO_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 0, 1, _val) |
| 156 | |
| 157 | #define GET_WMM_QOS_INFO_FIELD_STA_AC_VI_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 1, 1) |
| 158 | #define SET_WMM_QOS_INFO_FIELD_STA_AC_VI_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 1, 1, _val) |
| 159 | |
| 160 | #define GET_WMM_QOS_INFO_FIELD_STA_AC_BE_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 2, 1) |
| 161 | #define SET_WMM_QOS_INFO_FIELD_STA_AC_BE_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 2, 1, _val) |
| 162 | |
| 163 | #define GET_WMM_QOS_INFO_FIELD_STA_AC_BK_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 3, 1) |
| 164 | #define SET_WMM_QOS_INFO_FIELD_STA_AC_BK_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 3, 1, _val) |
| 165 | |
| 166 | #define GET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(_pStart) LE_BITS_TO_1BYTE(_pStart, 5, 2) |
| 167 | #define SET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 5, 2, _val) |
| 168 | |
Larry Finger | f58a1cd | 2011-07-19 19:27:05 -0500 | [diff] [blame] | 169 | enum qos_ie_source { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 170 | QOSIE_SRC_ADDTSREQ, |
| 171 | QOSIE_SRC_ADDTSRSP, |
| 172 | QOSIE_SRC_REASOCREQ, |
| 173 | QOSIE_SRC_REASOCRSP, |
| 174 | QOSIE_SRC_DELTS, |
Larry Finger | f58a1cd | 2011-07-19 19:27:05 -0500 | [diff] [blame] | 175 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 176 | |
| 177 | |
Larry Finger | 9de9f96 | 2011-07-19 21:17:25 -0500 | [diff] [blame^] | 178 | #define AC_CODING u32 |
| 179 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 180 | #define AC0_BE 0 |
| 181 | #define AC1_BK 1 |
| 182 | #define AC2_VI 2 |
| 183 | #define AC3_VO 3 |
| 184 | #define AC_MAX 4 |
| 185 | |
| 186 | |
| 187 | #define AC_PARAM_SIZE 4 |
| 188 | |
| 189 | #define GET_WMM_AC_PARAM_AIFSN(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 0, 4) ) |
| 190 | #define SET_WMM_AC_PARAM_AIFSN(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 0, 4, _val) |
| 191 | |
| 192 | #define GET_WMM_AC_PARAM_ACM(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 4, 1) ) |
| 193 | #define SET_WMM_AC_PARAM_ACM(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 4, 1, _val) |
| 194 | |
| 195 | #define GET_WMM_AC_PARAM_ACI(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 5, 2) ) |
| 196 | #define SET_WMM_AC_PARAM_ACI(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 5, 2, _val) |
| 197 | |
| 198 | #define GET_WMM_AC_PARAM_ACI_AIFSN(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 0, 8) ) |
| 199 | #define SET_WMM_AC_PARAM_ACI_AIFSN(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 0, 8, _val) |
| 200 | |
| 201 | #define GET_WMM_AC_PARAM_ECWMIN(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 8, 4) ) |
| 202 | #define SET_WMM_AC_PARAM_ECWMIN(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 8, 4, _val) |
| 203 | |
| 204 | #define GET_WMM_AC_PARAM_ECWMAX(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 12, 4) ) |
| 205 | #define SET_WMM_AC_PARAM_ECWMAX(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 12, 4, _val) |
| 206 | |
| 207 | #define GET_WMM_AC_PARAM_TXOP_LIMIT(_pStart) ( (u8)LE_BITS_TO_4BYTE(_pStart, 16, 16) ) |
| 208 | #define SET_WMM_AC_PARAM_TXOP_LIMIT(_pStart, _val) SET_BITS_TO_LE_4BYTE(_pStart, 16, 16, _val) |
| 209 | |
| 210 | |
| 211 | |
| 212 | #define WMM_PARAM_ELEMENT_SIZE (8+(4*AC_PARAM_SIZE)) |
| 213 | |
Larry Finger | f58a1cd | 2011-07-19 19:27:05 -0500 | [diff] [blame] | 214 | enum qos_ele_subtype { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 215 | QOSELE_TYPE_INFO = 0x00, |
| 216 | QOSELE_TYPE_PARAM = 0x01, |
Larry Finger | f58a1cd | 2011-07-19 19:27:05 -0500 | [diff] [blame] | 217 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 218 | |
| 219 | |
Larry Finger | f12dfcb | 2011-07-19 19:28:39 -0500 | [diff] [blame] | 220 | enum direction_value { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 221 | DIR_UP = 0, |
| 222 | DIR_DOWN = 1, |
| 223 | DIR_DIRECT = 2, |
| 224 | DIR_BI_DIR = 3, |
Larry Finger | f12dfcb | 2011-07-19 19:28:39 -0500 | [diff] [blame] | 225 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 226 | |
Larry Finger | 379a20f | 2011-07-19 19:30:04 -0500 | [diff] [blame] | 227 | enum acm_method { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 228 | eAcmWay0_SwAndHw = 0, |
| 229 | eAcmWay1_HW = 1, |
| 230 | eAcmWay2_SW = 2, |
Larry Finger | 379a20f | 2011-07-19 19:30:04 -0500 | [diff] [blame] | 231 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 232 | |
| 233 | |
Larry Finger | b0d7de7 | 2011-07-18 22:21:17 -0500 | [diff] [blame] | 234 | struct acm { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 235 | u64 UsedTime; |
| 236 | u64 MediumTime; |
| 237 | u8 HwAcmCtl; |
Larry Finger | d3b2c17 | 2011-07-19 12:50:41 -0500 | [diff] [blame] | 238 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 239 | |
| 240 | |
| 241 | |
Larry Finger | 9de9f96 | 2011-07-19 21:17:25 -0500 | [diff] [blame^] | 242 | #define AC_UAPSD u8 |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 243 | |
| 244 | #define GET_VO_UAPSD(_apsd) ((_apsd) & BIT0) |
| 245 | #define SET_VO_UAPSD(_apsd) ((_apsd) |= BIT0) |
| 246 | |
| 247 | #define GET_VI_UAPSD(_apsd) ((_apsd) & BIT1) |
| 248 | #define SET_VI_UAPSD(_apsd) ((_apsd) |= BIT1) |
| 249 | |
| 250 | #define GET_BK_UAPSD(_apsd) ((_apsd) & BIT2) |
| 251 | #define SET_BK_UAPSD(_apsd) ((_apsd) |= BIT2) |
| 252 | |
| 253 | #define GET_BE_UAPSD(_apsd) ((_apsd) & BIT3) |
| 254 | #define SET_BE_UAPSD(_apsd) ((_apsd) |= BIT3) |
| 255 | |
Larry Finger | 626f951 | 2011-07-19 10:27:46 -0500 | [diff] [blame] | 256 | union qos_tclas { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 257 | |
| 258 | struct _TYPE_GENERAL{ |
| 259 | u8 Priority; |
| 260 | u8 ClassifierType; |
| 261 | u8 Mask; |
| 262 | } TYPE_GENERAL; |
| 263 | |
| 264 | struct _TYPE0_ETH{ |
| 265 | u8 Priority; |
| 266 | u8 ClassifierType; |
| 267 | u8 Mask; |
| 268 | u8 SrcAddr[6]; |
| 269 | u8 DstAddr[6]; |
| 270 | u16 Type; |
| 271 | } TYPE0_ETH; |
| 272 | |
| 273 | struct _TYPE1_IPV4{ |
| 274 | u8 Priority; |
| 275 | u8 ClassifierType; |
| 276 | u8 Mask; |
| 277 | u8 Version; |
| 278 | u8 SrcIP[4]; |
| 279 | u8 DstIP[4]; |
| 280 | u16 SrcPort; |
| 281 | u16 DstPort; |
| 282 | u8 DSCP; |
| 283 | u8 Protocol; |
| 284 | u8 Reserved; |
| 285 | } TYPE1_IPV4; |
| 286 | |
| 287 | struct _TYPE1_IPV6{ |
| 288 | u8 Priority; |
| 289 | u8 ClassifierType; |
| 290 | u8 Mask; |
| 291 | u8 Version; |
| 292 | u8 SrcIP[16]; |
| 293 | u8 DstIP[16]; |
| 294 | u16 SrcPort; |
| 295 | u16 DstPort; |
| 296 | u8 FlowLabel[3]; |
| 297 | } TYPE1_IPV6; |
| 298 | |
| 299 | struct _TYPE2_8021Q{ |
| 300 | u8 Priority; |
| 301 | u8 ClassifierType; |
| 302 | u8 Mask; |
| 303 | u16 TagType; |
| 304 | } TYPE2_8021Q; |
Larry Finger | 626f951 | 2011-07-19 10:27:46 -0500 | [diff] [blame] | 305 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 306 | |
Larry Finger | 1d2a55f | 2011-07-18 21:58:49 -0500 | [diff] [blame] | 307 | struct qos_tstream { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 308 | |
| 309 | bool bUsed; |
| 310 | u16 MsduLifetime; |
| 311 | bool bEstablishing; |
| 312 | u8 TimeSlotCount; |
| 313 | u8 DialogToken; |
Larry Finger | 95ce5fc | 2011-07-18 21:55:05 -0500 | [diff] [blame] | 314 | struct wmm_tspec TSpec; |
| 315 | struct wmm_tspec OutStandingTSpec; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 316 | u8 NominalPhyRate; |
Larry Finger | 1d2a55f | 2011-07-18 21:58:49 -0500 | [diff] [blame] | 317 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 318 | |
Larry Finger | 0db4279 | 2011-07-18 22:01:50 -0500 | [diff] [blame] | 319 | struct sta_qos { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 320 | u8 WMMIEBuf[MAX_WMMELE_LENGTH]; |
| 321 | u8* WMMIE; |
| 322 | |
| 323 | QOS_MODE QosCapability; |
| 324 | QOS_MODE CurrentQosMode; |
| 325 | |
| 326 | AC_UAPSD b4ac_Uapsd; |
| 327 | AC_UAPSD Curr4acUapsd; |
| 328 | u8 bInServicePeriod; |
| 329 | u8 MaxSPLength; |
| 330 | int NumBcnBeforeTrigger; |
| 331 | |
| 332 | u8 * pWMMInfoEle; |
| 333 | u8 WMMParamEle[WMM_PARAM_ELEMENT_SIZE]; |
| 334 | |
Larry Finger | b0d7de7 | 2011-07-18 22:21:17 -0500 | [diff] [blame] | 335 | struct acm acm[4]; |
Larry Finger | 379a20f | 2011-07-19 19:30:04 -0500 | [diff] [blame] | 336 | enum acm_method AcmMethod; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 337 | |
Larry Finger | 1d2a55f | 2011-07-18 21:58:49 -0500 | [diff] [blame] | 338 | struct qos_tstream StaTsArray[MAX_STA_TS_COUNT]; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 339 | u8 DialogToken; |
Larry Finger | 95ce5fc | 2011-07-18 21:55:05 -0500 | [diff] [blame] | 340 | struct wmm_tspec TSpec; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 341 | |
| 342 | u8 QBssWirelessMode; |
| 343 | |
| 344 | bool bNoAck; |
| 345 | |
| 346 | bool bEnableRxImmBA; |
| 347 | |
Larry Finger | d3b2c17 | 2011-07-19 12:50:41 -0500 | [diff] [blame] | 348 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 349 | |
| 350 | #define QBSS_LOAD_SIZE 5 |
| 351 | #define GET_QBSS_LOAD_STA_COUNT(__pStart) ReadEF2Byte(__pStart) |
| 352 | #define SET_QBSS_LOAD_STA_COUNT(__pStart, __Value) WriteEF2Byte(__pStart, __Value) |
| 353 | #define GET_QBSS_LOAD_CHNL_UTILIZATION(__pStart) ReadEF1Byte((u8*)(__pStart) + 2) |
| 354 | #define SET_QBSS_LOAD_CHNL_UTILIZATION(__pStart, __Value) WriteEF1Byte((u8*)(__pStart) + 2, __Value) |
| 355 | #define GET_QBSS_LOAD_AVAILABLE_CAPACITY(__pStart) ReadEF2Byte((u8*)(__pStart) + 3) |
| 356 | #define SET_QBSS_LOAD_AVAILABLE_CAPACITY(__pStart, __Value) WriteEF2Byte((u8*)(__pStart) + 3, __Value) |
| 357 | |
Larry Finger | 0157d2e | 2011-07-18 20:04:31 -0500 | [diff] [blame] | 358 | struct bss_qos { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 359 | |
| 360 | QOS_MODE bdQoSMode; |
| 361 | u8 bdWMMIEBuf[MAX_WMMELE_LENGTH]; |
Larry Finger | 8310b6c0 | 2011-07-18 21:57:13 -0500 | [diff] [blame] | 362 | struct octet_string bdWMMIE; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 363 | |
Larry Finger | f58a1cd | 2011-07-19 19:27:05 -0500 | [diff] [blame] | 364 | enum qos_ele_subtype EleSubType; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 365 | |
| 366 | u8* pWMMInfoEle; |
| 367 | u8* pWMMParamEle; |
| 368 | |
| 369 | u8 QBssLoad[QBSS_LOAD_SIZE]; |
| 370 | bool bQBssLoadValid; |
Larry Finger | d3b2c17 | 2011-07-19 12:50:41 -0500 | [diff] [blame] | 371 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 372 | |
| 373 | #define sQoSCtlLng 2 |
| 374 | #define QOS_CTRL_LEN(_QosMode) ( (_QosMode > QOS_DISABLE)? sQoSCtlLng : 0 ) |
| 375 | |
| 376 | |
| 377 | #define IsACValid(ac) ( ( ac>=0 && ac<=7 )? true : false ) |
| 378 | |
| 379 | |
Larry Finger | 44a4004 | 2011-07-19 10:29:41 -0500 | [diff] [blame] | 380 | union aci_aifsn { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 381 | u8 charData; |
| 382 | |
| 383 | struct |
| 384 | { |
| 385 | u8 AIFSN:4; |
Larry Finger | b0d7de7 | 2011-07-18 22:21:17 -0500 | [diff] [blame] | 386 | u8 acm:1; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 387 | u8 ACI:2; |
| 388 | u8 Reserved:1; |
| 389 | }f; |
Larry Finger | 44a4004 | 2011-07-19 10:29:41 -0500 | [diff] [blame] | 390 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 391 | |
Larry Finger | a33be1e | 2011-07-19 10:31:43 -0500 | [diff] [blame] | 392 | union ecw { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 393 | u8 charData; |
| 394 | struct |
| 395 | { |
| 396 | u8 ECWmin:4; |
| 397 | u8 ECWmax:4; |
| 398 | }f; |
Larry Finger | a33be1e | 2011-07-19 10:31:43 -0500 | [diff] [blame] | 399 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 400 | |
Larry Finger | eb85e46 | 2011-07-19 10:35:19 -0500 | [diff] [blame] | 401 | union ac_param { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 402 | u32 longData; |
| 403 | u8 charData[4]; |
| 404 | |
| 405 | struct |
| 406 | { |
Larry Finger | 44a4004 | 2011-07-19 10:29:41 -0500 | [diff] [blame] | 407 | union aci_aifsn AciAifsn; |
Larry Finger | a33be1e | 2011-07-19 10:31:43 -0500 | [diff] [blame] | 408 | union ecw Ecw; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 409 | u16 TXOPLimit; |
| 410 | }f; |
Larry Finger | eb85e46 | 2011-07-19 10:35:19 -0500 | [diff] [blame] | 411 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 412 | |
| 413 | #endif |