]> Git Repo - J-linux.git/blob - drivers/staging/rtl8192e/rtl819x_Qos.h
Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux...
[J-linux.git] / drivers / staging / rtl8192e / rtl819x_Qos.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
4  *
5  * Contact Information: wlanfae <[email protected]>
6  */
7 #ifndef __INC_QOS_TYPE_H
8 #define __INC_QOS_TYPE_H
9
10 #define BIT0                0x00000001
11 #define BIT1                0x00000002
12 #define BIT2                0x00000004
13 #define BIT3                0x00000008
14 #define BIT4                0x00000010
15 #define BIT5                0x00000020
16 #define BIT6                0x00000040
17 #define BIT7                0x00000080
18 #define BIT8                0x00000100
19 #define BIT9                0x00000200
20 #define BIT10              0x00000400
21 #define BIT11              0x00000800
22 #define BIT12              0x00001000
23 #define BIT13              0x00002000
24 #define BIT14              0x00004000
25 #define BIT15              0x00008000
26 #define BIT16              0x00010000
27 #define BIT17              0x00020000
28 #define BIT18              0x00040000
29 #define BIT19              0x00080000
30 #define BIT20              0x00100000
31 #define BIT21              0x00200000
32 #define BIT22              0x00400000
33 #define BIT23              0x00800000
34 #define BIT24              0x01000000
35 #define BIT25              0x02000000
36 #define BIT26              0x04000000
37 #define BIT27              0x08000000
38 #define BIT28              0x10000000
39 #define BIT29              0x20000000
40 #define BIT30              0x40000000
41 #define BIT31              0x80000000
42
43 union qos_tsinfo {
44         u8              charData[3];
45         struct {
46                 u8              ucTrafficType:1;
47                 u8              ucTSID:4;
48                 u8              ucDirection:2;
49                 u8              ucAccessPolicy:2;
50                 u8              ucAggregation:1;
51                 u8              ucPSB:1;
52                 u8              ucUP:3;
53                 u8              ucTSInfoAckPolicy:2;
54                 u8              ucSchedule:1;
55                 u8              ucReserved:7;
56         } field;
57 };
58
59 union tspec_body {
60         u8              charData[55];
61
62         struct {
63                 union qos_tsinfo TSInfo;
64                 u16     NominalMSDUsize;
65                 u16     MaxMSDUsize;
66                 u32     MinServiceItv;
67                 u32     MaxServiceItv;
68                 u32     InactivityItv;
69                 u32     SuspenItv;
70                 u32     ServiceStartTime;
71                 u32     MinDataRate;
72                 u32     MeanDataRate;
73                 u32     PeakDataRate;
74                 u32     MaxBurstSize;
75                 u32     DelayBound;
76                 u32     MinPhyRate;
77                 u16     SurplusBandwidthAllowance;
78                 u16     MediumTime;
79         } f;
80 };
81
82 struct octet_string {
83         u8 *Octet;
84         u16 Length;
85 };
86
87 #define AC0_BE  0
88 #define AC1_BK  1
89 #define AC2_VI  2
90 #define AC3_VO  3
91 #define AC_MAX  4
92
93 enum direction_value {
94         DIR_UP                  = 0,
95         DIR_DOWN                = 1,
96         DIR_DIRECT              = 2,
97         DIR_BI_DIR              = 3,
98 };
99
100 struct acm {
101         u64             UsedTime;
102         u64             MediumTime;
103         u8              HwAcmCtl;
104 };
105
106 union qos_tclas {
107
108         struct _TYPE_GENERAL {
109                 u8              Priority;
110                 u8              ClassifierType;
111                 u8              Mask;
112         } TYPE_GENERAL;
113
114         struct _TYPE0_ETH {
115                 u8              Priority;
116                 u8              ClassifierType;
117                 u8              Mask;
118                 u8              SrcAddr[ETH_ALEN];
119                 u8              DstAddr[ETH_ALEN];
120                 u16             Type;
121         } TYPE0_ETH;
122
123         struct _TYPE1_IPV4 {
124                 u8              Priority;
125                 u8              ClassifierType;
126                 u8              Mask;
127                 u8              Version;
128                 u8              SrcIP[4];
129                 u8              DstIP[4];
130                 u16             SrcPort;
131                 u16             DstPort;
132                 u8              DSCP;
133                 u8              Protocol;
134                 u8              Reserved;
135         } TYPE1_IPV4;
136
137         struct _TYPE1_IPV6 {
138                 u8              Priority;
139                 u8              ClassifierType;
140                 u8              Mask;
141                 u8              Version;
142                 u8              SrcIP[16];
143                 u8              DstIP[16];
144                 u16             SrcPort;
145                 u16             DstPort;
146                 u8              FlowLabel[3];
147         } TYPE1_IPV6;
148
149         struct _TYPE2_8021Q {
150                 u8              Priority;
151                 u8              ClassifierType;
152                 u8              Mask;
153                 u16             TagType;
154         } TYPE2_8021Q;
155 };
156
157 union aci_aifsn {
158         u8      charData;
159
160         struct {
161                 u8      AIFSN:4;
162                 u8      acm:1;
163                 u8      ACI:2;
164                 u8      Reserved:1;
165         } f;
166 };
167
168 #endif
This page took 0.041106 seconds and 4 git commands to generate.