aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorNaohiro Ooiwa <nooiwa@miraclelinux.com>2009-06-30 15:44:19 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-30 15:44:19 -0400
commit01e532981460594fffbf9b992ecfc96a78369924 (patch)
tree27620cb3753545cfcbfac4800f498d30dd43ea01 /drivers/net/bnx2x_main.c
parentff0ac74afb5b9916641723a78796d4ee7937c2ea (diff)
bnx2x: Fix the behavior of ethtool when ONBOOT=no
This is the same fix as commit 7959ea254ed18faee41160b1c50b3c9664735967 ("bnx2: Fix the behavior of ethtool when ONBOOT=no"), but for bnx2x: -------------------- When configure in ifcfg-eth* is ONBOOT=no, the behavior of ethtool command is wrong. # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2 ONBOOT=no # ethtool eth2 | tail -n1 Link detected: yes I think "Link detected" should be "no". -------------------- Signed-off-by: Naohiro Ooiwa <nooiwa@miraclelinux.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index fbf1352e9c1c..951714a7f90a 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -8637,6 +8637,14 @@ static int bnx2x_nway_reset(struct net_device *dev)
8637 return 0; 8637 return 0;
8638} 8638}
8639 8639
8640static u32
8641bnx2x_get_link(struct net_device *dev)
8642{
8643 struct bnx2x *bp = netdev_priv(dev);
8644
8645 return bp->link_vars.link_up;
8646}
8647
8640static int bnx2x_get_eeprom_len(struct net_device *dev) 8648static int bnx2x_get_eeprom_len(struct net_device *dev)
8641{ 8649{
8642 struct bnx2x *bp = netdev_priv(dev); 8650 struct bnx2x *bp = netdev_priv(dev);
@@ -10034,7 +10042,7 @@ static struct ethtool_ops bnx2x_ethtool_ops = {
10034 .get_msglevel = bnx2x_get_msglevel, 10042 .get_msglevel = bnx2x_get_msglevel,
10035 .set_msglevel = bnx2x_set_msglevel, 10043 .set_msglevel = bnx2x_set_msglevel,
10036 .nway_reset = bnx2x_nway_reset, 10044 .nway_reset = bnx2x_nway_reset,
10037 .get_link = ethtool_op_get_link, 10045 .get_link = bnx2x_get_link,
10038 .get_eeprom_len = bnx2x_get_eeprom_len, 10046 .get_eeprom_len = bnx2x_get_eeprom_len,
10039 .get_eeprom = bnx2x_get_eeprom, 10047 .get_eeprom = bnx2x_get_eeprom,
10040 .set_eeprom = bnx2x_set_eeprom, 10048 .set_eeprom = bnx2x_set_eeprom,