- Kai Germaschewski: ISDN update (including Makefiles)
[davej-history.git] / include / linux / ethtool.h
blob384171b3f6eb3aa2483fda14c108aec4ebd0f7eb
1 /* $Id: ethtool.h,v 1.2 2000/11/12 10:05:57 davem Exp $
2 * ethtool.h: Defines for Linux ethtool.
4 * Copyright (C) 1998 David S. Miller (davem@redhat.com)
5 */
7 #ifndef _LINUX_ETHTOOL_H
8 #define _LINUX_ETHTOOL_H
11 /* This should work for both 32 and 64 bit userland. */
12 struct ethtool_cmd {
13 u32 cmd;
14 u32 supported; /* Features this interface supports */
15 u32 advertising; /* Features this interface advertises */
16 u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */
17 u8 duplex; /* Duplex, half or full */
18 u8 port; /* Which connector port */
19 u8 phy_address;
20 u8 transceiver; /* Which tranceiver to use */
21 u8 autoneg; /* Enable or disable autonegotiation */
22 u32 maxtxpkt; /* Tx pkts before generating tx int */
23 u32 maxrxpkt; /* Rx pkts before generating rx int */
24 u32 reserved[4];
28 /* CMDs currently supported */
29 #define ETHTOOL_GSET 0x00000001 /* Get settings, non-privileged. */
30 #define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */
32 /* compatibility with older code */
33 #define SPARC_ETH_GSET ETHTOOL_GSET
34 #define SPARC_ETH_SSET ETHTOOL_SSET
36 /* Indicates what features are supported by the interface. */
37 #define SUPPORTED_10baseT_Half (1 << 0)
38 #define SUPPORTED_10baseT_Full (1 << 1)
39 #define SUPPORTED_100baseT_Half (1 << 2)
40 #define SUPPORTED_100baseT_Full (1 << 3)
41 #define SUPPORTED_1000baseT_Half (1 << 4)
42 #define SUPPORTED_1000baseT_Full (1 << 5)
43 #define SUPPORTED_Autoneg (1 << 6)
44 #define SUPPORTED_TP (1 << 7)
45 #define SUPPORTED_AUI (1 << 8)
46 #define SUPPORTED_MII (1 << 9)
47 #define SUPPORTED_FIBRE (1 << 10)
49 /* Indicates what features are advertised by the interface. */
50 #define ADVERTISED_10baseT_Half (1 << 0)
51 #define ADVERTISED_10baseT_Full (1 << 1)
52 #define ADVERTISED_100baseT_Half (1 << 2)
53 #define ADVERTISED_100baseT_Full (1 << 3)
54 #define ADVERTISED_1000baseT_Half (1 << 4)
55 #define ADVERTISED_1000baseT_Full (1 << 5)
56 #define ADVERTISED_Autoneg (1 << 6)
57 #define ADVERTISED_TP (1 << 7)
58 #define ADVERTISED_AUI (1 << 8)
59 #define ADVERTISED_MII (1 << 9)
60 #define ADVERTISED_FIBRE (1 << 10)
62 /* The following are all involved in forcing a particular link
63 * mode for the device for setting things. When getting the
64 * devices settings, these indicate the current mode and whether
65 * it was foced up into this mode or autonegotiated.
68 /* The forced speed, 10Mb, 100Mb, gigabit. */
69 #define SPEED_10 10
70 #define SPEED_100 100
71 #define SPEED_1000 1000
73 /* Duplex, half or full. */
74 #define DUPLEX_HALF 0x00
75 #define DUPLEX_FULL 0x01
77 /* Which connector port. */
78 #define PORT_TP 0x00
79 #define PORT_AUI 0x01
80 #define PORT_MII 0x02
81 #define PORT_FIBRE 0x03
82 #define PORT_BNC 0x04
84 /* Which tranceiver to use. */
85 #define XCVR_INTERNAL 0x00
86 #define XCVR_EXTERNAL 0x01
87 #define XCVR_DUMMY1 0x02
88 #define XCVR_DUMMY2 0x03
89 #define XCVR_DUMMY3 0x04
91 /* Enable or disable autonegotiation. If this is set to enable,
92 * the forced link modes above are completely ignored.
94 #define AUTONEG_DISABLE 0x00
95 #define AUTONEG_ENABLE 0x01
97 #endif /* _LINUX_ETHTOOL_H */