summaryrefslogtreecommitdiff
path: root/sys/dev/ic/if_wi.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-10 00:58:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-10 00:58:53 +0000
commit72c0cdd4172dcf02c25953c22dacd95efced4fe4 (patch)
treee8f5c6c781dfefb90d5872d933d7a05cde4f2cad /sys/dev/ic/if_wi.c
parent28245217ef21ce5cb86824fd869a8211ec4fba53 (diff)
under some cases some wi(4) cards freak out and then do not recover.
make the driver reset in those cases. this needs testing, which is why it is being commited; from kuethe
Diffstat (limited to 'sys/dev/ic/if_wi.c')
-rw-r--r--sys/dev/ic/if_wi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index 77f93be7a27..049ef897ab3 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.127 2006/03/25 22:41:43 djm Exp $ */
+/* $OpenBSD: if_wi.c,v 1.128 2006/04/10 00:58:52 deraadt 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.127 2006/03/25 22:41:43 djm Exp $";
+ "$OpenBSD: if_wi.c,v 1.128 2006/04/10 00:58:52 deraadt Exp $";
#endif /* lint */
#ifdef foo
@@ -2407,6 +2407,12 @@ wi_mgmt_xmit(struct wi_softc *sc, caddr_t data, int len)
if (wi_cmd(sc, WI_CMD_TX|WI_RECLAIM, id, 0, 0)) {
printf(WI_PRT_FMT ": wi_mgmt_xmit: xmit failed\n",
WI_PRT_ARG(sc));
+ /*
+ * Hostile stations or corrupt frames may crash the card
+ * and cause the kernel to get stuck printing complaints.
+ * Reset the card and hope the problem goes away.
+ */
+ wi_reset(sc);
return(EIO);
}