Bug 193569 - [iwn] [wpi] 5GHz association fails on passive channels
Summary: [iwn] [wpi] 5GHz association fails on passive channels
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-11 17:32 UTC by Adrian Chadd
Modified: 2015-09-03 21:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Chadd freebsd_committer freebsd_triage 2014-09-11 17:32:37 UTC
The TL;DR is this:

* 5GHz passive channels require the station to hear a beacon from an AP doing DFS before it transmits anything;
* so net80211 does this;
* then it tries to associate;
* .. and iwn/wpi will just issue a new RXON to associate, clearing the firmware state
* which includes that it's seen beacons;
* so then it transmits a frame (association request);
* and the firmware immediately fails it with some status code (IWN_TX_*) that says "nope, need to see a beacon first."

I forget the status code but it's pretty easy to see with 'sysctl dev.iwn.0.debug=0x1' when associating on a 5GHz channel.

What the linux iwlwifi driver does - and what I think we should do - is this:

* have a per-vap buffer of temporarily failed frames;
* (not per-node; it's not required for this NIC);
* if we see a TX fail for this reason, don't free the mbuf - just append it to the vap retry queue - and set some flag + channel number;
* upon receiving a beacon notification - if it's for a beacon on the currently associated channel then schedule a taskqueue to flush that queue;
* .. then flush this queue as appropriate in iwn_newstate().
* .. and make sure the taskqueue is cancelled during state changes, suspend/resume, etc.

the flush may get complicated - we should flush it if we transition away from RUN. Just make sure it works. :)
Comment 1 Adrian Chadd freebsd_committer freebsd_triage 2015-09-03 21:43:24 UTC
Fixed in -HEAD, thankfully!