Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb Backed out changeset 59315a2ccd28
details: https://anonhg.NetBSD.org/src-all/rev/b11c716eee1d
branches: trunk
changeset: 376727:b11c716eee1d
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun May 03 09:22:32 2020 +1000
description:
Backed out changeset 59315a2ccd28
diffstat:
sys/dev/usb/if_urtwn.c | 31 +++++++++++++++----------------
1 files changed, 15 insertions(+), 16 deletions(-)
diffs (62 lines):
diff -r efbeb3c7ee0f -r b11c716eee1d sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Sun May 03 09:04:51 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Sun May 03 09:22:32 2020 +1000
@@ -390,6 +390,7 @@ urtwn_attach(device_t parent, device_t s
struct usb_attach_arg *uaa = aux;
char *devinfop;
const struct urtwn_dev *dev;
+ struct urtwn_rx_data *data;
usb_device_request_t req;
// NNN loop below size_t i;
int error;
@@ -618,6 +619,20 @@ urtwn_attach(device_t parent, device_t s
goto fail;
}
+ /* Queue Rx xfers. */
+ for (size_t j = 0; j < sc->rx_npipe; j++) {
+ mutex_enter(&sc->sc_rx_mtx);
+ TAILQ_FOREACH(data, &sc->rx_free_list[j], next) {
+ usbd_setup_xfer(data->xfer, data, data->buf,
+ URTWN_RXBUFSZ, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
+ urtwn_rxeof);
+ error = usbd_transfer(data->xfer);
+ if (__predict_false(error != USBD_NORMAL_COMPLETION &&
+ error != USBD_IN_PROGRESS))
+ goto fail;
+ }
+ mutex_exit(&sc->sc_rx_mtx);
+ }
return;
fail:
@@ -5531,7 +5546,6 @@ urtwn_init(struct ifnet *ifp)
struct ieee80211com *ic = vap->iv_ic;
struct ifmediareq imr;
struct urtwn_softc *sc = ic->ic_softc;
- struct urtwn_rx_data *data;
uint32_t reg;
int error;
@@ -5747,21 +5761,6 @@ urtwn_init(struct ifnet *ifp)
/* Set default channel. */
urtwn_set_chan(sc, ic->ic_curchan, IEEE80211_HTINFO_2NDCHAN_NONE);
- /* Queue Rx xfers. */
- for (size_t j = 0; j < sc->rx_npipe; j++) {
- mutex_enter(&sc->sc_rx_mtx);
- TAILQ_FOREACH(data, &sc->rx_free_list[j], next) {
- usbd_setup_xfer(data->xfer, data, data->buf,
- URTWN_RXBUFSZ, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
- urtwn_rxeof);
- error = usbd_transfer(data->xfer);
- if (__predict_false(error != USBD_NORMAL_COMPLETION &&
- error != USBD_IN_PROGRESS))
- goto fail;
- }
- mutex_exit(&sc->sc_rx_mtx);
- }
-
/* We're ready to go. */
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_flags |= IFF_RUNNING;
Home |
Main Index |
Thread Index |
Old Index