Rename IFM_homePNA to IFM_HPNA_1 and IFM_1000_TX to IFM_1000_T.
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Mon, 14 Feb 2005 16:21:34 +0000 (16:21 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Mon, 14 Feb 2005 16:21:34 +0000 (16:21 +0000)
Obtained-from: FreeBSD
Submitted-by: Andreas Hauser
15 files changed:
sys/dev/netif/bge/if_bge.c
sys/dev/netif/dc/if_dc.c
sys/dev/netif/em/if_em.c
sys/dev/netif/gx/if_gx.c
sys/dev/netif/lge/if_lge.c
sys/dev/netif/mii_layer/brgphy.c
sys/dev/netif/mii_layer/e1000phy.c
sys/dev/netif/mii_layer/nsgphy.c
sys/dev/netif/mii_layer/pnaphy.c
sys/dev/netif/my/if_my.c
sys/dev/netif/ndis/if_ndis.c
sys/dev/netif/nge/if_nge.c
sys/dev/netif/sk/if_sk.c
sys/dev/netif/ti/if_ti.c
sys/net/if_media.h

index 9a82373..dcf5ad2 100644 (file)
@@ -31,7 +31,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/bge/if_bge.c,v 1.3.2.29 2003/12/01 21:06:59 ambrisko Exp $
- * $DragonFly: src/sys/dev/netif/bge/if_bge.c,v 1.25 2005/01/23 20:21:30 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/bge/if_bge.c,v 1.26 2005/02/14 16:21:34 joerg Exp $
  *
  */
 
@@ -610,7 +610,7 @@ bge_miibus_statchg(dev)
        mii = device_get_softc(sc->bge_miibus);
 
        BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE);
-       if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX) {
+       if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
                BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII);
        } else {
                BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII);
@@ -2356,7 +2356,7 @@ bge_tick(xsc)
                if (mii->mii_media_status & IFM_ACTIVE &&
                    IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
                        sc->bge_link++;
-                       if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX ||
+                       if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T ||
                            IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX)
                                printf("bge%d: gigabit link up\n",
                                   sc->bge_unit);
index 3e671da..9bfcec9 100644 (file)
@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/if_dc.c,v 1.9.2.45 2003/06/08 14:31:53 mux Exp $
- * $DragonFly: src/sys/dev/netif/dc/if_dc.c,v 1.18 2005/01/23 20:21:30 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/dc/if_dc.c,v 1.19 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/pci/if_dc.c,v 1.9.2.45 2003/06/08 14:31:53 mux Exp $
  */
@@ -962,7 +962,7 @@ static void dc_miibus_statchg(dev)
        mii = device_get_softc(sc->dc_miibus);
        ifm = &mii->mii_media;
        if (DC_IS_DAVICOM(sc) &&
-           IFM_SUBTYPE(ifm->ifm_media) == IFM_homePNA) {
+           IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) {
                dc_setcfg(sc, ifm->ifm_media);
                sc->dc_if_media = ifm->ifm_media;
        } else {
@@ -996,7 +996,7 @@ static void dc_miibus_mediainit(dev)
        ifm = &mii->mii_media;
 
        if (DC_IS_DAVICOM(sc) && rev >= DC_REVISION_DM9102A)
-               ifmedia_add(ifm, IFM_ETHER|IFM_homePNA, 0, NULL);
+               ifmedia_add(ifm, IFM_ETHER | IFM_HPNA_1, 0, NULL);
 
        return;
 }
