1 /* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */
5 * Damien Bergamini <damien.bergamini@free.fr>
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef _NET80211_IEEE80211_AMRR_H_
20 #define _NET80211_IEEE80211_AMRR_H_
23 * Naive implementation of the Adaptive Multi Rate Retry algorithm:
25 * "IEEE 802.11 Rate Adaptation: A Practical Approach"
26 * Mathieu Lacage, Hossein Manshaei, Thierry Turletti
27 * INRIA Sophia - Projet Planete
28 * http://www-sop.inria.fr/rapports/sophia/RR-5208.html
32 * Rate control settings.
36 struct ieee80211_amrr {
37 u_int amrr_min_success_threshold;
38 u_int amrr_max_success_threshold;
39 int amrr_interval; /* update interval (ticks) */
42 #define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 1
43 #define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 15
46 * Rate control state for a given node.
48 struct ieee80211_amrr_node {
49 struct ieee80211_amrr *amn_amrr;/* backpointer */
50 int amn_rix; /* current rate index */
51 int amn_ticks; /* time of last update */
55 u_int amn_success_threshold;
60 #endif /* _NET80211_IEEE80211_AMRR_H_ */