From nobody Thu Jun 09 13:19:04 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 21865850FCA; Thu, 9 Jun 2022 13:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LJl6d0BpFz3RLg; Thu, 9 Jun 2022 13:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654780745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGrE2W3wLbOW3DeG0SBYmhOgnwN5ccUX5GxVYM8AnFg=; b=vzpfmQKKXO3TBru3MQ3FDheDHmyxOyfy5GV2FpQJGD5bGkdGUn/G6Hx6jvnFgsNSpomprM Ojc0ukTQldolNBsFJL7i7I/J+DTZkHS0GyUYqrfqTV7D5AaF0Bsv784h05koDCs5ntPoyo krs/YNoGNKylR7hHZRN5j6KxdWrr4nQVf5VYjXxgk2U7JOQxyp2Ux7E3TCcmWjPMh05C4W 1h6PtkWkmf6mK026h7GUIVS1YdFtDf8k0WPafByvKKEBXwCt8rgFXhw0ftaZcGgxnFhzfZ gq4T0oTbGKT+TulFcOlMFfiBH8CwQ4hrN75UERi3zhK0Y8Vwi5gSieCVti2EgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC29224A49; Thu, 9 Jun 2022 13:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 259DJ4ed029099; Thu, 9 Jun 2022 13:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 259DJ4Jw029098; Thu, 9 Jun 2022 13:19:04 GMT (envelope-from git) Date: Thu, 9 Jun 2022 13:19:04 GMT Message-Id: <202206091319.259DJ4Jw029098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: c6c22ebb38e7 - main - urtw(4): Adjust all pause calls to use milliseconds instead of ticks. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6c22ebb38e7371191e2f8c411b81011ecbe096a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654780745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGrE2W3wLbOW3DeG0SBYmhOgnwN5ccUX5GxVYM8AnFg=; b=etctO49Cmr6hp1zM3yAfswI3Qn9sWkrA5F3M0m2UeKiQXaxK8y9aIjMzPmHfSAVh4Q3LKV EkRk2OnpBG38H5vA4AP5f20HWf3SzlUeEDgZJFuBfRA3xATXMD/aJMRLZ1W5dcEz7k2SxX NMXhuR0jfM2Pm1++Mbhs6y0njLB7cGTemO31qBt+1T1qU1t9PRd5GB8E7S8rZoUTxym/+m ecV0QCZaLVpaSDeYY0rihlfEU/fsONY4ZjaU3h0FQDAD7RHhQF7pUG/1P3+dHAy5GPOAS3 T62B7apjzapH9RxJ2MTpshCQyT1/bkwVW9TySggaJIv5vcOIt0pt5rSrh2wdgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654780745; a=rsa-sha256; cv=none; b=XA45BobXHPAYO+p4Imw3q0Xn/2xQHlP1pCmd62/k7CfD1yQUyS6XMjX+o390gISjhb+Wg4 M9T/EtL3pAbucPMwTin/bBVzilbYiKXZxW1Ill9fF1k6MHkurKbQUUHFlTV4GYsKMdYTOE jzLXjGVCTYa4zP0NYJ9irH/+ARSpIIp05OdxxvVJaZeAQt+3LO7N83M1rKy+Gtw7QgwF5M oISRWnMedYZopgIlb+0PMFz3+EN2H8sijUun8v8Db6filvhnJwwi/FSLaHjznj+ay52gVV BbqTDmYGpQV4hZpAtB0pBnRhuR4ppKCtcVD57WfPdvG7hqJLzmI/U1OaayQxzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=c6c22ebb38e7371191e2f8c411b81011ecbe096a commit c6c22ebb38e7371191e2f8c411b81011ecbe096a Author: Hans Petter Selasky AuthorDate: 2022-06-09 13:11:29 +0000 Commit: Hans Petter Selasky CommitDate: 2022-06-09 13:18:02 +0000 urtw(4): Adjust all pause calls to use milliseconds instead of ticks. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/wlan/if_urtw.c | 116 ++++++++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 55 deletions(-) diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index 2ade18480b6f..2e4bb876eb3e 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -1282,6 +1282,12 @@ fail: return (error); } +static void +urtw_pause_ms(struct urtw_softc *sc, int delay) +{ + usb_pause_mtx(&sc->sc_mtx, USB_MS_TO_TICKS(delay)); +} + static usb_error_t urtw_8187b_cmd_reset(struct urtw_softc *sc) { @@ -1295,7 +1301,7 @@ urtw_8187b_cmd_reset(struct urtw_softc *sc) urtw_write8_m(sc, URTW_CMD, data8); for (i = 0; i < 20; i++) { - usb_pause_mtx(&sc->sc_mtx, 2); + urtw_pause_ms(sc, 2); urtw_read8_m(sc, URTW_CMD, &data8); if (!(data8 & URTW_CMD_RST)) break; @@ -1326,7 +1332,7 @@ urtw_do_request(struct urtw_softc *sc, DPRINTF(sc, URTW_DEBUG_INIT, "Control request failed, %s (retrying)\n", usbd_errstr(err)); - usb_pause_mtx(&sc->sc_mtx, hz / 100); + urtw_pause_ms(sc, 10); } return (err); } @@ -1634,7 +1640,7 @@ urtw_set_channel(struct ieee80211com *ic) error = sc->sc_rf_set_chan(sc, ieee80211_chan2ieee(ic, ic->ic_curchan)); if (error != 0) goto fail; - usb_pause_mtx(&sc->sc_mtx, 10); + urtw_pause_ms(sc, 10); urtw_write32_m(sc, URTW_TX_CONF, orig); urtw_write16_m(sc, URTW_ATIM_WND, 2); @@ -2509,20 +2515,20 @@ urtw_8225_rf_init(struct urtw_softc *sc) error = urtw_8185_rf_pins_enable(sc); if (error) goto fail; - usb_pause_mtx(&sc->sc_mtx, 1000); + urtw_pause_ms(sc, 1000); for (i = 0; i < nitems(urtw_8225_rf_part1); i++) { urtw_8225_write(sc, urtw_8225_rf_part1[i].reg, urtw_8225_rf_part1[i].val); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); } - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, URTW_8225_ADDR_2_DATA_MAGIC1); - usb_pause_mtx(&sc->sc_mtx, 200); + urtw_pause_ms(sc, 200); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, URTW_8225_ADDR_2_DATA_MAGIC2); - usb_pause_mtx(&sc->sc_mtx, 200); + urtw_pause_ms(sc, 200); urtw_8225_write(sc, URTW_8225_ADDR_0_MAGIC, URTW_8225_ADDR_0_DATA_MAGIC3); @@ -2538,15 +2544,15 @@ urtw_8225_rf_init(struct urtw_softc *sc) for (i = 0; i < 128; i++) { urtw_8187_write_phy_ofdm(sc, 0xb, urtw_8225_agc[i]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8187_write_phy_ofdm(sc, 0xa, (uint8_t)i + 0x80); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); } for (i = 0; i < nitems(urtw_8225_rf_part2); i++) { urtw_8187_write_phy_ofdm(sc, urtw_8225_rf_part2[i].reg, urtw_8225_rf_part2[i].val); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); } error = urtw_8225_setgain(sc, 4); @@ -2556,7 +2562,7 @@ urtw_8225_rf_init(struct urtw_softc *sc) for (i = 0; i < nitems(urtw_8225_rf_part3); i++) { urtw_8187_write_phy_cck(sc, urtw_8225_rf_part3[i].reg, urtw_8225_rf_part3[i].val); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); } urtw_write8_m(sc, URTW_TESTR, 0x0d); @@ -2566,9 +2572,9 @@ urtw_8225_rf_init(struct urtw_softc *sc) goto fail; urtw_8187_write_phy_cck(sc, 0x10, 0x9b); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8187_write_phy_ofdm(sc, 0x26, 0x90); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); /* TX ant A, 0x0 for B */ error = urtw_8185_tx_antenna(sc, 0x3); @@ -2597,7 +2603,7 @@ urtw_8185_tx_antenna(struct urtw_softc *sc, uint8_t ant) usb_error_t error; urtw_write8_m(sc, URTW_TX_ANTENNA, ant); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); fail: return (error); } @@ -2629,7 +2635,7 @@ urtw_8187_write_phy(struct urtw_softc *sc, uint8_t addr, uint32_t data) urtw_write8_m(sc, URTW_PHY_MAGIC3, ((phyw & 0x00ff0000) >> 16)); urtw_write8_m(sc, URTW_PHY_MAGIC2, ((phyw & 0x0000ff00) >> 8)); urtw_write8_m(sc, URTW_PHY_MAGIC1, ((phyw & 0x000000ff))); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); fail: return (error); } @@ -2669,7 +2675,7 @@ urtw_8225_usb_init(struct urtw_softc *sc) urtw_write16_m(sc, URTW_RF_PINS_SELECT, 0x80); urtw_write16_m(sc, URTW_RF_PINS_ENABLE, 0x80); - usb_pause_mtx(&sc->sc_mtx, 500); + urtw_pause_ms(sc, 500); fail: return (error); } @@ -2702,7 +2708,7 @@ urtw_8225_write_c(struct urtw_softc *sc, uint8_t addr, uint16_t data) DELAY(10); urtw_write16_m(sc, URTW_RF_PINS_OUTPUT, d80 | URTW_BB_HOST_BANG_EN); urtw_write16_m(sc, URTW_RF_PINS_SELECT, d84); - usb_pause_mtx(&sc->sc_mtx, 2); + urtw_pause_ms(sc, 2); fail: return (error); } @@ -2740,7 +2746,7 @@ urtw_8225_rf_set_chan(struct urtw_softc *sc, int chan) if (error) goto fail; urtw_8225_write(sc, URTW_8225_ADDR_7_MAGIC, urtw_8225_channel[chan]); - usb_pause_mtx(&sc->sc_mtx, 10); + urtw_pause_ms(sc, 10); fail: return (error); } @@ -2798,7 +2804,7 @@ urtw_8225_set_txpwrlvl(struct urtw_softc *sc, int chan) urtw_8187_write_phy_cck(sc, 0x44 + i, cck_pwltable[idx * 8 + i]); } - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); /* OFDM power setting */ ofdm_pwrlvl = (ofdm_pwrlvl > (ofdm_pwrlvl_max - ofdm_pwrlvl_min)) ? @@ -2819,7 +2825,7 @@ urtw_8225_set_txpwrlvl(struct urtw_softc *sc, int chan) urtw_8225_tx_gain_cck_ofdm[set] >> 1); urtw_8187_write_phy_ofdm(sc, 0x5, urtw_8225_txpwr_ofdm[idx]); urtw_8187_write_phy_ofdm(sc, 0x7, urtw_8225_txpwr_ofdm[idx]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); fail: return (error); } @@ -2891,13 +2897,13 @@ urtw_8225v2_rf_init(struct urtw_softc *sc) if (error) goto fail; - usb_pause_mtx(&sc->sc_mtx, 500); + urtw_pause_ms(sc, 500); for (i = 0; i < nitems(urtw_8225v2_rf_part1); i++) { urtw_8225_write(sc, urtw_8225v2_rf_part1[i].reg, urtw_8225v2_rf_part1[i].val); } - usb_pause_mtx(&sc->sc_mtx, 50); + urtw_pause_ms(sc, 50); urtw_8225_write(sc, URTW_8225_ADDR_0_MAGIC, URTW_8225_ADDR_0_DATA_MAGIC1); @@ -2916,10 +2922,10 @@ urtw_8225v2_rf_init(struct urtw_softc *sc) URTW_8225_ADDR_0_MAGIC, URTW_8225_ADDR_0_DATA_MAGIC2); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, URTW_8225_ADDR_2_DATA_MAGIC1); - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, URTW_8225_ADDR_2_DATA_MAGIC2); - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); error = urtw_8225_read(sc, URTW_8225_ADDR_6_MAGIC, &data32); if (error != 0) @@ -2929,17 +2935,17 @@ urtw_8225v2_rf_init(struct urtw_softc *sc) if (!(data32 & URTW_8225_ADDR_6_DATA_MAGIC2)) { urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, URTW_8225_ADDR_2_DATA_MAGIC1); - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, URTW_8225_ADDR_2_DATA_MAGIC2); - usb_pause_mtx(&sc->sc_mtx, 50); + urtw_pause_ms(sc, 50); error = urtw_8225_read(sc, URTW_8225_ADDR_6_MAGIC, &data32); if (error != 0) goto fail; if (!(data32 & URTW_8225_ADDR_6_DATA_MAGIC2)) device_printf(sc->sc_dev, "RF calibration failed\n"); } - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_8225_write(sc, URTW_8225_ADDR_0_MAGIC, URTW_8225_ADDR_0_DATA_MAGIC6); @@ -2992,7 +2998,7 @@ urtw_8225v2_rf_set_chan(struct urtw_softc *sc, int chan) goto fail; urtw_8225_write(sc, URTW_8225_ADDR_7_MAGIC, urtw_8225_channel[chan]); - usb_pause_mtx(&sc->sc_mtx, 10); + urtw_pause_ms(sc, 10); fail: return (error); } @@ -3109,7 +3115,7 @@ urtw_8225v2_set_txpwrlvl(struct urtw_softc *sc, int chan) urtw_write8_m(sc, URTW_TX_GAIN_CCK, urtw_8225v2_tx_gain_cck_ofdm[cck_pwrlvl]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); /* OFDM power setting */ ofdm_pwrlvl = (ofdm_pwrlvl > (ofdm_pwrlvl_max - ofdm_pwrlvl_min)) ? @@ -3129,7 +3135,7 @@ urtw_8225v2_set_txpwrlvl(struct urtw_softc *sc, int chan) urtw_write8_m(sc, URTW_TX_GAIN_OFDM, urtw_8225v2_tx_gain_cck_ofdm[ofdm_pwrlvl]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); fail: return (error); } @@ -3143,13 +3149,13 @@ urtw_8225v2_setgain(struct urtw_softc *sc, int16_t gain) /* XXX for A? */ gainp = urtw_8225v2_gain_bg; urtw_8187_write_phy_ofdm(sc, 0x0d, gainp[gain * 3]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8187_write_phy_ofdm(sc, 0x1b, gainp[gain * 3 + 1]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8187_write_phy_ofdm(sc, 0x1d, gainp[gain * 3 + 2]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8187_write_phy_ofdm(sc, 0x21, 0x17); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); fail: return (error); } @@ -3165,7 +3171,7 @@ urtw_8225_isv2(struct urtw_softc *sc, int *ret) urtw_write16_m(sc, URTW_RF_PINS_OUTPUT, URTW_RF_PINS_MAGIC5); urtw_write16_m(sc, URTW_RF_PINS_SELECT, URTW_RF_PINS_MAGIC5); urtw_write16_m(sc, URTW_RF_PINS_ENABLE, URTW_RF_PINS_MAGIC5); - usb_pause_mtx(&sc->sc_mtx, 500); + urtw_pause_ms(sc, 500); urtw_8225_write(sc, URTW_8225_ADDR_0_MAGIC, URTW_8225_ADDR_0_DATA_MAGIC1); @@ -3287,36 +3293,36 @@ urtw_8225v2b_rf_init(struct urtw_softc *sc) urtw_write16_m(sc, URTW_RF_PINS_OUTPUT, 0x0480); urtw_write16_m(sc, URTW_RF_PINS_SELECT, 0x2488); urtw_write16_m(sc, URTW_RF_PINS_ENABLE, 0x1fff); - usb_pause_mtx(&sc->sc_mtx, 1100); + urtw_pause_ms(sc, 1100); for (i = 0; i < nitems(urtw_8225v2b_rf_part0); i++) { urtw_8225_write(sc, urtw_8225v2b_rf_part0[i].reg, urtw_8225v2b_rf_part0[i].val); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); } urtw_8225_write(sc, 0x00, 0x01b7); for (i = 0; i < 95; i++) { urtw_8225_write(sc, URTW_8225_ADDR_1_MAGIC, (uint8_t)(i + 1)); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, urtw_8225v2b_rxgain[i]); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); } urtw_8225_write(sc, URTW_8225_ADDR_3_MAGIC, 0x080); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8225_write(sc, URTW_8225_ADDR_5_MAGIC, 0x004); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8225_write(sc, URTW_8225_ADDR_0_MAGIC, 0x0b7); - usb_pause_mtx(&sc->sc_mtx, 1); - usb_pause_mtx(&sc->sc_mtx, 3000); + urtw_pause_ms(sc, 1); + urtw_pause_ms(sc, 3000); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, 0xc4d); - usb_pause_mtx(&sc->sc_mtx, 2000); + urtw_pause_ms(sc, 2000); urtw_8225_write(sc, URTW_8225_ADDR_2_MAGIC, 0x44d); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_8225_write(sc, URTW_8225_ADDR_0_MAGIC, 0x2bf); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); urtw_write8_m(sc, URTW_TX_GAIN_CCK, 0x03); urtw_write8_m(sc, URTW_TX_GAIN_OFDM, 0x07); @@ -3362,7 +3368,7 @@ urtw_8225v2b_rf_set_chan(struct urtw_softc *sc, int chan) goto fail; urtw_8225_write(sc, URTW_8225_ADDR_7_MAGIC, urtw_8225_channel[chan]); - usb_pause_mtx(&sc->sc_mtx, 10); + urtw_pause_ms(sc, 10); fail: return (error); } @@ -3398,7 +3404,7 @@ urtw_8225v2b_set_txpwrlvl(struct urtw_softc *sc, int chan) urtw_write8_m(sc, URTW_TX_GAIN_CCK, urtw_8225v2_tx_gain_cck_ofdm[cck_pwrlvl] << 1); - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); /* OFDM power setting */ ofdm_pwrlvl = (ofdm_pwrlvl > 15) ? @@ -3430,7 +3436,7 @@ urtw_8225v2b_set_txpwrlvl(struct urtw_softc *sc, int chan) urtw_8187_write_phy_ofdm(sc, 0x89, 0x50); } } - usb_pause_mtx(&sc->sc_mtx, 1); + urtw_pause_ms(sc, 1); fail: return (error); } @@ -3547,7 +3553,7 @@ urtw_reset(struct urtw_softc *sc) error = urtw_intr_disable(sc); if (error) goto fail; - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); error = urtw_write8e(sc, 0x18, 0x10); if (error != 0) @@ -3558,12 +3564,12 @@ urtw_reset(struct urtw_softc *sc) error = urtw_write8e(sc, 0x18, 0x00); if (error != 0) goto fail; - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_read8_m(sc, URTW_CMD, &data); data = (data & 0x2) | URTW_CMD_RST; urtw_write8_m(sc, URTW_CMD, data); - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_read8_m(sc, URTW_CMD, &data); if (data & URTW_CMD_RST) { @@ -3574,7 +3580,7 @@ urtw_reset(struct urtw_softc *sc) error = urtw_set_mode(sc, URTW_EPROM_CMD_LOAD); if (error) goto fail; - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); error = urtw_8180_set_anaparam(sc, URTW_8225_ANAPARAM_ON); if (error) @@ -3654,7 +3660,7 @@ urtw_led_mode0(struct urtw_softc *sc, int mode) break; case URTW_LED_POWER_ON_BLINK: urtw_led_on(sc, URTW_LED_GPIO); - usb_pause_mtx(&sc->sc_mtx, 100); + urtw_pause_ms(sc, 100); urtw_led_off(sc, URTW_LED_GPIO); break; default: