Fixed usage of arpcom and #define blahblah arpcom.blahblah, fixed ioctl
authorRod Grimes <rgrimes@FreeBSD.org>
Mon, 6 Sep 1993 16:13:18 +0000 (16:13 +0000)
committerRod Grimes <rgrimes@FreeBSD.org>
Mon, 6 Sep 1993 16:13:18 +0000 (16:13 +0000)
support for options NS (XNS networking).

sys/i386/isa/if_ec.c
sys/i386/isa/if_is.c
sys/i386/isa/if_ne.c
sys/i386/isa/if_we.c

index 24e02ba..3c6260d 100644 (file)
@@ -95,9 +95,9 @@
  * This structure contains the output queue for the interface, its address, ...
  */
 struct ec_softc {
  * This structure contains the output queue for the interface, its address, ...
  */
 struct ec_softc {
-       struct  arpcom ec_ac;           /* Ethernet common part         */
-#define        ec_if   ec_ac.ac_if             /* network-visible interface    */
-#define        ec_addr ec_ac.ac_enaddr         /* hardware Ethernet address    */
+       struct  arpcom arpcom;          /* Ethernet common part         */
+#define        ec_if   arpcom.ac_if            /* network-visible interface    */
+#define        ec_addr arpcom.ac_enaddr                /* hardware Ethernet address    */
 
        u_char  ec_flags;               /* software state               */
 #define        EC_RUNNING      0x01
 
        u_char  ec_flags;               /* software state               */
 #define        EC_RUNNING      0x01
@@ -605,7 +605,8 @@ caddr_t data;
                        register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
                        register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
-                               ina->x_host = *(union ns_host *)(sc->ns_addr);
+                               ina->x_host =
+                                       *(union ns_host *)(sc->arpcom.ac_enaddr);
                        else {
                                /* 
                                 * The manual says we can't change the address 
                        else {
                                /* 
                                 * The manual says we can't change the address 
@@ -614,7 +615,8 @@ caddr_t data;
                                 */
                                ifp->if_flags &= ~IFF_RUNNING; 
                                bcopy((caddr_t)ina->x_host.c_host,
                                 */
                                ifp->if_flags &= ~IFF_RUNNING; 
                                bcopy((caddr_t)ina->x_host.c_host,
-                                   (caddr_t)sc->ns_addr, sizeof(sc->ns_addr));
+                                   (caddr_t)sc->arpcom.ac_enaddr,
+                                       sizeof(sc->arpcom.ac_enaddr));
                        }
                        ec_init(ifp->if_unit); /* does ne_setaddr() */
                        break;
                        }
                        ec_init(ifp->if_unit); /* does ne_setaddr() */
                        break;
index ffc4940..1277b4d 100644 (file)
@@ -851,15 +851,18 @@ is_ioctl(ifp, cmd, data)
                  */
                case AF_NS:
                    {
                  */
                case AF_NS:
                    {
-                       register struct arpcom.ac_enaddr *ina = &(IA_SNS(ifa)->sns_addr);
+                       register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
 
                        if (ns_nullhost(*ina))
-                               ina->x_host = *(union ns_host *)(is->arpcom.ac_enaddr);
+                               ina->x_host =
+                                       *(union ns_host *)(is->arpcom.ac_enaddr);
                        else {
                                /* 
                        else {
                                /* 
+                                *
                                 */
                                bcopy((caddr_t)ina->x_host.c_host,
                                 */
                                bcopy((caddr_t)ina->x_host.c_host,
-                                   (caddr_t)is->arpcom.ac_enaddr, sizeof(is->arpcom.ac_enaddr));
+                                   (caddr_t)is->arpcom.ac_enaddr,
+                                       sizeof(is->arpcom.ac_enaddr));
                        }
                         /*
                          * Set new address
                        }
                         /*
                          * Set new address
index 866ce4f..31e5536 100644 (file)
@@ -91,13 +91,11 @@ struct      mbuf *neget();
  * Ethernet software status per interface.
  *
  * Each interface is referenced by a network interface structure,
  * Ethernet software status per interface.
  *
  * Each interface is referenced by a network interface structure,
- * ns_if, which the routing code uses to locate the interface.
+ * arpcom.ac_if, which the routing code uses to locate the interface.
  * This structure contains the output queue for the interface, its address, ...
  */
 struct ne_softc {
  * This structure contains the output queue for the interface, its address, ...
  */
 struct ne_softc {
-       struct  arpcom ns_ac;           /* Ethernet common part */
-#define        ns_if   ns_ac.ac_if             /* network-visible interface */
-#define        ns_addr ns_ac.ac_enaddr         /* hardware Ethernet address */
+       struct  arpcom arpcom;          /* Ethernet common part */
        int     ns_flags;
 #define        DSF_LOCK        1               /* block re-entering enstart */
        int     ns_oactive ;
        int     ns_flags;
 #define        DSF_LOCK        1               /* block re-entering enstart */
        int     ns_oactive ;
@@ -227,7 +225,7 @@ word:
        nefetch (ns, (caddr_t)boarddata, 0, sizeof(boarddata));
 
        for(i=0; i < 6; i++)
        nefetch (ns, (caddr_t)boarddata, 0, sizeof(boarddata));
 
        for(i=0; i < 6; i++)
-               ns->ns_addr[i] = boarddata[i];
+               ns->arpcom.ac_enaddr[i] = boarddata[i];
        splx(s);
        return (1);
 }
        splx(s);
        return (1);
 }
@@ -328,12 +326,12 @@ neattach(dvp)
 {
        int unit = dvp->id_unit;
        register struct ne_softc *ns = &ne_softc[unit];
 {
        int unit = dvp->id_unit;
        register struct ne_softc *ns = &ne_softc[unit];
-       register struct ifnet *ifp = &ns->ns_if;
+       register struct ifnet *ifp = &ns->arpcom.ac_if;
 
        ifp->if_unit = unit;
        ifp->if_name = nedriver.name ;
        ifp->if_mtu = ETHERMTU;
 
        ifp->if_unit = unit;
        ifp->if_name = nedriver.name ;
        ifp->if_mtu = ETHERMTU;
-       printf ("ne%d: address %s", unit, ether_sprintf(ns->ns_addr)) ;
+       printf ("ne%d: address %s", unit, ether_sprintf(ns->arpcom.ac_enaddr));
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
        ifp->if_init = neinit;
        ifp->if_output = ether_output;
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
        ifp->if_init = neinit;
        ifp->if_output = ether_output;
@@ -352,7 +350,7 @@ neinit(unit)
        int unit;
 {
        register struct ne_softc *ns = &ne_softc[unit];
        int unit;
 {
        register struct ne_softc *ns = &ne_softc[unit];
-       struct ifnet *ifp = &ns->ns_if;
+       struct ifnet *ifp = &ns->arpcom.ac_if;
        int s;
        int i; char *cp;
        register nec = ns->ns_port;
        int s;
        int i; char *cp;
        register nec = ns->ns_port;
@@ -364,7 +362,7 @@ neinit(unit)
 
        /* set physical address on ethernet */
        outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG1|DSCM_STOP);
 
        /* set physical address on ethernet */
        outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG1|DSCM_STOP);
-       for (i=0 ; i < 6 ; i++) outb(nec+ds1_par0+i,ns->ns_addr[i]);
+       for (i=0 ; i < 6 ; i++) outb(nec+ds1_par0+i,ns->arpcom.ac_enaddr[i]);
 
        /* clr logical address hash filter for now */
        for (i=0 ; i < 8 ; i++) outb(nec+ds1_mar0+i,0xff);
 
        /* clr logical address hash filter for now */
        for (i=0 ; i < 8 ; i++) outb(nec+ds1_mar0+i,0xff);
@@ -393,7 +391,7 @@ neinit(unit)
        outb(nec+ds0_dcr, ns->ns_mode);
        outb (nec+ds0_imr, 0xff);
 
        outb(nec+ds0_dcr, ns->ns_mode);
        outb (nec+ds0_imr, 0xff);
 
-       ns->ns_if.if_flags |= IFF_RUNNING;
+       ns->arpcom.ac_if.if_flags |= IFF_RUNNING;
        ns->ns_flags &= ~DSF_LOCK;
        ns->ns_oactive = 0; ns->ns_mask = ~0;
        nestart(ifp);
        ns->ns_flags &= ~DSF_LOCK;
        ns->ns_oactive = 0; ns->ns_mask = ~0;
        nestart(ifp);
@@ -427,10 +425,10 @@ nestart(ifp)
        if (inb(nec+ds_cmd) & DSCM_TRANS)
                return;
 
        if (inb(nec+ds_cmd) & DSCM_TRANS)
                return;
 
-       if ((ns->ns_if.if_flags & IFF_RUNNING) == 0)
+       if ((ns->arpcom.ac_if.if_flags & IFF_RUNNING) == 0)
                return;
 
                return;
 
-       IF_DEQUEUE(&ns->ns_if.if_snd, m);
+       IF_DEQUEUE(&ns->arpcom.ac_if.if_snd, m);
  
        if (m == 0)
                return;
  
        if (m == 0)
                return;
@@ -504,7 +502,7 @@ loop:
                (void) inb(nec+ 0xD);
                (void) inb(nec + 0xE);
                (void) inb(nec + 0xF);
                (void) inb(nec+ 0xD);
                (void) inb(nec + 0xE);
                (void) inb(nec + 0xF);
-               ns->ns_if.if_ierrors++;
+               ns->arpcom.ac_if.if_ierrors++;
        }
 
        /* We received something; rummage thru tiny ring buffer */
        }
 
        /* We received something; rummage thru tiny ring buffer */
@@ -570,15 +568,15 @@ loop:
        if (isr & DSIS_TXE) {
                ns->ns_flags &= ~DSF_LOCK;
                /* Need to read these registers to clear status */
        if (isr & DSIS_TXE) {
                ns->ns_flags &= ~DSF_LOCK;
                /* Need to read these registers to clear status */
-               ns->ns_if.if_collisions += inb(nec+ds0_tbcr0);
-               ns->ns_if.if_oerrors++;
+               ns->arpcom.ac_if.if_collisions += inb(nec+ds0_tbcr0);
+               ns->arpcom.ac_if.if_oerrors++;
        }
 
        /* Packet Transmitted */
        if (isr & DSIS_TX) {
                ns->ns_flags &= ~DSF_LOCK;
        }
 
        /* Packet Transmitted */
        if (isr & DSIS_TX) {
                ns->ns_flags &= ~DSF_LOCK;
-               ++ns->ns_if.if_opackets;
-               ns->ns_if.if_collisions += inb(nec+ds0_tbcr0);
+               ++ns->arpcom.ac_if.if_opackets;
+               ns->arpcom.ac_if.if_collisions += inb(nec+ds0_tbcr0);
        }
 
        /* Receiver ovverun? */
        }
 
        /* Receiver ovverun? */
@@ -596,7 +594,7 @@ loop:
 
        /* Any more to send? */
        outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG0|DSCM_START);
 
        /* Any more to send? */
        outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG0|DSCM_START);
-       nestart(&ns->ns_if);
+       nestart(&ns->arpcom.ac_if);
        outb (nec+ds_cmd, cmd);
        outb (nec+ds0_imr, 0xff);
 
        outb (nec+ds_cmd, cmd);
        outb (nec+ds0_imr, 0xff);
 
@@ -618,7 +616,7 @@ nerecv(ns)
 {
        int len,i;
 
 {
        int len,i;
 
-       ns->ns_if.if_ipackets++;
+       ns->arpcom.ac_if.if_ipackets++;
        len = ns->ns_ph.pr_sz0 + (ns->ns_ph.pr_sz1<<8);
        if(len < ETHER_MIN_LEN || len > ETHER_MAX_LEN)
                return;
        len = ns->ns_ph.pr_sz0 + (ns->ns_ph.pr_sz1<<8);
        if(len < ETHER_MIN_LEN || len > ETHER_MAX_LEN)
                return;
@@ -687,10 +685,10 @@ neread(ns, buf, len)
         * information to be at the front, but we still have to drop
         * the type and length which are at the front of any trailer data.
         */
         * information to be at the front, but we still have to drop
         * the type and length which are at the front of any trailer data.
         */
-       m = neget(buf, len, off, &ns->ns_if);
+       m = neget(buf, len, off, &ns->arpcom.ac_if);
        if (m == 0) return;
 
        if (m == 0) return;
 
-       ether_input(&ns->ns_if, eh, m);
+       ether_input(&ns->arpcom.ac_if, eh, m);
 }
 
 /*
 }
 
 /*
@@ -808,7 +806,8 @@ neioctl(ifp, cmd, data)
                        register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
                        register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
-                               ina->x_host = *(union ns_host *)(ns->ns_addr);
+                               ina->x_host =
+                                       *(union ns_host *)(ns->arpcom.ac_enaddr);
                        else {
                                /* 
                                 * The manual says we can't change the address 
                        else {
                                /* 
                                 * The manual says we can't change the address 
@@ -817,7 +816,8 @@ neioctl(ifp, cmd, data)
                                 */
                                ifp->if_flags &= ~IFF_RUNNING; 
                                bcopy((caddr_t)ina->x_host.c_host,
                                 */
                                ifp->if_flags &= ~IFF_RUNNING; 
                                bcopy((caddr_t)ina->x_host.c_host,
-                                   (caddr_t)ns->ns_addr, sizeof(ns->ns_addr));
+                                   (caddr_t)ns->arpcom.ac_enaddr,
+                                       sizeof(ns->arpcom.ac_enaddr));
                        }
                        neinit(ifp->if_unit); /* does ne_setaddr() */
                        break;
                        }
                        neinit(ifp->if_unit); /* does ne_setaddr() */
                        break;
