summaryrefslogtreecommitdiff
path: root/sys/dev/wl
diff options
context:
space:
mode:
authorJohn Hay <jhay@FreeBSD.org>2003-04-17 17:51:24 +0000
committerJohn Hay <jhay@FreeBSD.org>2003-04-17 17:51:24 +0000
commite37f27be240bca3010ef47d17e1165d8dd9a0823 (patch)
treefe07575dcd44cd6ba3b854242b43750f3ae8b722 /sys/dev/wl
parenta368c85b6263600016e75990cfe9c94d1bf32530 (diff)
downloadsrc-test2-e37f27be240bca3010ef47d17e1165d8dd9a0823.tar.gz
src-test2-e37f27be240bca3010ef47d17e1165d8dd9a0823.zip
Notes
Diffstat (limited to 'sys/dev/wl')
-rw-r--r--sys/dev/wl/if_wl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index 795afdf0c2cc..83bc665c1c3b 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -1119,7 +1119,14 @@ wlread(struct wl_softc *sc, u_short fd_p)
*/
mlen = 0;
mb_p = mtod(m, u_char *);
- bytes_in_mbuf = MCLBYTES;
+ bytes_in_mbuf = m->m_len;
+
+ /* Put the ethernet header inside the mbuf. */
+ bcopy(&fd.destination[0], mb_p, 14);
+ mb_p += 14;
+ mlen += 14;
+ bytes_in_mbuf -= 14;
+
bytes = min(bytes_in_mbuf, bytes_in_msg);
for (;;) {
if (bytes & 1) {
@@ -1144,6 +1151,7 @@ wlread(struct wl_softc *sc, u_short fd_p)
return 0;
}
mb_p += bytes;
+ bytes_in_mbuf -= bytes;
bytes_in_msg -= bytes;
if (bytes_in_msg == 0) {
if (rbd.status & RBD_SW_EOF || rbd.next_rbd_offset == I82586NULL) {