Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb make rum_ioctl look like other wireless drivers, ...
details: https://anonhg.NetBSD.org/src/rev/a049310a8d79
branches: trunk
changeset: 762496:a049310a8d79
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Feb 22 00:58:08 2011 +0000
description:
make rum_ioctl look like other wireless drivers, now dhcpcd works and
mdnsd doesn't hang my laptop
diffstat:
sys/dev/usb/if_rum.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diffs (68 lines):
diff -r 58f01ea67054 -r a049310a8d79 sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c Mon Feb 21 23:50:42 2011 +0000
+++ b/sys/dev/usb/if_rum.c Tue Feb 22 00:58:08 2011 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
-/* $NetBSD: if_rum.c,v 1.35 2011/02/21 23:50:42 jmcneill Exp $ */
+/* $NetBSD: if_rum.c,v 1.36 2011/02/22 00:58:08 jmcneill Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.35 2011/02/21 23:50:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.36 2011/02/22 00:58:08 jmcneill Exp $");
#include <sys/param.h>
@@ -1356,6 +1356,9 @@
static int
rum_ioctl(struct ifnet *ifp, u_long cmd, void *data)
{
+#define IS_RUNNING(ifp) \
+ (((ifp)->if_flags & IFF_UP) && ((ifp)->if_flags & IFF_RUNNING))
+
struct rum_softc *sc = ifp->if_softc;
struct ieee80211com *ic = &sc->sc_ic;
int s, error = 0;
@@ -1366,7 +1369,6 @@
case SIOCSIFFLAGS:
if ((error = ifioctl_common(ifp, cmd, data)) != 0)
break;
- /* XXX re-use ether_ioctl() */
switch (ifp->if_flags & (IFF_UP|IFF_RUNNING)) {
case IFF_UP|IFF_RUNNING:
rum_update_promisc(sc);
@@ -1382,13 +1384,20 @@
}
break;
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
+ error = 0;
+ }
+ break;
+
default:
error = ieee80211_ioctl(ic, cmd, data);
}
if (error == ENETRESET) {
- if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
- (IFF_UP | IFF_RUNNING))
+ if (IS_RUNNING(ifp) &&
+ (ic->ic_roaming != IEEE80211_ROAMING_MANUAL))
rum_init(ifp);
error = 0;
}
@@ -1396,6 +1405,7 @@
splx(s);
return error;
+#undef IS_RUNNING
}
static void
Home |
Main Index |
Thread Index |
Old Index