bnxt_en: Fix ethtool autoneg logic.
authorMichael Chan <mchan@broadcom.com>
Wed, 10 Feb 2016 22:33:46 +0000 (17:33 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2016 20:50:01 +0000 (15:50 -0500)
commitb763499ee16b74707af0fb26ab0a26bd9719870b
treebb056c7adca1d54aa8f9e2ba31df126cd6b2829e
parent56bb7fd994f4cc163de08006bf68d959027a9f36
bnxt_en: Fix ethtool autoneg logic.

1. Determine autoneg on|off setting from link_info->autoneg.  Using the
firmware returned setting can be misleading if autoneg is changed and
there hasn't been a phy update from the firmware.

2. If autoneg is disabled, link_info->autoneg should be set to 0 to
indicate both speed and flow control autoneg are disabled.

3. To enable autoneg flow control, speed autoneg must be enabled.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c