1 /* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */
2 /* $NetBSD: ieee80211_amrr.h,v 1.1 2006/10/31 21:53:41 joerg Exp $ */
5 * Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
10 * Damien Bergamini <damien.bergamini@free.fr>
12 * Permission to use, copy, modify, and distribute this software for any
13 * purpose with or without fee is hereby granted, provided that the above
14 * copyright notice and this permission notice appear in all copies.
16 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 #ifndef _NET80211_AMRR_H_
25 #define _NET80211_AMRR_H_
28 * Naive implementation of the Adaptive Multi Rate Retry algorithm:
30 * "IEEE 802.11 Rate Adaptation: A Practical Approach"
31 * Mathieu Lacage, Hossein Manshaei, Thierry Turletti
32 * INRIA Sophia - Projet Planete
33 * http://www-sop.inria.fr/rapports/sophia/RR-5208.html
40 struct ieee80211_node
;
43 * Rate control settings.
45 struct ieee80211_amrr
{
46 uint_t amrr_min_success_threshold
;
47 uint_t amrr_max_success_threshold
;
50 #define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 1
51 #define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 15
54 * Rate control state for a given node.
56 struct ieee80211_amrr_node
{
59 uint_t amn_success_threshold
;
64 void ieee80211_amrr_node_init(struct ieee80211_amrr
*,
65 struct ieee80211_amrr_node
*);
66 void ieee80211_amrr_choose(struct ieee80211_amrr
*, struct ieee80211_node
*,
67 struct ieee80211_amrr_node
*);
73 #endif /* _NET80211_AMRR_H_ */