From 682256dbef8e827385cf214f3ada8b62f6c227ed Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Wed, 2 May 2012 03:40:32 +0000 Subject: be2net: Fix to apply duplex value as unknown when link is down. Suggested-by: Ben Hutchings Signed-off-by: Sarveshwar Bandi Signed-off-by: Somnath Kotur Signed-off-by: David S. Miller --- drivers/net/ethernet/emulex/benet/be_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c index c9ba2cbbd518..747f68fa976d 100644 --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c @@ -618,7 +618,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ecmd->supported = adapter->phy.supported; } - ecmd->duplex = DUPLEX_FULL; + ecmd->duplex = netif_carrier_ok(netdev) ? DUPLEX_FULL : DUPLEX_UNKNOWN; ecmd->phy_address = adapter->port_num; return 0; -- cgit v1.2.3