From 9d758314218905692d9e1ccc44ddbaf04b837c2d Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Wed, 19 Jul 2006 19:36:20 +0000 Subject: revert part of r1.6 commit. only data frames must reserve 4 bytes. --- sys/dev/usb/if_rum.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/dev/usb/if_rum.c') 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 * Copyright (c) 2006 Niall O'Higgins @@ -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) -- cgit v1.2.3