freebsd-dev/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
ar2317.c
ar2413.c
ar2425.c
ar5111.c
ar5112.c Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +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
ar5212_gpio.c
ar5212_interrupts.c
ar5212_keycache.c
ar5212_misc.c Begin adding support to explicitly set the current chainmask. 2013-02-25 22:42:43 +00:00
ar5212_phy.c
ar5212_power.c
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
ar5212_xmit.c .. include ah_desc.h here now. 2012-11-17 02:02:36 +00:00
ar5212.h Begin adding support to explicitly set the current chainmask. 2013-02-25 22:42:43 +00:00
ar5212.ini
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
ar5413.c