freebsd-dev/sys/dev/ath
Adrian Chadd 15e58d4d26 [ath] prepare for "correct" group (bcast/mcast) address frame handling and software/hardware queue TID mapping.
When I initially did this 11n TX work in days of yonder, my 802.11 standards
clue was ... not as finely tuned.  One of the things in 802.11-2012 (which
I guess technically was after I did this work, but I'm sure it was like this
in the previous rev?) is that among other traffic classes, three things are
important:

* group addressed frames should be default non-QoS, even if they're QoS frames, and
* group addressed frames should have a seqno out of a different space than the
  per-TID QoS one; and because of this
* group addressed frames, being non-QoS, should never be in the Block-ACK window
  for TX.

Now, net80211 and now this code cheats by using the non-QOS TID, but ideally
we'd introduce a separate seqno space just for multicast/group traffic for
TX and RX comparison.

Later extensions (eg reliable multicast / multimedia) express what one should do
when doing multicast traffic in a TID.  Now, technically we /could/ do group traffic
as QoS traffic and throw it into a per-TID seqno space, but this definitely
introduces ordering issues when you take into account things like CABQ behaviour.
(Ie, if some traffic in the TID goes into the CABQ and some doesn't, because
it's doing a split of multicast and non-multicast traffic, then you have
seqno ordering issues.)

So, until someone implements 802.11vv reliable multicast / multimedia extensions,
group traffic is non-QoS.

Next, software/hardware queue TID mapping.  In the past I believed the WME tagging
of frames because well, net80211 had a habit of tagging things like management
traffic with it.  But, then we also map QoS traffic categories to TIDs as well.
So, we should obey the TID!  But! then it put some management traffic into higher
WME categories too, as those frames don't have QoS TIDs.  But! It'd do things like
put things like QoS action frames into higher WME categories, when they should
be kept in-order with the rest of the traffic for that TID.  So! Given all of this,
the ath(4) driver does overrides to not trust the WME category.

I .. am undoing some of this.  Now, the TID has a 1:1 mapping to the hardware
queue.  The TID is the primary source of truth now for all QoS traffic.
The WME is only used for non-QoS traffic.  This now means that any TID traffic
queued should be consistently queued regardless of WME, so things like the
"TX finished, do more TX" that is occuring right now for transmit handling
should be "better".

The consistent {TID, WME} -> hardware queue mapping is important for
transmit completion.  It's used to schedule more traffic for that
particular TID, because that {many TID}:{1 TXQ} mapping in ath_tx_tid_sched()
is used for driving completion.  Ie, when the hardware queue completes,
it'll walk that list of scheduled TIDs attached to that TXQ.

The eventual aim is to get ready for some other features around putting
some data into other hardware queues (eg for better PS-POLL support,
uAPSD, support, correct-er TDMA support, etc) which requires that
I tidy all of this up in preparation for then introducing further
TID scheduling that isn't linked to a hardware TXQ (likely a per-WME, per-TID
driver queue, and a per-node driver queue) to enable that.

Tested:

