diff options
author | Ooiwa Naohiro <nooiwa@miraclelinux.com> | 2009-06-24 03:19:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-24 03:19:06 -0400 |
commit | 7959ea254ed18faee41160b1c50b3c9664735967 (patch) | |
tree | a623d403c00259f3ad3eb56e7b627176478dde55 /drivers/net/bnx2.c | |
parent | 0f77ca928b5d1ea17afc7a95682b6534611a719c (diff) |
bnx2: Fix the behavior of ethtool when ONBOOT=no
I found a little bug.
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: Ooiwa Naohiro <nooiwa@miraclelinux.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 38f1c3375d7f..b70cc99962fc 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -6825,6 +6825,14 @@ bnx2_nway_reset(struct net_device *dev) | |||
6825 | return 0; | 6825 | return 0; |
6826 | } | 6826 | } |
6827 | 6827 | ||
6828 | static u32 | ||
6829 | bnx2_get_link(struct net_device *dev) | ||
6830 | { | ||
6831 | struct bnx2 *bp = netdev_priv(dev); | ||
6832 | |||
6833 | return bp->link_up; | ||
6834 | } | ||
6835 | |||
6828 | static int | 6836 | static int |
6829 | bnx2_get_eeprom_len(struct net_device *dev) | 6837 | bnx2_get_eeprom_len(struct net_device *dev) |
6830 | { | 6838 | { |
@@ -7392,7 +7400,7 @@ static const struct ethtool_ops bnx2_ethtool_ops = { | |||
7392 | .get_wol = bnx2_get_wol, | 7400 | .get_wol = bnx2_get_wol, |
7393 | .set_wol = bnx2_set_wol, | 7401 | .set_wol = bnx2_set_wol, |
7394 | .nway_reset = bnx2_nway_reset, | 7402 | .nway_reset = bnx2_nway_reset, |
7395 | .get_link = ethtool_op_get_link, | 7403 | .get_link = bnx2_get_link, |
7396 | .get_eeprom_len = bnx2_get_eeprom_len, | 7404 | .get_eeprom_len = bnx2_get_eeprom_len, |
7397 | .get_eeprom = bnx2_get_eeprom, | 7405 | .get_eeprom = bnx2_get_eeprom, |
7398 | .set_eeprom = bnx2_set_eeprom, | 7406 | .set_eeprom = bnx2_set_eeprom, |