freebsd-dev/sys/dev/ath
Adrian Chadd 7dcb2bea01 Re-work how transmit buffer limits are enforced - partly to fix the PR,
but partly to just tidy up things.

The problem here - there are too many TX buffers in the queue! By the
time one needs to transmit an EAPOL frame (for this PR, it's the response
to the group rekey notification from the AP) there are no ath_buf entries
free and the EAPOL frame doesn't go out.

Now, the problem!

* Enforcing the TX buffer limitation _before_ we dequeue the frame?
  Bad idea. Because..
* .. it means I can't check whether the mbuf has M_EAPOL set.

The solution(s):

* De-queue the frame first
* Don't bother doing the TX buffer minimum free check until after
  we know whether it's an EAPOL frame or not.
* If it's an EAPOL frame, allocate the buffer from the mgmt pool
  rather than the default pool.

Whilst I'm here:

* Add a tweak to limit how many buffers a single node can acquire.
* Don't enforce that for EAPOL frames.
* .. set that to default to 1/4 of the available buffers, or 32,
  whichever is more sane.

This doesn't fix issues due to a sleeping node or a very poor performing
node; but this doesn't make it worse.

Tested:

* AR5416 STA, TX'ing 100+ mbit UDP to an AP, but only 50mbit being received
  (thus the TX queue fills up.)
* .. with CCMP / WPA2 encryption configured
* .. and the group rekey time set to 10 seconds, just to elicit the
  behaviour very quickly.

PR:		kern/138379
2013-05-07 07:52:18 +00:00
..
ath_dfs/null Add a method to explicitly disable radar reporting if required. 2013-01-02 01:36:10 +00:00
ath_hal Add device identification and probe/attach support for the QCA9565. 2013-05-02 00:59:39 +00:00
ath_rate I give up - just throw the EWMA update into the normal update_stats() 2013-02-27 04:33:06 +00:00
ah_osdep.c
ah_osdep.h
if_ath_ahb.c Create a new TX lock specifically for queuing frames. 2013-02-07 07:50:16 +00:00
if_ath_alq.c Extend the timestamp to be a timeval, rather than ticks. 2013-02-11 02:48:49 +00:00
if_ath_alq.h Fix an incorrect sizeof() 2013-02-18 18:39:15 +00:00
if_ath_beacon.c Use the new net80211 method to fetch the node TX power, rather than 2013-04-16 21:26:44 +00:00
if_ath_beacon.h Overhaul the TXQ locking (again!) as part of some beacon/cabq timing 2013-03-24 00:03:12 +00:00
if_ath_debug.c
if_ath_debug.h
if_ath_keycache.c Don't allocate or program a key for the AR5210. 2012-11-19 23:54:05 +00:00
if_ath_keycache.h
if_ath_led.c
if_ath_led.h
if_ath_misc.h Ensure that we only call the busdma unmap/flush routines once, when 2013-04-01 20:57:13 +00:00
if_ath_pci.c Create a new TX lock specifically for queuing frames. 2013-02-07 07:50:16 +00:00
if_ath_rx_edma.c Use a per-RX-queue deferred list, rather than a single deferred list for 2013-04-16 20:21:02 +00:00
if_ath_rx_edma.h
if_ath_rx.c Fix the busdma logic to work with EDMA chipsets when using bounce 2013-04-04 08:21:56 +00:00
if_ath_rx.h Fix the busdma logic to work with EDMA chipsets when using bounce 2013-04-04 08:21:56 +00:00
if_ath_spectral.c Fix format size. 2013-01-08 22:42:15 +00:00
if_ath_spectral.h Add a new (skeleton) spectral mode manager module. 2013-01-02 03:59:02 +00:00
if_ath_sysctl.c Re-work how transmit buffer limits are enforced - partly to fix the PR, 2013-05-07 07:52:18 +00:00
if_ath_sysctl.h
if_ath_tdma.c Overhaul the TXQ locking (again!) as part of some beacon/cabq timing 2013-03-24 00:03:12 +00:00
if_ath_tdma.h
if_ath_tsf.h
if_ath_tx_edma.c Fix this to compile when ATH_DEBUG_ALQ is defined but ATH_DEBUG isn't. 2013-04-08 21:15:43 +00:00
if_ath_tx_edma.h
if_ath_tx_ht.c Update the rate series setup code to use the decisions already made in 2013-04-17 07:21:30 +00:00
if_ath_tx_ht.h
if_ath_tx.c Simplify this bit of code! 2013-05-07 07:44:07 +00:00
if_ath_tx.h Add a new option to limit the maximum size of aggregates. 2013-02-21 06:18:40 +00:00
if_ath.c Re-work how transmit buffer limits are enforced - partly to fix the PR, 2013-05-07 07:52:18 +00:00
if_athdfs.h Add a method to explicitly disable radar reporting if required. 2013-01-02 01:36:10 +00:00
if_athioctl.h Re-work how transmit buffer limits are enforced - partly to fix the PR, 2013-05-07 07:52:18 +00:00
if_athrate.h Update the rate series setup code to use the decisions already made in 2013-04-17 07:21:30 +00:00
if_athvar.h Re-work how transmit buffer limits are enforced - partly to fix the PR, 2013-05-07 07:52:18 +00:00