174828f25SSam Leffler /* $OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $ */ 274828f25SSam Leffler 374828f25SSam Leffler /*- 474828f25SSam Leffler * Copyright (c) 2006 574828f25SSam Leffler * Damien Bergamini <damien.bergamini@free.fr> 674828f25SSam Leffler * 774828f25SSam Leffler * Permission to use, copy, modify, and distribute this software for any 874828f25SSam Leffler * purpose with or without fee is hereby granted, provided that the above 974828f25SSam Leffler * copyright notice and this permission notice appear in all copies. 1074828f25SSam Leffler * 1174828f25SSam Leffler * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1274828f25SSam Leffler * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1374828f25SSam Leffler * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1474828f25SSam Leffler * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1574828f25SSam Leffler * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1674828f25SSam Leffler * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1774828f25SSam Leffler * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1874828f25SSam Leffler */ 1974828f25SSam Leffler #ifndef _NET80211_IEEE80211_AMRR_H_ 2074828f25SSam Leffler #define _NET80211_IEEE80211_AMRR_H_ 2174828f25SSam Leffler 2274828f25SSam Leffler /*- 2374828f25SSam Leffler * Naive implementation of the Adaptive Multi Rate Retry algorithm: 2474828f25SSam Leffler * 2574828f25SSam Leffler * "IEEE 802.11 Rate Adaptation: A Practical Approach" 2674828f25SSam Leffler * Mathieu Lacage, Hossein Manshaei, Thierry Turletti 2774828f25SSam Leffler * INRIA Sophia - Projet Planete 2874828f25SSam Leffler * http://www-sop.inria.fr/rapports/sophia/RR-5208.html 2974828f25SSam Leffler */ 3074828f25SSam Leffler 3174828f25SSam Leffler /* 3274828f25SSam Leffler * Rate control settings. 3374828f25SSam Leffler */ 34b032f27cSSam Leffler struct ieee80211vap; 3574828f25SSam Leffler 3674828f25SSam Leffler struct ieee80211_amrr { 3774828f25SSam Leffler u_int amrr_min_success_threshold; 3874828f25SSam Leffler u_int amrr_max_success_threshold; 39b032f27cSSam Leffler int amrr_interval; /* update interval (ticks) */ 4074828f25SSam Leffler }; 4174828f25SSam Leffler 4274828f25SSam Leffler #define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD 1 4374828f25SSam Leffler #define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD 15 4474828f25SSam Leffler 4574828f25SSam Leffler /* 4674828f25SSam Leffler * Rate control state for a given node. 4774828f25SSam Leffler */ 4874828f25SSam Leffler struct ieee80211_amrr_node { 49b032f27cSSam Leffler struct ieee80211_amrr *amn_amrr;/* backpointer */ 50b032f27cSSam Leffler int amn_rix; /* current rate index */ 51b032f27cSSam Leffler int amn_ticks; /* time of last update */ 52*4b2c7dfeSAdrian Chadd /* for VHT, since there's no VHT RIX right now */ 53*4b2c7dfeSAdrian Chadd int amn_vht_mcs; 54*4b2c7dfeSAdrian Chadd int amn_vht_nss; 55*4b2c7dfeSAdrian Chadd 56b032f27cSSam Leffler /* statistics */ 5774828f25SSam Leffler u_int amn_txcnt; 58b032f27cSSam Leffler u_int amn_success; 59b032f27cSSam Leffler u_int amn_success_threshold; 60b032f27cSSam Leffler u_int amn_recovery; 6174828f25SSam Leffler u_int amn_retrycnt; 6274828f25SSam Leffler }; 6374828f25SSam Leffler 6474828f25SSam Leffler #endif /* _NET80211_IEEE80211_AMRR_H_ */ 65