From owner-freebsd-wireless@freebsd.org Sun Sep 13 19:50:20 2015 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A26E1A03B4E for ; Sun, 13 Sep 2015 19:50:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FA8E1C90 for ; Sun, 13 Sep 2015 19:50:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbkq10 with SMTP id kq10so76870917igb.0 for ; Sun, 13 Sep 2015 12:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=9pxLLtkVLEkyQZKqgqkmTx5DrwSxCbXCklgpSfGH5DA=; b=Y2R8ZkMUw51e+T2xNOeBN3i9KMv9nsAYpWy1XmOu6vQ2pPvofHI8paxYun4tsjZt4f GfJDysUFRAMW8Vz0Mzr3GnjRjf8n4mnp6alcxeJvuaov8ldCHGStfjJzBwVY5giwkD3D 4lvjKUxfGZlcWD2oUFRB3JmAteiepqTv5YEghjoQfeDt9gbAevFyORtJiyMoNXGXaK6A zfgYvP4VhFMz7z8N1VvKCq487BuSywG65/pKxZlleSJWZsA5G7Hqqtjkx0toMeuiKzRP byWg2PvJ2ZOquzhrZXumpWPGVk5yGhBZZps0Us4Fv9ubds3mCUvlPvB0V2Sspb5xyeu5 tp2w== MIME-Version: 1.0 X-Received: by 10.50.45.33 with SMTP id j1mr12083559igm.61.1442173819843; Sun, 13 Sep 2015 12:50:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.28.208 with HTTP; Sun, 13 Sep 2015 12:50:19 -0700 (PDT) In-Reply-To: References: Date: Sun, 13 Sep 2015 12:50:19 -0700 X-Google-Sender-Auth: FkLZXjcOGf5f7UiR42uycMVa0m0 Message-ID: Subject: Re: looking for if_rsu testers From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 13 Sep 2015 19:50:20 -0000 oh, and I should add: * - PS_ACTIVE actually means "fully on" - it's not actually doing any intelligent power saving. We should port over the basic power management code from rtlwifi so we put the NIC into off mode if it's not active, and into power-save mode if it's not associated - much like what I did with ath(4) for network-sleep. * I think the transmit path is always using TID 0, rather than an appropriate TID for things. We have to fix that before we do 11n or lulz will ensue. * the nic supports softap, ibss and monitor modes - it'd be nice to at least get monitor mode working as a way of testing out 11n.. -adrian On 13 September 2015 at 12:45, Adrian Chadd wrote: > hi all, > > I've done some digging into if_rsu (thanks to idwer on #freebsd-wifi > on efnet!) and found a few places that needed addressing. I haven't > yet enabled 11n on the thing yet, but it now seems a bunch more stable > and associating-y than it did before. > > Here's what I've found thus far: > > http://urbinek.eu/_soft/RTL819xSU_usb_linux_v2.6.6.0.20120405/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/document/RTL8712_D0_1_Programming_Guide_20090601.pdf > > http://www.urbinek.eu/_soft/RTL819xSU_usb_linux_v2.6.6.0.20120405/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/ReleaseNotes.pdf > > I also looked at the rtlwifi driver in linux and the fork specifically > for this particular chipset for ideas: > > https://github.com/chunkeey/rtl8192su/tree/master/rtlwifi > > This is a mostly-smart device. ie, the firmware handles scanning, > 802.11 association, transmit rate control, and I /think/ at least > something to do with 11n aggregation - but I don't know the full > details there yet. > > * openbsd adds a ENOTSUPP stub method for ic_send_mgmt() - ie, it > blocks all software-generated management frames out. The general idea > here is that the device handles scan, probe, assoc req, etc itself. I > bet freebsd transmitting its own assoc request / probe requests at the > same time the device is was confusing things. > * it's smart like iwm/iwn/etc - however scan returns a survey message > set, not beacons - so we should directly populate the scan cache > rather than the current hack of faking a beacon to the stack > * handle the STA disassociate message - yes, it's actually legit. > * the debug sysctl is now a bitmap, so you can see interesting things > without getting spammed. The most interesting one is the /text/ > firmware debug messages - sysctl hw.usb.rsu.debug=0x200 - which is > actually pretty enlightening. > * we don't yet print out the join message response code - it does tell > you about failures if they occur. > * there's some very large scan-to-scan differences in reported RSSI, > which is highly suspicious. That's worth looking into, in case our > calibration code is suspect. > > So, if you're using if_rsu then please update to the latest -head and > try it out. I'm very interested in the results. firmware messages via > debugging is also good - compile a kernel with USB_DEBUG, and sysctl > hw.usb.rsu.debug=0x200 . It'll actually give you text strings as > debugging info, which is highly awesome. > > Thanks! > > > -adrian