diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-11-06 10:49:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-11-06 10:49:02 +0000 |
commit | 0e6f8712e07dec2ed5c99a33fb12c4a7f55580c4 (patch) | |
tree | ea625a06a2a3811a3d13ab216e5c2cbb69c81a30 | |
parent | 3d6bcc8818ed6bd71be7d2bc4b517a82f0ce7bfe (diff) |
Don't advertise USB wi adapters as supported hostap devices,
the code would need to be largely overhauled if the hardware
actually supports it.
Fixes a panic when trying to set hostap on a usb wi, PR 5154.
-rw-r--r-- | sys/dev/ic/if_wi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index d50d6af0b8a..fb4828169bf 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.134 2006/08/17 20:36:35 deraadt Exp $ */ +/* $OpenBSD: if_wi.c,v 1.135 2006/11/06 10:49:01 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -127,7 +127,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.134 2006/08/17 20:36:35 deraadt Exp $"; + "$OpenBSD: if_wi.c,v 1.135 2006/11/06 10:49:01 jsg Exp $"; #endif /* lint */ #ifdef foo @@ -305,7 +305,12 @@ wi_attach(struct wi_softc *sc, struct wi_funcs *funcs) sc->wi_cmd_count = 2000; if (sc->sc_sta_firmware_ver >= 800) { #ifndef SMALL_KERNEL - if (sc->sc_sta_firmware_ver != 10402) + /* + * USB hostap is more pain than it is worth + * for now, things would have to be overhauled + */ + if ((sc->sc_sta_firmware_ver != 10402) && + (!(sc->wi_flags & WI_FLAGS_BUS_USB))) sc->wi_flags |= WI_FLAGS_HAS_HOSTAP; #endif sc->wi_flags |= WI_FLAGS_HAS_IBSS; |