diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-04-07 15:29:13 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-04-07 15:29:13 +0000 |
commit | 69bf804b50328bc699737db57c5d38691d59780a (patch) | |
tree | ea8a3480b8652bfecee1f73168674b2f28571e3b /sys/net80211/ieee80211_rssadapt.h | |
parent | 1db184691b1abeac975b128c17b5c4997b7bcf6c (diff) | |
download | FreeBSD-src-69bf804b50328bc699737db57c5d38691d59780a.zip FreeBSD-src-69bf804b50328bc699737db57c5d38691d59780a.tar.gz |
net80211 rate control framework (net80211 ratectl).
This framework allows drivers to abstract the rate control algorithm and
just feed the framework with the usable parameters. The rate control
framework will now deal with passing the parameters to the selected
algorithm. Right now we have AMRR (the default) and RSSADAPT but there's
no way to select one with ifconfig, yet.
The objective is to have more rate control algorithms in the net80211
stack so all drivers[0] can use it. Ideally, we'll have the well-known
sample rate control algorithm in the net80211 at some point so all
drivers can use it (not just ath).
[0] all drivers that do rate control in software, that is.
Reviewed by: bschmidt, thompsa, weyongo
MFC after: 1 months
Diffstat (limited to 'sys/net80211/ieee80211_rssadapt.h')
-rw-r--r-- | sys/net80211/ieee80211_rssadapt.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sys/net80211/ieee80211_rssadapt.h b/sys/net80211/ieee80211_rssadapt.h index b454f43..ee1d2d9 100644 --- a/sys/net80211/ieee80211_rssadapt.h +++ b/sys/net80211/ieee80211_rssadapt.h @@ -43,7 +43,7 @@ #define IEEE80211_RSSADAPT_BKTPOWER 3 /* 2**_BKTPOWER */ struct ieee80211_rssadapt { - struct ieee80211vap *vap; + const struct ieee80211vap *vap; int interval; /* update interval (ticks) */ }; @@ -66,36 +66,6 @@ struct ieee80211_rssadapt_node { [IEEE80211_RATE_SIZE]; }; -void ieee80211_rssadapt_init(struct ieee80211_rssadapt *, - struct ieee80211vap *, int); -void ieee80211_rssadapt_cleanup(struct ieee80211_rssadapt *); -void ieee80211_rssadapt_setinterval(struct ieee80211_rssadapt *, int); -void ieee80211_rssadapt_node_init(struct ieee80211_rssadapt *, - struct ieee80211_rssadapt_node *, struct ieee80211_node *); -int ieee80211_rssadapt_choose(struct ieee80211_node *, - struct ieee80211_rssadapt_node *, u_int); - -/* NB: these are public only for the inline below */ -void ieee80211_rssadapt_raise_rate(struct ieee80211_rssadapt_node *, - int pktlen, int rssi); -void ieee80211_rssadapt_lower_rate(struct ieee80211_rssadapt_node *, - int pktlen, int rssi); - #define IEEE80211_RSSADAPT_SUCCESS 1 #define IEEE80211_RSSADAPT_FAILURE 0 - -static __inline void -ieee80211_rssadapt_tx_complete(struct ieee80211_rssadapt_node *ra, - int success, int pktlen, int rssi) -{ - if (success) { - ra->ra_nok++; - if ((ra->ra_rix + 1) < ra->ra_rates.rs_nrates && - (ticks - ra->ra_last_raise) >= ra->ra_raise_interval) - ieee80211_rssadapt_raise_rate(ra, pktlen, rssi); - } else { - ra->ra_nfail++; - ieee80211_rssadapt_lower_rate(ra, pktlen, rssi); - } -} #endif /* _NET80211_IEEE80211_RSSADAPT_H_ */ |