From owner-freebsd-wireless@FreeBSD.ORG Thu Jul 10 07:14:00 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0089D8CE; Thu, 10 Jul 2014 07:13:59 +0000 (UTC) Received: from erelay6.ox.registrar-servers.com (erelay6.ox.registrar-servers.com [192.64.117.97]) by mx1.freebsd.org (Postfix) with ESMTP id C76472A56; Thu, 10 Jul 2014 07:13:59 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by erelay1.ox.registrar-servers.com (Postfix) with ESMTP id 85C10220502F; Thu, 10 Jul 2014 07:13:57 +0000 (UTC) Received: from erelay1.ox.registrar-servers.com ([127.0.0.1]) by localhost (erelay.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Mqt_WwpnrC7N; Thu, 10 Jul 2014 03:13:56 -0400 (EDT) Received: from imap10.ox.privateemail.com (imap10.ox.privateemail.com [192.64.116.221]) by erelay1.ox.registrar-servers.com (Postfix) with ESMTP id 40BE32205027; Thu, 10 Jul 2014 03:13:56 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id D8D6A2400C2; Thu, 10 Jul 2014 03:13:55 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AB7gfhmmtiFS; Thu, 10 Jul 2014 03:13:55 -0400 (EDT) Received: from localhost (110.Red-83-40-60.dynamicIP.rima-tde.net [83.40.60.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id CCD7C2400C3; Thu, 10 Jul 2014 03:13:54 -0400 (EDT) Date: Thu, 10 Jul 2014 09:13:42 +0200 From: Carlos Jacobo Puga Medina To: Kevin Lo Subject: Re: TP-LINK TL-WN821N Message-Id: <20140710091342.e769692dd5edf94bec3cbc61@fbsd.es> In-Reply-To: <20140710050524.GA14437@ns.kevlo.org> References: <20140707144056.351e26df0d1512c6fc48a954@fbsd.es> <20140707204636.50ae92cf9022cd13263932d3@fbsd.es> <20140707211035.5ce0a482fe062bc1ea64ace7@fbsd.es> <20140708022220.GA87876@ns.kevlo.org> <20140708124550.c60683f2c01f3f9aa6a4ff70@fbsd.es> <20140709100229.GA6733@ns.kevlo.org> <20140709154223.9623a93c2d458dc32339b554@fbsd.es> <20140710050524.GA14437@ns.kevlo.org> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; i386-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 07:14:00 -0000 On Thu, 10 Jul 2014 13:05:24 +0800 Kevin Lo wrote: > On Wed, Jul 09, 2014 at 03:42:23PM +0200, Carlos Jacobo Puga Medina wrote: > > > > On Wed, 9 Jul 2014 18:02:29 +0800 > > Kevin Lo wrote: > > > > > On Tue, Jul 08, 2014 at 12:45:50PM +0200, Carlos Jacobo Puga Medina wrote: > > > > > > > > On Tue, 8 Jul 2014 10:22:20 +0800 > > > > Kevin Lo wrote: > > > > > > > > > On Mon, Jul 07, 2014 at 12:16:12PM -0700, Adrian Chadd wrote: > > > > > > > > > > > > On 7 July 2014 12:10, Carlos Jacobo Puga Medina wrote: > > > > > > > On Mon, 7 Jul 2014 11:48:36 -0700 > > > > > > > Adrian Chadd wrote: > > > > > > > > > > > > > >> I'd just look at porting over the openbsd driver. There's no 11n > > > > > > >> support in the openbsd code though! > > > > > > > > > > > > > > That's bad, I hope that the 802.11n protocol will be implemented since it was released in 2009. > > > > > > > > > > > > > > What do you recommend to do? > > > > > > > > > > > > I'd be happy if the driver showed up from OpenBSD. We can always try > > > > > > to add 11n support. > > > > > > > > > > > > I'm sorry, I don't have much else to say at the moment and as my day > > > > > > job is decidedly not wireless, I can't be much help. :( > > > > > > > > > > I'm trying to get D-Link DWA-160 rev. A1 usb wifi adapter working with > > > > > latest OpenBSD snapshot (2014/07/06). It seems to me that there's a > > > > > problem with otus(4). > > > > > > > > > > dmesg: > > > > > otus0 at uhub1 port 7 "ATHER USB2.0 WLAN" rev 2.00/1.07 addr 2 > > > > > otus0: MAC/BBP AR9170, RF AR9104, MIMO 2T2R, address 00:22:b0:57:fc:dc > > > > > > > > > > ifconfig otus0 scan doesn't yield any result. > > > > > > > > > > # ifconfig otus0 scan > > > > > otus0: flags=28802 mtu 1500 > > > > > lladdr 00:22:b0:57:fc:dc > > > > > priority: 4 > > > > > groups: wlan > > > > > media: IEEE802.11 autoselect > > > > > status: no network > > > > > ieee80211: nwid "" > > > > > none > > > > > # > > > > > > > > > > > -a > > > > > > > > > > Kevin > > > > > > > > Hi, > > > > > > > > OpenBSD doesn't support 802.11n yet, but some of this cards run in 11g mode for now. So this could be chew better if we work together with them. > > > > > > All OpenBSD wireless drivers don't support .11n yet. > > > What I mean is that driver is not stable. At least for D-Link DWA-160 rev. A1. > > > > > > > Anyway if you don't mind I'll send you some outputs from TL-WN821N. > > > > > > No, I don't mind. :-) Thanks. > > > > > > > Regards, > > > > -- > > > > Carlos Jacobo Puga Medina > > > > > > Kevin > > > > I'm testing a TL-WN821N v4 device. > > Wait a minute. You mentioned OpenBSD otus(4), I thought we were talking > about the Atheros AR9170 chipset, not the Realtek RTL8192CU chip. Oops, I forgot mentioned that v4 use the Realtek RTL8192CU chipset. https://wikidevi.com/wiki/TP-LINK_TL-WN821N_v4 > > > # uname -a > > FreeBSD box.underbuild.com 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r268070: Tue Jul 1 14:05:40 CEST 2014 root@box.underbuild.com:/usr/obj/usr/src/sys/PROD i386 > > > > # dmesg | grep urtwn0 > > urtwn0: on usbus2 > > urtwn0: MAC/BB RTL8192CU, RF 6052 2T2R > > urtwn0: timeout waiting for firmware readiness > > > > # usbconfig -u 2 -a 3 dump_device_desc > > ugen2.3: 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 > > iProduct = 0x0002 > > iSerialNumber = 0x0003 > > bNumConfigurations = 0x0001 > > > > # ifconfig urtwn0 > > urtwn0: flags=8803 metric 0 mtu 2290 > > ether 10:fe:ed:27:f6:5d > > nd6 options=21 > > media: IEEE 802.11 Wireless Ethernet autoselect mode 11g > > status: associated > > > > I noticed that wireless never goes up. Not much luck here, I get the error: > > urtwn0: timeout waiting for firmware readiness > > 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. -- Carlos Jacobo Puga Medina