On Wed, Apr 11, 2018 at 10:47:33AM -0300, Elias M. Mariani wrote: > >Synopsis: athn: device timeout on Atheros AR9227 > >Category: system > >Environment: > System : OpenBSD 6.3 > Details : OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Architecture: OpenBSD.amd64 > Machine : amd64 > >Description: > Using a TP-LINK TL-WN851ND (Atheros AR9227) as hostap on mode 11n, > wpa2-psk. Running with unbound, dhcpd and routing with pf (pretty much > like the example router in the FAQ), also using apmd. The error > "athn0: device timeout" comes from time to time,
I believe these device timeouts are due to the fact that our athn(4) driver implementation is missing support for periodic calibration which is required for the device to keep operating correctly over time. There was code added for calibration long ago by damien@, but for reasons unknown to me this code has never been enabled. This needs to be revisited and maybe re-implemented based on what the drivers on other systems are doing today. This amounts to a small project rather than a simple bug fix. Someone experienced might take a couple of days or maybe even weeks to get it done. > also the device does > not broadcast when the network starts for the first time, running > netstart after boot fixes that. I'm not shure if this is a bug or just > an incompat with the hardware or something in the configuration I don't know. Your hostname.athm0 looks ok. > , the > bandwidth starts fine on the wireless AP but it seems to start to > degradate as times goes by (rebooting helps...). Again this points towards a calibration problem. The hardware warms up during operation and if it's not re-calibrated then eventually performance will suffer because this affects the quality of radio signals generated. Signals might end up being sent slightly off-channel, for example, so they're harder to pick up at the receiver's end. > I will try to test the device in other motherboard in a while, if > someone is using this hardware as hostap fine let me know so we can > discard a firmware related problem (athn-firmware-1.1p4). The firmware is only relevant for USB devices. PCI devices supported by athn(4) do not use any firmware.