freebsd-dev/sys
Adrian Chadd 7403d1b9b2 Map the non-QoS TID to the voice queue, in order to ensure important
things like EAPOL frames make it out.

After a whole bunch of hacking/testing, I discovered that they weren't
being early-dropped by the stack (but I should look at ensuring that
later..) but were even making to the hardware transmit queue.
They were mostly even being received by the remote end.  However, the
remote end was completely ignoring them.

This didn't happen under 150-170MBit TCP tests as I'm guessing the TX
queue stayed very busy and the STA didn't do any scanning. However, when
doing 100Mbit/s of TCP traffic, the STA would do background scanning -
which involves it coming in and out of powersave mode with the AP.

Now, this is a total and utter hack around the real problems, which are:

* I need to implement proper power save handling and integrate it into
  the filtered frames support, so the driver/stack doesn't send frames
  whilst the station is actually in sleep;

* .. but frames were actually making it to the STA (macbook pro) and
  the AP did receive an ACK; but a tcpdump on the receiving side showed
  the EAPOL frame never made it. So the stack was dropping it for
  some reason;

* Importantly - the EAPOL frames are currently going into the non-QoS
  TID, which maps to the BE queue and is susceptible to that queue being
  busy doing other things, but;

* There's other traffic going on in the non-QoS TID from other contexts
  when scanning is going on and it's possible there's some races causing
  sequence number/IV issues, but;

* Importantly importantlly, I think the interaction with TID 16 multicast
  traffic in power save mode is causing issues - since I -believe- the
  sequence number space being used by the EAPOL frames on TID 16 overlaps
  with the multicast frames that have sequence numbers allocated and
  are then stuffed on the cabq.  Since with EAPOL frames being in TID 16
  and queued to the BE queue, it's going to be waiting to be serviced
  with all of the aggregate traffic going on - and if the CABQ gets
  emptied beforehand, those TID 16 multicast frames with sequence numbers
  will go out beforehand.

Now, there's quite likely a bunch of "stuff happening slightly out of
sequence" going on due to the nature of the TX path (read: lots of
overlapping and concurrent ath_start() and ath_raw_xmit() calls going
on, sigh) but I thought I had caught them all and stuffed each TID TX
behind a lock (that lasted as long as it needed to in order to get
the frame onto the relevant destination queue - thus keeping things
in order.)

Unfortunately the last problem is the big one and I'm going to stare at
it some more.  If it _is_

So this is a work around for now to ensure that EAPOL frames actually
make it out before any other stuff in the non-QoS TID and HOPEFULLY
before the CABQ gets active.

I'm now going to spend a little time in the TX path figuring out exactly
why the sender is rejecting things. There's two (well, three if you count
EAPOL contents invalid) possibilities:

* The sequence number is out of order (ie, something else like the multicast
  traffic on CABQ) is going out first on TID 16;
* The CCMP IV is out of order (similar to above - but less likely,  as the
  TX key for multicast traffic is different to unicast traffic);
* EAPOL contents strangely invalid.

AP: Ubiquiti RSPRO, AR9160/AR9220 NICs
STA: Macbook Pro, Broadcom 11n NIC
2012-09-26 03:45:42 +00:00
..
amd64 After r205013, amd64 and i386 CPU family and model IDs were printed out 2012-09-21 10:31:19 +00:00
arm Eliminate an unused declaration. 2012-09-25 03:59:10 +00:00
boot MFi386: revision 240637 2012-09-23 08:50:54 +00:00
bsm
cam Fix a panic when trying to play invalid audio tracks. 2012-09-19 18:42:31 +00:00
cddl It is possible to recursively destroy snapshots even if the snapshot 2012-09-23 20:12:10 +00:00
compat Remove redundant check 2012-09-12 10:12:03 +00:00
conf Improve the check for p4 opened files. 2012-09-22 07:44:36 +00:00
contrib Fix panic introduced by me in r240835, when zero weight 2012-09-25 12:45:41 +00:00
crypto
ddb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
dev Map the non-QoS TID to the voice queue, in order to ensure important 2012-09-26 03:45:42 +00:00
fs Modify the NFSv4 client so that it can handle owner 2012-09-20 02:49:25 +00:00
gdb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
geom Use the topology lock to protect list of providers while withering them. 2012-09-22 12:41:49 +00:00
gnu/fs Add VFCF_READONLY flag that indicates ntfs and xfs file systems are 2012-09-12 03:42:52 +00:00
i386 After r205013, amd64 and i386 CPU family and model IDs were printed out 2012-09-21 10:31:19 +00:00
ia64 userret() already checks for td_locks when INVARIANTS is enabled, so 2012-09-08 18:27:11 +00:00
isa
kern Fix freebsd32_kmq_timedreceive() and freebsd32_kmq_timedsend() to use 2012-09-25 22:15:59 +00:00
kgssapi
libkern s/ is is / is /g 2012-09-14 22:00:03 +00:00
mips Prefer __containerof() above member2struct(). 2012-09-15 19:28:54 +00:00
modules Add TRIM support. 2012-09-23 19:40:58 +00:00
net Correct misspelling in debug output. 2012-09-26 01:09:19 +00:00
net80211 Fix a crash bug introduced in the iterate node work recently done. 2012-09-16 22:45:00 +00:00
netatalk
netgraph o Create directory sys/netpfil, where all packet filters should 2012-09-14 11:51:49 +00:00
netinet Whitespace change. 2012-09-23 07:43:10 +00:00
netinet6 Merge the projects/pf/head branch, that was worked on for last six months, 2012-09-08 06:41:54 +00:00
netipsec Add missing break 2012-09-18 08:00:43 +00:00
netipx
netnatm
netncp Add characters mapping for codepages used in Germany. 2012-06-01 03:59:08 +00:00
netpfil EBUSY is a better reply for refusing to unload pf(4) or pfsync(4). 2012-09-22 19:03:11 +00:00
netsmb Change a duplicated check to clarify that we really want to set a 2012-07-10 21:02:59 +00:00
nfs - Typo fix 2012-08-16 19:22:34 +00:00
nfsclient Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
nfsserver
nlm Fix grammar. 2012-08-16 13:01:56 +00:00
ofed Align the PCI Express #defines with the style used for the PCI-X 2012-09-18 22:04:59 +00:00
opencrypto
pc98 MFi386: revision 237445 2012-09-23 09:13:57 +00:00
pci intpm: add ATI IXP400 pci id 2012-04-16 10:33:46 +00:00
powerpc Move the prototype for savectx from cpu.h to pcb.h, as it is on other 2012-09-23 17:33:16 +00:00
rpc Partial revert of r239963: 2012-09-24 03:14:17 +00:00
security Check vplabel for NULL before dereferencing it. Fixes a panic 2012-05-03 15:51:34 +00:00
sparc64 Correct double "the the" 2012-09-14 21:28:56 +00:00
sys Add rounddown2() macro similar to the roundup2() macro. 2012-09-22 17:49:25 +00:00
teken
tools
ufs Remove unused member of struct indir (in_exists) from UFS and EXT2 code. 2012-08-17 17:45:27 +00:00
vm Address a race condition that was introduced in r238212. Unless the page 2012-09-23 17:42:39 +00:00
x86 Allow static DMA allocations that allow for enough segments to do page-sized 2012-08-17 14:14:25 +00:00
xdr
xen
Makefile