OPNsense Forum

English Forums => General Discussion => Topic started by: phoenixtec on September 26, 2015, 10:31:37 am

Title: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: phoenixtec on September 26, 2015, 10:31:37 am
hi,

I used OPNsense 15.7.14-i386 with a atheros wireless card "AR5B95", After I setup my access point, I get this messages in the status=>system logs

Sep 26 16:30:08   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:07   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:07   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:07   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:07   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:06   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:06   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:06   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:06   kernel: ath0: stuck beacon; resetting (bmiss count 4)
Sep 26 16:30:05   kernel: ath0: stuck beacon; resetting (bmiss count 4)

Are there any way to solve this??
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: franco on September 26, 2015, 12:11:13 pm
This may be helpful: https://redmine.pfsense.org/issues/3849

Though Chris is right, this is a driver issue not easily solvable. FreeBSD 10 to 11 has a network code split and it's almost impossible to backport driver fixes. FreeBSD 10.1 to 10.2 itself hasn't updated Atheros drivers, so we are stuck in a vicious circle.

Workarounds are switching modes or trying other WiFi hardware.
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: cmb on September 30, 2015, 07:24:57 pm
FreeBSD 10 to 11 has a network code split and it's almost impossible to backport driver fixes.

Far from almost impossible, we've done it multiple times with net80211 and ath(4) and it wasn't even all that difficult.
https://doc.pfsense.org/index.php?title=2.2.1_New_Features_and_Changes#Misc_Binary.2FOS_Changes
https://doc.pfsense.org/index.php?title=2.2.2_New_Features_and_Changes#Wireless

The non-cosmetic stuck beacon issues are gone since the initial back port in 2.2.1.

FreeBSD 10.1 to 10.2 itself hasn't updated Atheros drivers

Might I recommend:
https://github.com/pfsense/FreeBSD-src
10-STABLE with -CURRENT's net80211 and ath(4).

Same will hopefully hit stock 10-STABLE soon.

There are some GUI input validation changes and back end config changes that go along with that to prevent getting into circumstances that are known to be problematic still. You'll find the details here, interfaces.inc and interfaces.php.
https://github.com/pfsense/pfsense

The GUI + driver changes (in combination only) will fix this bug.
https://github.com/opnsense/core/issues/217
and a variety of similar issues, plus OP's stuck beacon issues, and more.
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: franco on October 02, 2015, 07:06:56 am
Far from almost impossible, we've done it multiple times with net80211 and ath(4) and it wasn't even all that difficult.

Congratulations on your efforts. Allow me to say it's still almost impossible for me to do this in my free time, with a day job on the side. ;)

The non-cosmetic stuck beacon issues are gone since the initial back port in 2.2.1.

This patch isn't available to the public, remember? :)

Might I recommend:
https://github.com/pfsense/FreeBSD-src
10-STABLE with -CURRENT's net80211 and ath(4).

You may, although pointing to a repository that is neither in production (we all hope for the best with 2.3) nor pointing to the specific commit(s) in a 200k commit history is generally difficult to follow or verify.


Cheers,
Franco
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: cmb on October 03, 2015, 10:53:17 am
Ah c'mon, you know it's available.  ;)

Here are the kernel bits, public, for FreeBSD 10.1.
https://files.pfsense.org/cmb/10_1-HEAD-wireless-ath.diff
https://files.pfsense.org/cmb/10_1-HEAD-wireless-ath.tgz
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: franco on October 03, 2015, 05:18:40 pm
Thank you! :)
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: creator on March 07, 2016, 07:45:47 pm
Out of curiosity, where did this end up?

I am running into this trying to get my new system ready... unfortunately if I apply any stress I encounter the stuck beacon and bf_next not NULL! errors and normally get kicked off wifi.

At the moment I've got my OPNsense cobbled together with bubblegum and bailing wire while I sort out my next steps.

At the moment in seems that I need to custom compile a kernel with the updates I need to get my hardware working anyway (https://forum.opnsense.org/index.php?action=post;topic=2345.0 (https://forum.opnsense.org/index.php?action=post;topic=2345.0))...

Don't misunderstand me, I know I'm not asking about something that's trivial in any way.  Just trying to make sure I'm not chasing my tail when fixes already exist.

Thanks!
PhilD
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: franco on March 07, 2016, 08:29:23 pm
We're switching to FreeBSD 10.3 in 16.7 (or some time in the 16.1.x series depending on how smoothly that transition is). I will provide test builds as soon as 10.3 is officially out (end of this month). Hopefully, this will have driver updates you seek.

Lately, I've seen too many reverts and patches for patches. We've vowed to stick to the FreeBSD way, stripping down unnecessary patching as much as we can. The same goes for the opposite direction. Other voices have seconded that "backporting never is a good idea", so we'll go with what FreeBSD considers a release as it becomes available.

If you need any assistance in pinning down your custom kernel version to avoid voiding / replacing your custom kernel I'd be delighted to help out on that front instead. There's more than one way, and certainly no "right" way to handle all ends of this problem at the same time. :)
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: lattera on March 07, 2016, 08:44:46 pm
We're switching to FreeBSD 10.3 in 16.7 (or some time in the 16.1.x series depending on how smoothly that transition is). I will provide test builds as soon as 10.3 is officially out (end of this month). Hopefully, this will have driver updates you seek.

The problem is still in 10.3. It should be mostly resolved in 11-CURRENT with the new wireless networking stack. However, the new wireless networking stack breaks OPNsense. Fixing that is on my ever-growing list of things to do. I've started on it, but I need to get some spare cycles to finish it.

One way to help alleviate the problem on FreeBSD 10.x (but not fix it entirely) is to build with a non-SMP kernel. That has obvious drawbacks, though.

(Sorry to be a downer! Point is: there will be a solution for 11-CURRENT, but it'll take time.)
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: creator on March 08, 2016, 07:03:00 am
Franco: I'll certainly take you up on pinning down a custom kernel... once I get to that point. ;) One step at a time!

Lattera: No worries.  I appreciate even having a heads up. I know from experience how much of a migraine not having a robot zombie army of clones gets in the way of checking off todo items. All in due time.
 
Thanks gents.

PhilD
 
Title: Re: kernel: ath0: stuck beacon; resetting (bmiss count 4)
Post by: franco on May 07, 2016, 12:23:19 pm
Maybe just as a late follow-up, the wifi stack changes offered here never made it to pfSense 2.3 RELEASE due to kernel panics.

https://forum.pfsense.org/index.php?topic=109201.msg608191#msg608191

As I had no time for review / testing, they were never added to OPNsense as well.