diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-03-17 20:08:14 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-03-17 20:08:14 +0000 |
commit | b14389eedfd8c6232e55d3f4723104cded6eb02a (patch) | |
tree | 6f0dd5c39533d62dc5f583d8af5fe803c447b21a /sys | |
parent | f13b58c8178cdbd5884a9e9d37d39b13b34a1947 (diff) |
support for ipv6.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_ipw.c | 19 | ||||
-rw-r--r-- | sys/dev/pci/if_iwi.c | 22 |
2 files changed, 33 insertions, 8 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index ce89bf4ab16..3c7e41c5be8 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.43 2005/03/12 13:23:30 damien Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.44 2005/03/17 20:08:13 damien Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -1366,7 +1366,9 @@ int ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ipw_softc *sc = ifp->if_softc; + struct ieee80211com *ic = &sc->sc_ic; struct ifaddr *ifa; + struct ifreq *ifr; int s, error = 0; s = splnet(); @@ -1378,7 +1380,7 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (ifa->ifa_addr->sa_family) { #ifdef INET case AF_INET: - arp_ifinit(&sc->sc_ic.ic_ac, ifa); + arp_ifinit(&ic->ic_ac, ifa); ipw_init(ifp); break; #endif @@ -1397,6 +1399,17 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } break; + case SIOCADDMULTI: + case SIOCDELMULTI: + ifr = (struct ifreq *)data; + error = (cmd == SIOCADDMULTI) ? + ether_addmulti(ifr, &ic->ic_ac) : + ether_delmulti(ifr, &ic->ic_ac); + + if (error == ENETRESET) + error = 0; + break; + case SIOCG80211TXPOWER: /* * If the hardware radio transmitter switch is off, report a @@ -1424,7 +1437,7 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ieee80211_ioctl(ifp, cmd, data); } - if (error == ENETRESET && cmd != SIOCADDMULTI) { + if (error == ENETRESET) { if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING)) ipw_init(ifp); diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 7072ad85998..7cd75a0e5ce 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.30 2005/03/14 13:21:42 damien Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.31 2005/03/17 20:08:13 damien Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -1256,7 +1256,9 @@ int iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct iwi_softc *sc = ifp->if_softc; + struct ieee80211com *ic = &sc->sc_ic; struct ifaddr *ifa; + struct ifreq *ifr; int s, error = 0; s = splnet(); @@ -1268,9 +1270,8 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (ifa->ifa_addr->sa_family) { #ifdef INET case AF_INET: - if (!(ifp->if_flags & IFF_UP)) - iwi_init(ifp); - arp_ifinit(&sc->sc_ic.ic_ac, ifa); + arp_ifinit(&ic->ic_ac, ifa); + iwi_init(ifp); break; #endif default: @@ -1288,6 +1289,17 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } break; + case SIOCADDMULTI: + case SIOCDELMULTI: + ifr = (struct ifreq *)data; + error = (cmd == SIOCADDMULTI) ? + ether_addmulti(ifr, &ic->ic_ac) : + ether_delmulti(ifr, &ic->ic_ac); + + if (error == ENETRESET) + error = 0; + break; + case SIOCG80211TXPOWER: /* * If the hardware radio transmitter switch is off, report a @@ -1315,7 +1327,7 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ieee80211_ioctl(ifp, cmd, data); } - if (error == ENETRESET && cmd != SIOCADDMULTI) { + if (error == ENETRESET) { if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING)) iwi_init(ifp); |