summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2005-03-17 14:23:04 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2005-03-17 14:23:04 +0000
commitd148e7dcb63cf6abc4f67ad38ccdf72a00f2e2a0 (patch)
tree92fb5b20bc11fbde6bdc481b6c104901fb91dc73
parent239156c59a517d7e685b0c8191869d14546fafc1 (diff)
give ipv6 a chance. pointed out by Paul de Weerd.
-rw-r--r--sys/dev/ic/ral.c16
-rw-r--r--sys/dev/usb/if_ral.c16
2 files changed, 28 insertions, 4 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index 9af73f39201..06638828198 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.32 2005/03/11 20:47:59 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.33 2005/03/17 14:23:00 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -2026,6 +2026,7 @@ ral_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct ral_softc *sc = ifp->if_softc;
struct ieee80211com *ic = &sc->sc_ic;
struct ifaddr *ifa;
+ struct ifreq *ifr;
int s, error = 0;
s = splnet();
@@ -2058,6 +2059,17 @@ ral_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 SIOCS80211CHANNEL:
/*
* This allows for fast channel switching in monitor mode
@@ -2076,7 +2088,7 @@ ral_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))
ral_init(ifp);
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 776b853f1bc..ae7d2f4a07e 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.5 2005/03/17 12:46:54 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.6 2005/03/17 14:23:03 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -1268,6 +1268,7 @@ ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct ural_softc *sc = ifp->if_softc;
struct ieee80211com *ic = &sc->sc_ic;
struct ifaddr *ifa;
+ struct ifreq *ifr;
int s, error = 0;
s = splnet();
@@ -1300,6 +1301,17 @@ ural_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 SIOCS80211CHANNEL:
/*
* This allows for fast channel switching in monitor mode
@@ -1318,7 +1330,7 @@ ural_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))
ural_init(ifp);