Commit 7959ea25 authored by Ooiwa Naohiro's avatar Ooiwa Naohiro Committed by David S. Miller

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: default avatarOoiwa Naohiro <nooiwa@miraclelinux.com>
Acked-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f77ca92
...@@ -6825,6 +6825,14 @@ bnx2_nway_reset(struct net_device *dev) ...@@ -6825,6 +6825,14 @@ bnx2_nway_reset(struct net_device *dev)
return 0; return 0;
} }
static u32
bnx2_get_link(struct net_device *dev)
{
struct bnx2 *bp = netdev_priv(dev);
return bp->link_up;
}
static int static int
bnx2_get_eeprom_len(struct net_device *dev) bnx2_get_eeprom_len(struct net_device *dev)
{ {
...@@ -7392,7 +7400,7 @@ static const struct ethtool_ops bnx2_ethtool_ops = { ...@@ -7392,7 +7400,7 @@ static const struct ethtool_ops bnx2_ethtool_ops = {
.get_wol = bnx2_get_wol, .get_wol = bnx2_get_wol,
.set_wol = bnx2_set_wol, .set_wol = bnx2_set_wol,
.nway_reset = bnx2_nway_reset, .nway_reset = bnx2_nway_reset,
.get_link = ethtool_op_get_link, .get_link = bnx2_get_link,
.get_eeprom_len = bnx2_get_eeprom_len, .get_eeprom_len = bnx2_get_eeprom_len,
.get_eeprom = bnx2_get_eeprom, .get_eeprom = bnx2_get_eeprom,
.set_eeprom = bnx2_set_eeprom, .set_eeprom = bnx2_set_eeprom,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment