The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/net80211/ieee80211_rssadapt.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $FreeBSD: stable/12/sys/net80211/ieee80211_rssadapt.h 326272 2017-11-27 15:23:17Z pfg $ */
    2 /* $NetBSD: ieee80211_rssadapt.h,v 1.4 2005/02/26 22:45:09 perry Exp $ */
    3 /*-
    4  * SPDX-License-Identifier: BSD-3-Clause
    5  *
    6  * Copyright (c) 2003, 2004 David Young.  All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or
    9  * without modification, are permitted provided that the following
   10  * conditions are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above
   14  *    copyright notice, this list of conditions and the following
   15  *    disclaimer in the documentation and/or other materials provided
   16  *    with the distribution.
   17  * 3. The name of David Young may not be used to endorse or promote
   18  *    products derived from this software without specific prior
   19  *    written permission.
   20  *
   21  * THIS SOFTWARE IS PROVIDED BY David Young ``AS IS'' AND ANY
   22  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
   23  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   24  * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL David
   25  * Young BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   26  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
   27  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   29  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
   32  * OF SUCH DAMAGE.
   33  */
   34 #ifndef _NET80211_IEEE80211_RSSADAPT_H_
   35 #define _NET80211_IEEE80211_RSSADAPT_H_
   36 
   37 /* Data-rate adaptation loosely based on "Link Adaptation Strategy
   38  * for IEEE 802.11 WLAN via Received Signal Strength Measurement"
   39  * by Javier del Prado Pavon and Sunghyun Choi.
   40  */
   41 
   42 /* Buckets for frames 0-128 bytes long, 129-1024, 1025-maximum. */
   43 #define IEEE80211_RSSADAPT_BKTS         3
   44 #define IEEE80211_RSSADAPT_BKT0         128
   45 #define IEEE80211_RSSADAPT_BKTPOWER     3       /* 2**_BKTPOWER */
   46 
   47 struct ieee80211_rssadapt {
   48         const struct ieee80211vap *vap;
   49         int     interval;                       /* update interval (ticks) */
   50 };
   51 
   52 struct ieee80211_rssadapt_node {
   53         struct ieee80211_rssadapt *ra_rs;       /* backpointer */
   54         struct ieee80211_rateset ra_rates;      /* negotiated rates */
   55         int     ra_rix;                         /* current rate index */
   56         int     ra_ticks;                       /* time of last update */
   57         int     ra_last_raise;                  /* time of last rate raise */
   58         int     ra_raise_interval;              /* rate raise time threshold */
   59 
   60         /* Tx failures in this update interval */
   61         uint32_t                ra_nfail;
   62         /* Tx successes in this update interval */
   63         uint32_t                ra_nok;
   64         /* exponential average packets/second */
   65         uint32_t                ra_pktrate;
   66         /* RSSI threshold for each Tx rate */
   67         uint16_t                ra_rate_thresh[IEEE80211_RSSADAPT_BKTS]
   68                                               [IEEE80211_RATE_SIZE];
   69 };
   70 
   71 #define IEEE80211_RSSADAPT_SUCCESS      1
   72 #define IEEE80211_RSSADAPT_FAILURE      0
   73 #endif /* _NET80211_IEEE80211_RSSADAPT_H_ */

Cache object: 199849b87ea1f2d2126dc514ff7989d6


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.