diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-12-13 07:37:55 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-12-13 07:37:55 +0000 |
commit | a807afdc62a3acdd7f0a0fc7d86f33aea9a56136 (patch) | |
tree | 0f9c825c656b6076518b82156fac97d7db554746 /sys/dev/usb/if_atu.c | |
parent | 5c83e3a178f5af994490dc1b4acae56d30823b6c (diff) |
set the buffer up before we try to use it. fixes a panic on sparc64 which
didn't manifest on i386 for some reason.
Diffstat (limited to 'sys/dev/usb/if_atu.c')
-rw-r--r-- | sys/dev/usb/if_atu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index a2178b5fb14..ac67b8cf260 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atu.c,v 1.43 2004/12/12 08:45:36 dlg Exp $ */ +/* $OpenBSD: if_atu.c,v 1.44 2004/12/13 07:37:54 dlg Exp $ */ /* * Copyright (c) 2003, 2004 * Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved. @@ -1639,14 +1639,14 @@ atu_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) h = (struct atu_rx_hdr *)c->atu_buf; len = h->length - 4; /* XXX magic number */ - wh = mtod(m, struct ieee80211_frame *); - ni = ieee80211_find_rxnode(ic, wh); - m = c->atu_mbuf; memcpy(mtod(m, char *), c->atu_buf + ATU_RX_HDRLEN, len); m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = len; + wh = mtod(m, struct ieee80211_frame *); + ni = ieee80211_find_rxnode(ic, wh); + ifp->if_ipackets++; s = splnet(); |