diff options
author | kevlo <kevlo@FreeBSD.org> | 2014-05-05 01:50:01 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2014-05-05 01:50:01 +0000 |
commit | 896088154c4791d323d605fdaf257c5d285704da (patch) | |
tree | 2b936455158acac5344c85e055a5d6df88e356ad /sys/dev | |
parent | cf561a1a553d48a687a32b956976203040e85101 (diff) | |
download | FreeBSD-src-896088154c4791d323d605fdaf257c5d285704da.zip FreeBSD-src-896088154c4791d323d605fdaf257c5d285704da.tar.gz |
MFC r264317, r264864:
- Add the Asus USB-N10 NANO [1]
- Fix panic by adding mtx_assert() to urtwn_init_locked() and
urtwn_stop_locked() [2]
Tested by: Kuan-Chung Chiu <buganini@gmail.com> [1]
Anthony Jenkins <scoobi_doo at yahoo dot com> [2]
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/usbdevs | 1 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_urtwn.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 227dc1d..2cd2d37 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1186,6 +1186,7 @@ product ASUS RT3070_1 0x1790 RT3070 product ASUS USBN10 0x1786 USB-N10 product ASUS RTL8192CU 0x17ab RTL8192CU product ASUS USBN66 0x17ad USB-N66 +product ASUS USBN10NANO 0x17ba USB-N10 Nano product ASUS RTL8192SU 0x1791 RTL8192SU product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA diff --git a/sys/dev/usb/wlan/if_urtwn.c b/sys/dev/usb/wlan/if_urtwn.c index 55cbeb2..cb70b20 100644 --- a/sys/dev/usb/wlan/if_urtwn.c +++ b/sys/dev/usb/wlan/if_urtwn.c @@ -91,6 +91,7 @@ static const STRUCT_USB_HOST_ID urtwn_devs[] = { URTWN_DEV(ABOCOM, RTL8188CU_2), URTWN_DEV(ABOCOM, RTL8192CU), URTWN_DEV(ASUS, RTL8192CU), + URTWN_DEV(ASUS, USBN10NANO), URTWN_DEV(AZUREWAVE, RTL8188CE_1), URTWN_DEV(AZUREWAVE, RTL8188CE_2), URTWN_DEV(AZUREWAVE, RTL8188CU), @@ -2051,6 +2052,7 @@ urtwn_load_firmware(struct urtwn_softc *sc) uint32_t reg; int mlen, ntries, page, error; + URTWN_UNLOCK(sc); /* Read firmware image from the filesystem. */ if ((sc->chip & (URTWN_CHIP_UMC_A_CUT | URTWN_CHIP_92C)) == URTWN_CHIP_UMC_A_CUT) @@ -2059,6 +2061,7 @@ urtwn_load_firmware(struct urtwn_softc *sc) imagename = "urtwn-rtl8192cfwT"; fw = firmware_get(imagename); + URTWN_LOCK(sc); if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", imagename); @@ -2813,6 +2816,8 @@ urtwn_init_locked(void *arg) uint32_t reg; int error; + URTWN_ASSERT_LOCKED(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) urtwn_stop_locked(ifp); @@ -2976,6 +2981,8 @@ urtwn_stop_locked(struct ifnet *ifp) { struct urtwn_softc *sc = ifp->if_softc; + URTWN_ASSERT_LOCKED(sc); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); callout_stop(&sc->sc_watchdog_ch); |