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 Rely on defaults set by usbwifi



details:   https://anonhg.NetBSD.org/src-all/rev/45388f2e9c2d
branches:  trunk
changeset: 365653:45388f2e9c2d
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Wed Feb 09 11:58:03 2022 +0100

description:
Rely on defaults set by usbwifi

diffstat:

 sys/dev/usb/if_run.c   |  7 +++----
 sys/dev/usb/if_urtwn.c |  7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diffs (48 lines):

diff -r 8385a809623a -r 45388f2e9c2d sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c      Wed Feb 09 11:57:26 2022 +0100
+++ b/sys/dev/usb/if_run.c      Wed Feb 09 11:58:03 2022 +0100
@@ -601,10 +601,6 @@
        sc->sc_uw.uw_dev = self;
        sc->sc_uw.uw_udev = uaa->uaa_device;
        sc->sc_uw.uw_ops = &run_ops;
-       sc->sc_uw.uw_rx_xfer_flags = USBD_SHORT_XFER_OK;
-       sc->sc_uw.uw_tx_xfer_flags = USBD_FORCE_SHORT_XFER;
-       sc->sc_uw.uw_tx_xfer_timeout = RUN_TX_TIMEOUT;
-       sc->sc_uw.uw_rx_xfer_timeout = USBD_NO_TIMEOUT;
        sc->sc_uw.uw_rx_bufsz = RUN_MAX_RXSZ;
        sc->sc_uw.uw_tx_bufsz = RUN_MAX_TXSZ;
        sc->sc_uw.uw_rx_list_cnt = RUN_RX_RING_COUNT;
@@ -619,6 +615,9 @@
 
        usbwifi_attach(&sc->sc_uw);
 
+       /* override default settings */
+       sc->sc_uw.uw_tx_xfer_timeout = RUN_TX_TIMEOUT;
+
        error = usbd_set_config_no(sc->sc_uw.uw_udev, 1, 0);
        if (error != 0) {
                aprint_error_dev(self, "failed to set configuration"
diff -r 8385a809623a -r 45388f2e9c2d sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Wed Feb 09 11:57:26 2022 +0100
+++ b/sys/dev/usb/if_urtwn.c    Wed Feb 09 11:58:03 2022 +0100
@@ -400,10 +400,6 @@
        sc->sc_uw.uw_dev = self;
        sc->sc_uw.uw_udev = uaa->uaa_device;
        sc->sc_uw.uw_ops = &urtwn_ops;
-       sc->sc_uw.uw_rx_xfer_flags = USBD_SHORT_XFER_OK;
-       sc->sc_uw.uw_tx_xfer_flags = USBD_FORCE_SHORT_XFER;
-       sc->sc_uw.uw_tx_xfer_timeout = URTWN_TX_TIMEOUT;
-       sc->sc_uw.uw_rx_xfer_timeout = USBD_NO_TIMEOUT;
        sc->sc_uw.uw_rx_bufsz = URTWN_RXBUFSZ;  /* size of a single buffer */
        sc->sc_uw.uw_tx_bufsz = URTWN_TXBUFSZ;  /* for RX/TX */
        sc->sc_uw.uw_tx_list_cnt = URTWN_TX_LIST_COUNT; /* max RX/TX buffers */
@@ -435,6 +431,9 @@
 
        usbwifi_attach(&sc->sc_uw);
 
+       /* Override default settings */
+       sc->sc_uw.uw_tx_xfer_timeout = URTWN_TX_TIMEOUT;
+
        /* NNN make these callouts use a vap ... in vap create??? */
        callout_init(&sc->sc_calib_to, CALLOUT_MPSAFE);
        callout_setfunc(&sc->sc_calib_to, urtwn_calib_to, sc);



Home | Main Index | Thread Index | Old Index