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):
- ath_rate_onoe -
- ath_rate_amrr
ath_rate_sample - John Bickett's sample rate control module
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 .
802.11n related changes in 9.0 / 10.0-HEAD
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
TBD
Further Reading
Minstrel rate control (Linux/Madwifi) - http://wireless.kernel.org/en/developers/Documentation/mac80211/RateControl/minstrel
Bit selection in wireless networks (Bickett, J.) - http://dspace.mit.edu/handle/1721.1/34116
Future work - papers
Robust rate adaptation for 802.11 wireless networks (2006) - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.126.7323
IEEE 802.11 Rate Adaptation: A Practical Approach - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.58.9340
Cross-Layer Wireless Bit Rate Adaptation (2009) - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.162.1207
References
TBD