diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/if_rum.c | 16 |
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) |