FreeBSD src
Go to file
Adrian Chadd 1410ca560d [ath] initial station side quiet IE support.
This implements hardware assisted quiet IE support.  Quiet time is
an optional interval on DFS channels (but doesn't have to be DFS
only channels! sigh) where the station and AP can be quiet in order
to allow for channel utilisation measurements.  Typically that's
stuff like radar detection, spectral scan, other-BSS frame sniffing,
checking how busy the air is, etc.

The hardware implements it as one of the generic timers, which is
supplied a period, offset from the trigger period and duration
to stay quiet.  The AP can announce quiet time configurations which
change, and so this code also tracks that.

Implementation details:

* track the current quiet time IE
* compare the new one against the previous one - if only the TBTT
  counter changes, don't update things
* If tbttcount=1 then program it into the hardware - that is when
  it is easiest to program the correct starting offset (one TBTT +
  configured offset).
* .. later on check to see if it can be done on any tbttcount
* If the IE goes away then remove the quiet timer and clear the
  config
* Upon reset, state change, new beacon - clear quiet time IE
  and just let it resync from the next beacon.

History:

This was work done initially by sibridgetech.com in 2011/2012/2013
as part of some FreeBSD wifi DFS contracting work they had for a
third party.  They implemented the net80211 quiet time IE pieces
and had some test code for the station side which didn't entirely
use the timers correctly.

I figured out how to use the timers correctly without stopping/starting
the transmit DMA engine each time. When done correctly, the timer
just needs to be programmed once and left alone until the next
configuration change.

So, thanks to Himali Patel and Parthiv Shah for their work way
back then.  I finally figured it out and finished it!

TODO:

* Now, I'd rather net80211 did the quiet time IE tracking and parsing,
  pushing configurations into the driver is needed.  I'll look at
  doing that in a subsequent update.

* This doesn't handle multiple quiet time IEs, which will currently
  just mess things up.  I'll look into supporting that in the future
  (at least by only obeying "one" of them, and then ignoring
  subsequent IEs in a beacon/probe frame.)

* This also implements the STA side and not the AP side - the AP
  side will come later, and involves taking various other intervals
  into account (eg the beacon offset for multi-VAP modes, the
  SWBA time, etc, etc) as well as obtaining the configuration when
  a beacon is configured/generated rather than "hearing" an IE.

* .. investigate supporting quiet IE in mesh, tdma, ibss modes

* .. investigate supporting quiet IE for non-DFS channels
  (so this can be done for say, 2GHz channels.)

* Chances are i should commit NULL methods for the ar5210, ar5211 HALs..

Tested:

* AR9380, STA mode - announcing quiet, removing quiet, changing quite
  time config, whilst doing iperf testing;
* AR9380, AP mode.
2017-02-09 23:15:11 +00:00
bin Remove bdes(1) 2017-02-06 08:27:19 +00:00
cddl Search for _DTRACE_VERSION in sys/sdt.h rather than unistd.h. 2017-02-05 02:45:35 +00:00
contrib lld: Allow arbitrary code alignment in .eh_frame 2017-02-08 20:31:54 +00:00
crypto Merge OpenSSL 1.0.2k. 2017-01-26 19:10:29 +00:00
etc MFhead@r313360 2017-02-07 01:33:39 +00:00
gnu Bump GCC FBSD_CC_VER for r312899 (-march=octeon+ support) 2017-02-01 05:24:17 +00:00
include Make use of clang nullability attributes. 2017-01-28 20:54:43 +00:00
kerberos5 Conditionalize adding ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et to ETSRCS 2017-01-02 19:03:01 +00:00
lib ufs: Use UFS_MAXNAMLEN constant 2017-02-09 17:47:01 +00:00
libexec Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8) 2017-02-02 20:30:50 +00:00
release Add some comments with examples on how to build Vagrant images. 2017-02-01 16:15:23 +00:00
rescue Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
sbin ufs: Use UFS_MAXNAMLEN constant 2017-02-09 17:47:01 +00:00
secure Remove bdes(1) 2017-02-06 08:27:19 +00:00
share Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
sys [ath] initial station side quiet IE support. 2017-02-09 23:15:11 +00:00
targets Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
tests MFhead@r313398 2017-02-07 18:47:16 +00:00
tools o Add mkimg to the cross tools, and use the TMPPATH as PATH to pick up 2017-02-06 06:15:38 +00:00
usr.bin Trim trailing whitespace (mostly introduced in r313407). 2017-02-08 17:45:23 +00:00
usr.sbin Cleanup on usr.sbin/arp/arp.c 2017-02-09 19:58:12 +00:00
.arcconfig callsign isn't required anymore 2016-09-29 06:19:45 +00:00
.arclint phabricator related changes: 2015-04-20 20:33:22 +00:00
COPYRIGHT Bump copyright year. 2016-12-31 12:41:42 +00:00
LOCKS Explicitly require Security Officer's approval for kernel PRNG bits. 2013-09-17 14:19:05 +00:00
MAINTAINERS Remove myself from kern_timeout.c yeah! 2016-07-27 20:37:32 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
Makefile.inc1 Remove LOCAL_LIB_DIRS warning added in r275839. 2017-02-04 02:15:49 +00:00
Makefile.libcompat Use cross-NM (XNM) in compat32 build 2017-01-27 03:43:18 +00:00
ObsoleteFiles.inc Add ObsoleteFiles entries for bdes(1) missed in r313329 2017-02-06 10:51:53 +00:00
README README: remove nonexistent 'games' directory. 2016-05-18 10:43:13 +00:00
UPDATING Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC 2017-01-27 01:59:12 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree.  See build(7)
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The `buildkernel` and `installkernel` targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process.  See build(7), config(8),
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information.

Note: If you want to build and install the kernel with the
`buildkernel` and `installkernel` targets, you might need to build
world before.  More information is available in the handbook.

The kernel configuration files reside in the sys/<arch>/conf
sub-directory.  GENERIC is the default configuration used in release builds.
NOTES contains entries and documentation for all possible
devices, not just those commonly used.


Source Roadmap:
---------------

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html