Rate Control with ath(4)

| Driver | HAL | Supported Hardware | 802.11n support | Debugging |

The Atheros 11abgn PCI/PCIe devices rely on the host CPU to do packet scheduling and this includes choosing a suitable TX rate to use for any given node.

Historically the net80211 wifi stack would rely on the driver to choose the transmission rates and related information - this would be typically done in the firmware running on the NIC. For ath(4) cards however this was done in the driver. This was traditionally known as ath_rate(4).

There are three rate control modules in ath(4):

Please read the information pages for each of the rate control modules for further information.

Rate control API

The API is simplistic enough. Take a look at http://svnweb.freebsd.org/base/head/sys/dev/ath/if_athrate.h .

The rate control API has changed a little in 9.0/10.0-HEAD in order to support 802.11n TX (aggregation or otherwise).

The rate control code needs to be taught about the behaviour of MCS rates. ath_rate_sample is the only rate control module supported for 802.11n TX.

The existing method only works well for non-aggregate frames as it would be called each for a rate lookup AND a single frame completion. With 802.11n aggregation, a single rate lookup will be performed for an aggregate which will consist of multiple frames. However, it would be very inefficient to call the completion routine for each sub-frame in the aggregate. So instead, the API now includes two parameters - nframes and nbad. This represents the number of frames in the aggregate and the number of failures. The rate control code can then use this when calculating packet error rates and such.

TBD: rate series stuff

Where to go from here


Further Reading

Future work - papers



dev/ath_rate(4) (last edited 2012-09-18 17:01:07 by AdrianChadd)