root/drivers/staging/rtl8192e/rtl819x_Qos.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /*
   3  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
   4  *
   5  * Contact Information: wlanfae <wlanfae@realtek.com>
   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 enum acm_method {
 101         eAcmWay0_SwAndHw                = 0,
 102         eAcmWay1_HW                     = 1,
 103         eAcmWay2_SW                     = 2,
 104 };
 105 
 106 
 107 struct acm {
 108         u64             UsedTime;
 109         u64             MediumTime;
 110         u8              HwAcmCtl;
 111 };
 112 
 113 union qos_tclas {
 114 
 115         struct _TYPE_GENERAL {
 116                 u8              Priority;
 117                 u8              ClassifierType;
 118                 u8              Mask;
 119         } TYPE_GENERAL;
 120 
 121         struct _TYPE0_ETH {
 122                 u8              Priority;
 123                 u8              ClassifierType;
 124                 u8              Mask;
 125                 u8              SrcAddr[ETH_ALEN];
 126                 u8              DstAddr[ETH_ALEN];
 127                 u16             Type;
 128         } TYPE0_ETH;
 129 
 130         struct _TYPE1_IPV4 {
 131                 u8              Priority;
 132                 u8              ClassifierType;
 133                 u8              Mask;
 134                 u8              Version;
 135                 u8              SrcIP[4];
 136                 u8              DstIP[4];
 137                 u16             SrcPort;
 138                 u16             DstPort;
 139                 u8              DSCP;
 140                 u8              Protocol;
 141                 u8              Reserved;
 142         } TYPE1_IPV4;
 143 
 144         struct _TYPE1_IPV6 {
 145                 u8              Priority;
 146                 u8              ClassifierType;
 147                 u8              Mask;
 148                 u8              Version;
 149                 u8              SrcIP[16];
 150                 u8              DstIP[16];
 151                 u16             SrcPort;
 152                 u16             DstPort;
 153                 u8              FlowLabel[3];
 154         } TYPE1_IPV6;
 155 
 156         struct _TYPE2_8021Q {
 157                 u8              Priority;
 158                 u8              ClassifierType;
 159                 u8              Mask;
 160                 u16             TagType;
 161         } TYPE2_8021Q;
 162 };
 163 
 164 union aci_aifsn {
 165         u8      charData;
 166 
 167         struct {
 168                 u8      AIFSN:4;
 169                 u8      acm:1;
 170                 u8      ACI:2;
 171                 u8      Reserved:1;
 172         } f;
 173 };
 174 
 175 #endif

/* [<][>][^][v][top][bottom][index][help] */