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