summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-11-09 20:54:20 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-11-09 20:54:20 +0000
commite92477b490a56b3b64bdd7faef0b75448feb5dfb (patch)
treeb4764aec59b692515f7bc2a96c279fd7b24a739a /sys
parent6fa1827953e91bab9d8c7d4bd01d97f6e80cb74c (diff)
Zero the tx buffer before reusing it. This way stray bits will
not remain set on the text packet sent, seems to improve wi@usb on large transfers.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_wi_usb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index 6a901bc28f5..84e14aa72ce 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.3 2003/11/08 19:17:28 jmc Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.4 2003/11/09 20:54:19 drahn Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -451,6 +451,9 @@ wi_send_packet(struct wi_usb_softc *sc, int id)
bzero(((char *)c->wi_usb_buf)+total_len,
rnd_len - total_len);
+ /* zero old packet for next TX */
+ bzero(wibuf, total_len);
+
total_len = rnd_len;
DPRINTFN(5,("%s: %s: id=%x len=%x\n",