Home | History | Annotate | Line # | Download | only in net80211
ieee80211_amrr.h revision 1.1.148.1
      1  1.1.148.1   phil /* $FreeBSD$ */
      2        1.1  joerg /*	$OpenBSD: ieee80211_amrr.h,v 1.3 2006/06/17 19:34:31 damien Exp $	*/
      3        1.1  joerg 
      4        1.1  joerg /*-
      5        1.1  joerg  * Copyright (c) 2006
      6        1.1  joerg  *	Damien Bergamini <damien.bergamini (at) free.fr>
      7        1.1  joerg  *
      8        1.1  joerg  * Permission to use, copy, modify, and distribute this software for any
      9        1.1  joerg  * purpose with or without fee is hereby granted, provided that the above
     10        1.1  joerg  * copyright notice and this permission notice appear in all copies.
     11        1.1  joerg  *
     12        1.1  joerg  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     13        1.1  joerg  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     14        1.1  joerg  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     15        1.1  joerg  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     16        1.1  joerg  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     17        1.1  joerg  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     18        1.1  joerg  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     19        1.1  joerg  */
     20        1.1  joerg #ifndef _NET80211_IEEE80211_AMRR_H_
     21        1.1  joerg #define _NET80211_IEEE80211_AMRR_H_
     22        1.1  joerg 
     23        1.1  joerg /*-
     24        1.1  joerg  * Naive implementation of the Adaptive Multi Rate Retry algorithm:
     25        1.1  joerg  *
     26        1.1  joerg  * "IEEE 802.11 Rate Adaptation: A Practical Approach"
     27        1.1  joerg  *  Mathieu Lacage, Hossein Manshaei, Thierry Turletti
     28        1.1  joerg  *  INRIA Sophia - Projet Planete
     29        1.1  joerg  *  http://www-sop.inria.fr/rapports/sophia/RR-5208.html
     30        1.1  joerg  */
     31        1.1  joerg 
     32        1.1  joerg /*
     33        1.1  joerg  * Rate control settings.
     34        1.1  joerg  */
     35  1.1.148.1   phil struct ieee80211vap;
     36  1.1.148.1   phil 
     37        1.1  joerg struct ieee80211_amrr {
     38        1.1  joerg 	u_int	amrr_min_success_threshold;
     39        1.1  joerg 	u_int	amrr_max_success_threshold;
     40  1.1.148.1   phil 	int	amrr_interval;		/* update interval (ticks) */
     41        1.1  joerg };
     42        1.1  joerg 
     43        1.1  joerg #define IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD	 1
     44        1.1  joerg #define IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD	15
     45        1.1  joerg 
     46        1.1  joerg /*
     47        1.1  joerg  * Rate control state for a given node.
     48        1.1  joerg  */
     49        1.1  joerg struct ieee80211_amrr_node {
     50  1.1.148.1   phil 	struct ieee80211_amrr *amn_amrr;/* backpointer */
     51  1.1.148.1   phil 	int	amn_rix;		/* current rate index */
     52  1.1.148.1   phil 	int	amn_ticks;		/* time of last update */
     53  1.1.148.1   phil 	/* statistics */
     54  1.1.148.1   phil 	u_int	amn_txcnt;
     55        1.1  joerg 	u_int	amn_success;
     56        1.1  joerg 	u_int	amn_success_threshold;
     57  1.1.148.1   phil 	u_int	amn_recovery;
     58        1.1  joerg 	u_int	amn_retrycnt;
     59        1.1  joerg };
     60        1.1  joerg 
     61        1.1  joerg #endif /* _NET80211_IEEE80211_AMRR_H_ */
     62