xref: /dflybsd-src/sys/dev/netif/iwm/if_iwm_constants.h (revision 4cbc7cf96a5a52309aab9d8db3e0335042767af2)
1d7002a79SImre Vadász /*-
2d7002a79SImre Vadász  * Based on BSD-licensed source modules in the Linux iwlwifi driver,
3d7002a79SImre Vadász  * which were used as the reference documentation for this implementation.
4d7002a79SImre Vadász  *
5d7002a79SImre Vadász  ******************************************************************************
6d7002a79SImre Vadász  *
7d7002a79SImre Vadász  * This file is provided under a dual BSD/GPLv2 license.  When using or
8d7002a79SImre Vadász  * redistributing this file, you may do so under either license.
9d7002a79SImre Vadász  *
10d7002a79SImre Vadász  * GPL LICENSE SUMMARY
11d7002a79SImre Vadász  *
12d7002a79SImre Vadász  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
13d7002a79SImre Vadász  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
14d7002a79SImre Vadász  * Copyright(c) 2015        Intel Deutschland GmbH
15d7002a79SImre Vadász  *
16d7002a79SImre Vadász  * This program is free software; you can redistribute it and/or modify
17d7002a79SImre Vadász  * it under the terms of version 2 of the GNU General Public License as
18d7002a79SImre Vadász  * published by the Free Software Foundation.
19d7002a79SImre Vadász  *
20d7002a79SImre Vadász  * This program is distributed in the hope that it will be useful, but
21d7002a79SImre Vadász  * WITHOUT ANY WARRANTY; without even the implied warranty of
22d7002a79SImre Vadász  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23d7002a79SImre Vadász  * General Public License for more details.
24d7002a79SImre Vadász  *
25d7002a79SImre Vadász  * You should have received a copy of the GNU General Public License
26d7002a79SImre Vadász  * along with this program; if not, write to the Free Software
27d7002a79SImre Vadász  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
28d7002a79SImre Vadász  * USA
29d7002a79SImre Vadász  *
30d7002a79SImre Vadász  * The full GNU General Public License is included in this distribution
31d7002a79SImre Vadász  * in the file called COPYING.
32d7002a79SImre Vadász  *
33d7002a79SImre Vadász  * Contact Information:
34d7002a79SImre Vadász  *  Intel Linux Wireless <linuxwifi@intel.com>
35d7002a79SImre Vadász  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
36d7002a79SImre Vadász  *
37d7002a79SImre Vadász  * BSD LICENSE
38d7002a79SImre Vadász  *
39d7002a79SImre Vadász  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
40d7002a79SImre Vadász  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
41d7002a79SImre Vadász  * Copyright(c) 2015        Intel Deutschland GmbH
42d7002a79SImre Vadász  * All rights reserved.
43d7002a79SImre Vadász  *
44d7002a79SImre Vadász  * Redistribution and use in source and binary forms, with or without
45d7002a79SImre Vadász  * modification, are permitted provided that the following conditions
46d7002a79SImre Vadász  * are met:
47d7002a79SImre Vadász  *
48d7002a79SImre Vadász  *  * Redistributions of source code must retain the above copyright
49d7002a79SImre Vadász  *    notice, this list of conditions and the following disclaimer.
50d7002a79SImre Vadász  *  * Redistributions in binary form must reproduce the above copyright
51d7002a79SImre Vadász  *    notice, this list of conditions and the following disclaimer in
52d7002a79SImre Vadász  *    the documentation and/or other materials provided with the
53d7002a79SImre Vadász  *    distribution.
54d7002a79SImre Vadász  *  * Neither the name Intel Corporation nor the names of its
55d7002a79SImre Vadász  *    contributors may be used to endorse or promote products derived
56d7002a79SImre Vadász  *    from this software without specific prior written permission.
57d7002a79SImre Vadász  *
58d7002a79SImre Vadász  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
59d7002a79SImre Vadász  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
60d7002a79SImre Vadász  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
61d7002a79SImre Vadász  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
62d7002a79SImre Vadász  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
63d7002a79SImre Vadász  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
64d7002a79SImre Vadász  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
65d7002a79SImre Vadász  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
66d7002a79SImre Vadász  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
67d7002a79SImre Vadász  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
68d7002a79SImre Vadász  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
69d7002a79SImre Vadász  *
70d7002a79SImre Vadász  *****************************************************************************/
71*6acbba79SMatthew Dillon 
72*6acbba79SMatthew Dillon 
73d7002a79SImre Vadász #ifndef __IF_IWM_CONSTANTS_H
74d7002a79SImre Vadász #define __IF_IWM_CONSTANTS_H
75d7002a79SImre Vadász 
76d7002a79SImre Vadász /* <netproto/802_11/ieee80211_var.h> */
77d7002a79SImre Vadász 
78*6acbba79SMatthew Dillon #define IWM_DEFAULT_PS_TX_DATA_TIMEOUT	(100 * 1000)
79*6acbba79SMatthew Dillon #define IWM_DEFAULT_PS_RX_DATA_TIMEOUT	(100 * 1000)
80*6acbba79SMatthew Dillon #define IWM_WOWLAN_PS_TX_DATA_TIMEOUT	(10 * 1000)
81*6acbba79SMatthew Dillon #define IWM_WOWLAN_PS_RX_DATA_TIMEOUT	(10 * 1000)
82*6acbba79SMatthew Dillon #define IWM_SHORT_PS_TX_DATA_TIMEOUT	(2 * 1024) /* defined in TU */
83*6acbba79SMatthew Dillon #define IWM_SHORT_PS_RX_DATA_TIMEOUT	(40 * 1024) /* defined in TU */
84*6acbba79SMatthew Dillon #define IWM_P2P_LOWLATENCY_PS_ENABLE	0
85*6acbba79SMatthew Dillon #define IWM_UAPSD_RX_DATA_TIMEOUT		(50 * 1000)
86*6acbba79SMatthew Dillon #define IWM_UAPSD_TX_DATA_TIMEOUT		(50 * 1000)
87d7002a79SImre Vadász #ifdef notyet
88d7002a79SImre Vadász /* XXX Find corresponding values from net80211 */
89*6acbba79SMatthew Dillon #define IWM_UAPSD_QUEUES		(IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\
90d7002a79SImre Vadász 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\
91d7002a79SImre Vadász 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\
92d7002a79SImre Vadász 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BE)
93d7002a79SImre Vadász #endif
94*6acbba79SMatthew Dillon #define IWM_PS_HEAVY_TX_THLD_PACKETS	20
95*6acbba79SMatthew Dillon #define IWM_PS_HEAVY_RX_THLD_PACKETS	8
96*6acbba79SMatthew Dillon #define IWM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS	30
97*6acbba79SMatthew Dillon #define IWM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS	20
98*6acbba79SMatthew Dillon #define IWM_PS_HEAVY_TX_THLD_PERCENT	50
99*6acbba79SMatthew Dillon #define IWM_PS_HEAVY_RX_THLD_PERCENT	50
100*6acbba79SMatthew Dillon #define IWM_PS_SNOOZE_INTERVAL		25
101*6acbba79SMatthew Dillon #define IWM_PS_SNOOZE_WINDOW		50
102*6acbba79SMatthew Dillon #define IWM_WOWLAN_PS_SNOOZE_WINDOW		25
103*6acbba79SMatthew Dillon #define IWM_LOWLAT_QUOTA_MIN_PERCENT	64
104*6acbba79SMatthew Dillon #define IWM_BT_COEX_EN_RED_TXP_THRESH	62
105*6acbba79SMatthew Dillon #define IWM_BT_COEX_DIS_RED_TXP_THRESH	65
106*6acbba79SMatthew Dillon #define IWM_BT_COEX_SYNC2SCO		1
107*6acbba79SMatthew Dillon #define IWM_BT_COEX_CORUNNING		0
108*6acbba79SMatthew Dillon #define IWM_BT_COEX_MPLUT			1
109*6acbba79SMatthew Dillon #define IWM_BT_COEX_RRC			1
110*6acbba79SMatthew Dillon #define IWM_BT_COEX_TTC			1
111*6acbba79SMatthew Dillon #define IWM_BT_COEX_MPLUT_REG0		0x22002200
112*6acbba79SMatthew Dillon #define IWM_BT_COEX_MPLUT_REG1		0x11118451
113*6acbba79SMatthew Dillon #define IWM_BT_COEX_ANTENNA_COUPLING_THRS	30
114*6acbba79SMatthew Dillon #define IWM_FW_MCAST_FILTER_PASS_ALL	0
115*6acbba79SMatthew Dillon #define IWM_FW_BCAST_FILTER_PASS_ALL	0
116*6acbba79SMatthew Dillon #define IWM_QUOTA_THRESHOLD			4
117*6acbba79SMatthew Dillon #define IWM_RS_RSSI_BASED_INIT_RATE         0
118*6acbba79SMatthew Dillon #define IWM_RS_80_20_FAR_RANGE_TWEAK	1
119*6acbba79SMatthew Dillon #define IWM_TOF_IS_RESPONDER		0
120*6acbba79SMatthew Dillon #define IWM_SW_TX_CSUM_OFFLOAD		0
121*6acbba79SMatthew Dillon #define IWM_HW_CSUM_DISABLE			0
122*6acbba79SMatthew Dillon #define IWM_COLLECT_FW_ERR_DUMP		1
123*6acbba79SMatthew Dillon #define IWM_RS_NUM_TRY_BEFORE_ANT_TOGGLE    1
124*6acbba79SMatthew Dillon #define IWM_RS_HT_VHT_RETRIES_PER_RATE      2
125*6acbba79SMatthew Dillon #define IWM_RS_HT_VHT_RETRIES_PER_RATE_TW   1
126*6acbba79SMatthew Dillon #define IWM_RS_INITIAL_MIMO_NUM_RATES       3
127*6acbba79SMatthew Dillon #define IWM_RS_INITIAL_SISO_NUM_RATES       3
128*6acbba79SMatthew Dillon #define IWM_RS_INITIAL_LEGACY_NUM_RATES     2
129*6acbba79SMatthew Dillon #define IWM_RS_INITIAL_LEGACY_RETRIES       2
130*6acbba79SMatthew Dillon #define IWM_RS_SECONDARY_LEGACY_RETRIES	1
131*6acbba79SMatthew Dillon #define IWM_RS_SECONDARY_LEGACY_NUM_RATES   16
132*6acbba79SMatthew Dillon #define IWM_RS_SECONDARY_SISO_NUM_RATES     3
133*6acbba79SMatthew Dillon #define IWM_RS_SECONDARY_SISO_RETRIES       1
134*6acbba79SMatthew Dillon #define IWM_RS_RATE_MIN_FAILURE_TH		3
135*6acbba79SMatthew Dillon #define IWM_RS_RATE_MIN_SUCCESS_TH		8
136*6acbba79SMatthew Dillon #define IWM_RS_STAY_IN_COLUMN_TIMEOUT	5	/* Seconds */
137*6acbba79SMatthew Dillon #define IWM_RS_IDLE_TIMEOUT			5	/* Seconds */
138*6acbba79SMatthew Dillon #define IWM_RS_MISSED_RATE_MAX		15
139*6acbba79SMatthew Dillon #define IWM_RS_LEGACY_FAILURE_LIMIT		160
140*6acbba79SMatthew Dillon #define IWM_RS_LEGACY_SUCCESS_LIMIT		480
141*6acbba79SMatthew Dillon #define IWM_RS_LEGACY_TABLE_COUNT		160
142*6acbba79SMatthew Dillon #define IWM_RS_NON_LEGACY_FAILURE_LIMIT	400
143*6acbba79SMatthew Dillon #define IWM_RS_NON_LEGACY_SUCCESS_LIMIT	4500
144*6acbba79SMatthew Dillon #define IWM_RS_NON_LEGACY_TABLE_COUNT	1500
145*6acbba79SMatthew Dillon #define IWM_RS_SR_FORCE_DECREASE		15	/* percent */
146*6acbba79SMatthew Dillon #define IWM_RS_SR_NO_DECREASE		85	/* percent */
147*6acbba79SMatthew Dillon #define IWM_RS_AGG_TIME_LIMIT	        4000    /* 4 msecs. valid 100-8000 */
148*6acbba79SMatthew Dillon #define IWM_RS_AGG_DISABLE_START	        3
149*6acbba79SMatthew Dillon #define IWM_RS_TPC_SR_FORCE_INCREASE	75	/* percent */
150*6acbba79SMatthew Dillon #define IWM_RS_TPC_SR_NO_INCREASE		85	/* percent */
151*6acbba79SMatthew Dillon #define IWM_RS_TPC_TX_POWER_STEP		3
152d7002a79SImre Vadász 
153d7002a79SImre Vadász #endif /* __IF_IWM_CONSTANTS_H */
154