summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_ral.c16
1 files changed, 14 insertions, 2 deletions
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);