diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2002-06-09 03:14:19 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2002-06-09 03:14:19 +0000 |
commit | ccdcaed6c36359c5304b860b70682f290dc347b2 (patch) | |
tree | 01252ff1c7131e9290bbdb78ea60bcea4f1f0be0 /sys/dev/ic | |
parent | 8d960a3582efa749fdaa10a8b161486c0d7d34d4 (diff) |
a step towards consistancy; in general:
'struct arpcom foo' -> 'struct arpcom sc_arpcom'
ok itojun@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/an.c | 32 | ||||
-rw-r--r-- | sys/dev/ic/anvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/awivar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/dc.c | 78 | ||||
-rw-r--r-- | sys/dev/ic/dcreg.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/elink3var.h | 2 | ||||
-rw-r--r-- | sys/dev/ic/fxp.c | 36 | ||||
-rw-r--r-- | sys/dev/ic/fxpvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/gem.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/if_wi.c | 62 | ||||
-rw-r--r-- | sys/dev/ic/if_wi_hostap.c | 70 | ||||
-rw-r--r-- | sys/dev/ic/if_wivar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/pdq_ifsubr.c | 24 | ||||
-rw-r--r-- | sys/dev/ic/pdqvar.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/rlnvar.h | 2 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9.c | 34 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9reg.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/xl.c | 50 | ||||
-rw-r--r-- | sys/dev/ic/xlreg.h | 4 |
19 files changed, 215 insertions, 215 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index e23f25d3145..34fc7765e51 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.23 2002/03/14 01:26:54 millert Exp $ */ +/* $OpenBSD: an.c,v 1.24 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -176,7 +176,7 @@ int an_attach(sc) struct an_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; sc->an_gone = 0; sc->an_associated = 0; @@ -227,9 +227,9 @@ an_attach(sc) } bcopy((char *)&sc->an_caps.an_oemaddr, - (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); - printf(": address %6s\n", ether_sprintf(sc->arpcom.ac_enaddr)); + printf(": address %6s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_softc = sc; @@ -290,7 +290,7 @@ an_attach(sc) ether_ifattach(ifp); timeout_set(&sc->an_stat_ch, an_stats_update, sc); #if NBPFILTER > 0 - BPFATTACH(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, + BPFATTACH(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); #endif @@ -315,7 +315,7 @@ an_rxeof(sc) struct mbuf *m; int id, error = 0; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; id = CSR_READ_2(sc, AN_RX_FID); @@ -400,7 +400,7 @@ an_txeof(sc, status) struct ifnet *ifp; int id; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -437,7 +437,7 @@ an_stats_update(xsc) s = splimp(); sc = xsc; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; sc->an_status.an_type = AN_RID_STATUS; sc->an_status.an_len = sizeof(struct an_ltv_status); @@ -472,7 +472,7 @@ an_intr(xsc) if (sc->an_gone) return 0; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; if (!(ifp->if_flags & IFF_UP)) { CSR_WRITE_2(sc, AN_EVENT_ACK, 0xFFFF); @@ -888,7 +888,7 @@ an_setdef(sc, areq) struct an_ltv_gen *sp; extern struct ifaddr **ifnet_addrs; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; switch (areq->an_type) { case AN_RID_GENCONFIG: @@ -896,7 +896,7 @@ an_setdef(sc, areq) ifa = ifnet_addrs[ifp->if_index]; sdl = (struct sockaddr_dl *)ifa->ifa_addr; - bcopy((char *)&cfg->an_macaddr, (char *)&sc->arpcom.ac_enaddr, + bcopy((char *)&cfg->an_macaddr, (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy((char *)&cfg->an_macaddr, LLADDR(sdl), ETHER_ADDR_LEN); @@ -1011,7 +1011,7 @@ an_ioctl(ifp, command, data) return(ENODEV); } - if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { splx(s); return error; } @@ -1023,7 +1023,7 @@ an_ioctl(ifp, command, data) #ifdef INET case AF_INET: an_init(sc); - arp_ifinit(&sc->arpcom, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; #endif default: @@ -1135,7 +1135,7 @@ void an_init(sc) struct an_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct an_ltv_ssidlist ssid; struct an_ltv_aplist aplist; struct an_ltv_genconfig genconf; @@ -1160,7 +1160,7 @@ an_init(sc) } /* Set our MAC address. */ - bcopy((char *)&sc->arpcom.ac_enaddr, + bcopy((char *)&sc->sc_arpcom.ac_enaddr, (char *)&sc->an_config.an_macaddr, ETHER_ADDR_LEN); if (ifp->if_flags & IFF_BROADCAST) @@ -1328,7 +1328,7 @@ an_stop(sc) if (sc->an_gone) return; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; an_cmd(sc, AN_CMD_FORCE_SYNCLOSS, 0); CSR_WRITE_2(sc, AN_INT_EN, 0); diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index 41774b61c16..9b78b0a5423 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: anvar.h,v 1.10 2002/05/09 21:26:26 mickey Exp $ */ +/* $OpenBSD: anvar.h,v 1.11 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -641,7 +641,7 @@ struct an_tx_ring_data { struct an_softc { struct device sc_dev; - struct arpcom arpcom; + struct arpcom sc_arpcom; struct ifmedia an_ifmedia; void *sc_ih; struct timeout an_stat_ch; diff --git a/sys/dev/ic/awivar.h b/sys/dev/ic/awivar.h index 77e61755638..0bb13b1f431 100644 --- a/sys/dev/ic/awivar.h +++ b/sys/dev/ic/awivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: awivar.h,v 1.4 2002/03/14 01:26:54 millert Exp $ */ +/* $OpenBSD: awivar.h,v 1.5 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: awivar.h,v 1.12 2000/07/21 04:48:56 onoe Exp $ */ /*- @@ -105,7 +105,7 @@ struct awi_softc #endif #ifdef __OpenBSD__ struct device sc_dev; - struct arpcom sc_ec; + struct arpcom sc_arpcom; void *sc_ih; /* interrupt handler */ #endif struct am79c930_softc sc_chip; diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 9152c90c62e..1d7478c9f3a 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.49 2002/06/09 00:07:10 nordin Exp $ */ +/* $OpenBSD: dc.c,v 1.50 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -938,13 +938,13 @@ void dc_setfilt_21143(sc) { struct dc_desc *sframe; u_int32_t h, *sp; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; struct ifnet *ifp; int i; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; i = sc->dc_cdata.dc_tx_prod; DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); @@ -985,9 +985,9 @@ void dc_setfilt_21143(sc) } /* Set our MAC address */ - sp[39] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 0); - sp[40] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 1); - sp[41] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 2); + sp[39] = DC_SP_FIELD(sc->sc_arpcom.ac_enaddr, 0); + sp[40] = DC_SP_FIELD(sc->sc_arpcom.ac_enaddr, 1); + sp[41] = DC_SP_FIELD(sc->sc_arpcom.ac_enaddr, 2); bus_dmamap_sync(sc->sc_dmat, sc->sc_listmap, offsetof(struct dc_list_data, dc_sbuf[0]), @@ -1020,17 +1020,17 @@ void dc_setfilt_admtek(sc) struct dc_softc *sc; { struct ifnet *ifp; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; int h = 0; u_int32_t hashes[2] = { 0, 0 }; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Init our MAC address */ - CSR_WRITE_4(sc, DC_AL_PAR0, *(u_int32_t *)(&sc->arpcom.ac_enaddr[0])); - CSR_WRITE_4(sc, DC_AL_PAR1, *(u_int32_t *)(&sc->arpcom.ac_enaddr[4])); + CSR_WRITE_4(sc, DC_AL_PAR0, *(u_int32_t *)(&sc->sc_arpcom.ac_enaddr[0])); + CSR_WRITE_4(sc, DC_AL_PAR1, *(u_int32_t *)(&sc->sc_arpcom.ac_enaddr[4])); /* If we want promiscuous mode, set the allframes bit. */ if (ifp->if_flags & IFF_PROMISC) @@ -1075,21 +1075,21 @@ void dc_setfilt_asix(sc) struct dc_softc *sc; { struct ifnet *ifp; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; int h = 0; u_int32_t hashes[2] = { 0, 0 }; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Init our MAC address */ CSR_WRITE_4(sc, DC_AX_FILTIDX, DC_AX_FILTIDX_PAR0); CSR_WRITE_4(sc, DC_AX_FILTDATA, - *(u_int32_t *)(&sc->arpcom.ac_enaddr[0])); + *(u_int32_t *)(&sc->sc_arpcom.ac_enaddr[0])); CSR_WRITE_4(sc, DC_AX_FILTIDX, DC_AX_FILTIDX_PAR1); CSR_WRITE_4(sc, DC_AX_FILTDATA, - *(u_int32_t *)(&sc->arpcom.ac_enaddr[4])); + *(u_int32_t *)(&sc->sc_arpcom.ac_enaddr[4])); /* If we want promiscuous mode, set the allframes bit. */ if (ifp->if_flags & IFF_PROMISC) @@ -1147,14 +1147,14 @@ void dc_setfilt_xircom(sc) struct dc_softc *sc; { struct dc_desc *sframe; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; u_int32_t h, *sp; struct ifnet *ifp; int i; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_TX_ON|DC_NETCFG_RX_ON)); i = sc->dc_cdata.dc_tx_prod; @@ -1197,9 +1197,9 @@ void dc_setfilt_xircom(sc) } /* Set our MAC address */ - sp[0] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 0); - sp[1] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 1); - sp[2] = DC_SP_FIELD(sc->arpcom.ac_enaddr, 2); + sp[0] = DC_SP_FIELD(sc->sc_arpcom.ac_enaddr, 0); + sp[1] = DC_SP_FIELD(sc->sc_arpcom.ac_enaddr, 1); + sp[2] = DC_SP_FIELD(sc->sc_arpcom.ac_enaddr, 2); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON); @@ -1630,31 +1630,31 @@ void dc_attach(sc) case DC_TYPE_PNICII: dc_read_eeprom(sc, (caddr_t)&mac_offset, (DC_EE_NODEADDR_OFFSET / 2), 1, 0); - dc_read_eeprom(sc, (caddr_t)&sc->arpcom.ac_enaddr, + dc_read_eeprom(sc, (caddr_t)&sc->sc_arpcom.ac_enaddr, (mac_offset / 2), 3, 0); break; case DC_TYPE_PNIC: - dc_read_eeprom(sc, (caddr_t)&sc->arpcom.ac_enaddr, 0, 3, 1); + dc_read_eeprom(sc, (caddr_t)&sc->sc_arpcom.ac_enaddr, 0, 3, 1); break; case DC_TYPE_DM9102: case DC_TYPE_21143: case DC_TYPE_ASIX: - dc_read_eeprom(sc, (caddr_t)&sc->arpcom.ac_enaddr, + dc_read_eeprom(sc, (caddr_t)&sc->sc_arpcom.ac_enaddr, DC_EE_NODEADDR, 3, 0); break; case DC_TYPE_AL981: case DC_TYPE_AN983: - bcopy(&sc->dc_srom[DC_AL_EE_NODEADDR], &sc->arpcom.ac_enaddr, + bcopy(&sc->dc_srom[DC_AL_EE_NODEADDR], &sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); break; case DC_TYPE_XIRCOM: break; case DC_TYPE_CONEXANT: bcopy(&sc->dc_srom + DC_CONEXANT_EE_NODEADDR, - &sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + &sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); break; default: - dc_read_eeprom(sc, (caddr_t)&sc->arpcom.ac_enaddr, + dc_read_eeprom(sc, (caddr_t)&sc->sc_arpcom.ac_enaddr, DC_EE_NODEADDR, 3, 0); break; } @@ -1717,9 +1717,9 @@ hasmac: /* * A 21143 or clone chip was detected. Inform the world. */ - printf(" address %s\n", ether_sprintf(sc->arpcom.ac_enaddr)); + printf(" address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; ifp->if_softc = sc; ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -1815,7 +1815,7 @@ fail: int dc_detach(sc) struct dc_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; if (LIST_FIRST(&sc->sc_mii.mii_phys) != NULL) mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); @@ -2140,7 +2140,7 @@ void dc_rxeof(sc) int i, total_len = 0; u_int32_t rxstat; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; i = sc->dc_cdata.dc_rx_prod; while(!(sc->dc_ldata->dc_rx_list[i].dc_status & @@ -2247,7 +2247,7 @@ void dc_txeof(sc) struct ifnet *ifp; int idx; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Clear the timeout timer. */ ifp->if_timer = 0; @@ -2364,7 +2364,7 @@ void dc_tick(xsc) s = splimp(); - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; mii = &sc->sc_mii; if (sc->dc_flags & DC_REDUCED_MII_POLL) { @@ -2441,7 +2441,7 @@ int dc_intr(arg) int claimed = 0; sc = arg; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Supress unwanted interrupts */ if (!(ifp->if_flags & IFF_UP)) { @@ -2608,7 +2608,7 @@ int dc_encap(sc, m_head, txidx) htole32(DC_TXCTL_FINT); #ifdef ALTQ else if ((sc->dc_flags & DC_TX_USE_TX_INTR) && - TBR_IS_ENABLED(&sc->arpcom.ac_if.if_snd)) + TBR_IS_ENABLED(&sc->sc_arpcom.ac_if.if_snd)) sc->dc_ldata->dc_tx_list[cur].dc_ctl |= htole32(DC_TXCTL_FINT); #endif @@ -2746,7 +2746,7 @@ void dc_init(xsc) void *xsc; { struct dc_softc *sc = xsc; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mii_data *mii; int s; @@ -2984,7 +2984,7 @@ int dc_ioctl(ifp, command, data) s = splimp(); - if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { splx(s); return error; } @@ -2995,7 +2995,7 @@ int dc_ioctl(ifp, command, data) switch (ifa->ifa_addr->sa_family) { case AF_INET: dc_init(sc); - arp_ifinit(&sc->arpcom, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; default: dc_init(sc); @@ -3026,8 +3026,8 @@ int dc_ioctl(ifp, command, data) case SIOCADDMULTI: case SIOCDELMULTI: error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); + ether_addmulti(ifr, &sc->sc_arpcom) : + ether_delmulti(ifr, &sc->sc_arpcom); if (error == ENETRESET) { /* @@ -3087,7 +3087,7 @@ void dc_stop(sc) register int i; struct ifnet *ifp; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; ifp->if_timer = 0; timeout_del(&sc->dc_tick_tmo); diff --git a/sys/dev/ic/dcreg.h b/sys/dev/ic/dcreg.h index 51978e7d586..8bfe55e68b2 100644 --- a/sys/dev/ic/dcreg.h +++ b/sys/dev/ic/dcreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dcreg.h,v 1.24 2002/04/18 19:11:18 jason Exp $ */ +/* $OpenBSD: dcreg.h,v 1.25 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -693,7 +693,7 @@ struct dc_mii_frame { struct dc_softc { struct device sc_dev; void *sc_ih; - struct arpcom arpcom; /* interface info */ + struct arpcom sc_arpcom; /* interface info */ mii_data_t sc_mii; bus_space_handle_t dc_bhandle; /* bus space handle */ bus_space_tag_t dc_btag; /* bus space tag */ diff --git a/sys/dev/ic/elink3var.h b/sys/dev/ic/elink3var.h index ac9830ea3fb..9b0262f65c9 100644 --- a/sys/dev/ic/elink3var.h +++ b/sys/dev/ic/elink3var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3var.h,v 1.17 2002/03/14 01:26:54 millert Exp $ */ +/* $OpenBSD: elink3var.h,v 1.18 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: elink3var.h,v 1.12 1997/03/30 22:47:11 jonathan Exp $ */ /* diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 9eff640e6a5..859f48d9f46 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.37 2002/05/13 15:36:22 art Exp $ */ +/* $OpenBSD: fxp.c,v 1.38 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -249,7 +249,7 @@ fxp_power(why, arg) if (why != PWR_RESUME) fxp_stop(sc, 0); else { - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; if (ifp->if_flags & IFF_UP) fxp_init(sc); } @@ -354,8 +354,8 @@ fxp_attach_common(sc, enaddr, intrstr) */ fxp_read_eeprom(sc, (u_int16_t *)enaddr, 0, 3); - ifp = &sc->arpcom.ac_if; - bcopy(enaddr, sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + ifp = &sc->sc_arpcom.ac_if; + bcopy(enaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -373,7 +373,7 @@ fxp_attach_common(sc, enaddr, intrstr) #endif printf(": %s, address %s\n", intrstr, - ether_sprintf(sc->arpcom.ac_enaddr)); + ether_sprintf(sc->sc_arpcom.ac_enaddr)); /* * Initialize our media structures and probe the MII. @@ -454,7 +454,7 @@ int fxp_detach(sc) struct fxp_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; /* Unhook our tick handler. */ timeout_del(&sc->stats_update_to); @@ -731,7 +731,7 @@ fxp_intr(arg) void *arg; { struct fxp_softc *sc = arg; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; u_int8_t statack; int claimed = 0, rnr; @@ -883,7 +883,7 @@ fxp_stats_update(arg) void *arg; { struct fxp_softc *sc = arg; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct fxp_stats *sp = &sc->sc_ctrl->stats; int s; @@ -971,7 +971,7 @@ fxp_stop(sc, drain) struct fxp_softc *sc; int drain; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; int i; /* @@ -1073,7 +1073,7 @@ fxp_init(xsc) void *xsc; { struct fxp_softc *sc = xsc; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct fxp_cb_config *cbp; struct fxp_cb_ias *cb_ias; struct fxp_cb_tx *txp; @@ -1179,8 +1179,8 @@ fxp_init(xsc) cb_ias->cb_status = 0; cb_ias->cb_command = FXP_CB_COMMAND_IAS | FXP_CB_COMMAND_EL; cb_ias->link_addr = 0xffffffff; - bcopy(sc->arpcom.ac_enaddr, (void *)cb_ias->macaddr, - sizeof(sc->arpcom.ac_enaddr)); + bcopy(sc->sc_arpcom.ac_enaddr, (void *)cb_ias->macaddr, + sizeof(sc->sc_arpcom.ac_enaddr)); /* * Start the IAS (Individual Address Setup) command/DMA. @@ -1462,7 +1462,7 @@ fxp_ioctl(ifp, command, data) s = splimp(); - if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { splx(s); return (error); } @@ -1475,7 +1475,7 @@ fxp_ioctl(ifp, command, data) #ifdef INET case AF_INET: fxp_init(sc); - arp_ifinit(&sc->arpcom, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; #endif #ifdef NS @@ -1524,8 +1524,8 @@ fxp_ioctl(ifp, command, data) case SIOCADDMULTI: case SIOCDELMULTI: error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); + ether_addmulti(ifr, &sc->sc_arpcom) : + ether_delmulti(ifr, &sc->sc_arpcom); if (error == ENETRESET) { /* * Multicast list has changed; set the hardware @@ -1568,7 +1568,7 @@ fxp_mc_setup(sc, doit) int doit; { struct fxp_cb_mcs *mcsp = &sc->sc_ctrl->u.mcs; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct ether_multistep step; struct ether_multi *enm; int nmcasts; @@ -1582,7 +1582,7 @@ fxp_mc_setup(sc, doit) nmcasts = 0; if (!(ifp->if_flags & IFF_ALLMULTI)) { - ETHER_FIRST_MULTI(step, &sc->arpcom, enm); + ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm); while (enm != NULL) { if (nmcasts >= MAXMCADDR) { ifp->if_flags |= IFF_ALLMULTI; diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h index 9165ae695c1..332a2611646 100644 --- a/sys/dev/ic/fxpvar.h +++ b/sys/dev/ic/fxpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fxpvar.h,v 1.11 2002/03/14 01:26:54 millert Exp $ */ +/* $OpenBSD: fxpvar.h,v 1.12 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */ /* @@ -79,7 +79,7 @@ struct fxp_softc { bus_space_tag_t sc_st; /* bus space tag */ bus_space_handle_t sc_sh; /* bus space handle */ bus_dma_tag_t sc_dmat; /* bus dma tag */ - struct arpcom arpcom; /* per-interface network data */ + struct arpcom sc_arpcom; /* per-interface network data */ struct mii_data sc_mii; /* MII media information */ struct mbuf *rfa_headm; /* first mbuf in receive frame area */ struct mbuf *rfa_tailm; /* last mbuf in receive frame area */ diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index c423ba88f12..26bcd76b6dc 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.22 2002/06/07 23:44:05 drahn Exp $ */ +/* $OpenBSD: gem.c,v 1.23 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -1361,7 +1361,7 @@ gem_ioctl(ifp, cmd, data) s = splimp(); - if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->arpcom, cmd, data)) > 0) { splx(s); return (error); } @@ -1375,7 +1375,7 @@ gem_ioctl(ifp, cmd, data) #ifdef INET case AF_INET: gem_init(ifp); - arp_ifinit(&sc->sc_arpcom, ifa); + arp_ifinit(&sc->arpcom, ifa); break; #endif #ifdef NS diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index c352413ba1e..4b97d4bd757 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.63 2002/06/03 21:53:58 millert Exp $ */ +/* $OpenBSD: if_wi.c,v 1.64 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.63 2002/06/03 21:53:58 millert Exp $"; + "$OpenBSD: if_wi.c,v 1.64 2002/06/09 03:14:18 todd Exp $"; #endif /* lint */ #ifdef foo @@ -200,13 +200,13 @@ wi_attach(sc) printf(": unable to read station address\n"); return (error); } - bcopy((char *)&mac.wi_mac_addr, (char *)&sc->arpcom.ac_enaddr, + bcopy((char *)&mac.wi_mac_addr, (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); wi_get_id(sc); - printf("address %s", ether_sprintf(sc->arpcom.ac_enaddr)); + printf("address %s", ether_sprintf(sc->sc_arpcom.ac_enaddr)); - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -383,7 +383,7 @@ wi_attach(sc) printf("\n"); #if NBPFILTER > 0 - BPFATTACH(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, + BPFATTACH(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); #endif @@ -405,7 +405,7 @@ wi_intr(vsc) DPRINTF(WID_INTR, ("wi_intr: sc %p\n", sc)); - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; if (!(sc->wi_flags & WI_FLAGS_ATTACHED) || !(ifp->if_flags & IFF_UP)) { CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); @@ -470,7 +470,7 @@ wi_rxeof(sc) u_int16_t msg_type; int id; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; id = CSR_READ_2(sc, WI_RX_FID); @@ -619,7 +619,7 @@ wi_rxeof(sc) mtod(m, caddr_t) + WI_802_11_OFFSET_RAW, rxlen + 2)) { m_freem(m); - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap: failed to copy header\n"); ifp->if_ierrors++; return; @@ -729,7 +729,7 @@ wi_txeof(sc, status) { struct ifnet *ifp; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -751,7 +751,7 @@ wi_inquire(xsc) int s, rv; sc = xsc; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; timeout_add(&sc->sc_timo, hz * 60); @@ -780,7 +780,7 @@ wi_update_stats(sc) int len, i; u_int16_t t; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; id = CSR_READ_2(sc, WI_INFO_FID); @@ -1274,7 +1274,7 @@ wi_setmulti(sc) struct ether_multistep step; struct ether_multi *enm; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; bzero((char *)&mcast, sizeof(mcast)); @@ -1286,7 +1286,7 @@ wi_setmulti(sc) return; } - ETHER_FIRST_MULTI(step, &sc->arpcom, enm); + ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm); while (enm != NULL) { if (i >= 16) { bzero((char *)&mcast, sizeof(mcast)); @@ -1320,14 +1320,14 @@ wi_setdef(sc, wreq) extern struct ifaddr **ifnet_addrs; int error = 0; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; switch(wreq->wi_type) { case WI_RID_MAC_NODE: ifa = ifnet_addrs[ifp->if_index]; sdl = (struct sockaddr_dl *)ifa->ifa_addr; bcopy((char *)&wreq->wi_val, LLADDR(sdl), ETHER_ADDR_LEN); - bcopy((char *)&wreq->wi_val, (char *)&sc->arpcom.ac_enaddr, + bcopy((char *)&wreq->wi_val, (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); break; case WI_RID_PORTTYPE: @@ -1429,7 +1429,7 @@ wi_ioctl(ifp, command, data) DPRINTF (WID_IOCTL, ("wi_ioctl: command %lu data %p\n", command, data)); - if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { splx(s); return error; } @@ -1456,7 +1456,7 @@ wi_ioctl(ifp, command, data) #ifdef INET case AF_INET: wi_init(sc); - arp_ifinit(&sc->arpcom, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; #endif /* INET */ default: @@ -1498,8 +1498,8 @@ wi_ioctl(ifp, command, data) case SIOCDELMULTI: /* Update our multicast list. */ error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); + ether_addmulti(ifr, &sc->sc_arpcom) : + ether_delmulti(ifr, &sc->sc_arpcom); if (error == ENETRESET) { /* * Multicast list has changed; set the hardware filter @@ -1703,7 +1703,7 @@ STATIC void wi_init(sc) struct wi_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; int s; struct wi_ltv_macaddr mac; int id = 0; @@ -1771,7 +1771,7 @@ wi_init(sc) /* Set our MAC address. */ mac.wi_len = 4; mac.wi_type = WI_RID_MAC_NODE; - bcopy((char *)&sc->arpcom.ac_enaddr, + bcopy((char *)&sc->sc_arpcom.ac_enaddr, (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN); wi_write_record(sc, (struct wi_ltv_gen *)&mac); @@ -2036,7 +2036,7 @@ nextpkt: tx_frame.wi_frame_ctl |= htole16(WI_FCTL_FROMDS); if (sc->wi_use_wep) tx_frame.wi_frame_ctl |= htole16(WI_FCTL_WEP); - bcopy((char *)&sc->arpcom.ac_enaddr, + bcopy((char *)&sc->sc_arpcom.ac_enaddr, (char *)&tx_frame.wi_addr2, ETHER_ADDR_LEN); bcopy((char *)&eh->ether_shost, (char *)&tx_frame.wi_addr3, ETHER_ADDR_LEN); @@ -2189,7 +2189,7 @@ wi_stop(sc) timeout_del(&sc->sc_timo); - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; CSR_WRITE_2(sc, WI_INT_EN, 0); wi_cmd(sc, WI_CMD_DISABLE|sc->wi_portnum, 0, 0, 0); @@ -2469,7 +2469,7 @@ wi_media_change(ifp) break; } - if (sc->arpcom.ac_if.if_flags & IFF_UP) { + if (sc->sc_arpcom.ac_if.if_flags & IFF_UP) { if (otype != sc->wi_ptype || orate != sc->wi_tx_rate || ocreate_ibss != sc->wi_create_ibss) wi_init(sc); @@ -2487,7 +2487,7 @@ wi_media_status(ifp, imr) { struct wi_softc *sc = ifp->if_softc; - if (!(sc->arpcom.ac_if.if_flags & IFF_UP)) { + if (!(sc->sc_arpcom.ac_if.if_flags & IFF_UP)) { imr->ifm_active = IFM_IEEE80211|IFM_NONE; imr->ifm_status = 0; return; @@ -2526,7 +2526,7 @@ wi_set_nwkey(sc, nwkey) wk->wi_len = (sizeof(*wk) / 2) + 1; wk->wi_type = WI_RID_DEFLT_CRYPT_KEYS; - if (sc->arpcom.ac_if.if_flags & IFF_UP) { + if (sc->sc_arpcom.ac_if.if_flags & IFF_UP) { error = wi_write_record(sc, (struct wi_ltv_gen *)&wreq); if (error) return error; @@ -2537,7 +2537,7 @@ wi_set_nwkey(sc, nwkey) wreq.wi_len = 2; wreq.wi_type = WI_RID_TX_CRYPT_KEY; wreq.wi_val[0] = htole16(nwkey->i_defkid - 1); - if (sc->arpcom.ac_if.if_flags & IFF_UP) { + if (sc->sc_arpcom.ac_if.if_flags & IFF_UP) { error = wi_write_record(sc, (struct wi_ltv_gen *)&wreq); if (error) return error; @@ -2547,7 +2547,7 @@ wi_set_nwkey(sc, nwkey) wreq.wi_type = WI_RID_ENCRYPTION; wreq.wi_val[0] = htole16(nwkey->i_wepon); - if (sc->arpcom.ac_if.if_flags & IFF_UP) { + if (sc->sc_arpcom.ac_if.if_flags & IFF_UP) { error = wi_write_record(sc, (struct wi_ltv_gen *)&wreq); if (error) return error; @@ -2555,7 +2555,7 @@ wi_set_nwkey(sc, nwkey) if ((error = wi_setdef(sc, &wreq))) return (error); - if (sc->arpcom.ac_if.if_flags & IFF_UP) + if (sc->sc_arpcom.ac_if.if_flags & IFF_UP) wi_init(sc); return 0; } @@ -2600,7 +2600,7 @@ wi_set_pm(struct wi_softc *sc, struct ieee80211_power *power) sc->wi_pm_enabled = power->i_enabled; sc->wi_max_sleep = power->i_maxsleep; - if (sc->arpcom.ac_if.if_flags & IFF_UP) + if (sc->sc_arpcom.ac_if.if_flags & IFF_UP) wi_init(sc); return (0); diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c index 86c7f9e2170..9d0ec07eb50 100644 --- a/sys/dev/ic/if_wi_hostap.c +++ b/sys/dev/ic/if_wi_hostap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_hostap.c,v 1.15 2002/04/26 22:19:07 millert Exp $ */ +/* $OpenBSD: if_wi_hostap.c,v 1.16 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 2002 @@ -187,7 +187,7 @@ wihap_init(struct wi_softc *sc) int i; struct wihap_info *whi = &sc->wi_hostap_info; - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_init: sc=0x%x whi=0x%x\n", sc, whi); bzero(whi, sizeof(struct wihap_info)); @@ -215,7 +215,7 @@ wihap_sta_disassoc(struct wi_softc *sc, struct wi_80211_hdr *resp_hdr; caddr_t pkt; - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("Sending disassoc to sta %s\n", ether_sprintf(sta->addr)); /* Send disassoc packet. */ @@ -225,8 +225,8 @@ wihap_sta_disassoc(struct wi_softc *sc, pkt = sc->wi_txbuf + sizeof(struct wi_80211_hdr); bcopy(sta->addr, resp_hdr->addr1, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); put_hword(&pkt, reason); @@ -244,7 +244,7 @@ wihap_sta_deauth(struct wi_softc *sc, u_int8_t sta_addr[], struct wi_80211_hdr *resp_hdr; caddr_t pkt; - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("Sending deauth to sta %s\n", ether_sprintf(sta_addr)); /* Send deauth packet. */ @@ -254,8 +254,8 @@ wihap_sta_deauth(struct wi_softc *sc, u_int8_t sta_addr[], pkt = sc->wi_txbuf + sizeof(struct wi_80211_hdr); bcopy(sta_addr, resp_hdr->addr1, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); put_hword(&pkt, reason); @@ -274,7 +274,7 @@ wihap_shutdown(struct wi_softc *sc) struct wihap_sta_info *sta, *next; int s; - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_shutdown: sc=0x%x whi=0x%x\n", sc, whi); if (!(whi->apflags & WIHAPFL_ACTIVE)) @@ -303,7 +303,7 @@ wihap_shutdown(struct wi_softc *sc) } /* Delete the structure. */ - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_shutdown: FREE(sta=0x%x)\n", sta); next = LIST_NEXT(sta, list); FREE(sta, M_DEVBUF); @@ -340,7 +340,7 @@ wihap_sta_timeout(void *v) s = splsoftnet(); if (sta->flags & WI_SIFLAGS_ASSOC) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_timer: disassoc due to inactivity: %s\n", ether_sprintf(sta->addr)); @@ -352,7 +352,7 @@ wihap_sta_timeout(void *v) } else if (sta->flags & WI_SIFLAGS_AUTHEN) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_timer: deauth due to inactivity: %s\n", ether_sprintf(sta->addr)); @@ -516,7 +516,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, IEEE80211_ELEMID_CHALLENGE, challenge, sizeof(challenge))) < 0) return; - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_auth_req: station %s algo=0x%x seq=0x%x\n", ether_sprintf(rxfrm->wi_addr2), algo, seq); @@ -538,7 +538,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, goto fail; } - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_auth_req: new station\n"); /* Create new station. */ @@ -589,7 +589,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, challenge[i] = sta->challenge[i] = arc4random(); - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("\tchallenge: 0x%x 0x%x ...\n", challenge[0], challenge[1]); challenge_len = 128; @@ -621,7 +621,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, } /* switch (seq) */ break; default: - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_auth_req: algorithm unsupported: 0x%x\n", algo); status = IEEE80211_STATUS_ALG; @@ -631,7 +631,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, status = IEEE80211_STATUS_SUCCESS; fail: - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_auth_req: returns status=0x%x\n", status); /* Send response. */ @@ -639,8 +639,8 @@ fail: bzero(resp_hdr, sizeof(struct wi_80211_hdr)); resp_hdr->frame_ctl = htole16(WI_FTYPE_MGMT | WI_STYPE_MGMT_AUTH); bcopy(rxfrm->wi_addr2, resp_hdr->addr1, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); pkt = &sc->wi_txbuf[sizeof(struct wi_80211_hdr)]; put_hword(&pkt, algo); @@ -695,7 +695,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, return; } - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: from station %s\n", ether_sprintf(rxfrm->wi_addr2)); @@ -703,7 +703,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, if (sc->wi_net_name.i_len != ssid.i_len || memcmp(sc->wi_net_name.i_nwid, ssid.i_nwid, ssid.i_len)) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: bad ssid: '%.*s' != '%.*s'\n", ssid.i_len, ssid.i_nwid, sc->wi_net_name.i_len, sc->wi_net_name.i_nwid); @@ -720,7 +720,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, /* Check supported rates against ours. */ if (wihap_check_rates(sta, rates, rates_len)<0) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: rates mismatch.\n"); status = IEEE80211_STATUS_RATES; goto fail; @@ -735,7 +735,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, status = IEEE80211_STATUS_CAPINFO; if ((capinfo & (IEEE80211_CAPINFO_ESS | IEEE80211_CAPINFO_IBSS)) != IEEE80211_CAPINFO_ESS) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: capinfo: not ESS: " "capinfo=0x%x\n", capinfo); goto fail; @@ -743,14 +743,14 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, } if ((sc->wi_use_wep && !(capinfo & IEEE80211_CAPINFO_PRIVACY)) || (!sc->wi_use_wep && (capinfo & IEEE80211_CAPINFO_PRIVACY))) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: WEP flag mismatch: " "capinfo=0x%x\n", capinfo); goto fail; } if ((capinfo & (IEEE80211_CAPINFO_CF_POLLABLE | IEEE80211_CAPINFO_CF_POLLREQ)) == IEEE80211_CAPINFO_CF_POLLABLE) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: polling not supported: " "capinfo=0x%x\n", capinfo); goto fail; @@ -760,7 +760,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, asid = sta->asid; if (sta->flags & WI_SIFLAGS_ASSOC) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: already assoc'ed?\n"); } @@ -769,7 +769,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, status = IEEE80211_STATUS_SUCCESS; fail: - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: returns status=0x%x\n", status); /* Send response. */ @@ -779,8 +779,8 @@ fail: pkt = sc->wi_txbuf + sizeof(struct wi_80211_hdr); bcopy(rxfrm->wi_addr2, resp_hdr->addr1, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); - bcopy(sc->arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr2, ETHER_ADDR_LEN); + bcopy(sc->sc_arpcom.ac_enaddr, resp_hdr->addr3, ETHER_ADDR_LEN); put_hword(&pkt, capinfo); put_hword(&pkt, status); @@ -810,7 +810,7 @@ wihap_deauth_req(struct wi_softc *sc, struct wi_frame *rxfrm, sta = wihap_sta_find(whi, rxfrm->wi_addr2); if (sta == NULL) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_deauth_req: unknown station: %s\n", ether_sprintf(rxfrm->wi_addr2)); } @@ -839,7 +839,7 @@ wihap_disassoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, sta = wihap_sta_find(whi, rxfrm->wi_addr2); if (sta == NULL) { - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_disassoc_req: unknown station: %s\n", ether_sprintf(rxfrm->wi_addr2)); } @@ -929,7 +929,7 @@ wihap_mgmt_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m) caddr_t pkt; int s, len; - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) + if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) wihap_debug_frame_type(rxfrm); pkt = mtod(m, caddr_t) + WI_802_11_OFFSET_RAW; @@ -1039,7 +1039,7 @@ wihap_check_tx(struct wihap_info *whi, u_int8_t addr[], u_int8_t *txrate) int wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m) { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct wihap_info *whi = &sc->wi_hostap_info; struct wihap_sta_info *sta; int mcast, s; @@ -1054,7 +1054,7 @@ wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m) } /* Check BSSID. (Is this necessary?) */ - if (!addr_cmp(rxfrm->wi_addr1, sc->arpcom.ac_enaddr)) { + if (!addr_cmp(rxfrm->wi_addr1, sc->sc_arpcom.ac_enaddr)) { if (ifp->if_flags & IFF_DEBUG) printf("wihap_data_input: incorrect bss: %s\n", ether_sprintf(rxfrm->wi_addr1)); @@ -1131,7 +1131,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) struct hostap_sta stabuf; int s, error = 0, n, flag; - if (!(sc->arpcom.ac_if.if_flags & IFF_RUNNING)) + if (!(sc->sc_arpcom.ac_if.if_flags & IFF_RUNNING)) return ENODEV; switch (command) { diff --git a/sys/dev/ic/if_wivar.h b/sys/dev/ic/if_wivar.h index 7103b7ecfd2..77128c843dc 100644 --- a/sys/dev/ic/if_wivar.h +++ b/sys/dev/ic/if_wivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wivar.h,v 1.12 2002/06/02 16:11:41 millert Exp $ */ +/* $OpenBSD: if_wivar.h,v 1.13 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -40,7 +40,7 @@ struct wi_softc { #ifndef __FreeBSD__ struct device sc_dev; #endif /* !__FreeBSD__ */ - struct arpcom arpcom; + struct arpcom sc_arpcom; struct ifmedia sc_media; bus_space_handle_t wi_bhandle; bus_space_tag_t wi_btag; diff --git a/sys/dev/ic/pdq_ifsubr.c b/sys/dev/ic/pdq_ifsubr.c index de2a11e7c40..64c51f7e827 100644 --- a/sys/dev/ic/pdq_ifsubr.c +++ b/sys/dev/ic/pdq_ifsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdq_ifsubr.c,v 1.12 2002/06/02 22:49:59 deraadt Exp $ */ +/* $OpenBSD: pdq_ifsubr.c,v 1.13 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: pdq_ifsubr.c,v 1.5 1996/05/20 00:26:21 thorpej Exp $ */ /*- @@ -94,8 +94,8 @@ arp_ifinit( struct arpcom *ac, struct ifaddr *ifa) { - sc->sc_ac.ac_ipaddr = IA_SIN(ifa)->sin_addr; - arpwhohas(&sc->sc_ac, &IA_SIN(ifa)->sin_addr); + sc->sc_arpcom.ac_ipaddr = IA_SIN(ifa)->sin_addr; + arpwhohas(&sc->sc_arpcom, &IA_SIN(ifa)->sin_addr); #if _BSDI_VERSION >= 199401 ifa->ifa_rtrequest = arp_rtrequest; ifa->ifa_flags |= RTF_CLONING; @@ -151,7 +151,7 @@ ifnet_ret_t pdq_ifstart( struct ifnet *ifp) { - pdq_softc_t *sc = (pdq_softc_t *) ((caddr_t) ifp - offsetof(pdq_softc_t, sc_ac.ac_if)); + pdq_softc_t *sc = (pdq_softc_t *) ((caddr_t) ifp - offsetof(pdq_softc_t, sc_arpcom.ac_if)); struct mbuf *m; int tx = 0; @@ -245,7 +245,7 @@ pdq_os_addr_fill( struct ether_multistep step; struct ether_multi *enm; - ETHER_FIRST_MULTI(step, &sc->sc_ac, enm); + ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm); while (enm != NULL && num_addrs > 0) { ((u_short *) addr->lanaddr_bytes)[0] = ((u_short *) enm->enm_addrlo)[0]; ((u_short *) addr->lanaddr_bytes)[1] = ((u_short *) enm->enm_addrlo)[1]; @@ -262,7 +262,7 @@ pdq_ifioctl( ioctl_cmd_t cmd, caddr_t data) { - pdq_softc_t *sc = (pdq_softc_t *) ((caddr_t) ifp - offsetof(pdq_softc_t, sc_ac.ac_if)); + pdq_softc_t *sc = (pdq_softc_t *) ((caddr_t) ifp - offsetof(pdq_softc_t, sc_arpcom.ac_if)); int s, error = 0; s = splimp(); @@ -276,7 +276,7 @@ pdq_ifioctl( #if defined(INET) case AF_INET: { pdq_ifinit(sc); - arp_ifinit(&sc->sc_ac, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; } #endif /* INET */ @@ -289,12 +289,12 @@ pdq_ifioctl( case AF_NS: { struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr); if (ns_nullhost(*ina)) { - ina->x_host = *(union ns_host *)(sc->sc_ac.ac_enaddr); + ina->x_host = *(union ns_host *)(sc->sc_arpcom.ac_enaddr); } else { ifp->if_flags &= ~IFF_RUNNING; bcopy((caddr_t)ina->x_host.c_host, - (caddr_t)sc->sc_ac.ac_enaddr, - sizeof sc->sc_ac.ac_enaddr); + (caddr_t)sc->sc_arpcom.ac_enaddr, + sizeof sc->sc_arpcom.ac_enaddr); } pdq_ifinit(sc); @@ -321,9 +321,9 @@ pdq_ifioctl( * Update multicast listeners */ if (cmd == SIOCADDMULTI) - error = ether_addmulti((struct ifreq *)data, &sc->sc_ac); + error = ether_addmulti((struct ifreq *)data, &sc->sc_arpcom); else - error = ether_delmulti((struct ifreq *)data, &sc->sc_ac); + error = ether_delmulti((struct ifreq *)data, &sc->sc_arpcom); if (error == ENETRESET) { if (sc->sc_if.if_flags & IFF_RUNNING) diff --git a/sys/dev/ic/pdqvar.h b/sys/dev/ic/pdqvar.h index e769be48b2b..4d39a944477 100644 --- a/sys/dev/ic/pdqvar.h +++ b/sys/dev/ic/pdqvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pdqvar.h,v 1.15 2002/06/02 22:50:00 deraadt Exp $ */ +/* $OpenBSD: pdqvar.h,v 1.16 2002/06/09 03:14:18 todd Exp $ */ /* $NetBSD: pdqvar.h,v 1.11 1996/10/25 21:33:37 cgd Exp $ */ /*- @@ -204,8 +204,8 @@ typedef struct { #elif defined(__FreeBSD__) struct kern_devconf *sc_kdc; /* freebsd cruft */ #endif - struct arpcom sc_ac; -#define sc_if sc_ac.ac_if + struct arpcom sc_arpcom; +#define sc_if sc_arpcom.ac_if pdq_t *sc_pdq; #if !defined(__NetBSD__) && !defined(__OpenBSD__) pdq_bus_ioport_t sc_iobase; diff --git a/sys/dev/ic/rlnvar.h b/sys/dev/ic/rlnvar.h index ae09985a1b5..e522638fcca 100644 --- a/sys/dev/ic/rlnvar.h +++ b/sys/dev/ic/rlnvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rlnvar.h,v 1.6 2002/03/14 03:16:05 millert Exp $ */ +/* $OpenBSD: rlnvar.h,v 1.7 2002/06/09 03:14:18 todd Exp $ */ /* * David Leonard <d@openbsd.org>, 1999. Public domain. * diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index fbca8235fdb..1161ef4a985 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.16 2002/06/08 00:10:54 aaron Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.17 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998 @@ -496,13 +496,13 @@ void rl_setmulti(sc) struct ifnet *ifp; int h = 0; u_int32_t hashes[2] = { 0, 0 }; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; u_int32_t rxfilt; int mcnt = 0; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; rxfilt = CSR_READ_4(sc, RL_RXCFG); @@ -623,7 +623,7 @@ rl_rxeof(sc) u_int16_t limit; u_int16_t rx_bytes = 0, max_bytes; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; cur_rx = (CSR_READ_2(sc, RL_CURRXADDR) + 16) % RL_RXBUFLEN; @@ -740,7 +740,7 @@ void rl_txeof(sc) struct ifnet *ifp; u_int32_t txstat; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Clear the timeout timer. */ ifp->if_timer = 0; @@ -796,7 +796,7 @@ int rl_intr(arg) u_int16_t status; sc = arg; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Disable interrupts. */ CSR_WRITE_2(sc, RL_IMR, 0x0000); @@ -950,7 +950,7 @@ void rl_init(xsc) void *xsc; { struct rl_softc *sc = xsc; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; int s, i; u_int32_t rxcfg = 0; @@ -963,7 +963,7 @@ void rl_init(xsc) /* Init our MAC address */ for (i = 0; i < ETHER_ADDR_LEN; i++) { - CSR_WRITE_1(sc, RL_IDR0 + i, sc->arpcom.ac_enaddr[i]); + CSR_WRITE_1(sc, RL_IDR0 + i, sc->sc_arpcom.ac_enaddr[i]); } /* Init the RX buffer pointer register. */ @@ -1073,7 +1073,7 @@ int rl_ioctl(ifp, command, data) s = splimp(); - if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { splx(s); return error; } @@ -1085,7 +1085,7 @@ int rl_ioctl(ifp, command, data) #ifdef INET case AF_INET: rl_init(sc); - arp_ifinit(&sc->arpcom, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; #endif /* INET */ default: @@ -1112,8 +1112,8 @@ int rl_ioctl(ifp, command, data) case SIOCADDMULTI: case SIOCDELMULTI: error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); + ether_addmulti(ifr, &sc->sc_arpcom) : + ether_delmulti(ifr, &sc->sc_arpcom); if (error == ENETRESET) { /* @@ -1162,7 +1162,7 @@ void rl_stop(sc) register int i; struct ifnet *ifp; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; ifp->if_timer = 0; timeout_del(&sc->sc_tick_tmo); @@ -1188,7 +1188,7 @@ int rl_attach(sc) struct rl_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; bus_dma_segment_t seg; bus_dmamap_t dmamap; int rseg; @@ -1210,10 +1210,10 @@ rl_attach(sc) /* * Get station address. */ - rl_read_eeprom(sc, (caddr_t)sc->arpcom.ac_enaddr, RL_EE_EADDR, + rl_read_eeprom(sc, (caddr_t)sc->sc_arpcom.ac_enaddr, RL_EE_EADDR, addr_len, 3, 0); - printf(" address %s\n", ether_sprintf(sc->arpcom.ac_enaddr)); + printf(" address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, addr_len, 1, 0); @@ -1310,7 +1310,7 @@ int rl_detach(sc) struct rl_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; /* Unhook our tick handler. */ timeout_del(&sc->sc_tick_tmo); diff --git a/sys/dev/ic/rtl81x9reg.h b/sys/dev/ic/rtl81x9reg.h index d6907cb8cad..613bd81c085 100644 --- a/sys/dev/ic/rtl81x9reg.h +++ b/sys/dev/ic/rtl81x9reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9reg.h,v 1.5 2002/06/08 00:10:54 aaron Exp $ */ +/* $OpenBSD: rtl81x9reg.h,v 1.6 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998 @@ -365,7 +365,7 @@ struct rl_softc { bus_space_handle_t rl_bhandle; /* bus space handle */ bus_space_tag_t rl_btag; /* bus space tag */ bus_dma_tag_t sc_dmat; - struct arpcom arpcom; /* interface info */ + struct arpcom sc_arpcom; /* interface info */ struct mii_data sc_mii; /* MII information */ u_int8_t rl_type; void *sc_sdhook; /* shutdownhook */ diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index 9d366b996cc..eb8cf012b6d 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.36 2002/06/08 23:38:51 aaron Exp $ */ +/* $OpenBSD: xl.c,v 1.37 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -211,7 +211,7 @@ xl_power(why, arg) if (why != PWR_RESUME) xl_stop(sc); else { - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; if (ifp->if_flags & IFF_UP) { xl_reset(sc, 1); xl_init(sc); @@ -635,13 +635,13 @@ void xl_setmulti(sc) struct xl_softc *sc; { struct ifnet *ifp; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; u_int8_t rxfilt; int mcnt = 0; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); @@ -676,13 +676,13 @@ void xl_setmulti_hash(sc) { struct ifnet *ifp; int h = 0, i; - struct arpcom *ac = &sc->arpcom; + struct arpcom *ac = &sc->sc_arpcom; struct ether_multi *enm; struct ether_multistep step; u_int8_t rxfilt; int mcnt = 0; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); @@ -731,16 +731,16 @@ void xl_testpacket(sc) struct ifnet *ifp; int error; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) return; - bcopy(&sc->arpcom.ac_enaddr, + bcopy(&sc->sc_arpcom.ac_enaddr, mtod(m, struct ether_header *)->ether_dhost, ETHER_ADDR_LEN); - bcopy(&sc->arpcom.ac_enaddr, + bcopy(&sc->sc_arpcom.ac_enaddr, mtod(m, struct ether_header *)->ether_shost, ETHER_ADDR_LEN); mtod(m, struct ether_header *)->ether_type = htons(3); mtod(m, unsigned char *)[14] = 0; @@ -1217,7 +1217,7 @@ void xl_rxeof(sc) int total_len = 0, sumflags = 0; u_int32_t rxstat; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; again: @@ -1336,7 +1336,7 @@ void xl_txeof(sc) struct xl_chain *cur_tx; struct ifnet *ifp; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; /* Clear the timeout timer. */ ifp->if_timer = 0; @@ -1388,7 +1388,7 @@ xl_txeof_90xB(sc) struct ifnet *ifp; int idx; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; idx = sc->xl_cdata.xl_tx_cons; while(idx != sc->xl_cdata.xl_tx_prod) { @@ -1493,7 +1493,7 @@ int xl_intr(arg) int claimed = 0; sc = arg; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS) { @@ -1559,7 +1559,7 @@ void xl_stats_update(xsc) bzero((char *)&xl_stats, sizeof(struct xl_stats)); sc = xsc; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; if (sc->xl_hasmii) mii = &sc->sc_mii; @@ -1921,7 +1921,7 @@ void xl_init(xsc) void *xsc; { struct xl_softc *sc = xsc; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; int s, i; u_int16_t rxfilt = 0; struct mii_data *mii = NULL; @@ -1949,7 +1949,7 @@ void xl_init(xsc) XL_SEL_WIN(2); for (i = 0; i < ETHER_ADDR_LEN; i++) { CSR_WRITE_1(sc, XL_W2_STATION_ADDR_LO + i, - sc->arpcom.ac_enaddr[i]); + sc->sc_arpcom.ac_enaddr[i]); } /* Clear the station mask. */ @@ -2255,7 +2255,7 @@ xl_ioctl(ifp, command, data) s = splimp(); - if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { splx(s); return error; } @@ -2267,7 +2267,7 @@ xl_ioctl(ifp, command, data) #ifdef INET case AF_INET: xl_init(sc); - arp_ifinit(&sc->arpcom, ifa); + arp_ifinit(&sc->sc_arpcom, ifa); break; #endif /* INET */ default: @@ -2314,8 +2314,8 @@ xl_ioctl(ifp, command, data) case SIOCADDMULTI: case SIOCDELMULTI: error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); + ether_addmulti(ifr, &sc->sc_arpcom) : + ether_delmulti(ifr, &sc->sc_arpcom); if (error == ENETRESET) { /* @@ -2421,7 +2421,7 @@ void xl_stop(sc) { struct ifnet *ifp; - ifp = &sc->arpcom.ac_if; + ifp = &sc->sc_arpcom.ac_if; ifp->if_timer = 0; CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_DISABLE); @@ -2462,7 +2462,7 @@ xl_attach(sc) struct xl_softc *sc; { u_int8_t enaddr[ETHER_ADDR_LEN]; - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; caddr_t roundptr; u_int round; int i, media = IFM_ETHER|IFM_100_TX|IFM_FDX; @@ -2479,9 +2479,9 @@ xl_attach(sc) sc->sc_dev.dv_xname); return; } - bcopy(enaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); + bcopy(enaddr, (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); - printf(" address %s\n", ether_sprintf(sc->arpcom.ac_enaddr)); + printf(" address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); if (sc->xl_flags & (XL_FLAG_INVERT_LED_PWR|XL_FLAG_INVERT_MII_PWR)) { u_int16_t n; @@ -2709,7 +2709,7 @@ int xl_detach(sc) struct xl_softc *sc; { - struct ifnet *ifp = &sc->arpcom.ac_if; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; /* Unhook our tick handler. */ timeout_del(&sc->xl_stsup_tmo); diff --git a/sys/dev/ic/xlreg.h b/sys/dev/ic/xlreg.h index e9ceb591754..2990bc1a3ab 100644 --- a/sys/dev/ic/xlreg.h +++ b/sys/dev/ic/xlreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xlreg.h,v 1.11 2002/06/08 23:38:51 aaron Exp $ */ +/* $OpenBSD: xlreg.h,v 1.12 2002/06/09 03:14:18 todd Exp $ */ /* * Copyright (c) 1997, 1998 @@ -563,7 +563,7 @@ struct xl_softc { struct device sc_dev; /* generic device structure */ void * xl_intrhand; /* interrupt handler cookie */ struct timeout xl_stsup_tmo; /* stats update timeout */ - struct arpcom arpcom; /* interface info */ + struct arpcom sc_arpcom; /* interface info */ struct ifmedia ifmedia; /* media info */ mii_data_t sc_mii; /* mii bus */ bus_space_handle_t xl_bhandle; |