freebsd-nq/sys/net80211
Adrian Chadd 0d4e4e5ea4 Fix a WME corner case found by the FreeBSD 802.11n testing crew.
The symptom: sometimes 11n (and non-11n) throughput is great.
Sometimes it isn't. Much teeth gnashing occured, and much kernel
bisecting happened, until someone figured out it was the order
of which things were rebooted, not the kernel versions.
(Which was great news to me, it meant that I hadn't broken if_ath.)

What we found was that sometimes the WME parameters for the best-effort
queue had a burst window ("txop") in which the station would be allowed
to TX as many packets as it could fit inside that particular burst
window. This improved throughput.

After initially thinking it was a bug - the WME parameters for the
best-effort queue -should- have a txop of 0, Bernard and I discovered
"aggressive mode" in net80211 - where the WME BE queue parameters
are changed if there's not a lot of high priority traffic going on.
The WME parameters announced in the association response and beacon
frames just "change" based on what the current traffic levels are.
So in fact yes, the STA was acutally supposed to be doing this higher
throughput stuff as it's just meant to be configuring things based on
the WME parameters - but it wasn't.

What was eventually happening was this:

* at startup, the wme qosinfo count field would be 0;
* it'd be parsed in ieee80211_parse_wmeparams();
* and it would be bumped (to say 10);
* .. and the WME queue parameters would be correctly parsed and set.

But then, when you restarted the assocation (eg hostap goes away and
comes back with the same qosinfo count field of 10, or if you
destroy the sta VIF and re-create it), the WME qosinfo count field -
which is associated not to the VIF, but to the main interface -
wouldn't be cleared, so the queue default parameters would be used
(which include no burst setting for the BE queue) and would remain
that way until the hostap qosinfo count field changed, or the STA
was actually rebooted.

This fix simply cleares the wme capability field (which has the count
field) to 0, forcing it to be reset by the next received beacon.

Thanks go to Milu for finding it and helping me track down what was
going on, and Bernard Schmidt for working through the net80211 and
WME specific magic.
2011-03-24 15:27:15 +00:00
..
_ieee80211.h Constantly use MHz instead of Mhz. 2011-03-13 13:05:50 +00:00
ieee80211_acl.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_action.c Fix off by one in ieee80211_send_action_register 2009-11-11 14:58:48 +00:00
ieee80211_action.h Revamp 802.11 action frame handling: 2009-07-05 17:59:19 +00:00
ieee80211_adhoc.c Make sure to only accept and handle action frames which are for us. In 2011-02-22 19:05:42 +00:00
ieee80211_adhoc.h
ieee80211_ageq.c Fix typos - remove duplicate "is". 2011-02-23 09:22:33 +00:00
ieee80211_ageq.h Add ieee80211_ageq; a facility for staging packets that require 2009-07-05 18:17:37 +00:00
ieee80211_amrr.c sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:53:50 +00:00
ieee80211_amrr.h net80211 rate control framework (net80211 ratectl). 2010-04-07 15:29:13 +00:00
ieee80211_crypto_ccmp.c - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay 2010-07-01 20:50:12 +00:00
ieee80211_crypto_none.c
ieee80211_crypto_tkip.c - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay 2010-07-01 20:50:12 +00:00
ieee80211_crypto_wep.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_crypto.c Correct handling of keys that already have a hardware/device key index: 2009-07-21 19:36:32 +00:00
ieee80211_crypto.h - Introduce IEEE80211_KEY_NOREPLAY, a per-key flag to ignore replay 2010-07-01 20:50:12 +00:00
ieee80211_ddb.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
ieee80211_dfs.c correct timeout for doing NOL processing; need a ticks-relative value 2009-09-03 16:29:02 +00:00
ieee80211_dfs.h Fix definition of IEEE80211_CHAN_MAX; it was defined as 255 but 2008-12-15 01:26:33 +00:00
ieee80211_freebsd.c Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need 2011-01-18 21:14:13 +00:00
ieee80211_freebsd.h Make this code a little more portable by wrapping the mtx calls into 2010-04-14 18:29:40 +00:00
ieee80211_hostap.c Make sure to only accept and handle action frames which are for us. In 2011-02-22 19:05:42 +00:00
ieee80211_hostap.h
ieee80211_ht.c Constantly use MHz instead of Mhz. 2011-03-13 13:05:50 +00:00
ieee80211_ht.h Complete the MCS rate table based on the final 802.11n std. While here 2011-03-10 18:17:24 +00:00
ieee80211_hwmp.c Add missing braces. 2010-06-10 20:40:38 +00:00
ieee80211_input.c Add a new mgmt subtype "ACTION NO ACK" defined in 802.11n-2009, while here 2011-02-21 19:59:43 +00:00
ieee80211_input.h Move code that does payload realigment to a new routine, ieee80211_realign, 2009-07-18 20:19:53 +00:00
ieee80211_ioctl.c Instead of always returning 0 to a scan request, indicate if there is 2011-01-30 14:05:21 +00:00
ieee80211_ioctl.h Revert unwanted changes in revision 203422. 2010-02-06 19:24:16 +00:00
ieee80211_mesh.c Make sure to only accept and handle action frames which are for us. In 2011-02-22 19:05:42 +00:00
ieee80211_mesh.h Update mesh code to to D4.0. 2010-01-12 22:22:27 +00:00
ieee80211_monitor.c count packets 2009-06-02 00:04:10 +00:00
ieee80211_monitor.h
ieee80211_node.c Honor device capabilities while initializing ni_htrates. 2011-03-13 12:16:23 +00:00
ieee80211_node.h net80211 rate control framework (net80211 ratectl). 2010-04-07 15:29:13 +00:00
ieee80211_output.c When injecting frames a temporary node is faked, during this several 2011-03-13 12:56:46 +00:00
ieee80211_phy.c use 1/2 and 1/4 rate phy types to simplify txtime calculation 2009-02-19 17:44:23 +00:00
ieee80211_phy.h add ieee80211_isratevalid 2009-05-29 23:39:16 +00:00
ieee80211_power.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_power.h
ieee80211_proto.c Fix a WME corner case found by the FreeBSD 802.11n testing crew. 2011-03-24 15:27:15 +00:00
ieee80211_proto.h Remove trailing ";" in struct ieee80211_beacon_offsets declaration 2009-11-11 15:00:56 +00:00
ieee80211_radiotap.c purge dead code 2009-06-08 21:16:06 +00:00
ieee80211_radiotap.h
ieee80211_ratectl_none.c Some device drivers calculate various timing related things based on 2010-11-13 14:59:54 +00:00
ieee80211_ratectl.c Instead of using the AMRR ratectl algo as default for drivers which have 2010-11-06 18:17:20 +00:00
ieee80211_ratectl.h The ni_rctls checks are used to verify that a ratectl algo has set up 2010-11-14 09:59:52 +00:00
ieee80211_regdomain.c Add modes for 1/2 and 1/4-width channels so we have separate roaming 2009-02-19 05:21:54 +00:00
ieee80211_regdomain.h o add country codes from Atheros regulatory; these are not listed in 2009-01-27 23:09:55 +00:00
ieee80211_rssadapt.c Remove GNU-style struct initialization. 2010-06-12 07:02:43 +00:00
ieee80211_rssadapt.h net80211 rate control framework (net80211 ratectl). 2010-04-07 15:29:13 +00:00
ieee80211_scan_sta.c Fix rmax calculation during BSS selection. 2011-03-13 11:58:40 +00:00
ieee80211_scan.c Change return code semantics of start_scan_locked(). Instead of reporting 2011-01-30 14:00:50 +00:00
ieee80211_scan.h Implementation of the upcoming Wireless Mesh standard, 802.11s, on the 2009-07-11 15:02:45 +00:00
ieee80211_sta.c Fix a cut&paste error while parsing htcap/htinfo elements. This one is 2011-03-13 12:21:04 +00:00
ieee80211_sta.h
ieee80211_superg.c distribute sysctl decls so global variables can be made static 2009-05-30 20:11:23 +00:00
ieee80211_superg.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_tdma.c fixes a broken software beacon miss handler. There is a race to check 2010-03-14 01:57:32 +00:00
ieee80211_tdma.h Overhaul monitor mode handling: 2009-05-20 20:00:40 +00:00
ieee80211_var.h First step on removing the harcoded RX/TX stream and MCS0-15 assumptions. 2011-03-13 11:40:18 +00:00
ieee80211_wds.c Make sure to only accept and handle action frames which are for us. In 2011-02-22 19:05:42 +00:00
ieee80211_wds.h
ieee80211_xauth.c
ieee80211.c While determining the maxrate for ieee80211_media_setup() honor 2011-03-13 11:47:43 +00:00
ieee80211.h Add a new mgmt subtype "ACTION NO ACK" defined in 802.11n-2009, while here 2011-02-21 19:59:43 +00:00