be2net: Fix to not set link speed for disabled functions of a UMC card
authorSomnath Kotur <somnath.kotur@emulex.com>
Wed, 2 May 2012 03:40:16 +0000 (03:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2012 01:07:24 +0000 (21:07 -0400)
This renders the interface view somewhat inconsistent from the Host OS POV
considering the rest of the interfaces are showing their respective speeds
based on the bandwidth assigned to them.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_ethtool.c

index 7b06f3592bd77a0486c2a9f828cb135442554293..c9ba2cbbd51849a686f09744dc655e5ce2f28e2b 100644 (file)
@@ -558,7 +558,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
                                be_link_status_update(adapter, link_status);
                        if (link_speed)
                                et_speed = link_speed * 10;
-                       else
+                       else if (link_status)
                                et_speed = convert_to_et_speed(port_speed);
                } else {
                        et_speed = adapter->phy.forced_port_speed;