1164633Ssam/* $FreeBSD: releng/10.2/sys/net80211/ieee80211_amrr.h 206358 2010-04-07 15:29:13Z rpaulo $ */ 2164633Ssam/* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */ 3164633Ssam 4164633Ssam/*- 5164633Ssam * Copyright (c) 2006 6164633Ssam * Damien Bergamini <damien.bergamini@free.fr> 7164633Ssam * 8164633Ssam * Permission to use, copy, modify, and distribute this software for any 9164633Ssam * purpose with or without fee is hereby granted, provided that the above 10164633Ssam * copyright notice and this permission notice appear in all copies. 11164633Ssam * 12164633Ssam * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13164633Ssam * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14164633Ssam * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15164633Ssam * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16164633Ssam * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17164633Ssam * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18164633Ssam * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19164633Ssam */ 20164633Ssam#ifndef _NET80211_IEEE80211_AMRR_H_ 21164633Ssam#define _NET80211_IEEE80211_AMRR_H_ 22164633Ssam 23164633Ssam/*- 24164633Ssam * Naive implementation of the Adaptive Multi Rate Retry algorithm: 25164633Ssam * 26164633Ssam * "IEEE 802.11 Rate Adaptation: A Practical Approach" 27164633Ssam * Mathieu Lacage, Hossein Manshaei, Thierry Turletti 28164633Ssam * INRIA Sophia - Projet Planete 29164633Ssam * http://www-sop.inria.fr/rapports/sophia/RR-5208.html 30164633Ssam */ 31164633Ssam 32164633Ssam/* 33164633Ssam * Rate control settings. 34164633Ssam */ 35178354Ssamstruct ieee80211vap; 36164633Ssam 37164633Ssamstruct ieee80211_amrr { 38164633Ssam u_int amrr_min_success_threshold; 39164633Ssam u_int amrr_max_success_threshold; 40178354Ssam int amrr_interval; /* update interval (ticks) */ 41164633Ssam}; 42164633Ssam 43164633Ssam#define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 1 44164633Ssam#define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 15 45164633Ssam 46164633Ssam/* 47164633Ssam * Rate control state for a given node. 48164633Ssam */ 49164633Ssamstruct ieee80211_amrr_node { 50178354Ssam struct ieee80211_amrr *amn_amrr;/* backpointer */ 51178354Ssam int amn_rix; /* current rate index */ 52178354Ssam int amn_ticks; /* time of last update */ 53178354Ssam /* statistics */ 54178354Ssam u_int amn_txcnt; 55164633Ssam u_int amn_success; 56178354Ssam u_int amn_success_threshold; 57164633Ssam u_int amn_recovery; 58164633Ssam u_int amn_retrycnt; 59164633Ssam}; 60164633Ssam 61164633Ssam#endif /* _NET80211_IEEE80211_AMRR_H_ */ 62