diff options
| author | Justin Hibbits <jhibbits@FreeBSD.org> | 2025-02-11 21:13:36 +0000 |
|---|---|---|
| committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2025-06-25 19:53:13 +0000 |
| commit | 0d7abc6e1f785fa576909bbdba0a66a45be18a90 (patch) | |
| tree | 505fa5e9e79368024a88a05b6a4122943a99d7a9 /sys/dev/etherswitch | |
| parent | 07297aee35f26cfd37aef078ff6c0cbe67bbba15 (diff) | |
Diffstat (limited to 'sys/dev/etherswitch')
| -rw-r--r-- | sys/dev/etherswitch/arswitch/arswitch.c | 2 | ||||
| -rw-r--r-- | sys/dev/etherswitch/e6000sw/e6060sw.c | 8 | ||||
| -rw-r--r-- | sys/dev/etherswitch/infineon/adm6996fc.c | 8 | ||||
| -rw-r--r-- | sys/dev/etherswitch/micrel/ksz8995ma.c | 8 | ||||
| -rw-r--r-- | sys/dev/etherswitch/mtkswitch/mtkswitch.c | 8 |
5 files changed, 17 insertions, 17 deletions
diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c index 924793a0488f..c53c82f1750c 100644 --- a/sys/dev/etherswitch/arswitch/arswitch.c +++ b/sys/dev/etherswitch/arswitch/arswitch.c @@ -163,7 +163,7 @@ arswitch_attach_phys(struct arswitch_softc *sc) #if 0 DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(sc->miibus[phy]), - sc->ifp[phy]->if_xname); + if_name(sc->ifp[phy])); #endif if (err != 0) { device_printf(sc->sc_dev, diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c index 901f887ffdc6..0af71692091c 100644 --- a/sys/dev/etherswitch/e6000sw/e6060sw.c +++ b/sys/dev/etherswitch/e6000sw/e6060sw.c @@ -214,9 +214,9 @@ e6060sw_attach_phys(struct e6060sw_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - sc->ifp[port]->if_softc = sc; - sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[port], sc); + if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_E6060SW, M_WAITOK | M_ZERO); @@ -225,7 +225,7 @@ e6060sw_attach_phys(struct e6060sw_softc *sc) BMSR_DEFCAPMASK, phy + sc->smi_offset, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), - sc->ifp[port]->if_xname); + if_name(sc->ifp[port])); if (err != 0) { device_printf(sc->sc_dev, "attaching PHY %d failed\n", diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index 58a3f9625d4a..fedab27c2610 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -173,9 +173,9 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - sc->ifp[port]->if_softc = sc; - sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[port], sc); + if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_ADM6996FC, M_WAITOK | M_ZERO); @@ -184,7 +184,7 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), - sc->ifp[port]->if_xname); + if_name(sc->ifp[port])); if (err != 0) { device_printf(sc->sc_dev, "attaching PHY %d failed\n", diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index c2ac994fe882..cbffd5e39f49 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -219,9 +219,9 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - sc->ifp[port]->if_softc = sc; - sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[port], sc); + if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_KSZ8995MA, M_WAITOK | M_ZERO); @@ -230,7 +230,7 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), - sc->ifp[port]->if_xname); + if_name(sc->ifp[port])); if (err != 0) { device_printf(sc->sc_dev, "attaching PHY %d failed\n", diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c index 89e092d02ac4..ff7aee22398f 100644 --- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c +++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c @@ -121,9 +121,9 @@ mtkswitch_attach_phys(struct mtkswitch_softc *sc) continue; } sc->ifp[phy] = if_alloc(IFT_ETHER); - sc->ifp[phy]->if_softc = sc; - sc->ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[phy], sc); + if_setflagbits(sc->ifp[phy], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); sc->ifname[phy] = malloc(strlen(name) + 1, M_DEVBUF, M_WAITOK); bcopy(name, sc->ifname[phy], strlen(name) + 1); if_initname(sc->ifp[phy], sc->ifname[phy], @@ -138,7 +138,7 @@ mtkswitch_attach_phys(struct mtkswitch_softc *sc) } else { DPRINTF(sc->sc_dev, "%s attached to pseudo interface " "%s\n", device_get_nameunit(sc->miibus[phy]), - sc->ifp[phy]->if_xname); + if_name(sc->ifp[phy])); } } return (err); |
