diff options
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 116 |
1 files changed, 63 insertions, 53 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index b33f316bb92e..276b40a16835 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -310,6 +310,7 @@ struct ethtool_perm_addr { | |||
310 | enum ethtool_flags { | 310 | enum ethtool_flags { |
311 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ | 311 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ |
312 | ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */ | 312 | ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */ |
313 | ETH_FLAG_RXHASH = (1 << 28), | ||
313 | }; | 314 | }; |
314 | 315 | ||
315 | /* The following structures are for supporting RX network flow | 316 | /* The following structures are for supporting RX network flow |
@@ -490,12 +491,12 @@ void ethtool_ntuple_flush(struct net_device *dev); | |||
490 | * get_ufo: Report whether UDP fragmentation offload is enabled | 491 | * get_ufo: Report whether UDP fragmentation offload is enabled |
491 | * set_ufo: Turn UDP fragmentation offload on or off | 492 | * set_ufo: Turn UDP fragmentation offload on or off |
492 | * self_test: Run specified self-tests | 493 | * self_test: Run specified self-tests |
493 | * get_strings: Return a set of strings that describe the requested objects | 494 | * get_strings: Return a set of strings that describe the requested objects |
494 | * phys_id: Identify the device | 495 | * phys_id: Identify the device |
495 | * get_stats: Return statistics about the device | 496 | * get_stats: Return statistics about the device |
496 | * get_flags: get 32-bit flags bitmap | 497 | * get_flags: get 32-bit flags bitmap |
497 | * set_flags: set 32-bit flags bitmap | 498 | * set_flags: set 32-bit flags bitmap |
498 | * | 499 | * |
499 | * Description: | 500 | * Description: |
500 | * | 501 | * |
501 | * get_settings: | 502 | * get_settings: |
@@ -531,14 +532,20 @@ struct ethtool_ops { | |||
531 | int (*nway_reset)(struct net_device *); | 532 | int (*nway_reset)(struct net_device *); |
532 | u32 (*get_link)(struct net_device *); | 533 | u32 (*get_link)(struct net_device *); |
533 | int (*get_eeprom_len)(struct net_device *); | 534 | int (*get_eeprom_len)(struct net_device *); |
534 | int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); | 535 | int (*get_eeprom)(struct net_device *, |
535 | int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); | 536 | struct ethtool_eeprom *, u8 *); |
537 | int (*set_eeprom)(struct net_device *, | ||
538 | struct ethtool_eeprom *, u8 *); | ||
536 | int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); | 539 | int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); |
537 | int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); | 540 | int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); |
538 | void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); | 541 | void (*get_ringparam)(struct net_device *, |
539 | int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); | 542 | struct ethtool_ringparam *); |
540 | void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*); | 543 | int (*set_ringparam)(struct net_device *, |
541 | int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*); | 544 | struct ethtool_ringparam *); |
545 | void (*get_pauseparam)(struct net_device *, | ||
546 | struct ethtool_pauseparam*); | ||
547 | int (*set_pauseparam)(struct net_device *, | ||
548 | struct ethtool_pauseparam*); | ||
542 | u32 (*get_rx_csum)(struct net_device *); | 549 | u32 (*get_rx_csum)(struct net_device *); |
543 | int (*set_rx_csum)(struct net_device *, u32); | 550 | int (*set_rx_csum)(struct net_device *, u32); |
544 | u32 (*get_tx_csum)(struct net_device *); | 551 | u32 (*get_tx_csum)(struct net_device *); |
@@ -550,21 +557,24 @@ struct ethtool_ops { | |||
550 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 557 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
551 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 558 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
552 | int (*phys_id)(struct net_device *, u32); | 559 | int (*phys_id)(struct net_device *, u32); |
553 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); | 560 | void (*get_ethtool_stats)(struct net_device *, |
561 | struct ethtool_stats *, u64 *); | ||
554 | int (*begin)(struct net_device *); | 562 | int (*begin)(struct net_device *); |
555 | void (*complete)(struct net_device *); | 563 | void (*complete)(struct net_device *); |
556 | u32 (*get_ufo)(struct net_device *); | 564 | u32 (*get_ufo)(struct net_device *); |
557 | int (*set_ufo)(struct net_device *, u32); | 565 | int (*set_ufo)(struct net_device *, u32); |
558 | u32 (*get_flags)(struct net_device *); | 566 | u32 (*get_flags)(struct net_device *); |
559 | int (*set_flags)(struct net_device *, u32); | 567 | int (*set_flags)(struct net_device *, u32); |
560 | u32 (*get_priv_flags)(struct net_device *); | 568 | u32 (*get_priv_flags)(struct net_device *); |
561 | int (*set_priv_flags)(struct net_device *, u32); | 569 | int (*set_priv_flags)(struct net_device *, u32); |
562 | int (*get_sset_count)(struct net_device *, int); | 570 | int (*get_sset_count)(struct net_device *, int); |
563 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); | 571 | int (*get_rxnfc)(struct net_device *, |
572 | struct ethtool_rxnfc *, void *); | ||
564 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); | 573 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
565 | int (*flash_device)(struct net_device *, struct ethtool_flash *); | 574 | int (*flash_device)(struct net_device *, struct ethtool_flash *); |
566 | int (*reset)(struct net_device *, u32 *); | 575 | int (*reset)(struct net_device *, u32 *); |
567 | int (*set_rx_ntuple)(struct net_device *, struct ethtool_rx_ntuple *); | 576 | int (*set_rx_ntuple)(struct net_device *, |
577 | struct ethtool_rx_ntuple *); | ||
568 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); | 578 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); |
569 | }; | 579 | }; |
570 | #endif /* __KERNEL__ */ | 580 | #endif /* __KERNEL__ */ |
@@ -576,29 +586,29 @@ struct ethtool_ops { | |||
576 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ | 586 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ |
577 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ | 587 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ |
578 | #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ | 588 | #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ |
579 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ | 589 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ |
580 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ | 590 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ |
581 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ | 591 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ |
582 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ | 592 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ |
583 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ | 593 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ |
584 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ | 594 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ |
585 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ | 595 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ |
586 | #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ | 596 | #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ |
587 | #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ | 597 | #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ |
588 | #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ | 598 | #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ |
589 | #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ | 599 | #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ |
590 | #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ | 600 | #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ |
591 | #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ | 601 | #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ |
592 | #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ | 602 | #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ |
593 | #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ | 603 | #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ |
594 | #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ | 604 | #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ |
595 | #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable | 605 | #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable |
596 | * (ethtool_value) */ | 606 | * (ethtool_value) */ |
597 | #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable | 607 | #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable |
598 | * (ethtool_value). */ | 608 | * (ethtool_value). */ |
599 | #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ | 609 | #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ |
600 | #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ | 610 | #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ |
601 | #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ | 611 | #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ |
602 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ | 612 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ |
603 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ | 613 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ |
604 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ | 614 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ |
@@ -609,24 +619,24 @@ struct ethtool_ops { | |||
609 | #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ | 619 | #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ |
610 | #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ | 620 | #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ |
611 | #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ | 621 | #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ |
612 | #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ | 622 | #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ |
613 | #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ | 623 | #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ |
614 | 624 | ||
615 | #define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ | 625 | #define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ |
616 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ | 626 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ |
617 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ | 627 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ |
618 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ | 628 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ |
619 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ | 629 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ |
620 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ | 630 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ |
621 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ | 631 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ |
622 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ | 632 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ |
623 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ | 633 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ |
624 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 634 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
625 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 635 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
626 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | 636 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ |
627 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 637 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ |
628 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 638 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
629 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ | 639 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
630 | 640 | ||
631 | /* compatibility with older code */ | 641 | /* compatibility with older code */ |
632 | #define SPARC_ETH_GSET ETHTOOL_GSET | 642 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -635,18 +645,18 @@ struct ethtool_ops { | |||
635 | /* Indicates what features are supported by the interface. */ | 645 | /* Indicates what features are supported by the interface. */ |
636 | #define SUPPORTED_10baseT_Half (1 << 0) | 646 | #define SUPPORTED_10baseT_Half (1 << 0) |
637 | #define SUPPORTED_10baseT_Full (1 << 1) | 647 | #define SUPPORTED_10baseT_Full (1 << 1) |
638 | #define SUPPORTED_100baseT_Half (1 << 2) | 648 | #define SUPPORTED_100baseT_Half (1 << 2) |
639 | #define SUPPORTED_100baseT_Full (1 << 3) | 649 | #define SUPPORTED_100baseT_Full (1 << 3) |
640 | #define SUPPORTED_1000baseT_Half (1 << 4) | 650 | #define SUPPORTED_1000baseT_Half (1 << 4) |
641 | #define SUPPORTED_1000baseT_Full (1 << 5) | 651 | #define SUPPORTED_1000baseT_Full (1 << 5) |
642 | #define SUPPORTED_Autoneg (1 << 6) | 652 | #define SUPPORTED_Autoneg (1 << 6) |
643 | #define SUPPORTED_TP (1 << 7) | 653 | #define SUPPORTED_TP (1 << 7) |
644 | #define SUPPORTED_AUI (1 << 8) | 654 | #define SUPPORTED_AUI (1 << 8) |
645 | #define SUPPORTED_MII (1 << 9) | 655 | #define SUPPORTED_MII (1 << 9) |
646 | #define SUPPORTED_FIBRE (1 << 10) | 656 | #define SUPPORTED_FIBRE (1 << 10) |
647 | #define SUPPORTED_BNC (1 << 11) | 657 | #define SUPPORTED_BNC (1 << 11) |
648 | #define SUPPORTED_10000baseT_Full (1 << 12) | 658 | #define SUPPORTED_10000baseT_Full (1 << 12) |
649 | #define SUPPORTED_Pause (1 << 13) | 659 | #define SUPPORTED_Pause (1 << 13) |
650 | #define SUPPORTED_Asym_Pause (1 << 14) | 660 | #define SUPPORTED_Asym_Pause (1 << 14) |
651 | #define SUPPORTED_2500baseX_Full (1 << 15) | 661 | #define SUPPORTED_2500baseX_Full (1 << 15) |
652 | #define SUPPORTED_Backplane (1 << 16) | 662 | #define SUPPORTED_Backplane (1 << 16) |
@@ -656,8 +666,8 @@ struct ethtool_ops { | |||
656 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 666 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
657 | 667 | ||
658 | /* Indicates what features are advertised by the interface. */ | 668 | /* Indicates what features are advertised by the interface. */ |
659 | #define ADVERTISED_10baseT_Half (1 << 0) | 669 | #define ADVERTISED_10baseT_Half (1 << 0) |
660 | #define ADVERTISED_10baseT_Full (1 << 1) | 670 | #define ADVERTISED_10baseT_Full (1 << 1) |
661 | #define ADVERTISED_100baseT_Half (1 << 2) | 671 | #define ADVERTISED_100baseT_Half (1 << 2) |
662 | #define ADVERTISED_100baseT_Full (1 << 3) | 672 | #define ADVERTISED_100baseT_Full (1 << 3) |
663 | #define ADVERTISED_1000baseT_Half (1 << 4) | 673 | #define ADVERTISED_1000baseT_Half (1 << 4) |
@@ -696,12 +706,12 @@ struct ethtool_ops { | |||
696 | #define DUPLEX_FULL 0x01 | 706 | #define DUPLEX_FULL 0x01 |
697 | 707 | ||
698 | /* Which connector port. */ | 708 | /* Which connector port. */ |
699 | #define PORT_TP 0x00 | 709 | #define PORT_TP 0x00 |
700 | #define PORT_AUI 0x01 | 710 | #define PORT_AUI 0x01 |
701 | #define PORT_MII 0x02 | 711 | #define PORT_MII 0x02 |
702 | #define PORT_FIBRE 0x03 | 712 | #define PORT_FIBRE 0x03 |
703 | #define PORT_BNC 0x04 | 713 | #define PORT_BNC 0x04 |
704 | #define PORT_DA 0x05 | 714 | #define PORT_DA 0x05 |
705 | #define PORT_NONE 0xef | 715 | #define PORT_NONE 0xef |
706 | #define PORT_OTHER 0xff | 716 | #define PORT_OTHER 0xff |
707 | 717 | ||
@@ -715,7 +725,7 @@ struct ethtool_ops { | |||
715 | /* Enable or disable autonegotiation. If this is set to enable, | 725 | /* Enable or disable autonegotiation. If this is set to enable, |
716 | * the forced link modes above are completely ignored. | 726 | * the forced link modes above are completely ignored. |
717 | */ | 727 | */ |
718 | #define AUTONEG_DISABLE 0x00 | 728 | #define AUTONEG_DISABLE 0x00 |
719 | #define AUTONEG_ENABLE 0x01 | 729 | #define AUTONEG_ENABLE 0x01 |
720 | 730 | ||
721 | /* Mode MDI or MDI-X */ | 731 | /* Mode MDI or MDI-X */ |
@@ -746,8 +756,8 @@ struct ethtool_ops { | |||
746 | #define AH_V6_FLOW 0x0b | 756 | #define AH_V6_FLOW 0x0b |
747 | #define ESP_V6_FLOW 0x0c | 757 | #define ESP_V6_FLOW 0x0c |
748 | #define IP_USER_FLOW 0x0d | 758 | #define IP_USER_FLOW 0x0d |
749 | #define IPV4_FLOW 0x10 | 759 | #define IPV4_FLOW 0x10 |
750 | #define IPV6_FLOW 0x11 | 760 | #define IPV6_FLOW 0x11 |
751 | 761 | ||
752 | /* L3-L4 network traffic flow hash options */ | 762 | /* L3-L4 network traffic flow hash options */ |
753 | #define RXH_L2DA (1 << 1) | 763 | #define RXH_L2DA (1 << 1) |