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