ath "stops working" in hostap mode

Lay, Nathan nsl03 at
Sun Jan 1 01:30:16 UTC 2012

Thanks for the prompt response. Bumping the interface up and down does not fix it. Destroying and recreating the interface does not fix it either. The interface is completely unresponsive when this problem arises. As far as I can tell, it does not transmit (it vanishes from view from all other devices).

I do not have ATH_ENABLE_11N compiled in. Would this improve stability? The interface shows that it is using 11g mode with background scanning turned off. Here is exactly how it is configured and used:

create_args_wlan0="wlanmode hostap -bgscan"
autobridge_bridge0="wlan0 lan0"

It also sits behind pf (I saw pf mentioned in a similar message about ath).

I've installed athstats. Attached is the output.

Best Regards,
Nathan Lay

From: Adrian Chadd [adrian.chadd at]
Sent: Saturday, December 31, 2011 8:03 PM
To: Lay, Nathan
Subject: Re: ath "stops working" in hostap mode


I'd prefer you to email the -wireless list so we can debug this in public. :)

On 31 December 2011 16:59, Lay, Nathan <nsl03 at> wrote:
> Hi Adrian,
> I saw in the PR and mailing list that someone else seemed to have problems
> with ath in hostap mode. I have no idea what causes it as it happens for no
> apparent reason after an arbitrary amount of time. The first time I saw this
> problem, it happened after 1 day of uptime. The next time, it happened after
> a week of uptime. A reboot is required to remedy the problem although I'm
> not certain if reloading the module would solve the problem (I did not have
> it compiled as a loadable module).

Is this something that has been going on for a while? Or is it a recent thing?

> uname:
> 01:19:47 EST 2011     nslay at RADIO.LOCAL:/usr/obj/usr/src/sys/RADIO  amd64
> I don't know the SVN revision as I still have it setup to use CVS. Is there
> anyway I can get the SVN revision from CVS? All I can tell you is that I
> updated the sources on the 23rd when the security advisories were issued.

There's no easy way, no. it's just easier to work from subversion. :)

> Here's what I have:
> ath0: <Atheros 5416> mem 0xfe9f0000-0xfe9fffff irq 16 at device 0.0 on pci1
> ath0: AR5418 mac 12.10 RF2133 phy 8.1
> I noticed that you claim the AR5416 is crap. I might just look for an AR9xxx
> card instead.

It's not "crap", it's just an early version of their 802.11n stuff and
the newer stuff is much more stable.

> I'm not terribly familiar with the ath sysctl tunables, but here's something
> that looks unusual:
> dev.ath.0.stats.rx_phy_err.31: 30190

Just ignore that unless it's actually continuing to rise. :)

> (All others are 0 count)
> I also noticed this tunable:
> dev.ath.0.hal.ar5416_biasadj
> Is this something relevant to me?
> I am fluent in C. Is there anywhere specific I could look through?

The thing to do is figure out:

* what you mean by "stops working" ;-)
* is it a tx problem, an rx problem, or both
* make sure you've not enabled 11n (ie, you haven't compiled the
kernel with ATH_ENABLE_11N) as that could be part of it, even on -9.
* do any counters change - compile up sys/tools/tools/ath/athstats and
use that to start to figure out what's going on.
* does bumping the interface fix things - ie ifconfig wlanX down;
ifconfig wlanX up?


-------------- next part --------------
athstats: ath0: Invalid argument
athstats: ath0: Invalid argument
2643699  data frames received
683781   data frames transmit
467      tx frames with an alternate rate
96921    long on-chip tx retries
15400    tx failed 'cuz too many retries
82       stuck beacon conditions
12M      current transmit rate
14083    tx frames with no ack marked
644298   tx frames with short preamble
160699   rx failed 'cuz of bad CRC
30658    rx failed 'cuz of PHY err
    30658    CCK restart
658051   beacons transmitted
2246     periodic calibrations
-0/+0    TDMA slot adjust (usecs, smoothed)
50       rssi of last ack
27       avg recv rssi
-96      rx noise floor
25414    tx frames through raw api
11596    cabq frames transmitted
6619     cabq xmit overflowed beacon interval
Antenna profile:
[0] tx   668352 rx   162105
[1] tx        0 rx  2481594
-------------- next part --------------
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 1c:af:f7:f3:42:c1
	inet6 fe80::1eaf:f7ff:fef3:42c1%wlan0 prefixlen 64 tentative scopeid 0x10 
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
	ssid Lamp channel 5 (2432 MHz 11g) bssid 1c:af:f7:f3:42:c1
	regdomain FCC indoor ecm authmode WPA privacy MIXED deftxkey 2
	AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 27 scanvalid 60
	protmode CTS wme burst dtimperiod 1 -dfs

More information about the freebsd-wireless mailing list