Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 _UAPI_LINUX_ETHTOOL_H |
| 20 | #define _UAPI_LINUX_ETHTOOL_H |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 21 | #include <linux/kernel.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 22 | #include <linux/types.h> |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 23 | #include <linux/if_ether.h> |
| 24 | #include <limits.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | struct ethtool_cmd { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | __u32 cmd; |
| 27 | __u32 supported; |
| 28 | __u32 advertising; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | __u16 speed; |
| 30 | __u8 duplex; |
| 31 | __u8 port; |
| 32 | __u8 phy_address; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 | __u8 transceiver; |
| 34 | __u8 autoneg; |
| 35 | __u8 mdio_support; |
| 36 | __u32 maxtxpkt; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | __u32 maxrxpkt; |
| 38 | __u16 speed_hi; |
| 39 | __u8 eth_tp_mdix; |
| 40 | __u8 eth_tp_mdix_ctrl; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | __u32 lp_advertising; |
| 42 | __u32 reserved[2]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | }; |
| 44 | #define ETH_MDIO_SUPPORTS_C22 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | #define ETH_MDIO_SUPPORTS_C45 2 |
| 46 | #define ETHTOOL_FWVERS_LEN 32 |
| 47 | #define ETHTOOL_BUSINFO_LEN 32 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 48 | #define ETHTOOL_EROMVERS_LEN 32 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 49 | struct ethtool_drvinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 50 | __u32 cmd; |
| 51 | char driver[32]; |
| 52 | char version[32]; |
| 53 | char fw_version[ETHTOOL_FWVERS_LEN]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | char bus_info[ETHTOOL_BUSINFO_LEN]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 55 | char erom_version[ETHTOOL_EROMVERS_LEN]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | char reserved2[12]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 57 | __u32 n_priv_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 58 | __u32 n_stats; |
| 59 | __u32 testinfo_len; |
| 60 | __u32 eedump_len; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 61 | __u32 regdump_len; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | }; |
| 63 | #define SOPASS_MAX 6 |
| 64 | struct ethtool_wolinfo { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 65 | __u32 cmd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 66 | __u32 supported; |
| 67 | __u32 wolopts; |
| 68 | __u8 sopass[SOPASS_MAX]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 69 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | struct ethtool_value { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __u32 cmd; |
| 72 | __u32 data; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 73 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 74 | #define PFC_STORM_PREVENTION_AUTO 0xffff |
| 75 | #define PFC_STORM_PREVENTION_DISABLE 0 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 76 | enum tunable_id { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 | ETHTOOL_ID_UNSPEC, |
| 78 | ETHTOOL_RX_COPYBREAK, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 79 | ETHTOOL_TX_COPYBREAK, |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 80 | ETHTOOL_PFC_PREVENTION_TOUT, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 81 | __ETHTOOL_TUNABLE_COUNT, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 82 | }; |
| 83 | enum tunable_type_id { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | ETHTOOL_TUNABLE_UNSPEC, |
| 85 | ETHTOOL_TUNABLE_U8, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 86 | ETHTOOL_TUNABLE_U16, |
| 87 | ETHTOOL_TUNABLE_U32, |
| 88 | ETHTOOL_TUNABLE_U64, |
| 89 | ETHTOOL_TUNABLE_STRING, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 90 | ETHTOOL_TUNABLE_S8, |
| 91 | ETHTOOL_TUNABLE_S16, |
| 92 | ETHTOOL_TUNABLE_S32, |
| 93 | ETHTOOL_TUNABLE_S64, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 94 | }; |
| 95 | struct ethtool_tunable { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 96 | __u32 cmd; |
| 97 | __u32 id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 98 | __u32 type_id; |
| 99 | __u32 len; |
| 100 | void * data[0]; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 101 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 102 | #define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff |
| 103 | #define DOWNSHIFT_DEV_DISABLE 0 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 104 | #define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0 |
| 105 | #define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 106 | enum phy_tunable_id { |
| 107 | ETHTOOL_PHY_ID_UNSPEC, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 108 | ETHTOOL_PHY_DOWNSHIFT, |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 109 | ETHTOOL_PHY_FAST_LINK_DOWN, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 110 | __ETHTOOL_PHY_TUNABLE_COUNT, |
| 111 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | struct ethtool_regs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 113 | __u32 cmd; |
| 114 | __u32 version; |
| 115 | __u32 len; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 | __u8 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 117 | }; |
| 118 | struct ethtool_eeprom { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 | __u32 cmd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 | __u32 magic; |
| 121 | __u32 offset; |
| 122 | __u32 len; |
| 123 | __u8 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 124 | }; |
| 125 | struct ethtool_eee { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 126 | __u32 cmd; |
| 127 | __u32 supported; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 128 | __u32 advertised; |
| 129 | __u32 lp_advertised; |
| 130 | __u32 eee_active; |
| 131 | __u32 eee_enabled; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | __u32 tx_lpi_enabled; |
| 133 | __u32 tx_lpi_timer; |
| 134 | __u32 reserved[2]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 135 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 136 | struct ethtool_modinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 137 | __u32 cmd; |
| 138 | __u32 type; |
| 139 | __u32 eeprom_len; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 | __u32 reserved[8]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 141 | }; |
| 142 | struct ethtool_coalesce { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 143 | __u32 cmd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 144 | __u32 rx_coalesce_usecs; |
| 145 | __u32 rx_max_coalesced_frames; |
| 146 | __u32 rx_coalesce_usecs_irq; |
| 147 | __u32 rx_max_coalesced_frames_irq; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 148 | __u32 tx_coalesce_usecs; |
| 149 | __u32 tx_max_coalesced_frames; |
| 150 | __u32 tx_coalesce_usecs_irq; |
| 151 | __u32 tx_max_coalesced_frames_irq; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 152 | __u32 stats_block_coalesce_usecs; |
| 153 | __u32 use_adaptive_rx_coalesce; |
| 154 | __u32 use_adaptive_tx_coalesce; |
| 155 | __u32 pkt_rate_low; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 156 | __u32 rx_coalesce_usecs_low; |
| 157 | __u32 rx_max_coalesced_frames_low; |
| 158 | __u32 tx_coalesce_usecs_low; |
| 159 | __u32 tx_max_coalesced_frames_low; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 160 | __u32 pkt_rate_high; |
| 161 | __u32 rx_coalesce_usecs_high; |
| 162 | __u32 rx_max_coalesced_frames_high; |
| 163 | __u32 tx_coalesce_usecs_high; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 164 | __u32 tx_max_coalesced_frames_high; |
| 165 | __u32 rate_sample_interval; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 166 | }; |
| 167 | struct ethtool_ringparam { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 168 | __u32 cmd; |
| 169 | __u32 rx_max_pending; |
| 170 | __u32 rx_mini_max_pending; |
| 171 | __u32 rx_jumbo_max_pending; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 172 | __u32 tx_max_pending; |
| 173 | __u32 rx_pending; |
| 174 | __u32 rx_mini_pending; |
| 175 | __u32 rx_jumbo_pending; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 176 | __u32 tx_pending; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 177 | }; |
| 178 | struct ethtool_channels { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 179 | __u32 cmd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 180 | __u32 max_rx; |
| 181 | __u32 max_tx; |
| 182 | __u32 max_other; |
| 183 | __u32 max_combined; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 184 | __u32 rx_count; |
| 185 | __u32 tx_count; |
| 186 | __u32 other_count; |
| 187 | __u32 combined_count; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 188 | }; |
| 189 | struct ethtool_pauseparam { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 190 | __u32 cmd; |
| 191 | __u32 autoneg; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 192 | __u32 rx_pause; |
| 193 | __u32 tx_pause; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 194 | }; |
| 195 | #define ETH_GSTRING_LEN 32 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 196 | enum ethtool_stringset { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 197 | ETH_SS_TEST = 0, |
| 198 | ETH_SS_STATS, |
| 199 | ETH_SS_PRIV_FLAGS, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 200 | ETH_SS_NTUPLE_FILTERS, |
| 201 | ETH_SS_FEATURES, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 202 | ETH_SS_RSS_HASH_FUNCS, |
| 203 | ETH_SS_TUNABLES, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 204 | ETH_SS_PHY_STATS, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 205 | ETH_SS_PHY_TUNABLES, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 206 | }; |
| 207 | struct ethtool_gstrings { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 208 | __u32 cmd; |
| 209 | __u32 string_set; |
| 210 | __u32 len; |
| 211 | __u8 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 212 | }; |
| 213 | struct ethtool_sset_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 214 | __u32 cmd; |
| 215 | __u32 reserved; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 216 | __u64 sset_mask; |
| 217 | __u32 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 218 | }; |
| 219 | enum ethtool_test_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 220 | ETH_TEST_FL_OFFLINE = (1 << 0), |
| 221 | ETH_TEST_FL_FAILED = (1 << 1), |
| 222 | ETH_TEST_FL_EXTERNAL_LB = (1 << 2), |
| 223 | ETH_TEST_FL_EXTERNAL_LB_DONE = (1 << 3), |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 224 | }; |
| 225 | struct ethtool_test { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 226 | __u32 cmd; |
| 227 | __u32 flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 228 | __u32 reserved; |
| 229 | __u32 len; |
| 230 | __u64 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 231 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 232 | struct ethtool_stats { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 233 | __u32 cmd; |
| 234 | __u32 n_stats; |
| 235 | __u64 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 236 | }; |
| 237 | struct ethtool_perm_addr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 238 | __u32 cmd; |
| 239 | __u32 size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 240 | __u8 data[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 241 | }; |
| 242 | enum ethtool_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 243 | ETH_FLAG_TXVLAN = (1 << 7), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 244 | ETH_FLAG_RXVLAN = (1 << 8), |
| 245 | ETH_FLAG_LRO = (1 << 15), |
| 246 | ETH_FLAG_NTUPLE = (1 << 27), |
| 247 | ETH_FLAG_RXHASH = (1 << 28), |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 248 | }; |
| 249 | struct ethtool_tcpip4_spec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 250 | __be32 ip4src; |
| 251 | __be32 ip4dst; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 252 | __be16 psrc; |
| 253 | __be16 pdst; |
| 254 | __u8 tos; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 255 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 256 | struct ethtool_ah_espip4_spec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 257 | __be32 ip4src; |
| 258 | __be32 ip4dst; |
| 259 | __be32 spi; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 260 | __u8 tos; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 261 | }; |
| 262 | #define ETH_RX_NFC_IP4 1 |
| 263 | struct ethtool_usrip4_spec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 264 | __be32 ip4src; |
| 265 | __be32 ip4dst; |
| 266 | __be32 l4_4_bytes; |
| 267 | __u8 tos; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 268 | __u8 ip_ver; |
| 269 | __u8 proto; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 270 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 271 | struct ethtool_tcpip6_spec { |
| 272 | __be32 ip6src[4]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 273 | __be32 ip6dst[4]; |
| 274 | __be16 psrc; |
| 275 | __be16 pdst; |
| 276 | __u8 tclass; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 277 | }; |
| 278 | struct ethtool_ah_espip6_spec { |
| 279 | __be32 ip6src[4]; |
| 280 | __be32 ip6dst[4]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 281 | __be32 spi; |
| 282 | __u8 tclass; |
| 283 | }; |
| 284 | struct ethtool_usrip6_spec { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 285 | __be32 ip6src[4]; |
| 286 | __be32 ip6dst[4]; |
| 287 | __be32 l4_4_bytes; |
| 288 | __u8 tclass; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 289 | __u8 l4_proto; |
| 290 | }; |
| 291 | union ethtool_flow_union { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 292 | struct ethtool_tcpip4_spec tcp_ip4_spec; |
| 293 | struct ethtool_tcpip4_spec udp_ip4_spec; |
| 294 | struct ethtool_tcpip4_spec sctp_ip4_spec; |
| 295 | struct ethtool_ah_espip4_spec ah_ip4_spec; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 296 | struct ethtool_ah_espip4_spec esp_ip4_spec; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 297 | struct ethtool_usrip4_spec usr_ip4_spec; |
| 298 | struct ethtool_tcpip6_spec tcp_ip6_spec; |
| 299 | struct ethtool_tcpip6_spec udp_ip6_spec; |
| 300 | struct ethtool_tcpip6_spec sctp_ip6_spec; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 301 | struct ethtool_ah_espip6_spec ah_ip6_spec; |
| 302 | struct ethtool_ah_espip6_spec esp_ip6_spec; |
| 303 | struct ethtool_usrip6_spec usr_ip6_spec; |
| 304 | struct ethhdr ether_spec; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 305 | __u8 hdata[52]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 306 | }; |
| 307 | struct ethtool_flow_ext { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 308 | __u8 padding[2]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 309 | unsigned char h_dest[ETH_ALEN]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 310 | __be16 vlan_etype; |
| 311 | __be16 vlan_tci; |
| 312 | __be32 data[2]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 313 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 314 | struct ethtool_rx_flow_spec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 315 | __u32 flow_type; |
| 316 | union ethtool_flow_union h_u; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 317 | struct ethtool_flow_ext h_ext; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 318 | union ethtool_flow_union m_u; |
| 319 | struct ethtool_flow_ext m_ext; |
| 320 | __u64 ring_cookie; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 321 | __u32 location; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 322 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 323 | #define ETHTOOL_RX_FLOW_SPEC_RING 0x00000000FFFFFFFFLL |
| 324 | #define ETHTOOL_RX_FLOW_SPEC_RING_VF 0x000000FF00000000LL |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 325 | #define ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF 32 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 326 | struct ethtool_rxnfc { |
| 327 | __u32 cmd; |
| 328 | __u32 flow_type; |
| 329 | __u64 data; |
| 330 | struct ethtool_rx_flow_spec fs; |
| 331 | union { |
| 332 | __u32 rule_cnt; |
| 333 | __u32 rss_context; |
| 334 | }; |
| 335 | __u32 rule_locs[0]; |
| 336 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 337 | struct ethtool_rxfh_indir { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 338 | __u32 cmd; |
| 339 | __u32 size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 340 | __u32 ring_index[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 341 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 342 | struct ethtool_rxfh { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 343 | __u32 cmd; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 344 | __u32 rss_context; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 345 | __u32 indir_size; |
| 346 | __u32 key_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 347 | __u8 hfunc; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 348 | __u8 rsvd8[3]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 349 | __u32 rsvd32; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 350 | __u32 rss_config[0]; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 351 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 352 | #define ETH_RXFH_CONTEXT_ALLOC 0xffffffff |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 353 | #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 354 | struct ethtool_rx_ntuple_flow_spec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 355 | __u32 flow_type; |
| 356 | union { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 357 | struct ethtool_tcpip4_spec tcp_ip4_spec; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 358 | struct ethtool_tcpip4_spec udp_ip4_spec; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 359 | struct ethtool_tcpip4_spec sctp_ip4_spec; |
| 360 | struct ethtool_ah_espip4_spec ah_ip4_spec; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 361 | struct ethtool_ah_espip4_spec esp_ip4_spec; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 362 | struct ethtool_usrip4_spec usr_ip4_spec; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 363 | struct ethhdr ether_spec; |
| 364 | __u8 hdata[72]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 365 | } h_u, m_u; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 366 | __u16 vlan_tag; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 367 | __u16 vlan_tag_mask; |
| 368 | __u64 data; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 369 | __u64 data_mask; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 370 | __s32 action; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 371 | #define ETHTOOL_RXNTUPLE_ACTION_DROP (- 1) |
| 372 | #define ETHTOOL_RXNTUPLE_ACTION_CLEAR (- 2) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 373 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 374 | struct ethtool_rx_ntuple { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 375 | __u32 cmd; |
| 376 | struct ethtool_rx_ntuple_flow_spec fs; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 377 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 378 | #define ETHTOOL_FLASH_MAX_FILENAME 128 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 379 | enum ethtool_flash_op_type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 380 | ETHTOOL_FLASH_ALL_REGIONS = 0, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 381 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 382 | struct ethtool_flash { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 383 | __u32 cmd; |
| 384 | __u32 region; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 385 | char data[ETHTOOL_FLASH_MAX_FILENAME]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 386 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 387 | struct ethtool_dump { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 388 | __u32 cmd; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 389 | __u32 version; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 390 | __u32 flag; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 391 | __u32 len; |
| 392 | __u8 data[0]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 393 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 394 | #define ETH_FW_DUMP_DISABLE 0 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 395 | struct ethtool_get_features_block { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 396 | __u32 available; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 397 | __u32 requested; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 398 | __u32 active; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 399 | __u32 never_changed; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 400 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 401 | struct ethtool_gfeatures { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 402 | __u32 cmd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 403 | __u32 size; |
| 404 | struct ethtool_get_features_block features[0]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 405 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 406 | struct ethtool_set_features_block { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 407 | __u32 valid; |
| 408 | __u32 requested; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 409 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 410 | struct ethtool_sfeatures { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 411 | __u32 cmd; |
| 412 | __u32 size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 413 | struct ethtool_set_features_block features[0]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 414 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 415 | struct ethtool_ts_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 416 | __u32 cmd; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 417 | __u32 so_timestamping; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 418 | __s32 phc_index; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 419 | __u32 tx_types; |
| 420 | __u32 tx_reserved[3]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 421 | __u32 rx_filters; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 422 | __u32 rx_reserved[3]; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 423 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 424 | enum ethtool_sfeatures_retval_bits { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 425 | ETHTOOL_F_UNSUPPORTED__BIT, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 426 | ETHTOOL_F_WISH__BIT, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 427 | ETHTOOL_F_COMPAT__BIT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 428 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 429 | #define ETHTOOL_F_UNSUPPORTED (1 << ETHTOOL_F_UNSUPPORTED__BIT) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 430 | #define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 431 | #define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 432 | #define MAX_NUM_QUEUE 4096 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 433 | struct ethtool_per_queue_op { |
| 434 | __u32 cmd; |
| 435 | __u32 sub_command; |
| 436 | __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 437 | char data[]; |
| 438 | }; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 439 | struct ethtool_fecparam { |
| 440 | __u32 cmd; |
| 441 | __u32 active_fec; |
| 442 | __u32 fec; |
| 443 | __u32 reserved; |
| 444 | }; |
| 445 | enum ethtool_fec_config_bits { |
| 446 | ETHTOOL_FEC_NONE_BIT, |
| 447 | ETHTOOL_FEC_AUTO_BIT, |
| 448 | ETHTOOL_FEC_OFF_BIT, |
| 449 | ETHTOOL_FEC_RS_BIT, |
| 450 | ETHTOOL_FEC_BASER_BIT, |
| 451 | }; |
| 452 | #define ETHTOOL_FEC_NONE (1 << ETHTOOL_FEC_NONE_BIT) |
| 453 | #define ETHTOOL_FEC_AUTO (1 << ETHTOOL_FEC_AUTO_BIT) |
| 454 | #define ETHTOOL_FEC_OFF (1 << ETHTOOL_FEC_OFF_BIT) |
| 455 | #define ETHTOOL_FEC_RS (1 << ETHTOOL_FEC_RS_BIT) |
| 456 | #define ETHTOOL_FEC_BASER (1 << ETHTOOL_FEC_BASER_BIT) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 457 | #define ETHTOOL_GSET 0x00000001 |
| 458 | #define ETHTOOL_SSET 0x00000002 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 459 | #define ETHTOOL_GDRVINFO 0x00000003 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 460 | #define ETHTOOL_GREGS 0x00000004 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 461 | #define ETHTOOL_GWOL 0x00000005 |
| 462 | #define ETHTOOL_SWOL 0x00000006 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 463 | #define ETHTOOL_GMSGLVL 0x00000007 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 464 | #define ETHTOOL_SMSGLVL 0x00000008 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 465 | #define ETHTOOL_NWAY_RST 0x00000009 |
| 466 | #define ETHTOOL_GLINK 0x0000000a |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 467 | #define ETHTOOL_GEEPROM 0x0000000b |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 468 | #define ETHTOOL_SEEPROM 0x0000000c |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 469 | #define ETHTOOL_GCOALESCE 0x0000000e |
| 470 | #define ETHTOOL_SCOALESCE 0x0000000f |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 471 | #define ETHTOOL_GRINGPARAM 0x00000010 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 472 | #define ETHTOOL_SRINGPARAM 0x00000011 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 473 | #define ETHTOOL_GPAUSEPARAM 0x00000012 |
| 474 | #define ETHTOOL_SPAUSEPARAM 0x00000013 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 475 | #define ETHTOOL_GRXCSUM 0x00000014 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 476 | #define ETHTOOL_SRXCSUM 0x00000015 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 477 | #define ETHTOOL_GTXCSUM 0x00000016 |
| 478 | #define ETHTOOL_STXCSUM 0x00000017 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 479 | #define ETHTOOL_GSG 0x00000018 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 480 | #define ETHTOOL_SSG 0x00000019 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 481 | #define ETHTOOL_TEST 0x0000001a |
| 482 | #define ETHTOOL_GSTRINGS 0x0000001b |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 483 | #define ETHTOOL_PHYS_ID 0x0000001c |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 484 | #define ETHTOOL_GSTATS 0x0000001d |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 485 | #define ETHTOOL_GTSO 0x0000001e |
| 486 | #define ETHTOOL_STSO 0x0000001f |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 487 | #define ETHTOOL_GPERMADDR 0x00000020 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 488 | #define ETHTOOL_GUFO 0x00000021 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 489 | #define ETHTOOL_SUFO 0x00000022 |
| 490 | #define ETHTOOL_GGSO 0x00000023 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 491 | #define ETHTOOL_SGSO 0x00000024 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 492 | #define ETHTOOL_GFLAGS 0x00000025 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 493 | #define ETHTOOL_SFLAGS 0x00000026 |
| 494 | #define ETHTOOL_GPFLAGS 0x00000027 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 495 | #define ETHTOOL_SPFLAGS 0x00000028 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 496 | #define ETHTOOL_GRXFH 0x00000029 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 497 | #define ETHTOOL_SRXFH 0x0000002a |
| 498 | #define ETHTOOL_GGRO 0x0000002b |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 499 | #define ETHTOOL_SGRO 0x0000002c |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 500 | #define ETHTOOL_GRXRINGS 0x0000002d |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 501 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e |
| 502 | #define ETHTOOL_GRXCLSRULE 0x0000002f |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 503 | #define ETHTOOL_GRXCLSRLALL 0x00000030 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 504 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 505 | #define ETHTOOL_SRXCLSRLINS 0x00000032 |
| 506 | #define ETHTOOL_FLASHDEV 0x00000033 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 507 | #define ETHTOOL_RESET 0x00000034 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 508 | #define ETHTOOL_SRXNTUPLE 0x00000035 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 509 | #define ETHTOOL_GRXNTUPLE 0x00000036 |
| 510 | #define ETHTOOL_GSSET_INFO 0x00000037 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 511 | #define ETHTOOL_GRXFHINDIR 0x00000038 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 512 | #define ETHTOOL_SRXFHINDIR 0x00000039 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 513 | #define ETHTOOL_GFEATURES 0x0000003a |
| 514 | #define ETHTOOL_SFEATURES 0x0000003b |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 515 | #define ETHTOOL_GCHANNELS 0x0000003c |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 516 | #define ETHTOOL_SCHANNELS 0x0000003d |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 517 | #define ETHTOOL_SET_DUMP 0x0000003e |
| 518 | #define ETHTOOL_GET_DUMP_FLAG 0x0000003f |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 519 | #define ETHTOOL_GET_DUMP_DATA 0x00000040 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 520 | #define ETHTOOL_GET_TS_INFO 0x00000041 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 521 | #define ETHTOOL_GMODULEINFO 0x00000042 |
| 522 | #define ETHTOOL_GMODULEEEPROM 0x00000043 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 523 | #define ETHTOOL_GEEE 0x00000044 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 524 | #define ETHTOOL_SEEE 0x00000045 |
| 525 | #define ETHTOOL_GRSSH 0x00000046 |
| 526 | #define ETHTOOL_SRSSH 0x00000047 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 527 | #define ETHTOOL_GTUNABLE 0x00000048 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 528 | #define ETHTOOL_STUNABLE 0x00000049 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 529 | #define ETHTOOL_GPHYSTATS 0x0000004a |
| 530 | #define ETHTOOL_PERQUEUE 0x0000004b |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 531 | #define ETHTOOL_GLINKSETTINGS 0x0000004c |
| 532 | #define ETHTOOL_SLINKSETTINGS 0x0000004d |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 533 | #define ETHTOOL_PHY_GTUNABLE 0x0000004e |
| 534 | #define ETHTOOL_PHY_STUNABLE 0x0000004f |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 535 | #define ETHTOOL_GFECPARAM 0x00000050 |
| 536 | #define ETHTOOL_SFECPARAM 0x00000051 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 537 | #define SPARC_ETH_GSET ETHTOOL_GSET |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 538 | #define SPARC_ETH_SSET ETHTOOL_SSET |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 539 | enum ethtool_link_mode_bit_indices { |
| 540 | ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0, |
| 541 | ETHTOOL_LINK_MODE_10baseT_Full_BIT = 1, |
| 542 | ETHTOOL_LINK_MODE_100baseT_Half_BIT = 2, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 543 | ETHTOOL_LINK_MODE_100baseT_Full_BIT = 3, |
| 544 | ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 4, |
| 545 | ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 5, |
| 546 | ETHTOOL_LINK_MODE_Autoneg_BIT = 6, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 547 | ETHTOOL_LINK_MODE_TP_BIT = 7, |
| 548 | ETHTOOL_LINK_MODE_AUI_BIT = 8, |
| 549 | ETHTOOL_LINK_MODE_MII_BIT = 9, |
| 550 | ETHTOOL_LINK_MODE_FIBRE_BIT = 10, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 551 | ETHTOOL_LINK_MODE_BNC_BIT = 11, |
| 552 | ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 12, |
| 553 | ETHTOOL_LINK_MODE_Pause_BIT = 13, |
| 554 | ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 555 | ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 15, |
| 556 | ETHTOOL_LINK_MODE_Backplane_BIT = 16, |
| 557 | ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 17, |
| 558 | ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 559 | ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 19, |
| 560 | ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 20, |
| 561 | ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21, |
| 562 | ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 563 | ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23, |
| 564 | ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24, |
| 565 | ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25, |
| 566 | ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 567 | ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27, |
| 568 | ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28, |
| 569 | ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29, |
| 570 | ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 571 | ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 31, |
| 572 | ETHTOOL_LINK_MODE_25000baseKR_Full_BIT = 32, |
| 573 | ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 33, |
| 574 | ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 34, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 575 | ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 35, |
| 576 | ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT = 36, |
| 577 | ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 37, |
| 578 | ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 38, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 579 | ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 580 | ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 581 | ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 41, |
| 582 | ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 583 | ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43, |
| 584 | ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44, |
| 585 | ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45, |
| 586 | ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 46, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 587 | ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47, |
| 588 | ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48, |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 589 | ETHTOOL_LINK_MODE_FEC_NONE_BIT = 49, |
| 590 | ETHTOOL_LINK_MODE_FEC_RS_BIT = 50, |
| 591 | ETHTOOL_LINK_MODE_FEC_BASER_BIT = 51, |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 592 | ETHTOOL_LINK_MODE_50000baseKR_Full_BIT = 52, |
| 593 | ETHTOOL_LINK_MODE_50000baseSR_Full_BIT = 53, |
| 594 | ETHTOOL_LINK_MODE_50000baseCR_Full_BIT = 54, |
| 595 | ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT = 55, |
| 596 | ETHTOOL_LINK_MODE_50000baseDR_Full_BIT = 56, |
| 597 | ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT = 57, |
| 598 | ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT = 58, |
| 599 | ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT = 59, |
| 600 | ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 60, |
| 601 | ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT = 61, |
| 602 | ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT = 62, |
| 603 | ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT = 63, |
| 604 | ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64, |
| 605 | ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 65, |
| 606 | ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66, |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame^] | 607 | ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 67, |
| 608 | ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 68, |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 609 | __ETHTOOL_LINK_MODE_MASK_NBITS |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 610 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 611 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) (1UL << (ETHTOOL_LINK_MODE_ ##base_name ##_BIT)) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 612 | #define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) |
| 613 | #define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) |
| 614 | #define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 615 | #define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 616 | #define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) |
| 617 | #define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) |
| 618 | #define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 619 | #define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 620 | #define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) |
| 621 | #define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) |
| 622 | #define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 623 | #define SUPPORTED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 624 | #define SUPPORTED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) |
| 625 | #define SUPPORTED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) |
| 626 | #define SUPPORTED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 627 | #define SUPPORTED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 628 | #define SUPPORTED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) |
| 629 | #define SUPPORTED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) |
| 630 | #define SUPPORTED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 631 | #define SUPPORTED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 632 | #define SUPPORTED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) |
| 633 | #define SUPPORTED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) |
| 634 | #define SUPPORTED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 635 | #define SUPPORTED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 636 | #define SUPPORTED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) |
| 637 | #define SUPPORTED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) |
| 638 | #define SUPPORTED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 639 | #define SUPPORTED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 640 | #define SUPPORTED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) |
| 641 | #define SUPPORTED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) |
| 642 | #define SUPPORTED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 643 | #define ADVERTISED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 644 | #define ADVERTISED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) |
| 645 | #define ADVERTISED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) |
| 646 | #define ADVERTISED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 647 | #define ADVERTISED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 648 | #define ADVERTISED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) |
| 649 | #define ADVERTISED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) |
| 650 | #define ADVERTISED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 651 | #define ADVERTISED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 652 | #define ADVERTISED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) |
| 653 | #define ADVERTISED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) |
| 654 | #define ADVERTISED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 655 | #define ADVERTISED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 656 | #define ADVERTISED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) |
| 657 | #define ADVERTISED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) |
| 658 | #define ADVERTISED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 659 | #define ADVERTISED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 660 | #define ADVERTISED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) |
| 661 | #define ADVERTISED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) |
| 662 | #define ADVERTISED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 663 | #define ADVERTISED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 664 | #define ADVERTISED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) |
| 665 | #define ADVERTISED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) |
| 666 | #define ADVERTISED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 667 | #define ADVERTISED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 668 | #define ADVERTISED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) |
| 669 | #define ADVERTISED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) |
| 670 | #define ADVERTISED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 671 | #define ADVERTISED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 672 | #define ADVERTISED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) |
| 673 | #define ADVERTISED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 674 | #define SPEED_10 10 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 675 | #define SPEED_100 100 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 676 | #define SPEED_1000 1000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 677 | #define SPEED_2500 2500 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 678 | #define SPEED_5000 5000 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 679 | #define SPEED_10000 10000 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 680 | #define SPEED_14000 14000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 681 | #define SPEED_20000 20000 |
| 682 | #define SPEED_25000 25000 |
| 683 | #define SPEED_40000 40000 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 684 | #define SPEED_50000 50000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 685 | #define SPEED_56000 56000 |
| 686 | #define SPEED_100000 100000 |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 687 | #define SPEED_200000 200000 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 688 | #define SPEED_UNKNOWN - 1 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 689 | #define DUPLEX_HALF 0x00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 690 | #define DUPLEX_FULL 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 691 | #define DUPLEX_UNKNOWN 0xff |
| 692 | #define PORT_TP 0x00 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 693 | #define PORT_AUI 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 694 | #define PORT_MII 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 695 | #define PORT_FIBRE 0x03 |
| 696 | #define PORT_BNC 0x04 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 697 | #define PORT_DA 0x05 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 698 | #define PORT_NONE 0xef |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 699 | #define PORT_OTHER 0xff |
| 700 | #define XCVR_INTERNAL 0x00 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 701 | #define XCVR_EXTERNAL 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 702 | #define XCVR_DUMMY1 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 703 | #define XCVR_DUMMY2 0x03 |
| 704 | #define XCVR_DUMMY3 0x04 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 705 | #define AUTONEG_DISABLE 0x00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 706 | #define AUTONEG_ENABLE 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 707 | #define ETH_TP_MDI_INVALID 0x00 |
| 708 | #define ETH_TP_MDI 0x01 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 709 | #define ETH_TP_MDI_X 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 710 | #define ETH_TP_MDI_AUTO 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 711 | #define WAKE_PHY (1 << 0) |
| 712 | #define WAKE_UCAST (1 << 1) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 713 | #define WAKE_MCAST (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 714 | #define WAKE_BCAST (1 << 3) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 715 | #define WAKE_ARP (1 << 4) |
| 716 | #define WAKE_MAGIC (1 << 5) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 717 | #define WAKE_MAGICSECURE (1 << 6) |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 718 | #define WAKE_FILTER (1 << 7) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 719 | #define TCP_V4_FLOW 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 720 | #define UDP_V4_FLOW 0x02 |
| 721 | #define SCTP_V4_FLOW 0x03 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 722 | #define AH_ESP_V4_FLOW 0x04 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 723 | #define TCP_V6_FLOW 0x05 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 724 | #define UDP_V6_FLOW 0x06 |
| 725 | #define SCTP_V6_FLOW 0x07 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 726 | #define AH_ESP_V6_FLOW 0x08 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 727 | #define AH_V4_FLOW 0x09 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 728 | #define ESP_V4_FLOW 0x0a |
| 729 | #define AH_V6_FLOW 0x0b |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 730 | #define ESP_V6_FLOW 0x0c |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 731 | #define IPV4_USER_FLOW 0x0d |
| 732 | #define IP_USER_FLOW IPV4_USER_FLOW |
| 733 | #define IPV6_USER_FLOW 0x0e |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 734 | #define IPV4_FLOW 0x10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 735 | #define IPV6_FLOW 0x11 |
| 736 | #define ETHER_FLOW 0x12 |
| 737 | #define FLOW_EXT 0x80000000 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 738 | #define FLOW_MAC_EXT 0x40000000 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 739 | #define FLOW_RSS 0x20000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 740 | #define RXH_L2DA (1 << 1) |
| 741 | #define RXH_VLAN (1 << 2) |
| 742 | #define RXH_L3_PROTO (1 << 3) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 743 | #define RXH_IP_SRC (1 << 4) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 744 | #define RXH_IP_DST (1 << 5) |
| 745 | #define RXH_L4_B_0_1 (1 << 6) |
| 746 | #define RXH_L4_B_2_3 (1 << 7) |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 747 | #define RXH_DISCARD (1 << 31) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 748 | #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 749 | #define RX_CLS_FLOW_WAKE 0xfffffffffffffffeULL |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 750 | #define RX_CLS_LOC_SPECIAL 0x80000000 |
| 751 | #define RX_CLS_LOC_ANY 0xffffffff |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 752 | #define RX_CLS_LOC_FIRST 0xfffffffe |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 753 | #define RX_CLS_LOC_LAST 0xfffffffd |
| 754 | #define ETH_MODULE_SFF_8079 0x1 |
| 755 | #define ETH_MODULE_SFF_8079_LEN 256 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 756 | #define ETH_MODULE_SFF_8472 0x2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 757 | #define ETH_MODULE_SFF_8472_LEN 512 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 758 | #define ETH_MODULE_SFF_8636 0x3 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 759 | #define ETH_MODULE_SFF_8636_LEN 256 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 760 | #define ETH_MODULE_SFF_8436 0x4 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 761 | #define ETH_MODULE_SFF_8436_LEN 256 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 762 | #define ETH_MODULE_SFF_8636_MAX_LEN 640 |
| 763 | #define ETH_MODULE_SFF_8436_MAX_LEN 640 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 764 | enum ethtool_reset_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 765 | ETH_RESET_MGMT = 1 << 0, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 766 | ETH_RESET_IRQ = 1 << 1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 767 | ETH_RESET_DMA = 1 << 2, |
| 768 | ETH_RESET_FILTER = 1 << 3, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 769 | ETH_RESET_OFFLOAD = 1 << 4, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 770 | ETH_RESET_MAC = 1 << 5, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 771 | ETH_RESET_PHY = 1 << 6, |
| 772 | ETH_RESET_RAM = 1 << 7, |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 773 | ETH_RESET_AP = 1 << 8, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 774 | ETH_RESET_DEDICATED = 0x0000ffff, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 775 | ETH_RESET_ALL = 0xffffffff, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 776 | }; |
| 777 | #define ETH_RESET_SHARED_SHIFT 16 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 778 | struct ethtool_link_settings { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 779 | __u32 cmd; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 780 | __u32 speed; |
| 781 | __u8 duplex; |
| 782 | __u8 port; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 783 | __u8 phy_address; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 784 | __u8 autoneg; |
| 785 | __u8 mdio_support; |
| 786 | __u8 eth_tp_mdix; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 787 | __u8 eth_tp_mdix_ctrl; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 788 | __s8 link_mode_masks_nwords; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 789 | __u8 transceiver; |
| 790 | __u8 reserved1[3]; |
| 791 | __u32 reserved[7]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 792 | __u32 link_mode_masks[0]; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 793 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 794 | #endif |