Slow antenna diversity profiles on the AR5416 and later 11n NICs

Some hardware vendors wish to support more physical antennas than physical radios. This is to provide some (hopefully!) improvements in signal levels by using spatial diversity.

However, the 802.11n MIMO devices don't support the traditional antenna switch table and fast-diversity technique that the previous chips did. It relies purely on the MIMO signal processing from all the active radios.

(TODO: find the specific model D-Link PCI device that uses an AR9220 but has three antennas. It implements this!)

Implementation Details

To implement this, one or more external antenna switches are used. The AR5416 and later devices do have a switch table - one global and one extra per radio chain. These are typically used to switch in and out various components based on the operating mode and required attenuation. However, there's no absolute requirement that these bits be used for this - for example, if no external attenuation stages are needed, there's no need to use an IO bit for an attenuator. That bit can just be used as an antenna switch; one just needs to ensure that said bit is always set no matter what the current operating mode.

The pre-11n devices have two switch tables - one for each antenna. The AR5416 and later MIMO devices don't. So there's no way for the MAC or baseband to switch between multiple antenna configurations during transmit or receive (eg to implement fast receive diversity.) However, there's no real reason why the software can't actually do this. It can simply load in a different antenna switch table into the relevant registers and the hardware will use that for subsequent operations.

It's then up to software to track which antenna configuration is actually better.

The relevant registers are thus:

Now, the important bit here is that it's totally under software control - it's up to the software to track RX RSSI/EVM and TX success rates and determine which antenna configuration behaves better.

Does the FreeBSD HAL implement this?

In short - no. It wouldn't be hard to add - but one would need a NIC that requires it, and some time to expose the antenna selection method as HAL functions. It's not all that important at the moment, so no-one has added it.

What other variants are there?

There are some Mikrotik boards based on the AR9220 which have multiple external antenna connectors. They use hard-coded antenna switch table (common and per-chain) values in their closed-source driver to select the external antenna switch settings to control which antennas are used for TX and RX. Not much more is known at this point.

dev/ath_hal(4)/AntennaDiversityAR5416Slow (last edited 2013-06-11T06:58:01+0000 by AdrianChadd)