@@ -841,8 +841,8 @@ neioctl(ifp, cmd, data)
 
 #ifdef notdef
        case SIOCGHWADDR:
 
 #ifdef notdef
        case SIOCGHWADDR:
-               bcopy((caddr_t)ns->ns_addr, (caddr_t) &ifr->ifr_data,
-                       sizeof(ns->ns_addr));
+               bcopy((caddr_t)ns->arpcom.ac_enaddr, (caddr_t) &ifr->ifr_data,
+                       sizeof(ns->arpcom.ac_enaddr));
                break;
 #endif
 
                break;
 #endif
 
index 0930383..7639f44 100644 (file)
  * we_attach enhanced with link level address by Rodney W. Grimes, 1/30/93
  *
  * $Log: if_we.c,v $
  * we_attach enhanced with link level address by Rodney W. Grimes, 1/30/93
  *
  * $Log: if_we.c,v $
+ * Revision 1.4  1993/08/24  00:15:31  rgrimes
+ * Fixed the printf's for ethernet address so that ALL ethernet drivers are
+ * consistent in the format of this.
+ *
  * Revision 1.3  1993/08/22  22:54:56  ats
  * Added a new-line in the output of the ethernet-address that it gets
  * on it's line alone ( not mangled with the FPU detection ).
  * Revision 1.3  1993/08/22  22:54:56  ats
  * Added a new-line in the output of the ethernet-address that it gets
  * on it's line alone ( not mangled with the FPU detection ).
