From 38bb045d493cc166920834087acd934dedc1b5d5 Mon Sep 17 00:00:00 2001 From: Constantin Baranov Date: Wed, 18 Feb 2009 17:53:20 -0800 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/niu.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/net/niu.h') 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 { }; struct niu_link_config { + u32 supported; + /* Describes what we're trying to get. */ u32 advertising; - u32 supported; u16 speed; u8 duplex; u8 autoneg; /* Describes what we actually have. */ + u32 active_advertising; u16 active_speed; u8 active_duplex; + u8 active_autoneg; #define SPEED_INVALID 0xffff #define DUPLEX_INVALID 0xff #define AUTONEG_INVALID 0xff -- cgit v1.2.2