Go to the documentation of this file.
13 #ifndef _UAPI_LINUX_ETHTOOL_H
14 #define _UAPI_LINUX_ETHTOOL_H
16 #include <linux/types.h>
17 #include <linux/if_ether.h>
53 static inline void ethtool_cmd_speed_set(
struct ethtool_cmd *ep,
71 #define ETH_MDIO_SUPPORTS_C22 1
78 #define ETH_MDIO_SUPPORTS_C45 2
80 #define ETHTOOL_FWVERS_LEN 32
81 #define ETHTOOL_BUSINFO_LEN 32
351 #define ETH_GSTRING_LEN 32
475 #define ETH_RX_NFC_IP4 1
653 #define ETHTOOL_RXNTUPLE_ACTION_DROP (-1)
654 #define ETHTOOL_RXNTUPLE_ACTION_CLEAR (-2)
667 #define ETHTOOL_FLASH_MAX_FILENAME 128
694 #define ETH_FW_DUMP_DISABLE 0
809 #define ETHTOOL_F_UNSUPPORTED (1 << ETHTOOL_F_UNSUPPORTED__BIT)
810 #define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)
811 #define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)
815 #define ETHTOOL_GSET 0x00000001
816 #define ETHTOOL_SSET 0x00000002
817 #define ETHTOOL_GDRVINFO 0x00000003
818 #define ETHTOOL_GREGS 0x00000004
819 #define ETHTOOL_GWOL 0x00000005
820 #define ETHTOOL_SWOL 0x00000006
821 #define ETHTOOL_GMSGLVL 0x00000007
822 #define ETHTOOL_SMSGLVL 0x00000008
823 #define ETHTOOL_NWAY_RST 0x00000009
826 #define ETHTOOL_GLINK 0x0000000a
827 #define ETHTOOL_GEEPROM 0x0000000b
828 #define ETHTOOL_SEEPROM 0x0000000c
829 #define ETHTOOL_GCOALESCE 0x0000000e
830 #define ETHTOOL_SCOALESCE 0x0000000f
831 #define ETHTOOL_GRINGPARAM 0x00000010
832 #define ETHTOOL_SRINGPARAM 0x00000011
833 #define ETHTOOL_GPAUSEPARAM 0x00000012
834 #define ETHTOOL_SPAUSEPARAM 0x00000013
835 #define ETHTOOL_GRXCSUM 0x00000014
836 #define ETHTOOL_SRXCSUM 0x00000015
837 #define ETHTOOL_GTXCSUM 0x00000016
838 #define ETHTOOL_STXCSUM 0x00000017
839 #define ETHTOOL_GSG 0x00000018
841 #define ETHTOOL_SSG 0x00000019
843 #define ETHTOOL_TEST 0x0000001a
844 #define ETHTOOL_GSTRINGS 0x0000001b
845 #define ETHTOOL_PHYS_ID 0x0000001c
846 #define ETHTOOL_GSTATS 0x0000001d
847 #define ETHTOOL_GTSO 0x0000001e
848 #define ETHTOOL_STSO 0x0000001f
849 #define ETHTOOL_GPERMADDR 0x00000020
850 #define ETHTOOL_GUFO 0x00000021
851 #define ETHTOOL_SUFO 0x00000022
852 #define ETHTOOL_GGSO 0x00000023
853 #define ETHTOOL_SGSO 0x00000024
854 #define ETHTOOL_GFLAGS 0x00000025
855 #define ETHTOOL_SFLAGS 0x00000026
856 #define ETHTOOL_GPFLAGS 0x00000027
857 #define ETHTOOL_SPFLAGS 0x00000028
859 #define ETHTOOL_GRXFH 0x00000029
860 #define ETHTOOL_SRXFH 0x0000002a
861 #define ETHTOOL_GGRO 0x0000002b
862 #define ETHTOOL_SGRO 0x0000002c
863 #define ETHTOOL_GRXRINGS 0x0000002d
864 #define ETHTOOL_GRXCLSRLCNT 0x0000002e
865 #define ETHTOOL_GRXCLSRULE 0x0000002f
866 #define ETHTOOL_GRXCLSRLALL 0x00000030
867 #define ETHTOOL_SRXCLSRLDEL 0x00000031
868 #define ETHTOOL_SRXCLSRLINS 0x00000032
869 #define ETHTOOL_FLASHDEV 0x00000033
870 #define ETHTOOL_RESET 0x00000034
871 #define ETHTOOL_SRXNTUPLE 0x00000035
872 #define ETHTOOL_GRXNTUPLE 0x00000036
873 #define ETHTOOL_GSSET_INFO 0x00000037
874 #define ETHTOOL_GRXFHINDIR 0x00000038
875 #define ETHTOOL_SRXFHINDIR 0x00000039
877 #define ETHTOOL_GFEATURES 0x0000003a
878 #define ETHTOOL_SFEATURES 0x0000003b
879 #define ETHTOOL_GCHANNELS 0x0000003c
880 #define ETHTOOL_SCHANNELS 0x0000003d
881 #define ETHTOOL_SET_DUMP 0x0000003e
882 #define ETHTOOL_GET_DUMP_FLAG 0x0000003f
883 #define ETHTOOL_GET_DUMP_DATA 0x00000040
884 #define ETHTOOL_GET_TS_INFO 0x00000041
885 #define ETHTOOL_GMODULEINFO 0x00000042
886 #define ETHTOOL_GMODULEEEPROM 0x00000043
887 #define ETHTOOL_GEEE 0x00000044
888 #define ETHTOOL_SEEE 0x00000045
891 #define SPARC_ETH_GSET ETHTOOL_GSET
892 #define SPARC_ETH_SSET ETHTOOL_SSET
895 #define SUPPORTED_10baseT_Half (1 << 0)
896 #define SUPPORTED_10baseT_Full (1 << 1)
897 #define SUPPORTED_100baseT_Half (1 << 2)
898 #define SUPPORTED_100baseT_Full (1 << 3)
899 #define SUPPORTED_1000baseT_Half (1 << 4)
900 #define SUPPORTED_1000baseT_Full (1 << 5)
901 #define SUPPORTED_Autoneg (1 << 6)
902 #define SUPPORTED_TP (1 << 7)
903 #define SUPPORTED_AUI (1 << 8)
904 #define SUPPORTED_MII (1 << 9)
905 #define SUPPORTED_FIBRE (1 << 10)
906 #define SUPPORTED_BNC (1 << 11)
907 #define SUPPORTED_10000baseT_Full (1 << 12)
908 #define SUPPORTED_Pause (1 << 13)
909 #define SUPPORTED_Asym_Pause (1 << 14)
910 #define SUPPORTED_2500baseX_Full (1 << 15)
911 #define SUPPORTED_Backplane (1 << 16)
912 #define SUPPORTED_1000baseKX_Full (1 << 17)
913 #define SUPPORTED_10000baseKX4_Full (1 << 18)
914 #define SUPPORTED_10000baseKR_Full (1 << 19)
915 #define SUPPORTED_10000baseR_FEC (1 << 20)
916 #define SUPPORTED_20000baseMLD2_Full (1 << 21)
917 #define SUPPORTED_20000baseKR2_Full (1 << 22)
918 #define SUPPORTED_40000baseKR4_Full (1 << 23)
919 #define SUPPORTED_40000baseCR4_Full (1 << 24)
920 #define SUPPORTED_40000baseSR4_Full (1 << 25)
921 #define SUPPORTED_40000baseLR4_Full (1 << 26)
924 #define ADVERTISED_10baseT_Half (1 << 0)
925 #define ADVERTISED_10baseT_Full (1 << 1)
926 #define ADVERTISED_100baseT_Half (1 << 2)
927 #define ADVERTISED_100baseT_Full (1 << 3)
928 #define ADVERTISED_1000baseT_Half (1 << 4)
929 #define ADVERTISED_1000baseT_Full (1 << 5)
930 #define ADVERTISED_Autoneg (1 << 6)
931 #define ADVERTISED_TP (1 << 7)
932 #define ADVERTISED_AUI (1 << 8)
933 #define ADVERTISED_MII (1 << 9)
934 #define ADVERTISED_FIBRE (1 << 10)
935 #define ADVERTISED_BNC (1 << 11)
936 #define ADVERTISED_10000baseT_Full (1 << 12)
937 #define ADVERTISED_Pause (1 << 13)
938 #define ADVERTISED_Asym_Pause (1 << 14)
939 #define ADVERTISED_2500baseX_Full (1 << 15)
940 #define ADVERTISED_Backplane (1 << 16)
941 #define ADVERTISED_1000baseKX_Full (1 << 17)
942 #define ADVERTISED_10000baseKX4_Full (1 << 18)
943 #define ADVERTISED_10000baseKR_Full (1 << 19)
944 #define ADVERTISED_10000baseR_FEC (1 << 20)
945 #define ADVERTISED_20000baseMLD2_Full (1 << 21)
946 #define ADVERTISED_20000baseKR2_Full (1 << 22)
947 #define ADVERTISED_40000baseKR4_Full (1 << 23)
948 #define ADVERTISED_40000baseCR4_Full (1 << 24)
949 #define ADVERTISED_40000baseSR4_Full (1 << 25)
950 #define ADVERTISED_40000baseLR4_Full (1 << 26)
960 #define SPEED_100 100
961 #define SPEED_1000 1000
962 #define SPEED_2500 2500
963 #define SPEED_10000 10000
964 #define SPEED_UNKNOWN -1
967 #define DUPLEX_HALF 0x00
968 #define DUPLEX_FULL 0x01
969 #define DUPLEX_UNKNOWN 0xff
973 #define PORT_AUI 0x01
974 #define PORT_MII 0x02
975 #define PORT_FIBRE 0x03
976 #define PORT_BNC 0x04
978 #define PORT_NONE 0xef
979 #define PORT_OTHER 0xff
982 #define XCVR_INTERNAL 0x00
983 #define XCVR_EXTERNAL 0x01
984 #define XCVR_DUMMY1 0x02
985 #define XCVR_DUMMY2 0x03
986 #define XCVR_DUMMY3 0x04
991 #define AUTONEG_DISABLE 0x00
992 #define AUTONEG_ENABLE 0x01
997 #define ETH_TP_MDI_INVALID 0x00
998 #define ETH_TP_MDI 0x01
999 #define ETH_TP_MDI_X 0x02
1000 #define ETH_TP_MDI_AUTO 0x03
1003 #define WAKE_PHY (1 << 0)
1004 #define WAKE_UCAST (1 << 1)
1005 #define WAKE_MCAST (1 << 2)
1006 #define WAKE_BCAST (1 << 3)
1007 #define WAKE_ARP (1 << 4)
1008 #define WAKE_MAGIC (1 << 5)
1009 #define WAKE_MAGICSECURE (1 << 6)
1012 #define TCP_V4_FLOW 0x01
1013 #define UDP_V4_FLOW 0x02
1014 #define SCTP_V4_FLOW 0x03
1015 #define AH_ESP_V4_FLOW 0x04
1016 #define TCP_V6_FLOW 0x05
1017 #define UDP_V6_FLOW 0x06
1018 #define SCTP_V6_FLOW 0x07
1019 #define AH_ESP_V6_FLOW 0x08
1020 #define AH_V4_FLOW 0x09
1021 #define ESP_V4_FLOW 0x0a
1022 #define AH_V6_FLOW 0x0b
1023 #define ESP_V6_FLOW 0x0c
1024 #define IP_USER_FLOW 0x0d
1025 #define IPV4_FLOW 0x10
1026 #define IPV6_FLOW 0x11
1027 #define ETHER_FLOW 0x12
1029 #define FLOW_EXT 0x80000000
1032 #define RXH_L2DA (1 << 1)
1033 #define RXH_VLAN (1 << 2)
1034 #define RXH_L3_PROTO (1 << 3)
1035 #define RXH_IP_SRC (1 << 4)
1036 #define RXH_IP_DST (1 << 5)
1037 #define RXH_L4_B_0_1 (1 << 6)
1038 #define RXH_L4_B_2_3 (1 << 7)
1039 #define RXH_DISCARD (1 << 31)
1041 #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
1044 #define RX_CLS_LOC_SPECIAL 0x80000000
1045 #define RX_CLS_LOC_ANY 0xffffffff
1046 #define RX_CLS_LOC_FIRST 0xfffffffe
1047 #define RX_CLS_LOC_LAST 0xfffffffd
1050 #define ETH_MODULE_SFF_8079 0x1
1051 #define ETH_MODULE_SFF_8079_LEN 256
1052 #define ETH_MODULE_SFF_8472 0x2
1053 #define ETH_MODULE_SFF_8472_LEN 512
1083 #define ETH_RESET_SHARED_SHIFT 16