@@ -151,9 +155,7 @@ static inline char *we_ring_copy();
  * This structure contains the output queue for the interface, its address, ...
  */
 struct we_softc {
  * This structure contains the output queue for the interface, its address, ...
  */
 struct we_softc {
-       struct  arpcom we_ac;           /* Ethernet common part         */
-#define        we_if   we_ac.ac_if             /* network-visible interface    */
-#define        we_addr we_ac.ac_enaddr         /* hardware Ethernet address    */
+       struct  arpcom arpcom;          /* Ethernet common part         */
 
        u_char  we_flags;               /* software state               */
 #define        WDF_RUNNING     0x01
 
        u_char  we_flags;               /* software state               */
 #define        WDF_RUNNING     0x01
@@ -270,7 +272,7 @@ weprobe(is)
         * Save board ROM station address
         */
        for (i = 0; i < ETHER_ADDR_LEN; ++i)
         * Save board ROM station address
         */
        for (i = 0; i < ETHER_ADDR_LEN; ++i)
-           sc->we_addr[i] = inb(sc->we_io_ctl_addr + WD_ROM_OFFSET + i);
+           sc->arpcom.ac_enaddr[i] = inb(sc->we_io_ctl_addr + WD_ROM_OFFSET + i);
 
        /*
         * Mapin interface memory, setup memory select register
 
        /*
         * Mapin interface memory, setup memory select register
@@ -304,7 +306,7 @@ weattach(is)
        struct isa_device *is;
 {
        register struct we_softc *sc = &we_softc[is->id_unit];
        struct isa_device *is;
 {
        register struct we_softc *sc = &we_softc[is->id_unit];
-       register struct ifnet *ifp = &sc->we_if;
+       register struct ifnet *ifp = &sc->arpcom.ac_if;
        union we_command wecmd;
        struct ifaddr *ifa;
        struct sockaddr_dl *sdl;
        union we_command wecmd;
        struct ifaddr *ifa;
        struct sockaddr_dl *sdl;
@@ -345,7 +347,7 @@ weattach(is)
                sdl->sdl_type = IFT_ETHER;
                sdl->sdl_alen = ETHER_ADDR_LEN;
                sdl->sdl_slen = 0;
                sdl->sdl_type = IFT_ETHER;
                sdl->sdl_alen = ETHER_ADDR_LEN;
                sdl->sdl_slen = 0;
-               bcopy(sc->we_addr, LLADDR(sdl), ETHER_ADDR_LEN);
+               bcopy(sc->arpcom.ac_enaddr, LLADDR(sdl), ETHER_ADDR_LEN);
                }
 
 #if NBPFILTER > 0
                }
 
 #if NBPFILTER > 0
@@ -358,7 +360,7 @@ weattach(is)
        printf("we%d: %s address %s\n",
                is->id_unit,
                (sc->we_type & WD_ETHERNET) ? "ethernet" : "starlan",
        printf("we%d: %s address %s\n",
                is->id_unit,
                (sc->we_type & WD_ETHERNET) ? "ethernet" : "starlan",
-               ether_sprintf(sc->we_addr));
+               ether_sprintf(sc->arpcom.ac_enaddr));
 }
  
 /*
 }
  
 /*
@@ -412,7 +414,7 @@ weinit(unit)
        int unit;
 {
        register struct we_softc *sc = &we_softc[unit];
        int unit;
 {
        register struct we_softc *sc = &we_softc[unit];
-       register struct ifnet *ifp = &sc->we_if;
+       register struct ifnet *ifp = &sc->arpcom.ac_if;
        union we_command wecmd;
        int i, s;
 
        union we_command wecmd;
        int i, s;
 
@@ -462,7 +464,7 @@ weinit(unit)
        wecmd.cs_ps = 1;
        outb(sc->we_io_nic_addr + WD_P0_COMMAND, wecmd.cs_byte);
        for (i = 0; i < ETHER_ADDR_LEN; ++i)
        wecmd.cs_ps = 1;
        outb(sc->we_io_nic_addr + WD_P0_COMMAND, wecmd.cs_byte);
        for (i = 0; i < ETHER_ADDR_LEN; ++i)
-           outb(sc->we_io_nic_addr + WD_P1_PAR0 + i, sc->we_addr[i]);
+           outb(sc->we_io_nic_addr + WD_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]);
        for (i = 0; i < ETHER_ADDR_LEN; ++i)    /* == broadcast addr */
            outb(sc->we_io_nic_addr + WD_P1_MAR0 + i, 0xff);
        outb(sc->we_io_nic_addr + WD_P1_CURR, WD_TXBUF_SIZE);
        for (i = 0; i < ETHER_ADDR_LEN; ++i)    /* == broadcast addr */
            outb(sc->we_io_nic_addr + WD_P1_MAR0 + i, 0xff);
        outb(sc->we_io_nic_addr + WD_P1_CURR, WD_TXBUF_SIZE);
@@ -472,7 +474,7 @@ weinit(unit)
        wecmd.cs_rd = 0x4;
        outb(sc->we_io_nic_addr + WD_P1_COMMAND, wecmd.cs_byte);
 #if NBPFILTER > 0
        wecmd.cs_rd = 0x4;
        outb(sc->we_io_nic_addr + WD_P1_COMMAND, wecmd.cs_byte);
 #if NBPFILTER > 0
-       if (sc->we_if.if_flags & IFF_PROMISC) {
+       if (sc->arpcom.ac_if.if_flags & IFF_PROMISC) {
                outb(sc->we_io_nic_addr + WD_P0_RCR,
                         WD_R_PRO | WD_R_SEP | WD_R_AR | WD_R_CONFIG);
        } else
                outb(sc->we_io_nic_addr + WD_P0_RCR,
                         WD_R_PRO | WD_R_SEP | WD_R_AR | WD_R_CONFIG);
        } else
@@ -511,7 +513,7 @@ westart(ifp)
                (void) splx(s);
                return;
        }
                (void) splx(s);
                return;
        }