@@ -1416,7 +1416,7 @@ static void dc_setcfg(sc, media)
         * on the external MII port.
         */
        if (DC_IS_DAVICOM(sc)) {
-               if (IFM_SUBTYPE(media) == IFM_homePNA) {
+               if (IFM_SUBTYPE(media) == IFM_HPNA_1) {
                        DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_PORTSEL);
                        sc->dc_link = 1;
                } else {
@@ -3277,7 +3277,7 @@ static void dc_init(xsc)
        (void)splx(s);
 
        /* Don't start the ticker if this is a homePNA link. */
-       if (IFM_SUBTYPE(mii->mii_media.ifm_media) == IFM_homePNA)
+       if (IFM_SUBTYPE(mii->mii_media.ifm_media) == IFM_HPNA_1)
                sc->dc_link = 1;
        else {
                if (sc->dc_flags & DC_21143_NWAY)
@@ -3314,7 +3314,7 @@ static int dc_ifmedia_upd(ifp)
        ifm = &mii->mii_media;
 
        if (DC_IS_DAVICOM(sc) &&
-           IFM_SUBTYPE(ifm->ifm_media) == IFM_homePNA)
+           IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1)
                dc_setcfg(sc, ifm->ifm_media);
        else
                sc->dc_link = 0;
@@ -3338,7 +3338,7 @@ static void dc_ifmedia_sts(ifp, ifmr)
        mii_pollstat(mii);
        ifm = &mii->mii_media;
        if (DC_IS_DAVICOM(sc)) {
-               if (IFM_SUBTYPE(ifm->ifm_media) == IFM_homePNA) {
+               if (IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) {
                        ifmr->ifm_active = ifm->ifm_media;
                        ifmr->ifm_status = 0;
                        return;
index 3d03264..388316d 100644 (file)
@@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
 ***************************************************************************/
 
 /*$FreeBSD: src/sys/dev/em/if_em.c,v 1.2.2.15 2003/06/09 22:10:15 pdeuskar Exp $*/
-/*$DragonFly: src/sys/dev/netif/em/if_em.c,v 1.26 2005/02/05 23:23:25 joerg Exp $*/
+/*$DragonFly: src/sys/dev/netif/em/if_em.c,v 1.27 2005/02/14 16:21:34 joerg Exp $*/
 
 #include "if_em.h"
 
@@ -997,7 +997,7 @@ em_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
                        ifmr->ifm_active |= IFM_100_TX;
                        break;
                case 1000:
-                       ifmr->ifm_active |= IFM_1000_TX;
+                       ifmr->ifm_active |= IFM_1000_T;
                        break;
                }
                if (adapter->link_duplex == FULL_DUPLEX)
@@ -1032,7 +1032,7 @@ em_media_change(struct ifnet *ifp)
                adapter->hw.autoneg_advertised = AUTONEG_ADV_DEFAULT;
                break;
        case IFM_1000_SX:
-       case IFM_1000_TX:
+       case IFM_1000_T:
                adapter->hw.autoneg = DO_AUTO_NEG;
                adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL;
                break;
@@ -1677,9 +1677,9 @@ em_setup_interface(device_t dev, struct adapter *adapter)
                            0, NULL);
                ifmedia_add(&adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 
                            0, NULL);
-               ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_TX | IFM_FDX, 
+               ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 
                            0, NULL);
-               ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_TX, 0, NULL);
+               ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL);
        }
        ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
        ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);
index 5b76516..24f98b5 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/gx/if_gx.c,v 1.2.2.3 2001/12/14 19:51:39 jlemon Exp $
- * $DragonFly: src/sys/dev/netif/gx/Attic/if_gx.c,v 1.11 2005/01/23 20:21:31 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/gx/Attic/if_gx.c,v 1.12 2005/02/14 16:21:34 joerg Exp $
  */
 
 #include <sys/param.h>
@@ -723,7 +723,7 @@ gx_ifmedia_upd(struct ifnet *ifp)
                 * 1000TX half duplex does not work.
                 */
                if (IFM_TYPE(ifm->ifm_media) == IFM_ETHER &&
-                   IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_TX &&
+                   IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_T &&
                    (IFM_OPTIONS(ifm->ifm_media) & IFM_FDX) == 0)
                        return (EINVAL);
                mii = device_get_softc(gx->gx_miibus);
