Background

In order to understand what's going on, it's good to quickly (re) visit what is actually going on with the idea of antenna diversity.

In the beginning there was no antenna diversity. You just had one shared antenna. Due to the physical properties of electromagnetic radiation - the wavelength being quite large at 2GHz (a few inches), time-delayed reflections off of different surfaces and how they can add up constructively and destructively, etc - the received signal isn't going to be very "clean."

The three important factors here:

Diversity Types

There's a few different diversity implementations out there.

One radio, multiple antennas - spatial diversity

Given this behaviour, you may wish to have multiple receive and/or transmit antennas.

You're hedging your bets that at least one of the transmit and/or receive antennas will be better positioned than the others and give you a "better" signal. There's one radio and multiple antennas, so you end up implementing this as a set of antennas with a switch to choose which one to use. For 802.11 and one radio, the only real time you get to choose is at the beginning of a frame, during the training/preamble section.

So you can think of this kind of physical spatial diversity as an attempt to maximise some kind of function (call it say, signal strength) by selecting alternate antenna configurations until you find one that works.

Multiple radios, combining radio signals

Then some smart folks came along and realised that if you knew what your signal was going to look like, you could try to pick out the different copies of them coming into different antennas, offset them in the time domain and then add them together. If done correctly, you'll have all the signals line up in the time domain and add correctly.

Here, all of the antennas are receiving at the same time.

Multiple radios, transmitting different parts of signals

Then there's the case of trying to improve things at the transmitter side. You could just transmit the same signal out all three antennas simultaneously. What you end up with is a slightly space-offset copy / copies of the same signal reflecting off different surfaces at different times.

There's various variations on this theme (eg STBC - space time block coding) which maps a single stream into two separate radio transmissions, in the hope that they combine in a more useful fashion at the receiver.

MIMO

MIMO transmits multiple spatial streams to a receiver. It's interesting from a diversity perspective because what you end up with is multiple separate transmitted streams (one per antenna, or each multiplexed over all the antennas) but each antenna receives all of the transmitted streams. The receiver then does receive combining to figure out how to mix the signals together in order to do so in a helpful, constructive fashion.

Receiver LNA mixing

The AR9285/AR9485 implements a different take on receive diversity. It's a single radio chip (so no MIMO, no ratio combining, etc.) but there's still a benefit from implementing receive diversity. Instead of simply implementing an antenna switch, the receiver has two low noise amplifiers (LNAs) with a configurable signal mixer. This mixes the signals in four ways - LNA1 only, LNA2 only, LNA1+LNA2, LNA1-LNA2. LNA1 and LNA2 only provide the classic style antenna spatial diversity. The other two provide some basic signal mixing without doing any complicated signal processing.

Sector / Phased-Array Antennas

Another interesting take on antenna diversity is using multi-element, phased-array antennas. Here, a large number of small elements make up a reconfigurable antenna, which allows you to control what the antenna can transmit/receive. It can vary from being a general, omni-directional antenna to a very specifically focused beam.

The trick here is figuring out which particular antenna configurations are optimal when transmitting to a given node. In the Atheros wifi case, the MAC allows the transmit antenna configuration to be set for each transmitted frame, so this kind of work can be done in software (typically as part of rate control.)

dev/ath_hal(4)/AntennaDiversityOverview (last edited 2013-06-10T20:16:48+0000 by AdrianChadd)