xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/intel/iwlwifi/mvm/constants.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /******************************************************************************
2*4882a593Smuzhiyun  *
3*4882a593Smuzhiyun  * This file is provided under a dual BSD/GPLv2 license.  When using or
4*4882a593Smuzhiyun  * redistributing this file, you may do so under either license.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * GPL LICENSE SUMMARY
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
9*4882a593Smuzhiyun  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10*4882a593Smuzhiyun  * Copyright(c) 2015        Intel Deutschland GmbH
11*4882a593Smuzhiyun  * Copyright(c) 2018 - 2019 Intel Corporation
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * This program is free software; you can redistribute it and/or modify
14*4882a593Smuzhiyun  * it under the terms of version 2 of the GNU General Public License as
15*4882a593Smuzhiyun  * published by the Free Software Foundation.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  * This program is distributed in the hope that it will be useful, but
18*4882a593Smuzhiyun  * WITHOUT ANY WARRANTY; without even the implied warranty of
19*4882a593Smuzhiyun  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20*4882a593Smuzhiyun  * General Public License for more details.
21*4882a593Smuzhiyun  *
22*4882a593Smuzhiyun  * The full GNU General Public License is included in this distribution
23*4882a593Smuzhiyun  * in the file called COPYING.
24*4882a593Smuzhiyun  *
25*4882a593Smuzhiyun  * Contact Information:
26*4882a593Smuzhiyun  *  Intel Linux Wireless <linuxwifi@intel.com>
27*4882a593Smuzhiyun  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
28*4882a593Smuzhiyun  *
29*4882a593Smuzhiyun  * BSD LICENSE
30*4882a593Smuzhiyun  *
31*4882a593Smuzhiyun  * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
32*4882a593Smuzhiyun  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
33*4882a593Smuzhiyun  * Copyright(c) 2015        Intel Deutschland GmbH
34*4882a593Smuzhiyun  * Copyright(c) 2018 - 2019 Intel Corporation
35*4882a593Smuzhiyun  * All rights reserved.
36*4882a593Smuzhiyun  *
37*4882a593Smuzhiyun  * Redistribution and use in source and binary forms, with or without
38*4882a593Smuzhiyun  * modification, are permitted provided that the following conditions
39*4882a593Smuzhiyun  * are met:
40*4882a593Smuzhiyun  *
41*4882a593Smuzhiyun  *  * Redistributions of source code must retain the above copyright
42*4882a593Smuzhiyun  *    notice, this list of conditions and the following disclaimer.
43*4882a593Smuzhiyun  *  * Redistributions in binary form must reproduce the above copyright
44*4882a593Smuzhiyun  *    notice, this list of conditions and the following disclaimer in
45*4882a593Smuzhiyun  *    the documentation and/or other materials provided with the
46*4882a593Smuzhiyun  *    distribution.
47*4882a593Smuzhiyun  *  * Neither the name Intel Corporation nor the names of its
48*4882a593Smuzhiyun  *    contributors may be used to endorse or promote products derived
49*4882a593Smuzhiyun  *    from this software without specific prior written permission.
50*4882a593Smuzhiyun  *
51*4882a593Smuzhiyun  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
52*4882a593Smuzhiyun  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
53*4882a593Smuzhiyun  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
54*4882a593Smuzhiyun  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
55*4882a593Smuzhiyun  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
56*4882a593Smuzhiyun  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
57*4882a593Smuzhiyun  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
58*4882a593Smuzhiyun  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
59*4882a593Smuzhiyun  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
60*4882a593Smuzhiyun  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
61*4882a593Smuzhiyun  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62*4882a593Smuzhiyun  *
63*4882a593Smuzhiyun  *****************************************************************************/
64*4882a593Smuzhiyun #ifndef __MVM_CONSTANTS_H
65*4882a593Smuzhiyun #define __MVM_CONSTANTS_H
66*4882a593Smuzhiyun 
67*4882a593Smuzhiyun #include <linux/ieee80211.h>
68*4882a593Smuzhiyun #include "fw-api.h"
69*4882a593Smuzhiyun 
70*4882a593Smuzhiyun #define IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM		20
71*4882a593Smuzhiyun 
72*4882a593Smuzhiyun #define IWL_MVM_DEFAULT_PS_TX_DATA_TIMEOUT	(100 * USEC_PER_MSEC)
73*4882a593Smuzhiyun #define IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT	(100 * USEC_PER_MSEC)
74*4882a593Smuzhiyun #define IWL_MVM_WOWLAN_PS_TX_DATA_TIMEOUT	(10 * USEC_PER_MSEC)
75*4882a593Smuzhiyun #define IWL_MVM_WOWLAN_PS_RX_DATA_TIMEOUT	(10 * USEC_PER_MSEC)
76*4882a593Smuzhiyun #define IWL_MVM_SHORT_PS_TX_DATA_TIMEOUT	(2 * 1024) /* defined in TU */
77*4882a593Smuzhiyun #define IWL_MVM_SHORT_PS_RX_DATA_TIMEOUT	(40 * 1024) /* defined in TU */
78*4882a593Smuzhiyun #define IWL_MVM_P2P_LOWLATENCY_PS_ENABLE	0
79*4882a593Smuzhiyun #define IWL_MVM_UAPSD_RX_DATA_TIMEOUT		(50 * USEC_PER_MSEC)
80*4882a593Smuzhiyun #define IWL_MVM_UAPSD_TX_DATA_TIMEOUT		(50 * USEC_PER_MSEC)
81*4882a593Smuzhiyun #define IWL_MVM_UAPSD_QUEUES		(IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\
82*4882a593Smuzhiyun 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\
83*4882a593Smuzhiyun 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\
84*4882a593Smuzhiyun 					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BE)
85*4882a593Smuzhiyun #define IWL_MVM_PS_HEAVY_TX_THLD_PACKETS	20
86*4882a593Smuzhiyun #define IWL_MVM_PS_HEAVY_RX_THLD_PACKETS	8
87*4882a593Smuzhiyun #define IWL_MVM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS	30
88*4882a593Smuzhiyun #define IWL_MVM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS	20
89*4882a593Smuzhiyun #define IWL_MVM_PS_HEAVY_TX_THLD_PERCENT	50
90*4882a593Smuzhiyun #define IWL_MVM_PS_HEAVY_RX_THLD_PERCENT	50
91*4882a593Smuzhiyun #define IWL_MVM_PS_SNOOZE_INTERVAL		25
92*4882a593Smuzhiyun #define IWL_MVM_PS_SNOOZE_WINDOW		50
93*4882a593Smuzhiyun #define IWL_MVM_WOWLAN_PS_SNOOZE_WINDOW		25
94*4882a593Smuzhiyun #define IWL_MVM_LOWLAT_QUOTA_MIN_PERCENT	64
95*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_EN_RED_TXP_THRESH	62
96*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_DIS_RED_TXP_THRESH	65
97*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_SYNC2SCO		1
98*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_MPLUT			1
99*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_RRC			1
100*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_TTC			1
101*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_MPLUT_REG0		0x22002200
102*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_MPLUT_REG1		0x11118451
103*4882a593Smuzhiyun #define IWL_MVM_BT_COEX_ANTENNA_COUPLING_THRS	30
104*4882a593Smuzhiyun #define IWL_MVM_FW_MCAST_FILTER_PASS_ALL	0
105*4882a593Smuzhiyun #define IWL_MVM_FW_BCAST_FILTER_PASS_ALL	0
106*4882a593Smuzhiyun #define IWL_MVM_QUOTA_THRESHOLD			4
107*4882a593Smuzhiyun #define IWL_MVM_RS_RSSI_BASED_INIT_RATE         0
108*4882a593Smuzhiyun #define IWL_MVM_RS_80_20_FAR_RANGE_TWEAK	1
109*4882a593Smuzhiyun #define IWL_MVM_TOF_IS_RESPONDER		0
110*4882a593Smuzhiyun #define IWL_MVM_SW_TX_CSUM_OFFLOAD		0
111*4882a593Smuzhiyun #define IWL_MVM_HW_CSUM_DISABLE			0
112*4882a593Smuzhiyun #define IWL_MVM_PARSE_NVM			0
113*4882a593Smuzhiyun #define IWL_MVM_ADWELL_ENABLE			1
114*4882a593Smuzhiyun #define IWL_MVM_ADWELL_MAX_BUDGET		0
115*4882a593Smuzhiyun #define IWL_MVM_TCM_LOAD_MEDIUM_THRESH		10 /* percentage */
116*4882a593Smuzhiyun #define IWL_MVM_TCM_LOAD_HIGH_THRESH		50 /* percentage */
117*4882a593Smuzhiyun #define IWL_MVM_TCM_LOWLAT_ENABLE_THRESH	100 /* packets/10 seconds */
118*4882a593Smuzhiyun #define IWL_MVM_UAPSD_NONAGG_PERIOD		5000 /* msecs */
119*4882a593Smuzhiyun #define IWL_MVM_UAPSD_NOAGG_LIST_LEN		IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM
120*4882a593Smuzhiyun #define IWL_MVM_NON_TRANSMITTING_AP		0
121*4882a593Smuzhiyun #define IWL_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE    1
122*4882a593Smuzhiyun #define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE      2
123*4882a593Smuzhiyun #define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW   1
124*4882a593Smuzhiyun #define IWL_MVM_RS_INITIAL_MIMO_NUM_RATES       3
125*4882a593Smuzhiyun #define IWL_MVM_RS_INITIAL_SISO_NUM_RATES       3
126*4882a593Smuzhiyun #define IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES     2
127*4882a593Smuzhiyun #define IWL_MVM_RS_INITIAL_LEGACY_RETRIES       2
128*4882a593Smuzhiyun #define IWL_MVM_RS_SECONDARY_LEGACY_RETRIES	1
129*4882a593Smuzhiyun #define IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES   16
130*4882a593Smuzhiyun #define IWL_MVM_RS_SECONDARY_SISO_NUM_RATES     3
131*4882a593Smuzhiyun #define IWL_MVM_RS_SECONDARY_SISO_RETRIES       1
132*4882a593Smuzhiyun #define IWL_MVM_RS_RATE_MIN_FAILURE_TH		3
133*4882a593Smuzhiyun #define IWL_MVM_RS_RATE_MIN_SUCCESS_TH		8
134*4882a593Smuzhiyun #define IWL_MVM_RS_STAY_IN_COLUMN_TIMEOUT	5	/* Seconds */
135*4882a593Smuzhiyun #define IWL_MVM_RS_IDLE_TIMEOUT			5	/* Seconds */
136*4882a593Smuzhiyun #define IWL_MVM_RS_MISSED_RATE_MAX		15
137*4882a593Smuzhiyun #define IWL_MVM_RS_LEGACY_FAILURE_LIMIT		160
138*4882a593Smuzhiyun #define IWL_MVM_RS_LEGACY_SUCCESS_LIMIT		480
139*4882a593Smuzhiyun #define IWL_MVM_RS_LEGACY_TABLE_COUNT		160
140*4882a593Smuzhiyun #define IWL_MVM_RS_NON_LEGACY_FAILURE_LIMIT	400
141*4882a593Smuzhiyun #define IWL_MVM_RS_NON_LEGACY_SUCCESS_LIMIT	4500
142*4882a593Smuzhiyun #define IWL_MVM_RS_NON_LEGACY_TABLE_COUNT	1500
143*4882a593Smuzhiyun #define IWL_MVM_RS_SR_FORCE_DECREASE		15	/* percent */
144*4882a593Smuzhiyun #define IWL_MVM_RS_SR_NO_DECREASE		85	/* percent */
145*4882a593Smuzhiyun #define IWL_MVM_RS_AGG_TIME_LIMIT	        4000    /* 4 msecs. valid 100-8000 */
146*4882a593Smuzhiyun #define IWL_MVM_RS_AGG_DISABLE_START	        3
147*4882a593Smuzhiyun #define IWL_MVM_RS_AGG_START_THRESHOLD	        10	/* num frames per second */
148*4882a593Smuzhiyun #define IWL_MVM_RS_TPC_SR_FORCE_INCREASE	75	/* percent */
149*4882a593Smuzhiyun #define IWL_MVM_RS_TPC_SR_NO_INCREASE		85	/* percent */
150*4882a593Smuzhiyun #define IWL_MVM_RS_TPC_TX_POWER_STEP		3
151*4882a593Smuzhiyun #define IWL_MVM_ENABLE_EBS			1
152*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_ALGO		IWL_TOF_ALGO_TYPE_MAX_LIKE
153*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_DYNACK		true
154*4882a593Smuzhiyun #define IWL_MVM_D3_DEBUG			false
155*4882a593Smuzhiyun #define IWL_MVM_USE_TWT				true
156*4882a593Smuzhiyun #define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA	10
157*4882a593Smuzhiyun #define IWL_MVM_USE_NSSN_SYNC			0
158*4882a593Smuzhiyun #define IWL_MVM_PHY_FILTER_CHAIN_A		0
159*4882a593Smuzhiyun #define IWL_MVM_PHY_FILTER_CHAIN_B		0
160*4882a593Smuzhiyun #define IWL_MVM_PHY_FILTER_CHAIN_C		0
161*4882a593Smuzhiyun #define IWL_MVM_PHY_FILTER_CHAIN_D		0
162*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_ENABLE_SMOOTH     false
163*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_SMOOTH_ALPHA      40
164*4882a593Smuzhiyun /*  20016 pSec is 6 meter RTT, meaning 3 meter range */
165*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT 20016
166*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT  20016
167*4882a593Smuzhiyun #define IWL_MVM_FTM_INITIATOR_SMOOTH_AGE_SEC    2
168*4882a593Smuzhiyun 
169*4882a593Smuzhiyun #endif /* __MVM_CONSTANTS_H */
170