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