summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_rum.c
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-07-19 20:16:21 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-07-19 20:16:21 +0000
commit9d23c7249120d4db06064ef391293facb928aa56 (patch)
tree1c47d922ead979d99db07d569b7d085f172a7526 /sys/dev/usb/if_rum.c
parent3d431b8be522a990fb2fa836bff550b31f76e9fd (diff)
RX descriptor is located at the beginning of the RX buffer, unlike
RT2500USB.
Diffstat (limited to 'sys/dev/usb/if_rum.c')
-rw-r--r--sys/dev/usb/if_rum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index be70f9169cf..032e2a27ab7 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.25 2006/07/19 19:54:00 damien Exp $ */
+/* $OpenBSD: if_rum.c,v 1.26 2006/07/19 20:16:20 damien Exp $ */
/*-
* Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
* Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org>
@@ -729,8 +729,7 @@ rum_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
goto skip;
}
- /* rx descriptor is located at the end */
- desc = (struct rum_rx_desc *)(data->buf + len - RT2573_RX_DESC_SIZE);
+ desc = (struct rum_rx_desc *)data->buf;
if (letoh32(desc->flags) & (RT2573_RX_PHY_ERROR | RT2573_RX_CRC_ERROR)) {
/*
@@ -765,6 +764,7 @@ rum_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
/* finalize mbuf */
m->m_pkthdr.rcvif = ifp;
+ m->m_data = (caddr_t)(desc + 1);
m->m_pkthdr.len = m->m_len = (letoh32(desc->flags) >> 16) & 0xfff;
m_adj(m, -IEEE80211_CRC_LEN); /* trim FCS */