aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mii.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
commit6aa20a2235535605db6d6d2bd850298b2fe7f31e (patch)
treedf0b855043407b831d57f2f2c271f8aab48444f4 /drivers/net/mii.c
parent7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 (diff)
drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/mii.c')
-rw-r--r--drivers/net/mii.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index e42aa797f08b..2912a34f597b 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -83,9 +83,9 @@ int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
83 if (bmcr & BMCR_ANENABLE) { 83 if (bmcr & BMCR_ANENABLE) {
84 ecmd->advertising |= ADVERTISED_Autoneg; 84 ecmd->advertising |= ADVERTISED_Autoneg;
85 ecmd->autoneg = AUTONEG_ENABLE; 85 ecmd->autoneg = AUTONEG_ENABLE;
86 86
87 nego = mii_nway_result(advert & lpa); 87 nego = mii_nway_result(advert & lpa);
88 if ((bmcr2 & (ADVERTISE_1000HALF | ADVERTISE_1000FULL)) & 88 if ((bmcr2 & (ADVERTISE_1000HALF | ADVERTISE_1000FULL)) &
89 (lpa2 >> 2)) 89 (lpa2 >> 2))
90 ecmd->speed = SPEED_1000; 90 ecmd->speed = SPEED_1000;
91 else if (nego == LPA_100FULL || nego == LPA_100HALF) 91 else if (nego == LPA_100FULL || nego == LPA_100HALF)
@@ -103,7 +103,7 @@ int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
103 } else { 103 } else {
104 ecmd->autoneg = AUTONEG_DISABLE; 104 ecmd->autoneg = AUTONEG_DISABLE;
105 105
106 ecmd->speed = ((bmcr & BMCR_SPEED1000 && 106 ecmd->speed = ((bmcr & BMCR_SPEED1000 &&
107 (bmcr & BMCR_SPEED100) == 0) ? SPEED_1000 : 107 (bmcr & BMCR_SPEED100) == 0) ? SPEED_1000 :
108 (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10); 108 (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10);
109 ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; 109 ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF;
@@ -118,8 +118,8 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
118{ 118{
119 struct net_device *dev = mii->dev; 119 struct net_device *dev = mii->dev;
120 120
121 if (ecmd->speed != SPEED_10 && 121 if (ecmd->speed != SPEED_10 &&
122 ecmd->speed != SPEED_100 && 122 ecmd->speed != SPEED_100 &&
123 ecmd->speed != SPEED_1000) 123 ecmd->speed != SPEED_1000)
124 return -EINVAL; 124 return -EINVAL;
125 if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL) 125 if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
@@ -134,9 +134,9 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
134 return -EINVAL; 134 return -EINVAL;
135 if ((ecmd->speed == SPEED_1000) && (!mii->supports_gmii)) 135 if ((ecmd->speed == SPEED_1000) && (!mii->supports_gmii))
136 return -EINVAL; 136 return -EINVAL;
137 137
138 /* ignore supported, maxtxpkt, maxrxpkt */ 138 /* ignore supported, maxtxpkt, maxrxpkt */
139 139
140 if (ecmd->autoneg == AUTONEG_ENABLE) { 140 if (ecmd->autoneg == AUTONEG_ENABLE) {
141 u32 bmcr, advert, tmp; 141 u32 bmcr, advert, tmp;
142 u32 advert2 = 0, tmp2 = 0; 142 u32 advert2 = 0, tmp2 = 0;
@@ -176,7 +176,7 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
176 } 176 }
177 if ((mii->supports_gmii) && (advert2 != tmp2)) 177 if ((mii->supports_gmii) && (advert2 != tmp2))
178 mii->mdio_write(dev, mii->phy_id, MII_CTRL1000, tmp2); 178 mii->mdio_write(dev, mii->phy_id, MII_CTRL1000, tmp2);
179 179
180 /* turn on autonegotiation, and force a renegotiate */ 180 /* turn on autonegotiation, and force a renegotiate */
181 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); 181 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
182 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); 182 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
@@ -188,7 +188,7 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
188 188
189 /* turn off auto negotiation, set speed and duplexity */ 189 /* turn off auto negotiation, set speed and duplexity */
190 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); 190 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
191 tmp = bmcr & ~(BMCR_ANENABLE | BMCR_SPEED100 | 191 tmp = bmcr & ~(BMCR_ANENABLE | BMCR_SPEED100 |
192 BMCR_SPEED1000 | BMCR_FULLDPLX); 192 BMCR_SPEED1000 | BMCR_FULLDPLX);
193 if (ecmd->speed == SPEED_1000) 193 if (ecmd->speed == SPEED_1000)
194 tmp |= BMCR_SPEED1000; 194 tmp |= BMCR_SPEED1000;