xref: /freebsd/sys/dev/iwm/if_iwm_constants.h (revision e7065dd1e84d0501b041f130773b391cfc491bad)
108e1076cSAdrian Chadd /*-
208e1076cSAdrian Chadd  * Based on BSD-licensed source modules in the Linux iwlwifi driver,
308e1076cSAdrian Chadd  * which were used as the reference documentation for this implementation.
408e1076cSAdrian Chadd  *
508e1076cSAdrian Chadd  ******************************************************************************
608e1076cSAdrian Chadd  *
708e1076cSAdrian Chadd  * This file is provided under a dual BSD/GPLv2 license.  When using or
808e1076cSAdrian Chadd  * redistributing this file, you may do so under either license.
908e1076cSAdrian Chadd  *
1008e1076cSAdrian Chadd  * GPL LICENSE SUMMARY
1108e1076cSAdrian Chadd  *
1208e1076cSAdrian Chadd  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
1308e1076cSAdrian Chadd  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
1408e1076cSAdrian Chadd  * Copyright(c) 2015        Intel Deutschland GmbH
1508e1076cSAdrian Chadd  *
1608e1076cSAdrian Chadd  * This program is free software; you can redistribute it and/or modify
1708e1076cSAdrian Chadd  * it under the terms of version 2 of the GNU General Public License as
1808e1076cSAdrian Chadd  * published by the Free Software Foundation.
1908e1076cSAdrian Chadd  *
2008e1076cSAdrian Chadd  * This program is distributed in the hope that it will be useful, but
2108e1076cSAdrian Chadd  * WITHOUT ANY WARRANTY; without even the implied warranty of
2208e1076cSAdrian Chadd  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2308e1076cSAdrian Chadd  * General Public License for more details.
2408e1076cSAdrian Chadd  *
2508e1076cSAdrian Chadd  * You should have received a copy of the GNU General Public License
2608e1076cSAdrian Chadd  * along with this program; if not, write to the Free Software
2708e1076cSAdrian Chadd  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
2808e1076cSAdrian Chadd  * USA
2908e1076cSAdrian Chadd  *
3008e1076cSAdrian Chadd  * The full GNU General Public License is included in this distribution
3108e1076cSAdrian Chadd  * in the file called COPYING.
3208e1076cSAdrian Chadd  *
3308e1076cSAdrian Chadd  * Contact Information:
3408e1076cSAdrian Chadd  *  Intel Linux Wireless <linuxwifi@intel.com>
3508e1076cSAdrian Chadd  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
3608e1076cSAdrian Chadd  *
3708e1076cSAdrian Chadd  * BSD LICENSE
3808e1076cSAdrian Chadd  *
3908e1076cSAdrian Chadd  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
4008e1076cSAdrian Chadd  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
4108e1076cSAdrian Chadd  * Copyright(c) 2015        Intel Deutschland GmbH
4208e1076cSAdrian Chadd  * All rights reserved.
4308e1076cSAdrian Chadd  *
4408e1076cSAdrian Chadd  * Redistribution and use in source and binary forms, with or without
4508e1076cSAdrian Chadd  * modification, are permitted provided that the following conditions
4608e1076cSAdrian Chadd  * are met:
4708e1076cSAdrian Chadd  *
4808e1076cSAdrian Chadd  *  * Redistributions of source code must retain the above copyright
4908e1076cSAdrian Chadd  *    notice, this list of conditions and the following disclaimer.
5008e1076cSAdrian Chadd  *  * Redistributions in binary form must reproduce the above copyright
5108e1076cSAdrian Chadd  *    notice, this list of conditions and the following disclaimer in
5208e1076cSAdrian Chadd  *    the documentation and/or other materials provided with the
5308e1076cSAdrian Chadd  *    distribution.
5408e1076cSAdrian Chadd  *  * Neither the name Intel Corporation nor the names of its
5508e1076cSAdrian Chadd  *    contributors may be used to endorse or promote products derived
5608e1076cSAdrian Chadd  *    from this software without specific prior written permission.
5708e1076cSAdrian Chadd  *
5808e1076cSAdrian Chadd  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5908e1076cSAdrian Chadd  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6008e1076cSAdrian Chadd  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6108e1076cSAdrian Chadd  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
6208e1076cSAdrian Chadd  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6308e1076cSAdrian Chadd  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
6408e1076cSAdrian Chadd  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
6508e1076cSAdrian Chadd  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
6608e1076cSAdrian Chadd  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6708e1076cSAdrian Chadd  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6808e1076cSAdrian Chadd  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6908e1076cSAdrian Chadd  *
7008e1076cSAdrian Chadd  *****************************************************************************/
7108e1076cSAdrian Chadd 
7208e1076cSAdrian Chadd /* $FreeBSD$ */
7308e1076cSAdrian Chadd 
7408e1076cSAdrian Chadd #ifndef __IF_IWM_CONSTANTS_H
7508e1076cSAdrian Chadd #define __IF_IWM_CONSTANTS_H
7608e1076cSAdrian Chadd 
7708e1076cSAdrian Chadd /* <netproto/802_11/ieee80211_var.h> */
7808e1076cSAdrian Chadd 
79*e7065dd1SMark Johnston #define IWM_DEFAULT_PS_TX_DATA_TIMEOUT	(100 * 1000)
80*e7065dd1SMark Johnston #define IWM_DEFAULT_PS_RX_DATA_TIMEOUT	(100 * 1000)
81*e7065dd1SMark Johnston #define IWM_WOWLAN_PS_TX_DATA_TIMEOUT	(10 * 1000)
82*e7065dd1SMark Johnston #define IWM_WOWLAN_PS_RX_DATA_TIMEOUT	(10 * 1000)
83*e7065dd1SMark Johnston #define IWM_SHORT_PS_TX_DATA_TIMEOUT	(2 * 1024) /* defined in TU */
84*e7065dd1SMark Johnston #define IWM_SHORT_PS_RX_DATA_TIMEOUT	(40 * 1024) /* defined in TU */
85*e7065dd1SMark Johnston #define IWM_P2P_LOWLATENCY_PS_ENABLE	0
86*e7065dd1SMark Johnston #define IWM_UAPSD_RX_DATA_TIMEOUT		(50 * 1000)
87*e7065dd1SMark Johnston #define IWM_UAPSD_TX_DATA_TIMEOUT		(50 * 1000)
8808e1076cSAdrian Chadd #ifdef notyet
8908e1076cSAdrian Chadd /* XXX Find corresponding values from net80211 */
90*e7065dd1SMark Johnston #define IWM_UAPSD_QUEUES		(IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\
9108e1076cSAdrian Chadd 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\
9208e1076cSAdrian Chadd 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\
9308e1076cSAdrian Chadd 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BE)
9408e1076cSAdrian Chadd #endif
95*e7065dd1SMark Johnston #define IWM_PS_HEAVY_TX_THLD_PACKETS	20
96*e7065dd1SMark Johnston #define IWM_PS_HEAVY_RX_THLD_PACKETS	8
97*e7065dd1SMark Johnston #define IWM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS	30
98*e7065dd1SMark Johnston #define IWM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS	20
99*e7065dd1SMark Johnston #define IWM_PS_HEAVY_TX_THLD_PERCENT	50
100*e7065dd1SMark Johnston #define IWM_PS_HEAVY_RX_THLD_PERCENT	50
101*e7065dd1SMark Johnston #define IWM_PS_SNOOZE_INTERVAL		25
102*e7065dd1SMark Johnston #define IWM_PS_SNOOZE_WINDOW		50
103*e7065dd1SMark Johnston #define IWM_WOWLAN_PS_SNOOZE_WINDOW		25
104*e7065dd1SMark Johnston #define IWM_LOWLAT_QUOTA_MIN_PERCENT	64
105*e7065dd1SMark Johnston #define IWM_BT_COEX_EN_RED_TXP_THRESH	62
106*e7065dd1SMark Johnston #define IWM_BT_COEX_DIS_RED_TXP_THRESH	65
107*e7065dd1SMark Johnston #define IWM_BT_COEX_SYNC2SCO		1
108*e7065dd1SMark Johnston #define IWM_BT_COEX_CORUNNING		0
109*e7065dd1SMark Johnston #define IWM_BT_COEX_MPLUT			1
110*e7065dd1SMark Johnston #define IWM_BT_COEX_RRC			1
111*e7065dd1SMark Johnston #define IWM_BT_COEX_TTC			1
112*e7065dd1SMark Johnston #define IWM_BT_COEX_MPLUT_REG0		0x22002200
113*e7065dd1SMark Johnston #define IWM_BT_COEX_MPLUT_REG1		0x11118451
114*e7065dd1SMark Johnston #define IWM_BT_COEX_ANTENNA_COUPLING_THRS	30
115*e7065dd1SMark Johnston #define IWM_FW_MCAST_FILTER_PASS_ALL	0
116*e7065dd1SMark Johnston #define IWM_FW_BCAST_FILTER_PASS_ALL	0
117*e7065dd1SMark Johnston #define IWM_QUOTA_THRESHOLD			4
118*e7065dd1SMark Johnston #define IWM_RS_RSSI_BASED_INIT_RATE         0
119*e7065dd1SMark Johnston #define IWM_RS_80_20_FAR_RANGE_TWEAK	1
120*e7065dd1SMark Johnston #define IWM_TOF_IS_RESPONDER		0
121*e7065dd1SMark Johnston #define IWM_SW_TX_CSUM_OFFLOAD		0
122*e7065dd1SMark Johnston #define IWM_HW_CSUM_DISABLE			0
123*e7065dd1SMark Johnston #define IWM_COLLECT_FW_ERR_DUMP		1
124*e7065dd1SMark Johnston #define IWM_RS_NUM_TRY_BEFORE_ANT_TOGGLE    1
125*e7065dd1SMark Johnston #define IWM_RS_HT_VHT_RETRIES_PER_RATE      2
126*e7065dd1SMark Johnston #define IWM_RS_HT_VHT_RETRIES_PER_RATE_TW   1
127*e7065dd1SMark Johnston #define IWM_RS_INITIAL_MIMO_NUM_RATES       3
128*e7065dd1SMark Johnston #define IWM_RS_INITIAL_SISO_NUM_RATES       3
129*e7065dd1SMark Johnston #define IWM_RS_INITIAL_LEGACY_NUM_RATES     2
130*e7065dd1SMark Johnston #define IWM_RS_INITIAL_LEGACY_RETRIES       2
131*e7065dd1SMark Johnston #define IWM_RS_SECONDARY_LEGACY_RETRIES	1
132*e7065dd1SMark Johnston #define IWM_RS_SECONDARY_LEGACY_NUM_RATES   16
133*e7065dd1SMark Johnston #define IWM_RS_SECONDARY_SISO_NUM_RATES     3
134*e7065dd1SMark Johnston #define IWM_RS_SECONDARY_SISO_RETRIES       1
135*e7065dd1SMark Johnston #define IWM_RS_RATE_MIN_FAILURE_TH		3
136*e7065dd1SMark Johnston #define IWM_RS_RATE_MIN_SUCCESS_TH		8
137*e7065dd1SMark Johnston #define IWM_RS_STAY_IN_COLUMN_TIMEOUT	5	/* Seconds */
138*e7065dd1SMark Johnston #define IWM_RS_IDLE_TIMEOUT			5	/* Seconds */
139*e7065dd1SMark Johnston #define IWM_RS_MISSED_RATE_MAX		15
140*e7065dd1SMark Johnston #define IWM_RS_LEGACY_FAILURE_LIMIT		160
141*e7065dd1SMark Johnston #define IWM_RS_LEGACY_SUCCESS_LIMIT		480
142*e7065dd1SMark Johnston #define IWM_RS_LEGACY_TABLE_COUNT		160
143*e7065dd1SMark Johnston #define IWM_RS_NON_LEGACY_FAILURE_LIMIT	400
144*e7065dd1SMark Johnston #define IWM_RS_NON_LEGACY_SUCCESS_LIMIT	4500
145*e7065dd1SMark Johnston #define IWM_RS_NON_LEGACY_TABLE_COUNT	1500
146*e7065dd1SMark Johnston #define IWM_RS_SR_FORCE_DECREASE		15	/* percent */
147*e7065dd1SMark Johnston #define IWM_RS_SR_NO_DECREASE		85	/* percent */
148*e7065dd1SMark Johnston #define IWM_RS_AGG_TIME_LIMIT	        4000    /* 4 msecs. valid 100-8000 */
149*e7065dd1SMark Johnston #define IWM_RS_AGG_DISABLE_START	        3
150*e7065dd1SMark Johnston #define IWM_RS_TPC_SR_FORCE_INCREASE	75	/* percent */
151*e7065dd1SMark Johnston #define IWM_RS_TPC_SR_NO_INCREASE		85	/* percent */
152*e7065dd1SMark Johnston #define IWM_RS_TPC_TX_POWER_STEP		3
15308e1076cSAdrian Chadd 
15408e1076cSAdrian Chadd #endif /* __IF_IWM_CONSTANTS_H */
155