]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blame - drivers/staging/rtl8192e/rtl819x_Qos.h
Merge tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[mirror_ubuntu-eoan-kernel.git] / drivers / staging / rtl8192e / rtl819x_Qos.h
CommitLineData
94a79942
LF
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
f88ec6cb
LF
22#define BIT0 0x00000001
23#define BIT1 0x00000002
24#define BIT2 0x00000004
25#define BIT3 0x00000008
26#define BIT4 0x00000010
27#define BIT5 0x00000020
28#define BIT6 0x00000040
29#define BIT7 0x00000080
30#define BIT8 0x00000100
31#define BIT9 0x00000200
32#define BIT10 0x00000400
33#define BIT11 0x00000800
34#define BIT12 0x00001000
35#define BIT13 0x00002000
36#define BIT14 0x00004000
37#define BIT15 0x00008000
38#define BIT16 0x00010000
39#define BIT17 0x00020000
40#define BIT18 0x00040000
41#define BIT19 0x00080000
42#define BIT20 0x00100000
43#define BIT21 0x00200000
44#define BIT22 0x00400000
45#define BIT23 0x00800000
46#define BIT24 0x01000000
47#define BIT25 0x02000000
48#define BIT26 0x04000000
49#define BIT27 0x08000000
50#define BIT28 0x10000000
51#define BIT29 0x20000000
52#define BIT30 0x40000000
53#define BIT31 0x80000000
94a79942 54
42c53e7a 55union qos_tsinfo {
94a79942
LF
56 u8 charData[3];
57 struct {
58 u8 ucTrafficType:1;
59 u8 ucTSID:4;
60 u8 ucDirection:2;
61 u8 ucAccessPolicy:2;
62 u8 ucAggregation:1;
63 u8 ucPSB:1;
64 u8 ucUP:3;
65 u8 ucTSInfoAckPolicy:2;
66 u8 ucSchedule:1;
67 u8 ucReserved:7;
f88ec6cb 68 } field;
42c53e7a
LF
69};
70
ed306e48 71union tspec_body {
94a79942
LF
72 u8 charData[55];
73
f88ec6cb 74 struct {
42c53e7a 75 union qos_tsinfo TSInfo;
94a79942
LF
76 u16 NominalMSDUsize;
77 u16 MaxMSDUsize;
78 u32 MinServiceItv;
79 u32 MaxServiceItv;
80 u32 InactivityItv;
81 u32 SuspenItv;
82 u32 ServiceStartTime;
83 u32 MinDataRate;
84 u32 MeanDataRate;
85 u32 PeakDataRate;
86 u32 MaxBurstSize;
87 u32 DelayBound;
88 u32 MinPhyRate;
89 u16 SurplusBandwidthAllowance;
90 u16 MediumTime;
91 } f;
ed306e48 92};
94a79942 93
8310b6c0 94struct octet_string {
f88ec6cb
LF
95 u8 *Octet;
96 u16 Length;
d3b2c172 97};
f88ec6cb 98
94a79942
LF
99#define AC0_BE 0
100#define AC1_BK 1
101#define AC2_VI 2
102#define AC3_VO 3
103#define AC_MAX 4
104
f12dfcb0 105enum direction_value {
94a79942
LF
106 DIR_UP = 0,
107 DIR_DOWN = 1,
108 DIR_DIRECT = 2,
109 DIR_BI_DIR = 3,
f12dfcb0 110};
94a79942 111
379a20fb 112enum acm_method {
94a79942
LF
113 eAcmWay0_SwAndHw = 0,
114 eAcmWay1_HW = 1,
115 eAcmWay2_SW = 2,
379a20fb 116};
94a79942
LF
117
118
b0d7de73 119struct acm {
94a79942
LF
120 u64 UsedTime;
121 u64 MediumTime;
122 u8 HwAcmCtl;
d3b2c172 123};
94a79942 124
626f951d 125union qos_tclas {
94a79942 126
f88ec6cb 127 struct _TYPE_GENERAL {
94a79942
LF
128 u8 Priority;
129 u8 ClassifierType;
130 u8 Mask;
131 } TYPE_GENERAL;
132
f88ec6cb 133 struct _TYPE0_ETH {
94a79942
LF
134 u8 Priority;
135 u8 ClassifierType;
136 u8 Mask;
06c11107
MK
137 u8 SrcAddr[ETH_ALEN];
138 u8 DstAddr[ETH_ALEN];
94a79942
LF
139 u16 Type;
140 } TYPE0_ETH;
141
f88ec6cb 142 struct _TYPE1_IPV4 {
94a79942
LF
143 u8 Priority;
144 u8 ClassifierType;
145 u8 Mask;
146 u8 Version;
147 u8 SrcIP[4];
148 u8 DstIP[4];
149 u16 SrcPort;
150 u16 DstPort;
151 u8 DSCP;
152 u8 Protocol;
153 u8 Reserved;
154 } TYPE1_IPV4;
155
f88ec6cb 156 struct _TYPE1_IPV6 {
94a79942
LF
157 u8 Priority;
158 u8 ClassifierType;
159 u8 Mask;
160 u8 Version;
161 u8 SrcIP[16];
162 u8 DstIP[16];
163 u16 SrcPort;
164 u16 DstPort;
165 u8 FlowLabel[3];
166 } TYPE1_IPV6;
167
f88ec6cb 168 struct _TYPE2_8021Q {
94a79942
LF
169 u8 Priority;
170 u8 ClassifierType;
171 u8 Mask;
172 u16 TagType;
173 } TYPE2_8021Q;
626f951d 174};
94a79942 175
f88ec6cb 176#define IsACValid(ac) ((ac >= 0 && ac <= 7) ? true : false)
94a79942
LF
177
178
44a40046 179union aci_aifsn {
94a79942
LF
180 u8 charData;
181
f88ec6cb 182 struct {
94a79942 183 u8 AIFSN:4;
b0d7de73 184 u8 acm:1;
94a79942
LF
185 u8 ACI:2;
186 u8 Reserved:1;
f88ec6cb 187 } f;
44a40046 188};
94a79942 189
94a79942 190#endif