On Tue, Jan 10, 2017 at 11:08:40PM +0100, Vincent Gross wrote: > On Tue, 10 Jan 2017 00:27:47 +0100 > Stefan Sperling <s...@stsp.name> wrote: > > > On Mon, Jan 09, 2017 at 01:54:55PM +0100, Stefan Sperling wrote: > > > This diff adds 11n support to the athn(4) driver. > > > Requires -current net80211 code from today. > > > > A better diff which fixes several bugs. > > > > Most notably this should fix a crash in hostap mode triggered by > > clients joining and leaving in a loop. This is fixed by making sure > > timeout handlers managed by mira aren't overwritten when a client > > rejoins, and by cancelling these timeouts properly. I'd like to > > rename some mira API functions for better clarity but that's left for > > later. > > > > This also restores USB device firmware rate scaling in client mode > > which was disabled by commits I made in 2015. I found a missing > > 'usc->nnodes--;' in the code from before those commits, and I hope > > adding that is a proper fix for the problems we were hunting back > > then. > > > > Known issues (not blocking issues IMO): > > > > - The athn(4) driver selects low transmit rates relative to what > > iwn(4) and iwm(4) clients select. > > > > - USB client in 11n mode only sends with legacy rates (up to > > 54Mbit/s). Technically this is legal behaviour, and receiving MCS > > sent by the AP works. Rate selection is done in firmware so this > > isn't straightforward to debug.
I've thrown this on my apu2 and done some tests with my ipad, android phones and some openbsd laptops. Streamed 1080p from youtube works on one device but when I try with 2x it starts to buffer a bit. Tested on 2.4Ghz: athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 index 4 priority 4 llprio 3 groups: wlan media: IEEE802.11 autoselect hostap status: active ieee80211: nwid mynwid chan 7 bssid xxxxxxxxxxxxxxxxx wpakey 0x5324766a441a60e61749083489bcea5df6e73deb1ddbcbe6b1054270787bb4fe wpaprotos wpa2 wpaakms psk wpaciphers ccmp wpagroupcipher ccmp inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 OpenBSD shows: media: IEEE802.11 autoselect (HT-MCS5 mode 11n) I'm seeing some decent throughput on DL: $ ftp http://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/amd64/install60.fs Trying 129.21.208.172... Requesting http://ftp5.usa.openbsd.org/pub/OpenBSD/snapshots/amd64/install60.fs 100% |*******************************************************| 280 MB 08:53 294092800 bytes received in 533.82 seconds (538.00 KB/s) (That is about half what I see on my ubiquity) With 5Ghz I'm only able to test on my android/ipad, and I'm able to stream a couple 1080p videos at the same time without any issues: athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 index 4 priority 4 llprio 3 groups: wlan media: IEEE802.11 autoselect hostap (autoselect mode 11n hostap) status: active ieee80211: nwid mynwid chan 140 bssid xxxxxxxxxxxxxxxxx wpakey 0x5324766a441a60e61749083489bcea5df6e73deb1ddbcbe6b1054270787bb4fe wpaprotos wpa2 wpaakms psk wpaciphers ccmp wpagroupcipher ccmp inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 enc0: flags=0<> index 5 priority 0 llprio 3 groups: enc status: active I'll apply your other diffs and test more. Cheers!