Merge commit 'origin/vendor/PAM_PASSWDQC'
[dragonfly.git] / sys / netproto / 802_11 / wlan_ratectl / amrr / ieee80211_amrr_param.h
1 /*
2  * Copyright (c) 2004 INRIA
3  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer,
11  *    without modification.
12  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
13  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
14  *    redistribution must be conditioned upon including a substantially
15  *    similar Disclaimer requirement for further binary redistribution.
16  * 3. Neither the names of the above-listed copyright holders nor the names
17  *    of any contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * Alternatively, this software may be distributed under the terms of the
21  * GNU General Public License ("GPL") version 2 as published by the Free
22  * Software Foundation.
23  *
24  * NO WARRANTY
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
28  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
29  * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
30  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
33  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
35  * THE POSSIBILITY OF SUCH DAMAGES.
36  *
37  * $FreeBSD: src/sys/dev/ath/ath_rate/amrr/amrr.h,v 1.2 2004/12/31 22:41:45 sam Exp $
38  * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_amrr_param.h,v 1.2 2008/01/15 09:01:13 sephe Exp $
39  */
40
41 #ifndef _IEEE80211_AMRR_PARAM_H
42 #define _IEEE80211_AMRR_PARAM_H
43
44 struct ieee80211_amrr_param {
45         int     amrr_interval;  /* unit: millisecond */
46         int     amrr_max_success_threshold;
47         int     amrr_min_success_threshold;
48         int     amrr_debug;
49 };
50
51 #define IEEE80211_AMRR_INTERVAL         1000    /* 1 second */
52 #define IEEE80211_AMRR_MAX_SUCCESS_THR  10
53 #define IEEE80211_AMRR_MIN_SUCCESS_THR  1
54
55 #define IEEE80211_AMRR_PARAM_SETUP(param)       \
56 do {                                            \
57         (param)->amrr_interval =                \
58                 IEEE80211_AMRR_INTERVAL;        \
59         (param)->amrr_max_success_threshold =   \
60                 IEEE80211_AMRR_MAX_SUCCESS_THR; \
61         (param)->amrr_min_success_threshold =   \
62                 IEEE80211_AMRR_MIN_SUCCESS_THR; \
63         (param)->amrr_debug = 0;                \
64 } while (0)
65
66 #endif  /* !_IEEE80211_AMRR_PARAM_H */