Wifi rate control
FreeBSD has the beginnings of a rate control API that was primarily designed for pre-11n networks. It provides a simple API for rate control management and lookups.
Overview
The main API code is in sys/net80211/ieee80211_rate.[ch] . The three implemented modules so far:
- ieee80211_none;
- ieee80211_rssadapt;
- ieee80211_amrr .
Current API
TODO
Future work
- Update the rate / tx_complete / tx_update API to take a struct with counters / statistics. This should include time taken, short (RTS/CTS) and long (ACK) retries, success/failure, later A-MPDU BAR TX success information, current RSSI, perhaps even EVM.
- Both tx_complete and tx_update should be provided by each rate control module.
Update the rate API to return the rate information as a struct, rather than the rix. Most drivers end up referencing ni->tx_rate anyway, rather than using the returned information.
- Teach the rate API more about the packet being scheduled - eg is it multicast? what's the length? Is it A-MPDU / A-MSDU?
- Figure out what to do about locking.
Limitations
- There's only two real modules.
- The API use differs between modules and drivers. This should be unified.
- amrr has some basic 11n awareness - enough for iwn to make cursory use of it. It should grow a lot more features.