freebsd-dev/sys
Adrian Chadd 22a3aee637 Implement my first cut at "correct" node power-save and
PS-POLL support.

This implements PS-POLL awareness i nthe

* Implement frame "leaking", which allows for a software queue
  to be scheduled even though it's asleep
* Track whether a frame has been leaked or not
* Leak out a single non-AMPDU frame when transmitting aggregates
* Queue BAR frames if the node is asleep
* Direct-dispatch the rest of control and management frames.
  This allows for things like re-association to occur (which involves
  sending probe req/resp as well as assoc request/response) when
  the node is asleep and then tries reassociating.
* Limit how many frames can set in the software node queue whilst
  the node is asleep.  net80211 is already buffering frames for us
  so this is mostly just paranoia.
* Add a PS-POLL method which leaks out a frame if there's something
  in the software queue, else it calls net80211's ps-poll routine.
  Since the ath PS-POLL routine marks the node as having a single frame
  to leak, either a software queued frame would leak, OR the next queued
  frame would leak. The next queued frame could be something from the
  net80211 power save queue, OR it could be a NULL frame from net80211.

TODO:

* Don't transmit further BAR frames (eg via a timeout) if the node is
  currently asleep.  Otherwise we may end up exhausting management frames
  due to the lots of queued BAR frames.

  I may just undo this bit later on and direct-dispatch BAR frames
  even if the node is asleep.

* It would be nice to burst out a single A-MPDU frame if both ends
  support this.  I may end adding a FreeBSD IE soon to negotiate
  this power save behaviour.

* I should make STAs timeout of power save mode if they've been in power
  save for more than a handful of seconds.  This way cards that get
  "stuck" in power save mode don't stay there for the "inactivity" timeout
  in net80211.

* Move the queue depth check into the driver layer (ath_start / ath_transmit)
  rather than doing it in the TX path.

* There could be some naughty corner cases with ps-poll leaking.
  Specifically, if net80211 generates a NULL data frame whilst another
  transmitter sends a normal data frame out net80211 output / transmit,
  we need to ensure that the NULL data frame goes out first.
  This is one of those things that should occur inside the VAP/ic TX lock.
  Grr, more investigations to do..

Tested:

* STA: AR5416, AR9280
* AP: AR5416, AR9280, AR9160
2013-05-15 18:33:05 +00:00
..
amd64 Improve readability of static assertions for OFFSET_* macros. 2013-05-13 21:47:17 +00:00
arm Port the new PV entry allocator from amd64/i386/mips to armv6/v7. 2013-05-14 09:47:58 +00:00
boot Move 'compatible' line out of the common am335x.dtsi and into 2013-05-10 05:34:08 +00:00
bsm Implement chflagsat(2) system call, similar to fchmodat(2), but operates on 2013-03-21 22:59:01 +00:00
cam Suppress error printing for "PREVENT ALLOW MEDIUM REMOVAL" on da open. 2013-05-12 09:33:33 +00:00
cddl Bring back part of r249367 by adding DTrace's temporal option, which allows 2013-05-12 16:26:33 +00:00
compat Regenerate files for pipe2(). 2013-05-01 22:45:04 +00:00
conf Add Qlogic 10Gigabit Ethernet & CNA Adapter Driver Version 3.10.10 for 2013-05-15 17:03:09 +00:00
contrib Turns out that there really isn't an RTC chip on this board, at all. 2013-05-12 01:29:18 +00:00
crypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
ddb
dev Implement my first cut at "correct" node power-save and 2013-05-15 18:33:05 +00:00
fs Fix typo in comment. 2013-05-15 08:38:49 +00:00
gdb
geom - Use int8_t type for the mftrecsz field in g_label_ntfs. char type 2013-05-05 08:00:16 +00:00
gnu/fs/reiserfs Garbage collect XFS bits which are now already completely disconnected 2013-03-02 15:33:54 +00:00
i386 Improve readability of static assertions for OFFSET_* macros. 2013-05-13 21:47:17 +00:00
ia64 Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
isa
kern - Add a new general purpose path-compressed radix trie which can be used 2013-05-12 04:05:01 +00:00
kgssapi Isilon reported that sec=krb5p NFS mounts had a problem when m_len == 0 2013-05-01 22:07:55 +00:00
libkern Attempt to mitigate poor initialization of arc4 by one-shot 2013-04-19 00:30:52 +00:00
mips Fix several typos 2013-05-12 16:43:26 +00:00
modules Add Qlogic 10Gigabit Ethernet & CNA Adapter Driver Version 3.10.10 for 2013-05-15 17:03:09 +00:00
net Add IFF_MONITOR support to gre(4). 2013-05-11 19:05:38 +00:00
net80211 Fix a VAP BSS node reference in the HT code to actually take a reference 2013-05-10 09:37:58 +00:00
netatalk Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
netgraph Fix several typos 2013-05-12 16:43:26 +00:00
netinet Fix typo in net.inet.tcp.minmss sysctl description. 2013-05-13 19:55:27 +00:00
netinet6 Honor the net.inet6.ip6.v6only sysctl variable and the IPV6_V6ONLY 2013-05-10 18:09:38 +00:00
netipsec Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats. 2013-04-09 07:11:22 +00:00
netipx Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netnatm Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netpfil Return meaningful error code from pf_state_key_attach() and 2013-05-11 18:06:51 +00:00
netsmb If the kernel is compiled with VMIMAGE support, the first attempt of 2013-05-04 16:55:48 +00:00
nfs Move the NFS FHA (File Handle Affinity) code from sys/nfsserver to 2013-04-17 22:42:43 +00:00
nfsclient When an NFS unmount occurs, once vflush() writes the last dirty 2013-04-18 23:20:16 +00:00
nfsserver Move the NFS FHA (File Handle Affinity) code from sys/nfsserver to 2013-04-17 22:42:43 +00:00
nlm
ofed Fxi a bunch of typos. 2013-05-10 16:41:26 +00:00
opencrypto When porting XTS-related code from OpenBSD I forgot to update copyright (only 2013-02-20 22:59:53 +00:00
pc98 Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
pci - Corrrect mispellings of word useful 2013-04-17 11:45:15 +00:00
powerpc Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
rpc Fix a potential socket leak in the NFS server. If a client closes its 2013-04-08 19:03:01 +00:00
security Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
sparc64 Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
sys Rework the way C11 keywords are defined. 2013-05-13 21:46:07 +00:00
teken
tools Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
ufs Fix several typos 2013-05-12 16:43:26 +00:00
vm o Add accessor functions to add and remove pages from a specific 2013-05-13 15:40:51 +00:00
x86 o Add accessor functions to add and remove pages from a specific 2013-05-13 15:40:51 +00:00
xdr Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
xen xenstore/xenstore.c: 2013-04-29 23:08:13 +00:00
Makefile Remove netncp cscope entry missed in r248097 2013-03-12 14:21:52 +00:00