@@ -757,8 +757,8 @@ gx_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
        } else {
                mii = device_get_softc(gx->gx_miibus);
                mii_pollstat(mii);
-               if ((mii->mii_media_active & (IFM_1000_TX | IFM_HDX)) ==
-                   (IFM_1000_TX | IFM_HDX))
+               if ((mii->mii_media_active & (IFM_1000_T | IFM_HDX)) ==
+                   (IFM_1000_T | IFM_HDX))
                        mii->mii_media_active = IFM_ETHER | IFM_NONE;
                ifmr->ifm_active = mii->mii_media_active;
                ifmr->ifm_status = mii->mii_media_status;
index 3752bd0..cfadcbc 100644 (file)
@@ -31,7 +31,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/lge/if_lge.c,v 1.5.2.2 2001/12/14 19:49:23 jlemon Exp $
- * $DragonFly: src/sys/dev/netif/lge/if_lge.c,v 1.16 2005/01/23 20:21:31 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/lge/if_lge.c,v 1.17 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/dev/lge/if_lge.c,v 1.5.2.2 2001/12/14 19:49:23 jlemon Exp $
  */
@@ -344,7 +344,7 @@ static void lge_miibus_statchg(dev)
 
        LGE_CLRBIT(sc, LGE_GMIIMODE, LGE_GMIIMODE_SPEED);
        switch (IFM_SUBTYPE(mii->mii_media_active)) {
-       case IFM_1000_TX:
+       case IFM_1000_T:
        case IFM_1000_SX:
                LGE_SETBIT(sc, LGE_GMIIMODE, LGE_SPEED_1000);
                break;
@@ -1172,7 +1172,7 @@ static void lge_tick(xsc)
                    IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
                        sc->lge_link++;
                        if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX||
-                           IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX)
+                           IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T)
                                printf("lge%d: gigabit link up\n",
                                    sc->lge_unit);
                        if (ifp->if_snd.ifq_head != NULL)
index 8b23100..157c3a5 100644 (file)
@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/mii/brgphy.c,v 1.1.2.7 2003/05/11 18:00:55 ps Exp $
- * $DragonFly: src/sys/dev/netif/mii_layer/brgphy.c,v 1.5 2004/09/18 19:32:59 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/mii_layer/brgphy.c,v 1.6 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/dev/mii/brgphy.c,v 1.1.2.7 2003/05/11 18:00:55 ps Exp $
  */
@@ -190,10 +190,10 @@ brgphy_attach(dev)
        if (sc->mii_capabilities & BMSR_MEDIAMASK)
                mii_add_media(mii, (sc->mii_capabilities & ~BMSR_ANEG),
                    sc->mii_inst);
-       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
+       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst),
            BRGPHY_BMCR_FDX);
        PRINT(", 1000baseTX");
-       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst), 0);
+       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst), 0);
        PRINT("1000baseTX-FDX");
        ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0);
        PRINT("auto");
@@ -269,7 +269,7 @@ brgphy_service(sc, mii, cmd)
 #endif
                        (void) brgphy_mii_phy_auto(sc);
                        break;
-               case IFM_1000_TX:
+               case IFM_1000_T:
                        speed = BRGPHY_S1000;
                        goto setit;
                case IFM_100_TX:
@@ -290,7 +290,7 @@ setit:
                        PHY_WRITE(sc, BRGPHY_MII_BMCR, speed);
                        PHY_WRITE(sc, BRGPHY_MII_ANAR, BRGPHY_SEL_TYPE);
 
-                       if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_TX)
+                       if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)
                                break;
 
                        PHY_WRITE(sc, BRGPHY_MII_1000CTL, gig);
@@ -418,10 +418,10 @@ brgphy_status(sc)
                switch (PHY_READ(sc, BRGPHY_MII_AUXSTS) &
                    BRGPHY_AUXSTS_AN_RES) {
                case BRGPHY_RES_1000FD:
-                       mii->mii_media_active |= IFM_1000_TX | IFM_FDX;
+                       mii->mii_media_active |= IFM_1000_T | IFM_FDX;
                        break;
                case BRGPHY_RES_1000HD:
-                       mii->mii_media_active |= IFM_1000_TX | IFM_HDX;
+                       mii->mii_media_active |= IFM_1000_T | IFM_HDX;
                        break;
                case BRGPHY_RES_100FD:
                        mii->mii_media_active |= IFM_100_TX | IFM_FDX;
index a887de7..f0680c6 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/mii/e1000phy.c,v 1.1.2.2 2002/11/08 21:53:49 semenu Exp $ */
-/* $DragonFly: src/sys/dev/netif/mii_layer/e1000phy.c,v 1.5 2004/09/18 19:32:59 dillon Exp $ */
+/* $DragonFly: src/sys/dev/netif/mii_layer/e1000phy.c,v 1.6 2005/02/14 16:21:34 joerg Exp $ */
 /*
  * Principal Author: Parag Patel
  * Copyright (c) 2001
@@ -148,12 +148,12 @@ e1000phy_attach(device_t dev)
 
        device_printf(dev, " ");
        if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) {
-               ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst),
+               ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst),
                                E1000_CR_SPEED_1000 | E1000_CR_FULL_DUPLEX);
                PRINT("1000baseTX-FDX");
                /*
                TODO - apparently 1000BT-simplex not supported?
-               ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
+               ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst),
                                E1000_CR_SPEED_1000);
                PRINT("1000baseTX");
                */
@@ -295,7 +295,7 @@ e1000phy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
                        PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD);
                        break;
 
