summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnx2.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-11-17 18:30:55 +0400
committerDavid S. Miller <davem@davemloft.net>2011-11-22 00:27:19 +0400
commit37f07023d30708b5da091fe6d6be9b60783c6d82 (patch)
treee4f576abd841cdeddc6cbdc9da6b083277784295 /drivers/net/ethernet/broadcom/bnx2.c
parentb8ffdbd05f8692cdadccd04464271e48b1e8d439 (diff)
downloadlinux-37f07023d30708b5da091fe6d6be9b60783c6d82.tar.xz
net: Change mii to ethtool advertisement function names
This patch implements advice by Ben Hutchings to change the mii side of the function names to look more like the register whose values they convert. New LPA translation functions have been added as well. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 66f6e7f654c3..83d8cefba8c0 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -2054,8 +2054,8 @@ __acquires(&bp->phy_lock)
if (bp->autoneg & AUTONEG_SPEED) {
u32 adv_reg, adv1000_reg;
- u32 new_adv_reg = 0;
- u32 new_adv1000_reg = 0;
+ u32 new_adv = 0;
+ u32 new_adv1000 = 0;
bnx2_read_phy(bp, bp->mii_adv, &adv_reg);
adv_reg &= (PHY_ALL_10_100_SPEED | ADVERTISE_PAUSE_CAP |
@@ -2064,18 +2064,18 @@ __acquires(&bp->phy_lock)
bnx2_read_phy(bp, MII_CTRL1000, &adv1000_reg);
adv1000_reg &= PHY_ALL_1000_SPEED;
- new_adv_reg = ethtool_adv_to_mii_100bt(bp->advertising);
- new_adv_reg |= ADVERTISE_CSMA;
- new_adv_reg |= bnx2_phy_get_pause_adv(bp);
+ new_adv = ethtool_adv_to_mii_adv_t(bp->advertising);
+ new_adv |= ADVERTISE_CSMA;
+ new_adv |= bnx2_phy_get_pause_adv(bp);
- new_adv1000_reg |= ethtool_adv_to_mii_1000T(bp->advertising);
+ new_adv1000 |= ethtool_adv_to_mii_ctrl1000_t(bp->advertising);
- if ((adv1000_reg != new_adv1000_reg) ||
- (adv_reg != new_adv_reg) ||
+ if ((adv1000_reg != new_adv1000) ||
+ (adv_reg != new_adv) ||
((bmcr & BMCR_ANENABLE) == 0)) {
- bnx2_write_phy(bp, bp->mii_adv, new_adv_reg);
- bnx2_write_phy(bp, MII_CTRL1000, new_adv1000_reg);
+ bnx2_write_phy(bp, bp->mii_adv, new_adv);
+ bnx2_write_phy(bp, MII_CTRL1000, new_adv1000);
bnx2_write_phy(bp, bp->mii_bmcr, BMCR_ANRESTART |
BMCR_ANENABLE);
}