Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/net80211/ieee80211_amrr.h
39475 views
1
/* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */
2
3
/*-
4
* Copyright (c) 2006
5
* Damien Bergamini <[email protected]>
6
*
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.
10
*
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.
18
*/
19
#ifndef _NET80211_IEEE80211_AMRR_H_
20
#define _NET80211_IEEE80211_AMRR_H_
21
22
/*-
23
* Naive implementation of the Adaptive Multi Rate Retry algorithm:
24
*
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
29
*/
30
31
/*
32
* Rate control settings.
33
*/
34
struct ieee80211vap;
35
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) */
40
};
41
42
#define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 1
43
#define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 15
44
45
/*
46
* Rate control state for a given node.
47
*/
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 */
52
/* for VHT, since there's no VHT RIX right now */
53
int amn_vht_mcs;
54
int amn_vht_nss;
55
56
/* statistics */
57
u_int amn_txcnt;
58
u_int amn_success;
59
u_int amn_success_threshold;
60
u_int amn_recovery;
61
u_int amn_retrycnt;
62
};
63
64
#endif /* _NET80211_IEEE80211_AMRR_H_ */
65
66