From e1dc25a74f48cdbdc26dc4a7467b69939c82f211 Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Fri, 18 Mar 2005 19:07:23 +0000 Subject: use xferlen for mgt frames too. this prevents management frames with a odd length from being dropped. --- sys/dev/usb/if_ral.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index 11f33059b8f..1a076d90fca 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.8 2005/03/18 13:57:42 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.9 2005/03/18 19:07:22 damien Exp $ */ /*- * Copyright (c) 2005 @@ -1095,9 +1095,8 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) DPRINTFN(10, ("sending mgt frame len=%u rate=%u xfer len=%u\n", m0->m_pkthdr.len, rate, xferlen)); - usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, - RAL_TX_DESC_SIZE + m0->m_pkthdr.len, USBD_FORCE_SHORT_XFER | - USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); + usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, xferlen, + USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); error = usbd_transfer(data->xfer); if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) @@ -1181,9 +1180,8 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) DPRINTFN(10, ("sending data frame len=%u rate=%u xfer len=%u\n", m0->m_pkthdr.len, rate, xferlen)); - usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, - xferlen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, - ural_txeof); + usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, xferlen, + USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); error = usbd_transfer(data->xfer); if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) -- cgit v1.2.3