-       IF_DEQUEUE(&sc->we_if.if_snd, m);
+       IF_DEQUEUE(&sc->arpcom.ac_if.if_snd, m);
        if (m == 0) {
                (void) splx(s);
                return;
        if (m == 0) {
                (void) splx(s);
                return;
@@ -608,7 +610,7 @@ westart(ifp)
        outb(sc->we_io_nic_addr + WD_P0_TBCR1, len >> 8);
        wecmd.cs_txp = 1;
        outb(sc->we_io_nic_addr + WD_P0_COMMAND, wecmd.cs_byte);
        outb(sc->we_io_nic_addr + WD_P0_TBCR1, len >> 8);
        wecmd.cs_txp = 1;
        outb(sc->we_io_nic_addr + WD_P0_COMMAND, wecmd.cs_byte);
-       sc->we_if.if_timer = 3;
+       sc->arpcom.ac_if.if_timer = 3;
        (void) splx(s);
 }
  
        (void) splx(s);
 }
  
@@ -634,9 +636,9 @@ loop:
        /* transmit error */
        if (weisr.is_txe) {
                /* need to read these registers to clear status */
        /* transmit error */
        if (weisr.is_txe) {
                /* need to read these registers to clear status */
-               sc->we_if.if_collisions +=
+               sc->arpcom.ac_if.if_collisions +=
                    inb(sc->we_io_nic_addr + WD_P0_TBCR0);
                    inb(sc->we_io_nic_addr + WD_P0_TBCR0);
-               ++sc->we_if.if_oerrors;
+               ++sc->arpcom.ac_if.if_oerrors;
        }
 
        /* receiver error */
        }
 
        /* receiver error */
