diff options
author | bschmidt <bschmidt@FreeBSD.org> | 2010-10-19 18:49:26 +0000 |
---|---|---|
committer | bschmidt <bschmidt@FreeBSD.org> | 2010-10-19 18:49:26 +0000 |
commit | 3160add3b2a4a0adc16e0eac909f3a8395bc1e3c (patch) | |
tree | 33f777815db8c2eb73f826a9b1aaacb61bf26baa /sys/net80211/ieee80211_ratectl.h | |
parent | 3a7013e945403bf38121c6383653847e7109746f (diff) | |
download | FreeBSD-src-3160add3b2a4a0adc16e0eac909f3a8395bc1e3c.zip FreeBSD-src-3160add3b2a4a0adc16e0eac909f3a8395bc1e3c.tar.gz |
Fix an undefined behaviour if the desired ratectl algo is not available.
This can happen if the algos are built as modules but are not loaded. If
the selected ratectl algo is not available, try to load it (The load
module functions does nothing currently). Add a dummy ratectl algo which
always selects the first available rate. Use that one if the desired algo
is not available.
MFC after: 1 week
Diffstat (limited to 'sys/net80211/ieee80211_ratectl.h')
-rw-r--r-- | sys/net80211/ieee80211_ratectl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_ratectl.h b/sys/net80211/ieee80211_ratectl.h index 73b4f32..87b2698 100644 --- a/sys/net80211/ieee80211_ratectl.h +++ b/sys/net80211/ieee80211_ratectl.h @@ -26,10 +26,11 @@ */ enum ieee80211_ratealgs { - IEEE80211_RATECTL_AMRR = 0, + IEEE80211_RATECTL_AMRR = 0, IEEE80211_RATECTL_RSSADAPT = 1, IEEE80211_RATECTL_ONOE = 2, IEEE80211_RATECTL_SAMPLE = 3, + IEEE80211_RATECTL_NONE = 4, IEEE80211_RATECTL_MAX }; |