-               case IFM_1000_TX:
+               case IFM_1000_T:
                        if (sc->mii_flags & MIIF_DOINGAUTO)
                                return (0);
 
@@ -432,7 +432,7 @@ e1000phy_status(struct mii_softc *sc)
 
        if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) {
                if (ssr & E1000_SSR_1000MBS)
-                       mii->mii_media_active |= IFM_1000_TX;
+                       mii->mii_media_active |= IFM_1000_T;
                else if (ssr & E1000_SSR_100MBS)
                        mii->mii_media_active |= IFM_100_TX;
                else
index aef5c53..e286317 100644 (file)
@@ -31,7 +31,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/mii/nsgphy.c,v 1.1.2.3 2002/11/08 21:53:49 semenu Exp $
- * $DragonFly: src/sys/dev/netif/mii_layer/nsgphy.c,v 1.5 2004/09/18 19:32:59 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/mii_layer/nsgphy.c,v 1.6 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/dev/mii/nsgphy.c,v 1.1.2.3 2002/11/08 21:53:49 semenu Exp $
  */
@@ -155,10 +155,10 @@ static int nsgphy_attach(dev)
        mii_phy_reset(sc);
 
        device_printf(dev, " ");
-       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst),
+       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst),
            NSGPHY_S1000|NSGPHY_BMCR_FDX);
        PRINT("1000baseTX-FDX");
-       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
+       ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst),
            NSGPHY_S1000);
        PRINT("1000baseTX");
        sc->mii_capabilities =
@@ -246,7 +246,7 @@ nsgphy_service(sc, mii, cmd)
 #endif
                        (void) nsgphy_mii_phy_auto(sc, 0);
                        break;
-               case IFM_1000_TX:
+               case IFM_1000_T:
                        if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
                                PHY_WRITE(sc, NSGPHY_MII_BMCR,
                                    NSGPHY_BMCR_FDX|NSGPHY_BMCR_SPD1);
@@ -374,9 +374,9 @@ nsgphy_status(sc)
                anlpar = PHY_READ(sc, NSGPHY_MII_ANLPAR);
                gstat = PHY_READ(sc, NSGPHY_MII_1000STS);
                if (gstat & NSGPHY_1000STS_LPFD)
-                       mii->mii_media_active |= IFM_1000_TX|IFM_FDX;
+                       mii->mii_media_active |= IFM_1000_T | IFM_FDX;
                else if (gstat & NSGPHY_1000STS_LPHD)
-                       mii->mii_media_active |= IFM_1000_TX|IFM_HDX;
+                       mii->mii_media_active |= IFM_1000_T | IFM_HDX;
                else if (anlpar & NSGPHY_ANLPAR_100T4)
                        mii->mii_media_active |= IFM_100_T4;
                else if (anlpar & NSGPHY_ANLPAR_100FDX)
