Antenna Diversity on the AR9285

The AR9285/AR9485 support a combination of classic antenna diversity and LNA diversity.

Registers involved

If AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV is on, but AR_PHY_9285_ANT_DIV_CTL is not, then only classic external antenna switch diversity is used. If they are both on, LNA diversity is used.

Switch Table

The AR9285 has two switch table fields - one for the common table, one for the radio chain. There's only one radio chain though. Their defaults come from the EEPROM.

By default - if there's no external antenna switch - both tables are programmed with 0x0.

However, if there's an external antenna switch (eg for TX diversity, or for bluetooth coexistence) the antenna switch is going to need to be programmed with some values to drive the antenna switch appropriately.

The Switch Table and Bluetooth

In order to drive the antenna correctly, there needs to be an antenna switch sitting between the AR9285, the AR3011 bluetooth device and the external antenna. The switch is controlled by the MAC rather than by the bluetooth device, so correctly coexistence AND operation is required.

The AR3011 signals the MAC (via the 3-wire coexistence interface) that a Bluetooth transmission is about to occur and the AR9285 MAC decides whether to select the bluetooth antenna entry in the switch table or the 802.11 side.

The WB195 NIC doesn't store the bluetooth coexistence switch table values in EEPROM - those are all 0x0. So to use bluetooth, one needs to program the antenna switch registers appropriately. This is done via some hard-coded constants in ath_hal/ar9002/ar9285_btcoex.c:ar9285BTCoexAntennaDiversity().

Getting information about the settings used when receiving a frame

Since there's only two antennas on these devices, the third RSSI entry in the RX completion descriptor is re-used as an antenna and LNA configuration report.

So, instead of Primary channel RSSI for chain 2, this is what is reported:


LNA config used to receive frame (0->"Main" or 1->"Alternate")


ext diversity antenna used to receive frame (0->ant1 or 1->ant2)


LNA config used to receive frame


LNA config used for "Main"


LNA config used for "Alternate"

And instead of Extension channel RSSI for chain 2, this is what is reported:


0, not used


Fast diversity measurement executed on this frame? (0->no or 1->yes)


output of BB switchtables: sw_0[1:0]


output of BB switchtables: sw_com[3:0]

Getting run-time statistics

The ath(4) driver maps the RX LNA configuration used to the legacy "receive antenna" statistic. You can see this by compiling/running athstats.


What isn't yet described

dev/ath_hal(4)/AntennaDiversityAR9285 (last edited 2013-06-12T00:59:02+0000 by AdrianChadd)