svn commit: r265345 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan

Kevin Lo kevlo at FreeBSD.org
Mon May 5 01:50:03 UTC 2014


Author: kevlo
Date: Mon May  5 01:50:01 2014
New Revision: 265345
URL: http://svnweb.freebsd.org/changeset/base/265345

Log:
  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 at gmail.com> [1]
  		Anthony Jenkins <scoobi_doo at yahoo dot com> [2]

Modified:
  stable/10/share/man/man4/urtwn.4
  stable/10/sys/dev/usb/usbdevs
  stable/10/sys/dev/usb/wlan/if_urtwn.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/urtwn.4
==============================================================================
--- stable/10/share/man/man4/urtwn.4	Mon May  5 01:47:05 2014	(r265344)
+++ stable/10/share/man/man4/urtwn.4	Mon May  5 01:50:01 2014	(r265345)
@@ -61,6 +61,7 @@ It operates in the 2GHz spectrum only.
 The following adapters should work:
 .Pp
 .Bl -tag -width Ds -offset indent -compact
+.It ASUS USB-N10 NANO
 .It Belkin F7D1102 Surf Wireless Micro
 .It D-Link DWA-131
 .It Edimax EW-7811Un

Modified: stable/10/sys/dev/usb/usbdevs
==============================================================================
--- stable/10/sys/dev/usb/usbdevs	Mon May  5 01:47:05 2014	(r265344)
+++ stable/10/sys/dev/usb/usbdevs	Mon May  5 01:50:01 2014	(r265345)
@@ -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

Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- stable/10/sys/dev/usb/wlan/if_urtwn.c	Mon May  5 01:47:05 2014	(r265344)
+++ stable/10/sys/dev/usb/wlan/if_urtwn.c	Mon May  5 01:50:01 2014	(r265345)
@@ -91,6 +91,7 @@ static const STRUCT_USB_HOST_ID urtwn_de
 	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 *
 	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 *
 		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);


More information about the svn-src-all mailing list