@@ -394,7 +394,7 @@ nsgphy_status(sc)
 
        switch(bmcr & (NSGPHY_BMCR_SPD1|NSGPHY_BMCR_SPD0)) {
        case NSGPHY_S1000:
-               mii->mii_media_active |= IFM_1000_TX;
+               mii->mii_media_active |= IFM_1000_T;
                break;
        case NSGPHY_S100:
                mii->mii_media_active |= IFM_100_TX;
index 415ac64..77318f4 100644 (file)
@@ -31,7 +31,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/mii/pnaphy.c,v 1.1.2.3 2002/11/08 21:53:49 semenu Exp $
- * $DragonFly: src/sys/dev/netif/mii_layer/pnaphy.c,v 1.5 2004/09/18 19:32:59 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/mii_layer/pnaphy.c,v 1.6 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/dev/mii/pnaphy.c,v 1.1.2.3 2002/11/08 21:53:49 semenu Exp $
  */
@@ -143,7 +143,7 @@ pnaphy_attach(dev)
        if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
                printf("no media present");
        else {
-               ADD(IFM_MAKEWORD(IFM_ETHER, IFM_homePNA, 0, sc->mii_inst), 0);
+               ADD(IFM_MAKEWORD(IFM_ETHER, IFM_HPNA_1, 0, sc->mii_inst), 0);
                PRINT("HomePNA");
        }
        ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),
@@ -270,7 +270,7 @@ pnaphy_service(sc, mii, cmd)
        /* Update the media status. */
        ukphy_status(sc);
        if (IFM_SUBTYPE(mii->mii_media_active) == IFM_10_T)
-               mii->mii_media_active = IFM_ETHER|IFM_homePNA;
+               mii->mii_media_active = IFM_ETHER | IFM_HPNA_1;
 
        /* Callback if something changed. */
        if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
index fe6a61c..9417711 100644 (file)
@@ -26,7 +26,7 @@
  * Written by: yen_cw@myson.com.tw  available at: http://www.myson.com.tw/
  *
  * $FreeBSD: src/sys/dev/my/if_my.c,v 1.2.2.4 2002/04/17 02:05:27 julian Exp $
- * $DragonFly: src/sys/dev/netif/my/if_my.c,v 1.14 2005/01/23 18:50:50 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/my/if_my.c,v 1.15 2005/02/14 16:21:34 joerg Exp $
  *
  * Myson fast ethernet PCI NIC driver
  *
@@ -515,7 +515,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose)
                                /*
                                 * this version did not support 1000M,
                                 * ifm->ifm_media =
-                                * IFM_ETHER|IFM_1000_TX|IFM_FDX;
+                                * IFM_ETHER | IFM_1000_T | IFM_FDX;
                                 */
                                ifm->ifm_media =
                                    IFM_ETHER | IFM_100_TX | IFM_FDX;
@@ -528,7 +528,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose)
                                ability = 0;
                                /*
                                 * this version did not support 1000M,
-                                * ifm->ifm_media = IFM_ETHER|IFM_1000_TX;
+                                * ifm->ifm_media = IFM_ETHER | IFM_1000_T;
                                 */
                                ifm->ifm_media = IFM_ETHER | IFM_100_TX;
                                media &= ~PHY_BMCR_SPEEDSEL;
@@ -662,16 +662,16 @@ my_getmode_mii(struct my_softc * sc)
                               sc->my_unit);
 
                ifp->if_baudrate = 1000000000;
-               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_TX, 0, NULL);
-               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_TX | IFM_HDX,
+               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T, 0, NULL);
+               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T | IFM_HDX,
                    0, NULL);
                if (bootverbose)
                        printf("my%d: 1000Mbps full-duplex mode supported\n",
                           sc->my_unit);
                ifp->if_baudrate = 1000000000;
-               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_TX | IFM_FDX,
+               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T | IFM_FDX,
                    0, NULL);
-               sc->ifmedia.ifm_media = IFM_ETHER | IFM_1000_TX | IFM_FDX;
+               sc->ifmedia.ifm_media = IFM_ETHER | IFM_1000_T | IFM_FDX;
        }
 #endif
        if (bmsr & PHY_BMSR_CANAUTONEG) {
@@ -711,7 +711,7 @@ my_setmode_mii(struct my_softc * sc, int media)
                  PHY_BMCR_DUPLEX | PHY_BMCR_LOOPBK);
 
 #if 0                          /* this version did not support 1000M, */
