On Sat, Sep 20, 2014 at 10:23:17PM -0500, Marc Suttle wrote: > Hello openbsd-misc, > > Long time OpenBSD user here. I was getting sick of using an external AP > for my pf based firewall and decided to try and get an athn device working > in AP mode. I am getting a panic on my Soekris 6501 with an Atheros > AR9380. Model - TP-LINK TL-WDN4800 Dual Band Wireless N900 PCI Express > Adapter,2.4GHz 450Mbps/5Ghz 450Mbps. > > I know FreeBSD has made some progress with this chipset in 10 and even are > now supporting N. It would be great to see this working under OpenBSD. > Please let me know how I can assist or test with efforts on my part.
Porting the FreeBSD driver over is not trivial. FreeBSD uses a single ath(4) driver with a different code base from Atheros (this used to be closed sourced but is now open source but access to docs requires signing an NDA with the vendor which we won't do) while OpenBSD uses ath(4) with the reverse-engineed ar5xxx hal for old devices and otherwise athn(4) written by Damien as far as I can tell based on information from early versions of Linux' ath9k driver. The other option is to fix the existing drivers in OpenBSD. Both ath(4) and athn(4) have issues which I'll gladly rant about if you want to help fixing them. Neither option is very pleasant for someone who wants to write a drive-by fix. Having looked into both options I found this task requires a degree of devotion that I personally find hardly sustainable. > This looks very similar to the thread started by Mark Hellewell: > http://marc.info/?t=140937623100002&r=1&w=2 > > ddb> show panic > kernel diagnostic assertion "pin < sc->ngpiopins" failed: file > "../../../../dev/ic/ar9003.c", line 515 And I'll say it again: These devices attach but they *don't work*. I think it was a mistake to make athn(4) attach to this device. The code is untested and has never been working. The initial commit of this code from 2010 contains this comment in the log message: Tested for non-regression on various AR5416 (sparc64+i386), AR9281 and AR9285 (i386 only) adapters. AR9380 part is not tested (hardware is not available to the general public yet). 4 years later the hardware has become fairly widespread and people are starting to test it :) Some of the issues have since been fixed but many remain. Hunt down an older athn card that works. Send the one you've got to a developer who's interested in fixing support for it. Or even better try to fix the code yourself. We don't have anyone fully devoted to hacking the wireless stack at the moment.

