Replace the magic numbers with ANAR register setting for the flow control
support with the proper standard define from mii.h.


Index: atphy.c
===================================================================
RCS file: /cvs/src/sys/dev/mii/atphy.c,v
retrieving revision 1.2
diff -u -p -r1.2 atphy.c
--- atphy.c     23 Mar 2009 05:26:47 -0000      1.2
+++ atphy.c     25 Jul 2009 11:32:41 -0000
@@ -202,7 +202,7 @@ atphy_service(struct mii_softc *sc, stru
                        bmcr |= BMCR_FDX;
                        /* Enable pause. */
                        if (sc->mii_flags & MIIF_DOPAUSE)
-                               anar |= (3 << 10);
+                               anar |= ANAR_PAUSE_TOWARDS;
                }
 
                if ((sc->mii_extcapabilities & (EXTSR_1000TFDX |
@@ -374,7 +374,7 @@ atphy_mii_phy_auto(struct mii_softc *sc)
 
        anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA;
        if (sc->mii_flags & MIIF_DOPAUSE)
-               anar |= (3 << 10);
+               anar |= ANAR_PAUSE_TOWARDS;
        PHY_WRITE(sc, MII_ANAR, anar);
        if (sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX))
                PHY_WRITE(sc, MII_100T2CR, GTCR_ADV_1000TFDX |

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to