HomeFreeBSD

[ath] initial station side quiet IE support.

Description

[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.

Details

Provenance
adrianAuthored on
Parents
rS313489: MFC r296586:
Branches
Unknown
Tags
Unknown