diff options
author | Constantin Baranov <baranov@mercdev.com> | 2009-02-18 20:53:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-18 20:53:20 -0500 |
commit | 38bb045d493cc166920834087acd934dedc1b5d5 (patch) | |
tree | 361c59343742e3743d40a09129a90d73581bdcb4 /drivers/net/niu.h | |
parent | e0d8496a66de9eca13a88d93a5642db47e5a2b60 (diff) |
niu: improve ethtool support for gigabit copper cards
Introduced support for link speed and duplex setting (ethtool -s),
link advertising parameters and autonegotiation (ethtool -r):
- struct niu_link_config: split advertising and autoneg
fields into active and target values (similar to speed
and duplex fields)
- mii_init_common(): rewrite function to actually apply
requested niu_link_config parameters instead of providing
default initialization
- link_status_1g(): move parsing of MII registers into
new link_status_mii() function (link_status_1g_rgmii()
could possibly use this new implementation too)
- introduce simple nway_reset method
- fix incorrect XMAC_CONFIG_MODE selection for 10Mbps case
Signed-off-by: Constantin Baranov <baranov@mercdev.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/niu.h')
-rw-r--r-- | drivers/net/niu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/niu.h b/drivers/net/niu.h index e1a7392e8d70..5a002375b35b 100644 --- a/drivers/net/niu.h +++ b/drivers/net/niu.h | |||
@@ -3131,16 +3131,19 @@ struct niu_ops { | |||
3131 | }; | 3131 | }; |
3132 | 3132 | ||
3133 | struct niu_link_config { | 3133 | struct niu_link_config { |
3134 | u32 supported; | ||
3135 | |||
3134 | /* Describes what we're trying to get. */ | 3136 | /* Describes what we're trying to get. */ |
3135 | u32 advertising; | 3137 | u32 advertising; |
3136 | u32 supported; | ||
3137 | u16 speed; | 3138 | u16 speed; |
3138 | u8 duplex; | 3139 | u8 duplex; |
3139 | u8 autoneg; | 3140 | u8 autoneg; |
3140 | 3141 | ||
3141 | /* Describes what we actually have. */ | 3142 | /* Describes what we actually have. */ |
3143 | u32 active_advertising; | ||
3142 | u16 active_speed; | 3144 | u16 active_speed; |
3143 | u8 active_duplex; | 3145 | u8 active_duplex; |
3146 | u8 active_autoneg; | ||
3144 | #define SPEED_INVALID 0xffff | 3147 | #define SPEED_INVALID 0xffff |
3145 | #define DUPLEX_INVALID 0xff | 3148 | #define DUPLEX_INVALID 0xff |
3146 | #define AUTONEG_INVALID 0xff | 3149 | #define AUTONEG_INVALID 0xff |