summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-07-19 19:36:20 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-07-19 19:36:20 +0000
commit9d758314218905692d9e1ccc44ddbaf04b837c2d (patch)
tree65d31d9941cdecfe47ea433ffce606288531fa00
parent7047bf5760f211c1320eb904493a6356b64ede7b (diff)
revert part of r1.6 commit.
only data frames must reserve 4 bytes.
-rw-r--r--sys/dev/usb/if_rum.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 3f16602bdd9..ecf552d9018 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.22 2006/07/19 19:32:46 damien Exp $ */
+/* $OpenBSD: if_rum.c,v 1.23 2006/07/19 19:36:19 damien Exp $ */
/*-
* Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
* Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org>
@@ -1002,7 +1002,7 @@ rum_tx_bcn(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
return ENOMEM;
/* xfer length needs to be a multiple of two! */
- xferlen = (RT2573_TX_DESC_SIZE + m0->m_pkthdr.len + 3) & ~3;
+ xferlen = (RT2573_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1;
buf = usbd_alloc_buffer(xfer, xferlen);
if (buf == NULL) {
@@ -1095,15 +1095,15 @@ rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RT2573_TX_DESC_SIZE);
rum_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate);
- /* align end on a 4-bytes boundary */
- xferlen = (RT2573_TX_DESC_SIZE + m0->m_pkthdr.len + 3) & ~3;
+ /* align end on a 2-bytes boundary */
+ xferlen = (RT2573_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1;
/*
- * No space left in the last URB to store the extra 4 bytes, force
+ * No space left in the last URB to store the extra 2 bytes, force
* sending of another URB.
*/
if ((xferlen % 64) == 0)
- xferlen += 4;
+ xferlen += 2;
DPRINTFN(10, ("%s: sending mgt frame len=%u rate=%u xfer len=%u\n",
USBDEVNAME(sc->sc_dev), m0->m_pkthdr.len, rate, xferlen));
@@ -1197,11 +1197,11 @@ rum_tx_data(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RT2573_TX_DESC_SIZE);
rum_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate);
- /* align end on a 2-bytes boundary */
+ /* align end on a 4-bytes boundary */
xferlen = (RT2573_TX_DESC_SIZE + m0->m_pkthdr.len + 3) & ~3;
/*
- * No space left in the last URB to store the extra 2 bytes, force
+ * No space left in the last URB to store the extra 4 bytes, force
* sending of another URB.
*/
if ((xferlen % 64) == 0)