Page MenuHomeFreeBSD

D49025.1786566657.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D49025.1786566657.diff

diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c
--- a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c
+++ b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c
@@ -200,9 +200,9 @@
snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev));
for (phy = 0; phy < AR40XX_NUM_PHYS; phy++) {
sc->sc_phys.ifp[phy] = if_alloc(IFT_ETHER);
- sc->sc_phys.ifp[phy]->if_softc = sc;
- sc->sc_phys.ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST |
- IFF_DRV_RUNNING | IFF_SIMPLEX;
+ if_setsoftc(sc->sc_phys.ifp[phy], sc);
+ if_setflagbits(sc->sc_phys.ifp[phy], IFF_UP | IFF_BROADCAST |
+ IFF_DRV_RUNNING | IFF_SIMPLEX, 0);
sc->sc_phys.ifname[phy] = malloc(strlen(name)+1, M_DEVBUF,
M_WAITOK);
bcopy(name, sc->sc_phys.ifname[phy], strlen(name)+1);
@@ -215,7 +215,7 @@
device_printf(sc->sc_dev,
"%s attached to pseudo interface %s\n",
device_get_nameunit(sc->sc_phys.miibus[phy]),
- sc->sc_phys.ifp[phy]->if_xname);
+ if_name(sc->sc_phys.ifp[phy]));
if (err != 0) {
device_printf(sc->sc_dev,
"attaching PHY %d failed\n",

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 12, 8:30 PM (17 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29399946
Default Alt Text
D49025.1786566657.diff (1 KB)

Event Timeline