diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2009-03-26 20:17:28 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2009-03-26 20:17:28 +0000 |
commit | 4eacc26c475f34d24c56705a1e685afac6a3cb89 (patch) | |
tree | 214f74c87e54f53075b205908b3f79e99d59ae1c | |
parent | 30c9a073445657874ff9e232cd1e01f875754a39 (diff) |
remove useless code to force an empty transfer in case the length
is a multiple of wMaxPacketSize, since this is exactly what the
USBD_FORCE_SHORT_XFER flag does for us.
-rw-r--r-- | sys/dev/usb/if_run.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_runvar.h | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index a3e5d67e567..18b7a51891b 100644 --- a/sys/dev/usb/if_run.c +++ b/sys/dev/usb/if_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_run.c,v 1.12 2009/03/14 15:53:23 damien Exp $ */ +/* $OpenBSD: if_run.c,v 1.13 2009/03/26 20:17:27 damien Exp $ */ /*- * Copyright (c) 2008,2009 Damien Bergamini <damien.bergamini@free.fr> @@ -348,8 +348,6 @@ run_attach(struct device *parent, struct device *self, void *aux) nrx++; } else if (ntx < 4) { sc->txq[ntx].pipe_no = ed->bEndpointAddress; - sc->txq[ntx].pktsize = - UE_GET_SIZE(UGETW(ed->wMaxPacketSize)); ntx++; } } @@ -2028,8 +2026,6 @@ run_tx(struct run_softc *sc, struct mbuf *m, struct ieee80211_node *ni) ieee80211_release_node(ic, ni); xferlen += sizeof (*txd) + 4; - if ((xferlen % ring->pktsize) == 0) - xferlen += 4; usbd_setup_xfer(data->xfer, ring->pipeh, data, data->buf, xferlen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RUN_TX_TIMEOUT, run_txeof); diff --git a/sys/dev/usb/if_runvar.h b/sys/dev/usb/if_runvar.h index 2f7f50b1cb4..ec401351a65 100644 --- a/sys/dev/usb/if_runvar.h +++ b/sys/dev/usb/if_runvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_runvar.h,v 1.2 2009/03/14 15:53:23 damien Exp $ */ +/* $OpenBSD: if_runvar.h,v 1.3 2009/03/26 20:17:27 damien Exp $ */ /*- * Copyright (c) 2008,2009 Damien Bergamini <damien.bergamini@free.fr> @@ -93,7 +93,6 @@ struct run_tx_ring { usbd_pipe_handle pipeh; int cur; int queued; - uint16_t pktsize; uint8_t pipe_no; }; |