@@ -645,7 +647,7 @@ loop:
                (void) inb(sc->we_io_nic_addr + 0xD);
                (void) inb(sc->we_io_nic_addr + 0xE);
                (void) inb(sc->we_io_nic_addr + 0xF);
                (void) inb(sc->we_io_nic_addr + 0xD);
                (void) inb(sc->we_io_nic_addr + 0xE);
                (void) inb(sc->we_io_nic_addr + 0xF);
-               ++sc->we_if.if_ierrors;
+               ++sc->arpcom.ac_if.if_ierrors;
        }
 
        /* normal transmit complete */
        }
 
        /* normal transmit complete */
@@ -657,7 +659,7 @@ loop:
                werint (unit);
 
        /* try to start transmit */
                werint (unit);
 
        /* try to start transmit */
-       westart(&sc->we_if);
+       westart(&sc->arpcom.ac_if);
 
        /* re-enable onboard interrupts */
        wecmd.cs_byte = inb(sc->we_io_nic_addr + WD_P0_COMMAND);
 
        /* re-enable onboard interrupts */
        wecmd.cs_byte = inb(sc->we_io_nic_addr + WD_P0_COMMAND);
@@ -680,9 +682,9 @@ wetint(unit)
         * Do some statistics (assume page zero of NIC mapped in)
         */
        sc->we_flags &= ~WDF_TXBUSY; 
         * Do some statistics (assume page zero of NIC mapped in)
         */
        sc->we_flags &= ~WDF_TXBUSY; 
