On Thu, 10 Jul 2014 13:05:24 +0800
Kevin Lo <ke...@freebsd.org> wrote:

> Ok, I know where the problem lies.  Please try this patch, thanks.
> 
> Index: sys/dev/usb/wlan/if_urtwn.c
> ===================================================================
> --- sys/dev/usb/wlan/if_urtwn.c       (revision 268479)
> +++ sys/dev/usb/wlan/if_urtwn.c       (working copy)
> @@ -2281,9 +2281,6 @@ urtwn_fw_reset(struct urtwn_softc *sc)
>       }
>       /* Force 8051 reset. */
>       urtwn_write_2(sc, R92C_SYS_FUNC_EN, reg & ~R92C_SYS_FUNC_EN_CPUEN);
> -     urtwn_write_2(sc, R92C_SYS_FUNC_EN,
> -         urtwn_read_2(sc, R92C_SYS_FUNC_EN) |
> -         R92C_SYS_FUNC_EN_CPUEN);
>  }
>  
>  static void
> @@ -2383,6 +2380,11 @@ urtwn_load_firmware(struct urtwn_softc *sc)
>               urtwn_write_1(sc, R92C_MCUFWDL, 0);
>       }
>  
> +     if (!(sc->chip & URTWN_CHIP_88E)) {
> +             urtwn_write_2(sc, R92C_SYS_FUNC_EN,
> +                 urtwn_read_2(sc, R92C_SYS_FUNC_EN) |
> +                 R92C_SYS_FUNC_EN_CPUEN);
> +     }
>       urtwn_write_1(sc, R92C_MCUFWDL,
>           urtwn_read_1(sc, R92C_MCUFWDL) | R92C_MCUFWDL_EN);
>       urtwn_write_1(sc, R92C_MCUFWDL + 2,
>
> I'm just rebuilding the kernel.

It works! Thanks a lot for your help :)

# ifconfig -v wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 10:fe:ed:27:f6:5d
        inet6 fe80::12fe:edff:fe27:f65d%wlan0 prefixlen 64 scopeid 0x4 
        inet 192.168.1.42 netmask 0xffffff00 broadcast 192.168.1.255 
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
        status: associated
        ssid XXXXXXXXXX channel 11 (2462 MHz 11g) bssid f8:8e:85:c7:11:3d
        regdomain ETSI2 country ES anywhere -ecm authmode WPA -wps -tsn
        privacy ON deftxkey UNDEF
        TKIP 2:128-bit powersavemode OFF powersavesleep 100 txpower 30
        txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346 bmiss 7
        11a     ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11b     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        11g     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        turboA  ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        turboG  ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        sturbo  ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11na    ucast NONE    mgmt 12 MCS  mcast 12 MCS  maxretry 6
        11ng    ucast NONE    mgmt  2 MCS  mcast  2 MCS  maxretry 6
        half    ucast NONE    mgmt  3 Mb/s mcast  3 Mb/s maxretry 6
        quarter ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
        roam:11a     rssi    7dBm rate 12 Mb/s
        roam:11b     rssi    7dBm rate  1 Mb/s
        roam:11g     rssi    7dBm rate  5 Mb/s
        roam:turboA  rssi    7dBm rate 12 Mb/s
        roam:turboG  rssi    7dBm rate 12 Mb/s
        roam:sturbo  rssi    7dBm rate 12 Mb/s
        roam:11na    rssi    7dBm  MCS  1    
        roam:11ng    rssi    7dBm  MCS  1    
        roam:half    rssi    7dBm rate  6 Mb/s
        roam:quarter rssi    7dBm rate  3 Mb/s
        -pureg protmode CTS -ht -htcompat -ampdu ampdulimit 64k
        ampdudensity 8 -amsdu -shortgi htprotmode RTSCTS -puren -smps -rifs
        -wme -burst -dwds roaming MANUAL bintval 100
        groups: wlan 

# usbconfig -u 2 -a 3 dump_device_desc 
ugen2.3: <product 0x8178 vendor 0x0bda> at usbus2, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=ON (500mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000 
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0bda 
  idProduct = 0x8178 
  bcdDevice = 0x0200 
  iManufacturer = 0x0001  <802.11n>
  iProduct = 0x0002  <USB WLAN>
  iSerialNumber = 0x0003  <00e04c000001>
  bNumConfigurations = 0x0001 

# netstat -I urtwn0
Name    Mtu Network       Address              Ipkts Ierrs Idrop    Opkts Oerrs 
 Coll
urtwn  2290 <Link#3>      10:fe:ed:27:f6:5d        0     0     0     1055     0 
    0

Could you commit this little tweak to -HEAD?

Regards,
-- 
Carlos Jacobo Puga Medina <c...@fbsd.es>
_______________________________________________
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Reply via email to