18c2ecf20Sopenharmony_ci/******************************************************************************
28c2ecf20Sopenharmony_ci *
38c2ecf20Sopenharmony_ci * This file is provided under a dual BSD/GPLv2 license.  When using or
48c2ecf20Sopenharmony_ci * redistributing this file, you may do so under either license.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * GPL LICENSE SUMMARY
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
98c2ecf20Sopenharmony_ci * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
108c2ecf20Sopenharmony_ci * Copyright(c) 2015        Intel Deutschland GmbH
118c2ecf20Sopenharmony_ci * Copyright(c) 2018 - 2019 Intel Corporation
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify
148c2ecf20Sopenharmony_ci * it under the terms of version 2 of the GNU General Public License as
158c2ecf20Sopenharmony_ci * published by the Free Software Foundation.
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * This program is distributed in the hope that it will be useful, but
188c2ecf20Sopenharmony_ci * WITHOUT ANY WARRANTY; without even the implied warranty of
198c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
208c2ecf20Sopenharmony_ci * General Public License for more details.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * The full GNU General Public License is included in this distribution
238c2ecf20Sopenharmony_ci * in the file called COPYING.
248c2ecf20Sopenharmony_ci *
258c2ecf20Sopenharmony_ci * Contact Information:
268c2ecf20Sopenharmony_ci *  Intel Linux Wireless <linuxwifi@intel.com>
278c2ecf20Sopenharmony_ci * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
288c2ecf20Sopenharmony_ci *
298c2ecf20Sopenharmony_ci * BSD LICENSE
308c2ecf20Sopenharmony_ci *
318c2ecf20Sopenharmony_ci * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
328c2ecf20Sopenharmony_ci * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
338c2ecf20Sopenharmony_ci * Copyright(c) 2015        Intel Deutschland GmbH
348c2ecf20Sopenharmony_ci * Copyright(c) 2018 - 2019 Intel Corporation
358c2ecf20Sopenharmony_ci * All rights reserved.
368c2ecf20Sopenharmony_ci *
378c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
388c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions
398c2ecf20Sopenharmony_ci * are met:
408c2ecf20Sopenharmony_ci *
418c2ecf20Sopenharmony_ci *  * Redistributions of source code must retain the above copyright
428c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer.
438c2ecf20Sopenharmony_ci *  * Redistributions in binary form must reproduce the above copyright
448c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer in
458c2ecf20Sopenharmony_ci *    the documentation and/or other materials provided with the
468c2ecf20Sopenharmony_ci *    distribution.
478c2ecf20Sopenharmony_ci *  * Neither the name Intel Corporation nor the names of its
488c2ecf20Sopenharmony_ci *    contributors may be used to endorse or promote products derived
498c2ecf20Sopenharmony_ci *    from this software without specific prior written permission.
508c2ecf20Sopenharmony_ci *
518c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
528c2ecf20Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
538c2ecf20Sopenharmony_ci * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
548c2ecf20Sopenharmony_ci * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
558c2ecf20Sopenharmony_ci * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
568c2ecf20Sopenharmony_ci * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
578c2ecf20Sopenharmony_ci * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
588c2ecf20Sopenharmony_ci * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
598c2ecf20Sopenharmony_ci * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
608c2ecf20Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
618c2ecf20Sopenharmony_ci * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
628c2ecf20Sopenharmony_ci *
638c2ecf20Sopenharmony_ci *****************************************************************************/
648c2ecf20Sopenharmony_ci#ifndef __MVM_CONSTANTS_H
658c2ecf20Sopenharmony_ci#define __MVM_CONSTANTS_H
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#include <linux/ieee80211.h>
688c2ecf20Sopenharmony_ci#include "fw-api.h"
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci#define IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM		20
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#define IWL_MVM_DEFAULT_PS_TX_DATA_TIMEOUT	(100 * USEC_PER_MSEC)
738c2ecf20Sopenharmony_ci#define IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT	(100 * USEC_PER_MSEC)
748c2ecf20Sopenharmony_ci#define IWL_MVM_WOWLAN_PS_TX_DATA_TIMEOUT	(10 * USEC_PER_MSEC)
758c2ecf20Sopenharmony_ci#define IWL_MVM_WOWLAN_PS_RX_DATA_TIMEOUT	(10 * USEC_PER_MSEC)
768c2ecf20Sopenharmony_ci#define IWL_MVM_SHORT_PS_TX_DATA_TIMEOUT	(2 * 1024) /* defined in TU */
778c2ecf20Sopenharmony_ci#define IWL_MVM_SHORT_PS_RX_DATA_TIMEOUT	(40 * 1024) /* defined in TU */
788c2ecf20Sopenharmony_ci#define IWL_MVM_P2P_LOWLATENCY_PS_ENABLE	0
798c2ecf20Sopenharmony_ci#define IWL_MVM_UAPSD_RX_DATA_TIMEOUT		(50 * USEC_PER_MSEC)
808c2ecf20Sopenharmony_ci#define IWL_MVM_UAPSD_TX_DATA_TIMEOUT		(50 * USEC_PER_MSEC)
818c2ecf20Sopenharmony_ci#define IWL_MVM_UAPSD_QUEUES		(IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\
828c2ecf20Sopenharmony_ci					 IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\
838c2ecf20Sopenharmony_ci					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\
848c2ecf20Sopenharmony_ci					 IEEE80211_WMM_IE_STA_QOSINFO_AC_BE)
858c2ecf20Sopenharmony_ci#define IWL_MVM_PS_HEAVY_TX_THLD_PACKETS	20
868c2ecf20Sopenharmony_ci#define IWL_MVM_PS_HEAVY_RX_THLD_PACKETS	8
878c2ecf20Sopenharmony_ci#define IWL_MVM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS	30
888c2ecf20Sopenharmony_ci#define IWL_MVM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS	20
898c2ecf20Sopenharmony_ci#define IWL_MVM_PS_HEAVY_TX_THLD_PERCENT	50
908c2ecf20Sopenharmony_ci#define IWL_MVM_PS_HEAVY_RX_THLD_PERCENT	50
918c2ecf20Sopenharmony_ci#define IWL_MVM_PS_SNOOZE_INTERVAL		25
928c2ecf20Sopenharmony_ci#define IWL_MVM_PS_SNOOZE_WINDOW		50
938c2ecf20Sopenharmony_ci#define IWL_MVM_WOWLAN_PS_SNOOZE_WINDOW		25
948c2ecf20Sopenharmony_ci#define IWL_MVM_LOWLAT_QUOTA_MIN_PERCENT	64
958c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_EN_RED_TXP_THRESH	62
968c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_DIS_RED_TXP_THRESH	65
978c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_SYNC2SCO		1
988c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_MPLUT			1
998c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_RRC			1
1008c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_TTC			1
1018c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_MPLUT_REG0		0x22002200
1028c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_MPLUT_REG1		0x11118451
1038c2ecf20Sopenharmony_ci#define IWL_MVM_BT_COEX_ANTENNA_COUPLING_THRS	30
1048c2ecf20Sopenharmony_ci#define IWL_MVM_FW_MCAST_FILTER_PASS_ALL	0
1058c2ecf20Sopenharmony_ci#define IWL_MVM_FW_BCAST_FILTER_PASS_ALL	0
1068c2ecf20Sopenharmony_ci#define IWL_MVM_QUOTA_THRESHOLD			4
1078c2ecf20Sopenharmony_ci#define IWL_MVM_RS_RSSI_BASED_INIT_RATE         0
1088c2ecf20Sopenharmony_ci#define IWL_MVM_RS_80_20_FAR_RANGE_TWEAK	1
1098c2ecf20Sopenharmony_ci#define IWL_MVM_TOF_IS_RESPONDER		0
1108c2ecf20Sopenharmony_ci#define IWL_MVM_SW_TX_CSUM_OFFLOAD		0
1118c2ecf20Sopenharmony_ci#define IWL_MVM_HW_CSUM_DISABLE			0
1128c2ecf20Sopenharmony_ci#define IWL_MVM_PARSE_NVM			0
1138c2ecf20Sopenharmony_ci#define IWL_MVM_ADWELL_ENABLE			1
1148c2ecf20Sopenharmony_ci#define IWL_MVM_ADWELL_MAX_BUDGET		0
1158c2ecf20Sopenharmony_ci#define IWL_MVM_TCM_LOAD_MEDIUM_THRESH		10 /* percentage */
1168c2ecf20Sopenharmony_ci#define IWL_MVM_TCM_LOAD_HIGH_THRESH		50 /* percentage */
1178c2ecf20Sopenharmony_ci#define IWL_MVM_TCM_LOWLAT_ENABLE_THRESH	100 /* packets/10 seconds */
1188c2ecf20Sopenharmony_ci#define IWL_MVM_UAPSD_NONAGG_PERIOD		5000 /* msecs */
1198c2ecf20Sopenharmony_ci#define IWL_MVM_UAPSD_NOAGG_LIST_LEN		IWL_MVM_UAPSD_NOAGG_BSSIDS_NUM
1208c2ecf20Sopenharmony_ci#define IWL_MVM_NON_TRANSMITTING_AP		0
1218c2ecf20Sopenharmony_ci#define IWL_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE    1
1228c2ecf20Sopenharmony_ci#define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE      2
1238c2ecf20Sopenharmony_ci#define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW   1
1248c2ecf20Sopenharmony_ci#define IWL_MVM_RS_INITIAL_MIMO_NUM_RATES       3
1258c2ecf20Sopenharmony_ci#define IWL_MVM_RS_INITIAL_SISO_NUM_RATES       3
1268c2ecf20Sopenharmony_ci#define IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES     2
1278c2ecf20Sopenharmony_ci#define IWL_MVM_RS_INITIAL_LEGACY_RETRIES       2
1288c2ecf20Sopenharmony_ci#define IWL_MVM_RS_SECONDARY_LEGACY_RETRIES	1
1298c2ecf20Sopenharmony_ci#define IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES   16
1308c2ecf20Sopenharmony_ci#define IWL_MVM_RS_SECONDARY_SISO_NUM_RATES     3
1318c2ecf20Sopenharmony_ci#define IWL_MVM_RS_SECONDARY_SISO_RETRIES       1
1328c2ecf20Sopenharmony_ci#define IWL_MVM_RS_RATE_MIN_FAILURE_TH		3
1338c2ecf20Sopenharmony_ci#define IWL_MVM_RS_RATE_MIN_SUCCESS_TH		8
1348c2ecf20Sopenharmony_ci#define IWL_MVM_RS_STAY_IN_COLUMN_TIMEOUT	5	/* Seconds */
1358c2ecf20Sopenharmony_ci#define IWL_MVM_RS_IDLE_TIMEOUT			5	/* Seconds */
1368c2ecf20Sopenharmony_ci#define IWL_MVM_RS_MISSED_RATE_MAX		15
1378c2ecf20Sopenharmony_ci#define IWL_MVM_RS_LEGACY_FAILURE_LIMIT		160
1388c2ecf20Sopenharmony_ci#define IWL_MVM_RS_LEGACY_SUCCESS_LIMIT		480
1398c2ecf20Sopenharmony_ci#define IWL_MVM_RS_LEGACY_TABLE_COUNT		160
1408c2ecf20Sopenharmony_ci#define IWL_MVM_RS_NON_LEGACY_FAILURE_LIMIT	400
1418c2ecf20Sopenharmony_ci#define IWL_MVM_RS_NON_LEGACY_SUCCESS_LIMIT	4500
1428c2ecf20Sopenharmony_ci#define IWL_MVM_RS_NON_LEGACY_TABLE_COUNT	1500
1438c2ecf20Sopenharmony_ci#define IWL_MVM_RS_SR_FORCE_DECREASE		15	/* percent */
1448c2ecf20Sopenharmony_ci#define IWL_MVM_RS_SR_NO_DECREASE		85	/* percent */
1458c2ecf20Sopenharmony_ci#define IWL_MVM_RS_AGG_TIME_LIMIT	        4000    /* 4 msecs. valid 100-8000 */
1468c2ecf20Sopenharmony_ci#define IWL_MVM_RS_AGG_DISABLE_START	        3
1478c2ecf20Sopenharmony_ci#define IWL_MVM_RS_AGG_START_THRESHOLD	        10	/* num frames per second */
1488c2ecf20Sopenharmony_ci#define IWL_MVM_RS_TPC_SR_FORCE_INCREASE	75	/* percent */
1498c2ecf20Sopenharmony_ci#define IWL_MVM_RS_TPC_SR_NO_INCREASE		85	/* percent */
1508c2ecf20Sopenharmony_ci#define IWL_MVM_RS_TPC_TX_POWER_STEP		3
1518c2ecf20Sopenharmony_ci#define IWL_MVM_ENABLE_EBS			1
1528c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_ALGO		IWL_TOF_ALGO_TYPE_MAX_LIKE
1538c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_DYNACK		true
1548c2ecf20Sopenharmony_ci#define IWL_MVM_D3_DEBUG			false
1558c2ecf20Sopenharmony_ci#define IWL_MVM_USE_TWT				true
1568c2ecf20Sopenharmony_ci#define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA	10
1578c2ecf20Sopenharmony_ci#define IWL_MVM_USE_NSSN_SYNC			0
1588c2ecf20Sopenharmony_ci#define IWL_MVM_PHY_FILTER_CHAIN_A		0
1598c2ecf20Sopenharmony_ci#define IWL_MVM_PHY_FILTER_CHAIN_B		0
1608c2ecf20Sopenharmony_ci#define IWL_MVM_PHY_FILTER_CHAIN_C		0
1618c2ecf20Sopenharmony_ci#define IWL_MVM_PHY_FILTER_CHAIN_D		0
1628c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_ENABLE_SMOOTH     false
1638c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_SMOOTH_ALPHA      40
1648c2ecf20Sopenharmony_ci/*  20016 pSec is 6 meter RTT, meaning 3 meter range */
1658c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT 20016
1668c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT  20016
1678c2ecf20Sopenharmony_ci#define IWL_MVM_FTM_INITIATOR_SMOOTH_AGE_SEC    2
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci#endif /* __MVM_CONSTANTS_H */
170