-       sc->we_if.if_timer = 0;
-       ++sc->we_if.if_opackets;
-       sc->we_if.if_collisions += inb(sc->we_io_nic_addr + WD_P0_TBCR0);
+       sc->arpcom.ac_if.if_timer = 0;
+       ++sc->arpcom.ac_if.if_opackets;
+       sc->arpcom.ac_if.if_collisions += inb(sc->we_io_nic_addr + WD_P0_TBCR0);
 }
  
 /*
 }
  
 /*
@@ -789,7 +791,8 @@ weioctl(ifp, cmd, data)
                        register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
                        register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
 
                        if (ns_nullhost(*ina))
-                               ina->x_host = *(union ns_host *)(sc->ns_addr);
+                               ina->x_host =
+                                       *(union ns_host *)(sc->arpcom.ac_enaddr);
                        else {
                                /* 
                                 * The manual says we cant change the address 
                        else {
                                /* 
                                 * The manual says we cant change the address 
@@ -798,7 +801,8 @@ weioctl(ifp, cmd, data)
                                 */
                                ifp->if_flags &= ~IFF_RUNNING; 
                                bcopy((caddr_t)ina->x_host.c_host,
                                 */
                                ifp->if_flags &= ~IFF_RUNNING; 
                                bcopy((caddr_t)ina->x_host.c_host,
-                                   (caddr_t)sc->ns_addr, sizeof(sc->ns_addr));
+                                   (caddr_t)sc->arpcom.ac_enaddr,
+                                        sizeof(sc->arpcom.ac_enaddr));
                        }
                        weinit(ifp->if_unit); /* does ne_setaddr() */
                        break;
                        }
                        weinit(ifp->if_unit); /* does ne_setaddr() */
                        break;
