freebsd-dev/sys
Adrian Chadd b837332d0a Overhaul the TXQ locking (again!) as part of some beacon/cabq timing
related issues.

Moving the TX locking under one lock made things easier to progress on
but it had one important side-effect - it increased the latency when
handling CABQ setup when sending beacons.

This commit introduces a bunch of new changes and a few unrelated changs
that are just easier to lump in here.

The aim is to have the CABQ locking separate from other locking.
The CABQ transmit path in the beacon process thus doesn't have to grab
the general TX lock, reducing lock contention/latency and making it
more likely that we'll make the beacon TX timing.

The second half of this commit is the CABQ related setup changes needed
for sane looking EDMA CABQ support.  Right now the EDMA TX code naively
assumes that only one frame (MPDU or A-MPDU) is being pushed into each
FIFO slot.  For the CABQ this isn't true - a whole list of frames is
being pushed in - and thus CABQ handling breaks very quickly.

The aim here is to setup the CABQ list and then push _that list_ to
the hardware for transmission.  I can then extend the EDMA TX code
to stamp that list as being "one" FIFO entry (likely by tagging the
last buffer in that list as "FIFO END") so the EDMA TX completion code
correctly tracks things.

Major:

* Migrate the per-TXQ add/removal locking back to per-TXQ, rather than
  a single lock.

* Leave the software queue side of things under the ATH_TX_LOCK lock,
  (continuing) to serialise things as they are.

* Add a new function which is called whenever there's a beacon miss,
  to print out some debugging.  This is primarily designed to help
  me figure out if the beacon miss events are due to a noisy environment,
  issues with the PHY/MAC, or other.

* Move the CABQ setup/enable to occur _after_ all the VAPs have been
  looked at.  This means that for multiple VAPS in bursted mode, the
  CABQ gets primed once all VAPs are checked, rather than being primed
  on the first VAP and then having frames appended after this.

Minor:

* Add a (disabled) twiddle to let me enable/disable cabq traffic.
  It's primarily there to let me easily debug what's going on with beacon
  and CABQ setup/traffic; there's some DMA engine hangs which I'm finally
  trying to trace down.

* Clear bf_next when flushing frames; it should quieten some warnings
  that show up when a node goes away.

Tested:

* AR9280, STA/hostap, up to 4 vaps (staggered)
* AR5416, STA/hostap, up to 4 vaps (staggered)

TODO:

* (Lots) more AR9380 and later testing, as I may have missed something here.
* Leverage this to fix CABQ hanling for AR9380 and later chips.
* Force bursted beaconing on the chips that default to staggered beacons and
  ensure the CABQ stuff is all sane (eg, the MORE bits that aren't being
  correctly set when chaining descriptors.)
2013-03-24 00:03:12 +00:00
..
amd64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
arm Don't check and warn about pmap mismatch on every call to busdma sync. 2013-03-23 17:17:06 +00:00
boot Integrate Efika MX project back to home. 2013-03-20 15:39:27 +00:00
bsm Implement chflagsat(2) system call, similar to fchmodat(2), but operates on 2013-03-21 22:59:01 +00:00
cam Commit the removal of a whitespace to record the proper commit message 2013-03-19 15:05:21 +00:00
cddl ZFS: Fix a panic while unmounting a busy filesystem. 2013-03-23 16:34:56 +00:00
compat Regenerate after r248599. 2013-03-21 23:02:19 +00:00
conf Fix kernel build with options ZFS after r24571 (libzfs_core). 2013-03-23 20:01:45 +00:00
contrib
crypto
ddb
dev Overhaul the TXQ locking (again!) as part of some beacon/cabq timing 2013-03-24 00:03:12 +00:00
fs - Constify local path variable for chflagsat(). 2013-03-22 07:40:34 +00:00
gdb
geom Correct the page count when excess length is trimmed from the bio. 2013-03-21 22:36:43 +00:00
gnu/fs/reiserfs
i386 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
ia64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
isa
kern Extend taskqueue(9) to enable per-taskqueue callbacks. 2013-03-23 15:11:53 +00:00
kgssapi
libkern Add __aeabi_memset to libkern, implemented using memset, as clang may 2013-03-16 23:11:55 +00:00
mips Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
modules Fix the powerpc64 build. MACHINE_CPUARCH is common for powerpc/powerpc64, 2013-03-19 00:39:02 +00:00
net Remove __FreeBSD_version ifdefs. 2013-03-22 20:44:16 +00:00
net80211 Add VNET wrappers around the rest of the ieee80211 rtsock messages. 2013-03-20 02:42:52 +00:00
netatalk
netgraph Add NGM_NAT_LIBALIAS_INFO command, that reports internal stats 2013-03-21 08:36:15 +00:00
netinet Add ipfw support for setting/matching DiffServ codepoints (DSCP). 2013-03-20 10:35:33 +00:00
netinet6 Clean up some unused leftover code. 2013-03-22 01:45:54 +00:00
netipsec Use m_get2() + m_align() instead of hand made key_alloc_mbuf(). Code 2013-03-15 10:20:15 +00:00
netipx
netnatm
netpfil Add ipfw support for setting/matching DiffServ codepoints (DSCP). 2013-03-20 10:35:33 +00:00
netsmb
nfs Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
nfsclient Fix remainder calculation when biosize is not a power of 2 2013-03-19 13:06:11 +00:00
nfsserver
nlm
ofed
opencrypto
pc98
pci
powerpc Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
rpc Revert 195703 and 195821 as this special stop handling in NFS is now 2013-03-13 21:06:03 +00:00
security
sparc64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
sys Be more explicit about what each bio_cmd & bio_flags value means. 2013-03-23 16:55:07 +00:00
teken
tools
ufs The purpose of this change to the FFS layout policy is to reduce the 2013-03-22 21:45:28 +00:00
vm Only size and create the bio_transient_map when unmapped buffers are 2013-03-21 07:28:15 +00:00
x86
xdr Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
xen
Makefile