opnsense-src/sys/dev/ath/ath_hal/ar5212
Adrian Chadd d2a72d673f Begin adding support to explicitly set the current chainmask.
Right now the only way to set the chainmask is to set the hardware
configured chainmask through capabilities.  This is fine for forcing
the chainmask to be something other than what the hardware is capable
of (eg to reduce TX/RX to one connected antenna) but it does change what
the HAL hardware chainmask configuration is.

For operational mode changes, it (may?) make sense to separately control
the TX/RX chainmask.

Right now it's done as part of ar5416_reset.c - ar5416UpdateChainMasks()
calculates which TX/RX chainmasks to enable based on the operating mode.
(1 for legacy and whatever is supported for 11n operation.)  But doing
this in the HAL is suboptimal - the driver needs to know the currently
configured chainmask in order to correctly enable things for each
TX descriptor.  This is currently done by overriding the chainmask
config in the ar5416 TX routines but this has to disappear - the AR9300
HAL support requires the driver to dynamically set the TX chainmask based
on the TX power and TX rate in order to meet mini-PCIe slot power
requirements.

So:

* Introduce a new HAL method to set the operational chainmask variables;
* Introduce null methods for the previous generation chipsets;
* Add new driver state to record the current chainmask separate from
  the hardware configured chainmask.

Part #2 of this will involve disabling ar5416UpdateChainMasks() and moving
it into the driver; as well as properly programming the TX chainmask
based on the currently configured HAL chainmask.

Tested:

* AR5416, STA mode - both legacy (11a/11bg) and 11n rates - verified
  that AR_SELFGEN_MASK (the chainmask used for self-generated frames like
  ACKs and RTSes) is correct, as well as the TX descriptor contents is
  correct.
2013-02-25 22:42:43 +00:00
..
ar2316.c Overhaul regulatory support: 2009-01-28 18:00:22 +00:00
ar2317.c Overhaul regulatory support: 2009-01-28 18:00:22 +00:00
ar2413.c Overhaul regulatory support: 2009-01-28 18:00:22 +00:00
ar2425.c Add PCIE power control api: 2009-02-24 01:07:06 +00:00
ar5111.c Overhaul regulatory support: 2009-01-28 18:00:22 +00:00
ar5112.c Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar5212.h Begin adding support to explicitly set the current chainmask. 2013-02-25 22:42:43 +00:00
ar5212.ini Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5212_ani.c Fix ANI handling to work correctly when (trying) to receive radar errors. 2011-07-30 13:30:24 +00:00
ar5212_attach.c Begin adding support to explicitly set the current chainmask. 2013-02-25 22:42:43 +00:00
ar5212_beacon.c When programming the beacon timer configuration, be very explicit about 2012-11-27 02:18:41 +00:00
ar5212_eeprom.c Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5212_gpio.c 5416 and later parts mux the gpio outputs; extend the api to include 2009-02-24 00:12:16 +00:00
ar5212_interrupts.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
ar5212_keycache.c Fix the keycache behaviour for multicast keycache search. 2011-02-09 15:23:16 +00:00
ar5212_misc.c Begin adding support to explicitly set the current chainmask. 2013-02-25 22:42:43 +00:00
ar5212_phy.c o eliminate a << in calculating the tx time for turbo mode by pre-multiplying 2009-04-13 21:01:08 +00:00
ar5212_power.c Add support for the AR9285 chipset, which is found on many netbooks 2010-01-29 10:10:14 +00:00
ar5212_recv.c .. include ah_desc.h here now. 2012-11-17 02:02:36 +00:00
ar5212_reset.c After thinking about this a bit more, let's not keep statistics per-channel 2012-04-28 22:03:19 +00:00
ar5212_rfgain.c eliminate gainFCorrection; just have ar5212GetGainFCorrection return 2009-02-05 21:13:31 +00:00
ar5212_xmit.c .. include ah_desc.h here now. 2012-11-17 02:02:36 +00:00
ar5212desc.h Remove the ah_desc.h reference; it's not needed. 2012-11-17 02:00:33 +00:00
ar5212phy.h Add AR5413 radar parameters and strong signal diversity capability. 2012-08-29 03:58:13 +00:00
ar5212reg.h Port over some missing code from the ar5212 reference driver reset path. 2011-10-18 03:17:06 +00:00
ar5311reg.h Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5413.c Add PCIE power control api: 2009-02-24 01:07:06 +00:00