@@ -819,7 +823,7 @@ weioctl(ifp, cmd, data)
                    (ifp->if_flags & IFF_RUNNING) == 0)
                        weinit(ifp->if_unit);
 #if NBPFILTER > 0
                    (ifp->if_flags & IFF_RUNNING) == 0)
                        weinit(ifp->if_unit);
 #if NBPFILTER > 0
-               if (sc->we_if.if_flags & IFF_PROMISC) {
+               if (sc->arpcom.ac_if.if_flags & IFF_PROMISC) {
                        outb(sc->we_io_nic_addr + WD_P0_RCR,
                                 WD_R_PRO | WD_R_SEP | WD_R_AR | WD_R_CONFIG);
                } else
                        outb(sc->we_io_nic_addr + WD_P0_RCR,
                                 WD_R_PRO | WD_R_SEP | WD_R_AR | WD_R_CONFIG);
                } else
@@ -854,7 +858,7 @@ wesetaddr(physaddr, unit)
         * Rewrite ethernet address, and then force restart of NIC
         */
        for (i = 0; i < ETHER_ADDR_LEN; i++)
         * Rewrite ethernet address, and then force restart of NIC
         */
        for (i = 0; i < ETHER_ADDR_LEN; i++)
-               sc->we_addr[i] = physaddr[i];
+               sc->arpcom.ac_enaddr[i] = physaddr[i];
        sc->we_flags &= ~WDF_RUNNING;
        weinit(unit);
 }
        sc->we_flags &= ~WDF_RUNNING;
        weinit(unit);
 }
@@ -883,13 +887,13 @@ weread(sc, buf, len)
                u_short trail_residual;
        } trailer_header;
 
                u_short trail_residual;
        } trailer_header;
 
-       ++sc->we_if.if_ipackets;
+       ++sc->arpcom.ac_if.if_ipackets;
 
        /* Allocate a header mbuf */
        MGETHDR(m, M_DONTWAIT, MT_DATA);
        if (m == 0)
                goto bad;
 
        /* Allocate a header mbuf */
        MGETHDR(m, M_DONTWAIT, MT_DATA);
        if (m == 0)
                goto bad;
-       m->m_pkthdr.rcvif = &sc->we_if;
+       m->m_pkthdr.rcvif = &sc->arpcom.ac_if;
        m->m_pkthdr.len = len;
        m->m_len = 0;
        head = m;
        m->m_pkthdr.len = len;
        m->m_len = 0;
        head = m;
@@ -964,8 +968,8 @@ weread(sc, buf, len)
         *
         * XXX This test does not support multicasts.
         */
         *
         * XXX This test does not support multicasts.
         */
-       if ((sc->we_if.if_flags & IFF_PROMISC) &&
-               bcmp(eh->ether_dhost, sc->we_addr,
+       if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC) &&
+               bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
                        sizeof(eh->ether_dhost)) != 0 &&
                bcmp(eh->ether_dhost, etherbroadcastaddr,
                        sizeof(eh->ether_dhost)) != 0) {
                        sizeof(eh->ether_dhost)) != 0 &&
                bcmp(eh->ether_dhost, etherbroadcastaddr,
                        sizeof(eh->ether_dhost)) != 0) {
@@ -985,7 +989,7 @@ weread(sc, buf, len)
         */
        eh->ether_type = ntohs(eh->ether_type);
 
         */
        eh->ether_type = ntohs(eh->ether_type);
 
-       ether_input(&sc->we_if, eh, head);
+       ether_input(&sc->arpcom.ac_if, eh, head);
        return;
 
 bad:   if (head)
        return;
 
 bad:   if (head)