-       if (IFM_SUBTYPE(media) == IFM_1000_TX) {
+       if (IFM_SUBTYPE(media) == IFM_1000_T) {
                printf("1000Mbps/T4, half-duplex\n");
                bmcr &= ~PHY_BMCR_SPEEDSEL;
                bmcr &= ~PHY_BMCR_DUPLEX;
@@ -1683,11 +1683,11 @@ my_ifmedia_sts(struct ifnet * ifp, struct ifmediareq * ifmr)
                if (ability2 & PHY_1000SR_1000BTXFULL) {
                        advert = 0;
                        ability = 0;
-                       ifmr->ifm_active = IFM_ETHER|IFM_1000_TX|IFM_FDX;
+                       ifmr->ifm_active = IFM_ETHER | IFM_1000_T | IFM_FDX;
                } else if (ability & PHY_1000SR_1000BTXHALF) {
                        advert = 0;
                        ability = 0;
-                       ifmr->ifm_active = IFM_ETHER|IFM_1000_TX|IFM_HDX;
+                       ifmr->ifm_active = IFM_ETHER | IFM_1000_T | IFM_HDX;
                }
        }
 #endif
index 644f4c0..6af29fd 100644 (file)
@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.65 2004/07/07 17:46:30 wpaul Exp $
- * $DragonFly: src/sys/dev/netif/ndis/if_ndis.c,v 1.2 2004/09/14 23:57:00 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/ndis/if_ndis.c,v 1.3 2005/02/14 16:21:34 joerg Exp $
  */
 
 #include <sys/param.h>
@@ -1403,7 +1403,7 @@ ndis_ifmedia_sts(ifp, ifmr)
                ifmr->ifm_active |= IFM_100_TX;
                break;
        case 10000000:
-               ifmr->ifm_active |= IFM_1000_TX;
+               ifmr->ifm_active |= IFM_1000_T;
                break;
        default:
                device_printf(sc->ndis_dev, "unknown speed: %d\n", media_info);
index c8b192c..60032b5 100644 (file)
@@ -31,7 +31,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/nge/if_nge.c,v 1.13.2.13 2003/02/05 22:03:57 mbr Exp $
- * $DragonFly: src/sys/dev/netif/nge/if_nge.c,v 1.16 2005/01/23 20:21:31 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/nge/if_nge.c,v 1.17 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/dev/nge/if_nge.c,v 1.13.2.13 2003/02/05 22:03:57 mbr Exp $
  */
@@ -654,7 +654,7 @@ static void nge_miibus_statchg(dev)
                }
 
                /* If we have a 1000Mbps link, set the mode_1000 bit. */
-               if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX ||
+               if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T ||
                    IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) {
                        NGE_SETBIT(sc, NGE_CFG, NGE_CFG_MODE_1000);
                } else {
@@ -1562,7 +1562,7 @@ static void nge_tick(xsc)
                            IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
                                sc->nge_link++;
                                if (IFM_SUBTYPE(mii->mii_media_active) 
-                                   == IFM_1000_TX)
+                                   == IFM_1000_T)
                                        printf("nge%d: gigabit link up\n",
                                            sc->nge_unit);
                                if (ifp->if_snd.ifq_head != NULL)
index 46645ad..80ce3ce 100644 (file)
@@ -32,7 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/if_sk.c,v 1.19.2.9 2003/03/05 18:42:34 njl Exp $
- * $DragonFly: src/sys/dev/netif/sk/if_sk.c,v 1.23 2005/01/23 20:21:31 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/sk/if_sk.c,v 1.24 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/pci/if_sk.c,v 1.19.2.9 2003/03/05 18:42:34 njl Exp $
  */
@@ -1708,7 +1708,7 @@ static int skc_attach(dev)
                sc->sk_pmd = IFM_1000_CX;
                break;
        case SK_PMD_1000BASETX:
-               sc->sk_pmd = IFM_1000_TX;
+               sc->sk_pmd = IFM_1000_T;
                break;
        default:
                printf("skc%d: unknown media type: 0x%x\n",
@@ -2446,7 +2446,7 @@ static void sk_init_yukon(sc_if)
                break;
 
        case IFM_1000_CX:
-       case IFM_1000_TX:
+       case IFM_1000_T:
                phy |= SK_GPHY_COPPER;
                break;
        }
