1*085ff963SMatthew Dillon /* $FreeBSD$ */ 263a787e0SRui Paulo /* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */ 363a787e0SRui Paulo 463a787e0SRui Paulo /*- 563a787e0SRui Paulo * Copyright (c) 2006 663a787e0SRui Paulo * Damien Bergamini <damien.bergamini@free.fr> 763a787e0SRui Paulo * 863a787e0SRui Paulo * Permission to use, copy, modify, and distribute this software for any 963a787e0SRui Paulo * purpose with or without fee is hereby granted, provided that the above 1063a787e0SRui Paulo * copyright notice and this permission notice appear in all copies. 1163a787e0SRui Paulo * 1263a787e0SRui Paulo * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1363a787e0SRui Paulo * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1463a787e0SRui Paulo * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1563a787e0SRui Paulo * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1663a787e0SRui Paulo * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1763a787e0SRui Paulo * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1863a787e0SRui Paulo * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1963a787e0SRui Paulo */ 2063a787e0SRui Paulo #ifndef _NET80211_IEEE80211_AMRR_H_ 2163a787e0SRui Paulo #define _NET80211_IEEE80211_AMRR_H_ 2263a787e0SRui Paulo 2363a787e0SRui Paulo /*- 2463a787e0SRui Paulo * Naive implementation of the Adaptive Multi Rate Retry algorithm: 2563a787e0SRui Paulo * 2663a787e0SRui Paulo * "IEEE 802.11 Rate Adaptation: A Practical Approach" 2763a787e0SRui Paulo * Mathieu Lacage, Hossein Manshaei, Thierry Turletti 2863a787e0SRui Paulo * INRIA Sophia - Projet Planete 2963a787e0SRui Paulo * http://www-sop.inria.fr/rapports/sophia/RR-5208.html 3063a787e0SRui Paulo */ 3163a787e0SRui Paulo 3263a787e0SRui Paulo /* 3363a787e0SRui Paulo * Rate control settings. 3463a787e0SRui Paulo */ 3563a787e0SRui Paulo struct ieee80211vap; 3663a787e0SRui Paulo 3763a787e0SRui Paulo struct ieee80211_amrr { 3863a787e0SRui Paulo u_int amrr_min_success_threshold; 3963a787e0SRui Paulo u_int amrr_max_success_threshold; 4063a787e0SRui Paulo int amrr_interval; /* update interval (ticks) */ 4163a787e0SRui Paulo }; 4263a787e0SRui Paulo 4363a787e0SRui Paulo #define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 1 4463a787e0SRui Paulo #define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 15 4563a787e0SRui Paulo 4663a787e0SRui Paulo /* 4763a787e0SRui Paulo * Rate control state for a given node. 4863a787e0SRui Paulo */ 4963a787e0SRui Paulo struct ieee80211_amrr_node { 5063a787e0SRui Paulo struct ieee80211_amrr *amn_amrr;/* backpointer */ 5163a787e0SRui Paulo int amn_rix; /* current rate index */ 5263a787e0SRui Paulo int amn_ticks; /* time of last update */ 5363a787e0SRui Paulo /* statistics */ 5463a787e0SRui Paulo u_int amn_txcnt; 5563a787e0SRui Paulo u_int amn_success; 5663a787e0SRui Paulo u_int amn_success_threshold; 5763a787e0SRui Paulo u_int amn_recovery; 5863a787e0SRui Paulo u_int amn_retrycnt; 5963a787e0SRui Paulo }; 6063a787e0SRui Paulo 6163a787e0SRui Paulo #endif /* _NET80211_IEEE80211_AMRR_H_ */ 62