summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authordbj <dbj@NetBSD.org>2002-03-04 01:30:04 +0000
committerdbj <dbj@NetBSD.org>2002-03-04 01:30:04 +0000
commit918b9d4dec05dc2bdafb424cfd86bc2f2e46378f (patch)
tree20e75046ad2b44e6d0c05d38fc83bafefb85a333 /sys/dev/ic
parent6e4b27cd491dd296b62ad62af0ce245d8b410db5 (diff)
correctly handle AP scanning result when there are no APs
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/wi.c b/sys/dev/ic/wi.c
index b06b4ea091a..1e5680c8d79 100644
--- a/sys/dev/ic/wi.c
+++ b/sys/dev/ic/wi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.46 2002/03/04 01:21:07 dbj Exp $ */
+/* $NetBSD: wi.c,v 1.47 2002/03/04 01:30:04 dbj Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.46 2002/03/04 01:21:07 dbj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.47 2002/03/04 01:30:04 dbj Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -493,9 +493,9 @@ void wi_update_stats(sc)
switch (gen.wi_type) {
case WI_INFO_SCAN_RESULTS:
- if (gen.wi_len <= 3)
- break;
- if (sc->sc_prism2) { /* Prism2 chip */
+ if (gen.wi_len <= 3) {
+ sc->wi_naps = 0;
+ } else if (sc->sc_prism2) { /* Prism2 chip */
naps = 2 * (gen.wi_len - 3) / sizeof(ap2);
naps = naps > MAXAPINFO ? MAXAPINFO : naps;
sc->wi_naps = naps;