index 3dab913..da77b5d 100644 (file)
@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/if_ti.c,v 1.25.2.14 2002/02/15 04:20:20 silby Exp $
- * $DragonFly: src/sys/dev/netif/ti/if_ti.c,v 1.15 2005/01/23 20:23:22 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/ti/if_ti.c,v 1.16 2005/02/14 16:21:34 joerg Exp $
  *
  * $FreeBSD: src/sys/pci/if_ti.c,v 1.25.2.14 2002/02/15 04:20:20 silby Exp $
  */
@@ -1733,9 +1733,9 @@ static int ti_attach(dev)
                ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_100_TX, 0, NULL);
                ifmedia_add(&sc->ifmedia,
                    IFM_ETHER|IFM_100_TX|IFM_FDX, 0, NULL);
-               ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_1000_TX, 0, NULL);
+               ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T, 0, NULL);
                ifmedia_add(&sc->ifmedia,
-                   IFM_ETHER|IFM_1000_TX|IFM_FDX, 0, NULL);
+                   IFM_ETHER|IFM_1000_T | IFM_FDX, 0, NULL);
        } else {
                /* Fiber cards don't support 10/100 modes. */
                ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_1000_SX, 0, NULL);
@@ -2303,7 +2303,7 @@ static int ti_ifmedia_upd(ifp)
                    TI_CMD_CODE_NEGOTIATE_BOTH, 0);
                break;
        case IFM_1000_SX:
-       case IFM_1000_TX:
+       case IFM_1000_T:
                CSR_WRITE_4(sc, TI_GCR_GLINK, TI_GLNK_PREF|TI_GLNK_1000MB|
                    TI_GLNK_RX_FLOWCTL_Y|TI_GLNK_ENB);
                CSR_WRITE_4(sc, TI_GCR_LINK, 0);
@@ -2361,7 +2361,7 @@ static void ti_ifmedia_sts(ifp, ifmr)
        if (sc->ti_linkstat == TI_EV_CODE_GIG_LINK_UP) {
                media = CSR_READ_4(sc, TI_GCR_GLINK_STAT);
                if (sc->ti_copper)
-                       ifmr->ifm_active |= IFM_1000_TX;
+                       ifmr->ifm_active |= IFM_1000_T;
                else
                        ifmr->ifm_active |= IFM_1000_SX;
                if (media & TI_GLNK_FULL_DUPLEX)
index 29d2a82..c647582 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $     */
 /* $FreeBSD: src/sys/net/if_media.h,v 1.9.2.4 2002/07/30 06:22:40 imp Exp $ */
-/* $DragonFly: src/sys/net/if_media.h,v 1.7 2004/07/29 20:34:29 dillon Exp $ */
+/* $DragonFly: src/sys/net/if_media.h,v 1.8 2005/02/14 16:21:34 joerg Exp $ */
 
 /*
  * Copyright (c) 1997
@@ -137,8 +137,8 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr,
 #define IFM_1000_SX    14              /* 1000BaseSX Multi-mode Fiber */
 #define IFM_1000_LX    15              /* 1000BaseLX Single-mode Fiber */
 #define IFM_1000_CX    16              /* 1000BaseCX 150ohm STP */
-#define IFM_1000_TX    17              /* 1000BaseTX 4 pair cat 5 */
-#define IFM_homePNA    18              /* HomePNA media for ethernet frames */
+#define IFM_1000_T     17              /* 1000BaseTX 4 pair cat 5 */
+#define IFM_HPNA_1     18              /* HomePNA media for ethernet frames */
 /* note 31 is the max! */
 
 /*
@@ -294,8 +294,8 @@ struct ifmedia_description {
        { IFM_1000_SX,  "1000baseSX" },                                 \
        { IFM_1000_LX,  "1000baseLX" },                                 \
        { IFM_1000_CX,  "1000baseCX" },                                 \
-       { IFM_1000_TX,  "1000baseTX" },                                 \
-       { IFM_homePNA,  "homePNA" },                                    \
+       { IFM_1000_T,   "1000baseT" },                                  \
+       { IFM_HPNA_1,   "homePNA" },                                    \
        { 0, NULL },                                                    \
 }