Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _LINUX_ETHTOOL_H
     20 #define _LINUX_ETHTOOL_H
     21 #include <linux/types.h>
     22 struct ethtool_cmd {
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24  __u32 cmd;
     25  __u32 supported;
     26  __u32 advertising;
     27  __u16 speed;
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29  __u8 duplex;
     30  __u8 port;
     31  __u8 phy_address;
     32  __u8 transceiver;
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34  __u8 autoneg;
     35  __u32 maxtxpkt;
     36  __u32 maxrxpkt;
     37  __u16 speed_hi;
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39  __u16 reserved2;
     40  __u32 reserved[3];
     41 };
     42 #define ETHTOOL_BUSINFO_LEN 32
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 struct ethtool_drvinfo {
     45  __u32 cmd;
     46  char driver[32];
     47  char version[32];
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49  char fw_version[32];
     50  char bus_info[ETHTOOL_BUSINFO_LEN];
     51  char reserved1[32];
     52  char reserved2[12];
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54  __u32 n_priv_flags;
     55  __u32 n_stats;
     56  __u32 testinfo_len;
     57  __u32 eedump_len;
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59  __u32 regdump_len;
     60 };
     61 #define SOPASS_MAX 6
     62 struct ethtool_wolinfo {
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64  __u32 cmd;
     65  __u32 supported;
     66  __u32 wolopts;
     67  __u8 sopass[SOPASS_MAX];
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69 };
     70 struct ethtool_value {
     71  __u32 cmd;
     72  __u32 data;
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 };
     75 struct ethtool_regs {
     76  __u32 cmd;
     77  __u32 version;
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79  __u32 len;
     80  __u8 data[0];
     81 };
     82 struct ethtool_eeprom {
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84  __u32 cmd;
     85  __u32 magic;
     86  __u32 offset;
     87  __u32 len;
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89  __u8 data[0];
     90 };
     91 struct ethtool_coalesce {
     92  __u32 cmd;
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94  __u32 rx_coalesce_usecs;
     95  __u32 rx_max_coalesced_frames;
     96  __u32 rx_coalesce_usecs_irq;
     97  __u32 rx_max_coalesced_frames_irq;
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99  __u32 tx_coalesce_usecs;
    100  __u32 tx_max_coalesced_frames;
    101  __u32 tx_coalesce_usecs_irq;
    102  __u32 tx_max_coalesced_frames_irq;
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104  __u32 stats_block_coalesce_usecs;
    105  __u32 use_adaptive_rx_coalesce;
    106  __u32 use_adaptive_tx_coalesce;
    107  __u32 pkt_rate_low;
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109  __u32 rx_coalesce_usecs_low;
    110  __u32 rx_max_coalesced_frames_low;
    111  __u32 tx_coalesce_usecs_low;
    112  __u32 tx_max_coalesced_frames_low;
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114  __u32 pkt_rate_high;
    115  __u32 rx_coalesce_usecs_high;
    116  __u32 rx_max_coalesced_frames_high;
    117  __u32 tx_coalesce_usecs_high;
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119  __u32 tx_max_coalesced_frames_high;
    120  __u32 rate_sample_interval;
    121 };
    122 struct ethtool_ringparam {
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124  __u32 cmd;
    125  __u32 rx_max_pending;
    126  __u32 rx_mini_max_pending;
    127  __u32 rx_jumbo_max_pending;
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129  __u32 tx_max_pending;
    130  __u32 rx_pending;
    131  __u32 rx_mini_pending;
    132  __u32 rx_jumbo_pending;
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134  __u32 tx_pending;
    135 };
    136 struct ethtool_pauseparam {
    137  __u32 cmd;
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139  __u32 autoneg;
    140  __u32 rx_pause;
    141  __u32 tx_pause;
    142 };
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144 #define ETH_GSTRING_LEN 32
    145 enum ethtool_stringset {
    146  ETH_SS_TEST = 0,
    147  ETH_SS_STATS,
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149  ETH_SS_PRIV_FLAGS,
    150 };
    151 struct ethtool_gstrings {
    152  __u32 cmd;
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154  __u32 string_set;
    155  __u32 len;
    156  __u8 data[0];
    157 };
    158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    159 enum ethtool_test_flags {
    160  ETH_TEST_FL_OFFLINE = (1 << 0),
    161  ETH_TEST_FL_FAILED = (1 << 1),
    162 };
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164 struct ethtool_test {
    165  __u32 cmd;
    166  __u32 flags;
    167  __u32 reserved;
    168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    169  __u32 len;
    170  __u64 data[0];
    171 };
    172 struct ethtool_stats {
    173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    174  __u32 cmd;
    175  __u32 n_stats;
    176  __u64 data[0];
    177 };
    178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    179 struct ethtool_perm_addr {
    180  __u32 cmd;
    181  __u32 size;
    182  __u8 data[0];
    183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    184 };
    185 enum ethtool_flags {
    186  ETH_FLAG_LRO = (1 << 15),
    187 };
    188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    189 struct ethtool_rxnfc {
    190  __u32 cmd;
    191  __u32 flow_type;
    192  __u64 data;
    193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    194 };
    195 #define ETHTOOL_GSET 0x00000001
    196 #define ETHTOOL_SSET 0x00000002
    197 #define ETHTOOL_GDRVINFO 0x00000003
    198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    199 #define ETHTOOL_GREGS 0x00000004
    200 #define ETHTOOL_GWOL 0x00000005
    201 #define ETHTOOL_SWOL 0x00000006
    202 #define ETHTOOL_GMSGLVL 0x00000007
    203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    204 #define ETHTOOL_SMSGLVL 0x00000008
    205 #define ETHTOOL_NWAY_RST 0x00000009
    206 #define ETHTOOL_GLINK 0x0000000a
    207 #define ETHTOOL_GEEPROM 0x0000000b
    208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    209 #define ETHTOOL_SEEPROM 0x0000000c
    210 #define ETHTOOL_GCOALESCE 0x0000000e
    211 #define ETHTOOL_SCOALESCE 0x0000000f
    212 #define ETHTOOL_GRINGPARAM 0x00000010
    213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    214 #define ETHTOOL_SRINGPARAM 0x00000011
    215 #define ETHTOOL_GPAUSEPARAM 0x00000012
    216 #define ETHTOOL_SPAUSEPARAM 0x00000013
    217 #define ETHTOOL_GRXCSUM 0x00000014
    218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    219 #define ETHTOOL_SRXCSUM 0x00000015
    220 #define ETHTOOL_GTXCSUM 0x00000016
    221 #define ETHTOOL_STXCSUM 0x00000017
    222 #define ETHTOOL_GSG 0x00000018
    223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    224 #define ETHTOOL_SSG 0x00000019
    225 #define ETHTOOL_TEST 0x0000001a
    226 #define ETHTOOL_GSTRINGS 0x0000001b
    227 #define ETHTOOL_PHYS_ID 0x0000001c
    228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    229 #define ETHTOOL_GSTATS 0x0000001d
    230 #define ETHTOOL_GTSO 0x0000001e
    231 #define ETHTOOL_STSO 0x0000001f
    232 #define ETHTOOL_GPERMADDR 0x00000020
    233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    234 #define ETHTOOL_GUFO 0x00000021
    235 #define ETHTOOL_SUFO 0x00000022
    236 #define ETHTOOL_GGSO 0x00000023
    237 #define ETHTOOL_SGSO 0x00000024
    238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    239 #define ETHTOOL_GFLAGS 0x00000025
    240 #define ETHTOOL_SFLAGS 0x00000026
    241 #define ETHTOOL_GPFLAGS 0x00000027
    242 #define ETHTOOL_SPFLAGS 0x00000028
    243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    244 #define ETHTOOL_GRXFH 0x00000029
    245 #define ETHTOOL_SRXFH 0x0000002a
    246 #define ETHTOOL_GGRO 0x0000002b
    247 #define ETHTOOL_SGRO 0x0000002c
    248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    249 #define SPARC_ETH_GSET ETHTOOL_GSET
    250 #define SPARC_ETH_SSET ETHTOOL_SSET
    251 #define SUPPORTED_10baseT_Half (1 << 0)
    252 #define SUPPORTED_10baseT_Full (1 << 1)
    253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    254 #define SUPPORTED_100baseT_Half (1 << 2)
    255 #define SUPPORTED_100baseT_Full (1 << 3)
    256 #define SUPPORTED_1000baseT_Half (1 << 4)
    257 #define SUPPORTED_1000baseT_Full (1 << 5)
    258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    259 #define SUPPORTED_Autoneg (1 << 6)
    260 #define SUPPORTED_TP (1 << 7)
    261 #define SUPPORTED_AUI (1 << 8)
    262 #define SUPPORTED_MII (1 << 9)
    263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    264 #define SUPPORTED_FIBRE (1 << 10)
    265 #define SUPPORTED_BNC (1 << 11)
    266 #define SUPPORTED_10000baseT_Full (1 << 12)
    267 #define SUPPORTED_Pause (1 << 13)
    268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    269 #define SUPPORTED_Asym_Pause (1 << 14)
    270 #define SUPPORTED_2500baseX_Full (1 << 15)
    271 #define ADVERTISED_10baseT_Half (1 << 0)
    272 #define ADVERTISED_10baseT_Full (1 << 1)
    273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    274 #define ADVERTISED_100baseT_Half (1 << 2)
    275 #define ADVERTISED_100baseT_Full (1 << 3)
    276 #define ADVERTISED_1000baseT_Half (1 << 4)
    277 #define ADVERTISED_1000baseT_Full (1 << 5)
    278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    279 #define ADVERTISED_Autoneg (1 << 6)
    280 #define ADVERTISED_TP (1 << 7)
    281 #define ADVERTISED_AUI (1 << 8)
    282 #define ADVERTISED_MII (1 << 9)
    283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    284 #define ADVERTISED_FIBRE (1 << 10)
    285 #define ADVERTISED_BNC (1 << 11)
    286 #define ADVERTISED_10000baseT_Full (1 << 12)
    287 #define ADVERTISED_Pause (1 << 13)
    288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    289 #define ADVERTISED_Asym_Pause (1 << 14)
    290 #define ADVERTISED_2500baseX_Full (1 << 15)
    291 #define SPEED_10 10
    292 #define SPEED_100 100
    293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    294 #define SPEED_1000 1000
    295 #define SPEED_2500 2500
    296 #define SPEED_10000 10000
    297 #define DUPLEX_HALF 0x00
    298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    299 #define DUPLEX_FULL 0x01
    300 #define PORT_TP 0x00
    301 #define PORT_AUI 0x01
    302 #define PORT_MII 0x02
    303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    304 #define PORT_FIBRE 0x03
    305 #define PORT_BNC 0x04
    306 #define XCVR_INTERNAL 0x00
    307 #define XCVR_EXTERNAL 0x01
    308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    309 #define XCVR_DUMMY1 0x02
    310 #define XCVR_DUMMY2 0x03
    311 #define XCVR_DUMMY3 0x04
    312 #define AUTONEG_DISABLE 0x00
    313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    314 #define AUTONEG_ENABLE 0x01
    315 #define WAKE_PHY (1 << 0)
    316 #define WAKE_UCAST (1 << 1)
    317 #define WAKE_MCAST (1 << 2)
    318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    319 #define WAKE_BCAST (1 << 3)
    320 #define WAKE_ARP (1 << 4)
    321 #define WAKE_MAGIC (1 << 5)
    322 #define WAKE_MAGICSECURE (1 << 6)
    323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    324 #define TCP_V4_FLOW 0x01
    325 #define UDP_V4_FLOW 0x02
    326 #define SCTP_V4_FLOW 0x03
    327 #define AH_ESP_V4_FLOW 0x04
    328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    329 #define TCP_V6_FLOW 0x05
    330 #define UDP_V6_FLOW 0x06
    331 #define SCTP_V6_FLOW 0x07
    332 #define AH_ESP_V6_FLOW 0x08
    333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    334 #define RXH_DEV_PORT (1 << 0)
    335 #define RXH_L2DA (1 << 1)
    336 #define RXH_VLAN (1 << 2)
    337 #define RXH_L3_PROTO (1 << 3)
    338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    339 #define RXH_IP_SRC (1 << 4)
    340 #define RXH_IP_DST (1 << 5)
    341 #define RXH_L4_B_0_1 (1 << 6)
    342 #define RXH_L4_B_2_3 (1 << 7)
    343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    344 #define RXH_DISCARD (1 << 31)
    345 #endif
    346