/* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */12/*-3* Copyright (c) 20064* Damien Bergamini <[email protected]>5*6* Permission to use, copy, modify, and distribute this software for any7* purpose with or without fee is hereby granted, provided that the above8* copyright notice and this permission notice appear in all copies.9*10* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES11* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF12* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR13* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES14* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN15* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF16* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.17*/18#ifndef _NET80211_IEEE80211_AMRR_H_19#define _NET80211_IEEE80211_AMRR_H_2021/*-22* Naive implementation of the Adaptive Multi Rate Retry algorithm:23*24* "IEEE 802.11 Rate Adaptation: A Practical Approach"25* Mathieu Lacage, Hossein Manshaei, Thierry Turletti26* INRIA Sophia - Projet Planete27* http://www-sop.inria.fr/rapports/sophia/RR-5208.html28*/2930/*31* Rate control settings.32*/33struct ieee80211vap;3435struct ieee80211_amrr {36u_int amrr_min_success_threshold;37u_int amrr_max_success_threshold;38int amrr_interval; /* update interval (ticks) */39};4041#define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 142#define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 154344/*45* Rate control state for a given node.46*/47struct ieee80211_amrr_node {48struct ieee80211_amrr *amn_amrr;/* backpointer */49int amn_rix; /* current rate index */50int amn_ticks; /* time of last update */51/* for VHT, since there's no VHT RIX right now */52int amn_vht_mcs;53int amn_vht_nss;5455/* statistics */56u_int amn_txcnt;57u_int amn_success;58u_int amn_success_threshold;59u_int amn_recovery;60u_int amn_retrycnt;61};6263#endif /* _NET80211_IEEE80211_AMRR_H_ */646566