diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-06-20 22:42:30 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-06-20 22:42:30 +0000 |
commit | e1f9ada7b9b7742f5a9971f81d306527771c6626 (patch) | |
tree | f4531a9c7a7e356cb8c659820083d207db2b7c8e /sys | |
parent | 7df301d2051df22500fe1494c86ff82eaef679f7 (diff) |
Replace arpcom in the softc with ieee80211com in preparation for
further net80211 changes. ok mickey@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/an.c | 59 | ||||
-rw-r--r-- | sys/dev/ic/anvar.h | 4 | ||||
-rw-r--r-- | sys/dev/isa/if_an_isapnp.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_an_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_an_pcmcia.c | 10 |
5 files changed, 43 insertions, 38 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index cf51e2c0b9b..d429ead4dee 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.41 2005/04/24 00:25:05 brad Exp $ */ +/* $OpenBSD: an.c,v 1.42 2005/06/20 22:42:29 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -115,6 +115,8 @@ #include <netinet/if_ether.h> #endif +#include <net80211/ieee80211_var.h> + #include "bpfilter.h" #if NBPFILTER > 0 #include <net/bpf.h> @@ -172,7 +174,8 @@ int an_attach(sc) struct an_softc *sc; { - struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; sc->an_gone = 0; sc->an_associated = 0; @@ -223,9 +226,9 @@ an_attach(sc) } bcopy((char *)&sc->an_caps.an_oemaddr, - (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); + (char *)&sc->sc_ic.ic_ac.ac_enaddr, ETHER_ADDR_LEN); - printf(": address %6s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); + printf(": address %6s\n", ether_sprintf(sc->sc_ic.ic_ac.ac_enaddr)); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_softc = sc; @@ -285,7 +288,7 @@ an_attach(sc) ether_ifattach(ifp); timeout_set(&sc->an_stat_ch, an_stats_update, sc); #if NBPFILTER > 0 - BPFATTACH(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, + BPFATTACH(&sc->sc_ic.ic_ac.ac_if.if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); #endif @@ -301,7 +304,8 @@ void an_rxeof(sc) struct an_softc *sc; { - struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; struct ether_header *eh; #ifdef ANCACHE struct an_rxframe rx_frame; @@ -388,11 +392,10 @@ an_txeof(sc, status) struct an_softc *sc; int status; { - struct ifnet *ifp; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; int id; - ifp = &sc->sc_arpcom.ac_if; - ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -421,15 +424,13 @@ void an_stats_update(xsc) void *xsc; { - struct an_softc *sc; - struct ifnet *ifp; + struct an_softc *sc = xsc; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; int s; s = splimp(); - sc = xsc; - ifp = &sc->sc_arpcom.ac_if; - sc->an_status.an_type = AN_RID_STATUS; sc->an_status.an_len = sizeof(struct an_ltv_status); an_read_record(sc, (struct an_ltv_gen *)&sc->an_status); @@ -454,17 +455,14 @@ int an_intr(xsc) void *xsc; { - struct an_softc *sc; - struct ifnet *ifp; + struct an_softc *sc = (struct an_softc*)xsc; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; u_int16_t status; - sc = (struct an_softc*)xsc; - if (sc->an_gone) return 0; - ifp = &sc->sc_arpcom.ac_if; - if (!(ifp->if_flags & IFF_UP)) { CSR_WRITE_2(sc, AN_EVENT_ACK, 0xFFFF); CSR_WRITE_2(sc, AN_INT_EN, 0); @@ -873,19 +871,18 @@ an_setdef(sc, areq) struct an_softc *sc; struct an_req *areq; { - struct ifnet *ifp; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; struct an_ltv_genconfig *cfg; struct an_ltv_ssidlist *ssid; struct an_ltv_aplist *ap; struct an_ltv_gen *sp; - ifp = &sc->sc_arpcom.ac_if; - switch (areq->an_type) { case AN_RID_GENCONFIG: cfg = (struct an_ltv_genconfig *)areq; bcopy((char *)&cfg->an_macaddr, - (char *)&sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); + (char *)&sc->sc_ic.ic_ac.ac_enaddr, ETHER_ADDR_LEN); bcopy((char *)&cfg->an_macaddr, LLADDR(ifp->if_sadl), ETHER_ADDR_LEN); @@ -1000,7 +997,7 @@ an_ioctl(ifp, command, data) return(ENODEV); } - if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) { + if ((error = ether_ioctl(ifp, &sc->sc_ic.ic_ac, command, data)) > 0) { splx(s); return error; } @@ -1012,7 +1009,7 @@ an_ioctl(ifp, command, data) #ifdef INET case AF_INET: an_init(sc); - arp_ifinit(&sc->sc_arpcom, ifa); + arp_ifinit(&sc->sc_ic.ic_ac, ifa); break; #endif default: @@ -1124,7 +1121,8 @@ void an_init(sc) struct an_softc *sc; { - struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; struct an_ltv_ssidlist ssid; struct an_ltv_aplist aplist; struct an_ltv_genconfig genconf; @@ -1149,7 +1147,7 @@ an_init(sc) } /* Set our MAC address. */ - bcopy((char *)&sc->sc_arpcom.ac_enaddr, + bcopy((char *)&sc->sc_ic.ic_ac.ac_enaddr, (char *)&sc->an_config.an_macaddr, ETHER_ADDR_LEN); if (ifp->if_flags & IFF_BROADCAST) @@ -1311,14 +1309,13 @@ void an_stop(sc) struct an_softc *sc; { - struct ifnet *ifp; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; int i; if (sc->an_gone) return; - ifp = &sc->sc_arpcom.ac_if; - an_cmd(sc, AN_CMD_FORCE_SYNCLOSS, 0); CSR_WRITE_2(sc, AN_INT_EN, 0); an_cmd(sc, AN_CMD_DISABLE, 0); diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index 519d8e2eb88..b557ca8a434 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: anvar.h,v 1.17 2004/09/28 04:37:32 brad Exp $ */ +/* $OpenBSD: anvar.h,v 1.18 2005/06/20 22:42:29 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -638,7 +638,7 @@ struct an_tx_ring_data { struct an_softc { struct device sc_dev; int noise; /* noise value */ - struct arpcom sc_arpcom; + struct ieee80211com sc_ic; struct ifmedia an_ifmedia; void *sc_ih; struct timeout an_stat_ch; diff --git a/sys/dev/isa/if_an_isapnp.c b/sys/dev/isa/if_an_isapnp.c index 11a37bd81cc..e4ad19bc992 100644 --- a/sys/dev/isa/if_an_isapnp.c +++ b/sys/dev/isa/if_an_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_an_isapnp.c,v 1.3 2003/06/04 04:43:56 deraadt Exp $ */ +/* $OpenBSD: if_an_isapnp.c,v 1.4 2005/06/20 22:42:29 jsg Exp $ */ /* * Copyright (c) 2003 Michael Shalayeff @@ -39,6 +39,8 @@ #include <netinet/in.h> #include <netinet/if_ether.h> +#include <net80211/ieee80211_var.h> + #include <machine/bus.h> #include <machine/intr.h> diff --git a/sys/dev/pci/if_an_pci.c b/sys/dev/pci/if_an_pci.c index e61a22ac7f3..1398e97370c 100644 --- a/sys/dev/pci/if_an_pci.c +++ b/sys/dev/pci/if_an_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_an_pci.c,v 1.9 2002/11/19 18:40:17 jason Exp $ */ +/* $OpenBSD: if_an_pci.c,v 1.10 2005/06/20 22:42:29 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -67,6 +67,8 @@ #include <netinet/in.h> #include <netinet/if_ether.h> +#include <net80211/ieee80211_var.h> + #include <machine/bus.h> #include <machine/intr.h> diff --git a/sys/dev/pcmcia/if_an_pcmcia.c b/sys/dev/pcmcia/if_an_pcmcia.c index a295b5c26e2..e9104b7389b 100644 --- a/sys/dev/pcmcia/if_an_pcmcia.c +++ b/sys/dev/pcmcia/if_an_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_an_pcmcia.c,v 1.13 2005/01/27 17:04:55 millert Exp $ */ +/* $OpenBSD: if_an_pcmcia.c,v 1.14 2005/06/20 22:42:29 jsg Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -40,6 +40,8 @@ #include <netinet/in.h> #include <netinet/if_ether.h> +#include <net80211/ieee80211_var.h> + #include <machine/bus.h> #include <dev/pcmcia/pcmciareg.h> @@ -143,7 +145,8 @@ an_pcmcia_detach(dev, flags) { struct an_pcmcia_softc *psc = (struct an_pcmcia_softc *)dev; struct an_softc *sc = (struct an_softc *)dev; - struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; if (sc->an_gone) { printf ("%s: already detached\n", sc->sc_dev.dv_xname); @@ -171,7 +174,8 @@ an_pcmcia_activate(dev, act) { struct an_pcmcia_softc *psc = (struct an_pcmcia_softc *)dev; struct an_softc *sc = &psc->sc_an; - struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; int s; s = splnet(); |