ethtool.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. /*
  2. * ethtool.h: Defines for Linux ethtool.
  3. *
  4. * Copyright (C) 1998 David S. Miller (davem@redhat.com)
  5. * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
  6. * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
  7. * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
  8. * christopher.leech@intel.com,
  9. * scott.feldman@intel.com)
  10. */
  11. #ifndef _LINUX_ETHTOOL_H
  12. #define _LINUX_ETHTOOL_H
  13. /* This should work for both 32 and 64 bit userland. */
  14. struct ethtool_cmd {
  15. __u32 cmd;
  16. __u32 supported; /* Features this interface supports */
  17. __u32 advertising; /* Features this interface advertises */
  18. __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */
  19. __u8 duplex; /* Duplex, half or full */
  20. __u8 port; /* Which connector port */
  21. __u8 phy_address;
  22. __u8 transceiver; /* Which transceiver to use */
  23. __u8 autoneg; /* Enable or disable autonegotiation */
  24. __u32 maxtxpkt; /* Tx pkts before generating tx int */
  25. __u32 maxrxpkt; /* Rx pkts before generating rx int */
  26. __u32 reserved[4];
  27. };
  28. #define ETHTOOL_BUSINFO_LEN 32
  29. /* these strings are set to whatever the driver author decides... */
  30. struct ethtool_drvinfo {
  31. __u32 cmd;
  32. char driver[32]; /* driver short name, "tulip", "eepro100" */
  33. char version[32]; /* driver version string */
  34. char fw_version[32]; /* firmware version string, if applicable */
  35. char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
  36. /* For PCI devices, use pci_name(pci_dev). */
  37. char reserved1[32];
  38. char reserved2[12];
  39. __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
  40. __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
  41. __u32 testinfo_len;
  42. __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */
  43. __u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */
  44. };
  45. #define SOPASS_MAX 6
  46. /* wake-on-lan settings */
  47. struct ethtool_wolinfo {
  48. __u32 cmd;
  49. __u32 supported;
  50. __u32 wolopts;
  51. __u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */
  52. };
  53. /* for passing single values */
  54. struct ethtool_value {
  55. __u32 cmd;
  56. __u32 data;
  57. };
  58. /* for passing big chunks of data */
  59. struct ethtool_regs {
  60. __u32 cmd;
  61. __u32 version; /* driver-specific, indicates different chips/revs */
  62. __u32 len; /* bytes */
  63. __u8 data[0];
  64. };
  65. /* for passing EEPROM chunks */
  66. struct ethtool_eeprom {
  67. __u32 cmd;
  68. __u32 magic;
  69. __u32 offset; /* in bytes */
  70. __u32 len; /* in bytes */
  71. __u8 data[0];
  72. };
  73. /* for configuring coalescing parameters of chip */
  74. struct ethtool_coalesce {
  75. __u32 cmd; /* ETHTOOL_{G,S}COALESCE */
  76. /* How many usecs to delay an RX interrupt after
  77. * a packet arrives. If 0, only rx_max_coalesced_frames
  78. * is used.
  79. */
  80. __u32 rx_coalesce_usecs;
  81. /* How many packets to delay an RX interrupt after
  82. * a packet arrives. If 0, only rx_coalesce_usecs is
  83. * used. It is illegal to set both usecs and max frames
  84. * to zero as this would cause RX interrupts to never be
  85. * generated.
  86. */
  87. __u32 rx_max_coalesced_frames;
  88. /* Same as above two parameters, except that these values
  89. * apply while an IRQ is being serviced by the host. Not
  90. * all cards support this feature and the values are ignored
  91. * in that case.
  92. */
  93. __u32 rx_coalesce_usecs_irq;
  94. __u32 rx_max_coalesced_frames_irq;
  95. /* How many usecs to delay a TX interrupt after
  96. * a packet is sent. If 0, only tx_max_coalesced_frames
  97. * is used.
  98. */
  99. __u32 tx_coalesce_usecs;
  100. /* How many packets to delay a TX interrupt after
  101. * a packet is sent. If 0, only tx_coalesce_usecs is
  102. * used. It is illegal to set both usecs and max frames
  103. * to zero as this would cause TX interrupts to never be
  104. * generated.
  105. */
  106. __u32 tx_max_coalesced_frames;
  107. /* Same as above two parameters, except that these values
  108. * apply while an IRQ is being serviced by the host. Not
  109. * all cards support this feature and the values are ignored
  110. * in that case.
  111. */
  112. __u32 tx_coalesce_usecs_irq;
  113. __u32 tx_max_coalesced_frames_irq;
  114. /* How many usecs to delay in-memory statistics
  115. * block updates. Some drivers do not have an in-memory
  116. * statistic block, and in such cases this value is ignored.
  117. * This value must not be zero.
  118. */
  119. __u32 stats_block_coalesce_usecs;
  120. /* Adaptive RX/TX coalescing is an algorithm implemented by
  121. * some drivers to improve latency under low packet rates and
  122. * improve throughput under high packet rates. Some drivers
  123. * only implement one of RX or TX adaptive coalescing. Anything
  124. * not implemented by the driver causes these values to be
  125. * silently ignored.
  126. */
  127. __u32 use_adaptive_rx_coalesce;
  128. __u32 use_adaptive_tx_coalesce;
  129. /* When the packet rate (measured in packets per second)
  130. * is below pkt_rate_low, the {rx,tx}_*_low parameters are
  131. * used.
  132. */
  133. __u32 pkt_rate_low;
  134. __u32 rx_coalesce_usecs_low;
  135. __u32 rx_max_coalesced_frames_low;
  136. __u32 tx_coalesce_usecs_low;
  137. __u32 tx_max_coalesced_frames_low;
  138. /* When the packet rate is below pkt_rate_high but above
  139. * pkt_rate_low (both measured in packets per second) the
  140. * normal {rx,tx}_* coalescing parameters are used.
  141. */
  142. /* When the packet rate is (measured in packets per second)
  143. * is above pkt_rate_high, the {rx,tx}_*_high parameters are
  144. * used.
  145. */
  146. __u32 pkt_rate_high;
  147. __u32 rx_coalesce_usecs_high;
  148. __u32 rx_max_coalesced_frames_high;
  149. __u32 tx_coalesce_usecs_high;
  150. __u32 tx_max_coalesced_frames_high;
  151. /* How often to do adaptive coalescing packet rate sampling,
  152. * measured in seconds. Must not be zero.
  153. */
  154. __u32 rate_sample_interval;
  155. };
  156. /* for configuring RX/TX ring parameters */
  157. struct ethtool_ringparam {
  158. __u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */
  159. /* Read only attributes. These indicate the maximum number
  160. * of pending RX/TX ring entries the driver will allow the
  161. * user to set.
  162. */
  163. __u32 rx_max_pending;
  164. __u32 rx_mini_max_pending;
  165. __u32 rx_jumbo_max_pending;
  166. __u32 tx_max_pending;
  167. /* Values changeable by the user. The valid values are
  168. * in the range 1 to the "*_max_pending" counterpart above.
  169. */
  170. __u32 rx_pending;
  171. __u32 rx_mini_pending;
  172. __u32 rx_jumbo_pending;
  173. __u32 tx_pending;
  174. };
  175. /* for configuring link flow control parameters */
  176. struct ethtool_pauseparam {
  177. __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */
  178. /* If the link is being auto-negotiated (via ethtool_cmd.autoneg
  179. * being true) the user may set 'autonet' here non-zero to have the
  180. * pause parameters be auto-negotiated too. In such a case, the
  181. * {rx,tx}_pause values below determine what capabilities are
  182. * advertised.
  183. *
  184. * If 'autoneg' is zero or the link is not being auto-negotiated,
  185. * then {rx,tx}_pause force the driver to use/not-use pause
  186. * flow control.
  187. */
  188. __u32 autoneg;
  189. __u32 rx_pause;
  190. __u32 tx_pause;
  191. };
  192. #define ETH_GSTRING_LEN 32
  193. enum ethtool_stringset {
  194. ETH_SS_TEST = 0,
  195. ETH_SS_STATS,
  196. ETH_SS_PRIV_FLAGS,
  197. };
  198. /* for passing string sets for data tagging */
  199. struct ethtool_gstrings {
  200. __u32 cmd; /* ETHTOOL_GSTRINGS */
  201. __u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/
  202. __u32 len; /* number of strings in the string set */
  203. __u8 data[0];
  204. };
  205. enum ethtool_test_flags {
  206. ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */
  207. ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */
  208. };
  209. /* for requesting NIC test and getting results*/
  210. struct ethtool_test {
  211. __u32 cmd; /* ETHTOOL_TEST */
  212. __u32 flags; /* ETH_TEST_FL_xxx */
  213. __u32 reserved;
  214. __u32 len; /* result length, in number of u64 elements */
  215. __u64 data[0];
  216. };
  217. /* for dumping NIC-specific statistics */
  218. struct ethtool_stats {
  219. __u32 cmd; /* ETHTOOL_GSTATS */
  220. __u32 n_stats; /* number of u64's being returned */
  221. __u64 data[0];
  222. };
  223. struct ethtool_perm_addr {
  224. __u32 cmd; /* ETHTOOL_GPERMADDR */
  225. __u32 size;
  226. __u8 data[0];
  227. };
  228. /* boolean flags controlling per-interface behavior characteristics.
  229. * When reading, the flag indicates whether or not a certain behavior
  230. * is enabled/present. When writing, the flag indicates whether
  231. * or not the driver should turn on (set) or off (clear) a behavior.
  232. *
  233. * Some behaviors may read-only (unconditionally absent or present).
  234. * If such is the case, return EINVAL in the set-flags operation if the
  235. * flag differs from the read-only value.
  236. */
  237. enum ethtool_flags {
  238. ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
  239. };
  240. #ifdef __KERNEL__
  241. struct net_device;
  242. /* Some generic methods drivers may use in their ethtool_ops */
  243. u32 ethtool_op_get_link(struct net_device *dev);
  244. u32 ethtool_op_get_tx_csum(struct net_device *dev);
  245. int ethtool_op_set_tx_csum(struct net_device *dev, u32 data);
  246. int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data);
  247. int ethtool_op_set_tx_ipv6_csum(struct net_device *dev, u32 data);
  248. u32 ethtool_op_get_sg(struct net_device *dev);
  249. int ethtool_op_set_sg(struct net_device *dev, u32 data);
  250. u32 ethtool_op_get_tso(struct net_device *dev);
  251. int ethtool_op_set_tso(struct net_device *dev, u32 data);
  252. u32 ethtool_op_get_ufo(struct net_device *dev);
  253. int ethtool_op_set_ufo(struct net_device *dev, u32 data);
  254. u32 ethtool_op_get_flags(struct net_device *dev);
  255. int ethtool_op_set_flags(struct net_device *dev, u32 data);
  256. /**
  257. * &ethtool_ops - Alter and report network device settings
  258. * get_settings: Get device-specific settings
  259. * set_settings: Set device-specific settings
  260. * get_drvinfo: Report driver information
  261. * get_regs: Get device registers
  262. * get_wol: Report whether Wake-on-Lan is enabled
  263. * set_wol: Turn Wake-on-Lan on or off
  264. * get_msglevel: Report driver message level
  265. * set_msglevel: Set driver message level
  266. * nway_reset: Restart autonegotiation
  267. * get_link: Get link status
  268. * get_eeprom: Read data from the device EEPROM
  269. * set_eeprom: Write data to the device EEPROM
  270. * get_coalesce: Get interrupt coalescing parameters
  271. * set_coalesce: Set interrupt coalescing parameters
  272. * get_ringparam: Report ring sizes
  273. * set_ringparam: Set ring sizes
  274. * get_pauseparam: Report pause parameters
  275. * set_pauseparam: Set pause parameters
  276. * get_rx_csum: Report whether receive checksums are turned on or off
  277. * set_rx_csum: Turn receive checksum on or off
  278. * get_tx_csum: Report whether transmit checksums are turned on or off
  279. * set_tx_csum: Turn transmit checksums on or off
  280. * get_sg: Report whether scatter-gather is enabled
  281. * set_sg: Turn scatter-gather on or off
  282. * get_tso: Report whether TCP segmentation offload is enabled
  283. * set_tso: Turn TCP segmentation offload on or off
  284. * get_ufo: Report whether UDP fragmentation offload is enabled
  285. * set_ufo: Turn UDP fragmentation offload on or off
  286. * self_test: Run specified self-tests
  287. * get_strings: Return a set of strings that describe the requested objects
  288. * phys_id: Identify the device
  289. * get_stats: Return statistics about the device
  290. * get_flags: get 32-bit flags bitmap
  291. * set_flags: set 32-bit flags bitmap
  292. *
  293. * Description:
  294. *
  295. * get_settings:
  296. * @get_settings is passed an &ethtool_cmd to fill in. It returns
  297. * an negative errno or zero.
  298. *
  299. * set_settings:
  300. * @set_settings is passed an &ethtool_cmd and should attempt to set
  301. * all the settings this device supports. It may return an error value
  302. * if something goes wrong (otherwise 0).
  303. *
  304. * get_eeprom:
  305. * Should fill in the magic field. Don't need to check len for zero
  306. * or wraparound. Fill in the data argument with the eeprom values
  307. * from offset to offset + len. Update len to the amount read.
  308. * Returns an error or zero.
  309. *
  310. * set_eeprom:
  311. * Should validate the magic field. Don't need to check len for zero
  312. * or wraparound. Update len to the amount written. Returns an error
  313. * or zero.
  314. */
  315. struct ethtool_ops {
  316. int (*get_settings)(struct net_device *, struct ethtool_cmd *);
  317. int (*set_settings)(struct net_device *, struct ethtool_cmd *);
  318. void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
  319. int (*get_regs_len)(struct net_device *);
  320. void (*get_regs)(struct net_device *, struct ethtool_regs *, void *);
  321. void (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
  322. int (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
  323. u32 (*get_msglevel)(struct net_device *);
  324. void (*set_msglevel)(struct net_device *, u32);
  325. int (*nway_reset)(struct net_device *);
  326. u32 (*get_link)(struct net_device *);
  327. int (*get_eeprom_len)(struct net_device *);
  328. int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
  329. int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
  330. int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
  331. int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
  332. void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *);
  333. int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *);
  334. void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
  335. int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
  336. u32 (*get_rx_csum)(struct net_device *);
  337. int (*set_rx_csum)(struct net_device *, u32);
  338. u32 (*get_tx_csum)(struct net_device *);
  339. int (*set_tx_csum)(struct net_device *, u32);
  340. u32 (*get_sg)(struct net_device *);
  341. int (*set_sg)(struct net_device *, u32);
  342. u32 (*get_tso)(struct net_device *);
  343. int (*set_tso)(struct net_device *, u32);
  344. void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
  345. void (*get_strings)(struct net_device *, u32 stringset, u8 *);
  346. int (*phys_id)(struct net_device *, u32);
  347. void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
  348. int (*begin)(struct net_device *);
  349. void (*complete)(struct net_device *);
  350. u32 (*get_ufo)(struct net_device *);
  351. int (*set_ufo)(struct net_device *, u32);
  352. u32 (*get_flags)(struct net_device *);
  353. int (*set_flags)(struct net_device *, u32);
  354. u32 (*get_priv_flags)(struct net_device *);
  355. int (*set_priv_flags)(struct net_device *, u32);
  356. int (*get_sset_count)(struct net_device *, int);
  357. /* the following hooks are obsolete */
  358. int (*self_test_count)(struct net_device *);/* use get_sset_count */
  359. int (*get_stats_count)(struct net_device *);/* use get_sset_count */
  360. };
  361. #endif /* __KERNEL__ */
  362. /* CMDs currently supported */
  363. #define ETHTOOL_GSET 0x00000001 /* Get settings. */
  364. #define ETHTOOL_SSET 0x00000002 /* Set settings. */
  365. #define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
  366. #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */
  367. #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */
  368. #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */
  369. #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */
  370. #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */
  371. #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */
  372. #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */
  373. #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
  374. #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
  375. #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */
  376. #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */
  377. #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */
  378. #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */
  379. #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */
  380. #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */
  381. #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */
  382. #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */
  383. #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */
  384. #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */
  385. #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable
  386. * (ethtool_value) */
  387. #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable
  388. * (ethtool_value). */
  389. #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */
  390. #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */
  391. #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
  392. #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
  393. #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
  394. #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
  395. #define ETHTOOL_GPERMADDR 0x00000020 /* Get permanent hardware address */
  396. #define ETHTOOL_GUFO 0x00000021 /* Get UFO enable (ethtool_value) */
  397. #define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */
  398. #define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */
  399. #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
  400. #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */
  401. #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */
  402. #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
  403. #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
  404. /* compatibility with older code */
  405. #define SPARC_ETH_GSET ETHTOOL_GSET
  406. #define SPARC_ETH_SSET ETHTOOL_SSET
  407. /* Indicates what features are supported by the interface. */
  408. #define SUPPORTED_10baseT_Half (1 << 0)
  409. #define SUPPORTED_10baseT_Full (1 << 1)
  410. #define SUPPORTED_100baseT_Half (1 << 2)
  411. #define SUPPORTED_100baseT_Full (1 << 3)
  412. #define SUPPORTED_1000baseT_Half (1 << 4)
  413. #define SUPPORTED_1000baseT_Full (1 << 5)
  414. #define SUPPORTED_Autoneg (1 << 6)
  415. #define SUPPORTED_TP (1 << 7)
  416. #define SUPPORTED_AUI (1 << 8)
  417. #define SUPPORTED_MII (1 << 9)
  418. #define SUPPORTED_FIBRE (1 << 10)
  419. #define SUPPORTED_BNC (1 << 11)
  420. #define SUPPORTED_10000baseT_Full (1 << 12)
  421. #define SUPPORTED_Pause (1 << 13)
  422. #define SUPPORTED_Asym_Pause (1 << 14)
  423. #define SUPPORTED_2500baseX_Full (1 << 15)
  424. /* Indicates what features are advertised by the interface. */
  425. #define ADVERTISED_10baseT_Half (1 << 0)
  426. #define ADVERTISED_10baseT_Full (1 << 1)
  427. #define ADVERTISED_100baseT_Half (1 << 2)
  428. #define ADVERTISED_100baseT_Full (1 << 3)
  429. #define ADVERTISED_1000baseT_Half (1 << 4)
  430. #define ADVERTISED_1000baseT_Full (1 << 5)
  431. #define ADVERTISED_Autoneg (1 << 6)
  432. #define ADVERTISED_TP (1 << 7)
  433. #define ADVERTISED_AUI (1 << 8)
  434. #define ADVERTISED_MII (1 << 9)
  435. #define ADVERTISED_FIBRE (1 << 10)
  436. #define ADVERTISED_BNC (1 << 11)
  437. #define ADVERTISED_10000baseT_Full (1 << 12)
  438. #define ADVERTISED_Pause (1 << 13)
  439. #define ADVERTISED_Asym_Pause (1 << 14)
  440. #define ADVERTISED_2500baseX_Full (1 << 15)
  441. /* The following are all involved in forcing a particular link
  442. * mode for the device for setting things. When getting the
  443. * devices settings, these indicate the current mode and whether
  444. * it was foced up into this mode or autonegotiated.
  445. */
  446. /* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */
  447. #define SPEED_10 10
  448. #define SPEED_100 100
  449. #define SPEED_1000 1000
  450. #define SPEED_2500 2500
  451. #define SPEED_10000 10000
  452. /* Duplex, half or full. */
  453. #define DUPLEX_HALF 0x00
  454. #define DUPLEX_FULL 0x01
  455. /* Which connector port. */
  456. #define PORT_TP 0x00
  457. #define PORT_AUI 0x01
  458. #define PORT_MII 0x02
  459. #define PORT_FIBRE 0x03
  460. #define PORT_BNC 0x04
  461. /* Which transceiver to use. */
  462. #define XCVR_INTERNAL 0x00
  463. #define XCVR_EXTERNAL 0x01
  464. #define XCVR_DUMMY1 0x02
  465. #define XCVR_DUMMY2 0x03
  466. #define XCVR_DUMMY3 0x04
  467. /* Enable or disable autonegotiation. If this is set to enable,
  468. * the forced link modes above are completely ignored.
  469. */
  470. #define AUTONEG_DISABLE 0x00
  471. #define AUTONEG_ENABLE 0x01
  472. /* Wake-On-Lan options. */
  473. #define WAKE_PHY (1 << 0)
  474. #define WAKE_UCAST (1 << 1)
  475. #define WAKE_MCAST (1 << 2)
  476. #define WAKE_BCAST (1 << 3)
  477. #define WAKE_ARP (1 << 4)
  478. #define WAKE_MAGIC (1 << 5)
  479. #define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
  480. #endif /* _LINUX_ETHTOOL_H */