* AR9380, STA mode
* AR9380, AR9580, AP mode
2017-03-19 05:00:14 +00:00
..
ath_dfs/null dev/ath: minor spelling fixes in comments. 2016-05-02 19:56:48 +00:00
ath_hal Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ath_rate [ath] [ath_hal] break out the duration calculation to optionally include SIFS. 2016-07-15 06:39:35 +00:00
ah_osdep.c [ath] remove the inline version of the register access macros. 2016-01-03 17:58:11 +00:00
ah_osdep.h [ath] remove the inline version of the register access macros. 2016-01-03 17:58:11 +00:00
if_ath_ahb.c Remove the references to the TX IC lock - i ended up solving this 2015-09-29 03:37:17 +00:00
if_ath_alq.c
if_ath_alq.h [ath] add a placeholder event for debuggin EDMA TX FIFO push events. 2016-06-09 22:01:05 +00:00
if_ath_beacon.c [ath] initial station side quiet IE support. 2017-02-09 23:15:11 +00:00
if_ath_beacon.h
if_ath_btcoex_mci.c Fix kernel build. Improper definition location of a variable. 2016-06-02 01:59:41 +00:00
if_ath_btcoex_mci.h [ath] commit initial bluetooth coexistence support for the MCI NICs. 2016-06-02 00:51:36 +00:00
if_ath_btcoex.c [ath] remove now unused parameters. 2016-06-04 08:56:30 +00:00
if_ath_btcoex.h [ath] commit initial bluetooth coexistence support for the MCI NICs. 2016-06-02 00:51:36 +00:00
if_ath_debug.c
if_ath_debug.h [ath] sigh, how'd I miss this. 2017-02-10 07:16:56 +00:00
if_ath_descdma.c [ath] migrate ioctl and busdma memory operations out into separate source files. 2015-11-24 03:42:58 +00:00
if_ath_descdma.h [ath] migrate ioctl and busdma memory operations out into separate source files. 2015-11-24 03:42:58 +00:00
if_ath_ioctl.c [ath] Begin to lay the groundwork for btcoex related ioctl controls. 2016-11-27 18:34:29 +00:00
if_ath_ioctl.h [ath] migrate ioctl and busdma memory operations out into separate source files. 2015-11-24 03:42:58 +00:00
if_ath_keycache.c net80211 + drivers: convert to ieee80211_crypto_get_key_wepidx(). 2016-12-07 22:16:07 +00:00
if_ath_keycache.h net80211: drop redundant 3rd parameter from iv_key_set(). 2015-10-03 21:48:27 +00:00
if_ath_led.c
if_ath_led.h
if_ath_lna_div.c dev/ath: minor spelling fixes in comments. 2016-05-02 19:56:48 +00:00
if_ath_lna_div.h
if_ath_misc.h [ath] force wake the hardware if we see a missed beacon. 2016-11-28 17:54:29 +00:00
if_ath_pci_devlist.h
if_ath_pci.c dev/ath: minor spelling fixes in comments. 2016-05-02 19:56:48 +00:00
if_ath_rx_edma.c [ath] don't debug RX EDMA descriptors that are not yet complete. 2016-06-17 17:01:32 +00:00
if_ath_rx_edma.h
if_ath_rx.c [ath] include logging of TU versions of the TSF values. 2016-11-28 02:51:55 +00:00
if_ath_rx.h Begin plumbing ieee80211_rx_stats through the receive path. 2015-05-25 16:37:41 +00:00
if_ath_spectral.c [ath] ensure the NIC is woken up before changing the spectral scan parameters. 2017-02-02 05:27:48 +00:00
if_ath_spectral.h
if_ath_sysctl.c [ath] report node queue overflows. 2016-06-09 21:59:36 +00:00
if_ath_sysctl.h
if_ath_tdma.c Fix improper use of "its". 2016-11-08 23:59:41 +00:00
if_ath_tdma.h
if_ath_tsf.h
if_ath_tx_edma.c [ath] [ar9300] ensure the software scheduler is called to form more aggregates for EDMA chips 2017-01-23 04:20:37 +00:00
if_ath_tx_edma.h
if_ath_tx_ht.c [ath] only apply the AR9300 delimiter workaround for the first sub-frame. 2017-01-22 05:45:42 +00:00
if_ath_tx_ht.h
if_ath_tx.c [ath] prepare for "correct" group (bcast/mcast) address frame handling and software/hardware queue TID mapping. 2017-03-19 05:00:14 +00:00
if_ath_tx.h net80211: separate mbuf cleanup from ieee80211_fragment() 2015-10-12 03:27:08 +00:00
if_ath.c [ath] initial station side quiet IE support. 2017-02-09 23:15:11 +00:00
if_athdfs.h
if_athioctl.h [ath] add spectral scan priority. 2017-02-02 05:27:06 +00:00
if_athrate.h
if_athvar.h [ath] prepare for station side quiet time support. 2017-02-07 02:21:34 +00:00