summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/CLD_TXRX/HTT/htt_internal.h7
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h68
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h31
-rw-r--r--CORE/HDD/inc/wlan_hdd_tsf.h7
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c29
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c31
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c233
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c4
-rw-r--r--CORE/HDD/src/wlan_hdd_tsf.c278
-rw-r--r--CORE/MAC/inc/sirApi.h11
-rw-r--r--CORE/MAC/src/pe/include/limSession.h3
-rw-r--r--CORE/MAC/src/pe/lim/limScanResultUtils.c53
-rw-r--r--CORE/MAC/src/pe/lim/limScanResultUtils.h4
-rw-r--r--CORE/MAC/src/pe/lim/limSession.c10
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.h14
-rw-r--r--CORE/SERVICES/BMI/ol_fw.c6
-rw-r--r--CORE/SERVICES/COMMON/ol_if_athvar.h6
-rw-r--r--CORE/SERVICES/COMMON/wlan_defs.h227
-rw-r--r--CORE/SERVICES/COMMON/wmi_services.h114
-rw-r--r--CORE/SERVICES/COMMON/wmi_tlv_defs.h218
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified.h1444
-rw-r--r--CORE/SERVICES/COMMON/wmi_version.h4
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c9
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.h12
-rw-r--r--CORE/SERVICES/HIF/USB/if_usb.c18
-rw-r--r--CORE/SERVICES/HIF/USB/if_usb.h12
-rw-r--r--CORE/SERVICES/HIF/hif_oob.c262
-rw-r--r--CORE/SERVICES/HIF/hif_oob.h107
-rw-r--r--CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c9
-rw-r--r--CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.h12
-rw-r--r--CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h12
-rw-r--r--CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c85
-rw-r--r--CORE/SERVICES/HTC/htc.c37
-rw-r--r--CORE/SERVICES/WMA/wma.c19
-rw-r--r--CORE/SERVICES/WMI/wmi_unified.c12
-rw-r--r--CORE/SME/inc/sme_Api.h10
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c23
-rw-r--r--CORE/VOSS/inc/i_vos_types.h6
-rw-r--r--CORE/VOSS/inc/vos_api.h8
-rw-r--r--CORE/VOSS/src/vos_api.c184
-rw-r--r--CORE/VOSS/src/vos_nvitem.c34
-rw-r--r--Kbuild56
42 files changed, 3334 insertions, 395 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt_internal.h b/CORE/CLD_TXRX/HTT/htt_internal.h
index 667bf4f677a8..80cc0fa72229 100644
--- a/CORE/CLD_TXRX/HTT/htt_internal.h
+++ b/CORE/CLD_TXRX/HTT/htt_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016, 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016, 2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -449,8 +449,11 @@ htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev);
#endif /* IPA_UC_OFFLOAD */
/* Maximum Outstanding Bus Download */
+#ifdef QCA_TXRX_PERF
+#define HTT_MAX_BUS_CREDIT 300
+#else
#define HTT_MAX_BUS_CREDIT 33
-
+#endif
int
htt_tx_credit_update(struct htt_pdev_t *pdev);
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 98f2f2be228a..bf4f9273fc62 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2949,6 +2949,48 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_P2P_LISTEN_OFFLOAD_ENABLE ( 1 )
#define CFG_P2P_LISTEN_OFFLOAD_DEFAULT ( CFG_P2P_LISTEN_OFFLOAD_DISABLE )
+#ifdef CONFIG_GPIO_OOB
+/*
+ * <ini>
+ * goob_gpio_num - OOB GPIO NUM
+ * @Min: 0
+ * @Max: 255
+ * @Default: 255
+ *
+ * This ini is used to config OOB GPIO NUM
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+
+#define CFG_ENABLE_OOB_GPIO_NUM_NAME "goob_gpio_num"
+#define CFG_ENABLE_OOB_GPIO_NUM_MIN (0)
+#define CFG_ENABLE_OOB_GPIO_NUM_MAX (255)
+#define CFG_ENABLE_OOB_GPIO_NUM_DEFAULT (CFG_ENABLE_OOB_GPIO_NUM_MAX)
+
+/*
+ * <ini>
+ * goob_gpio_flag - OOB GPIO flag
+ * bit 0 - enable OOB wake up
+ * bit 1 - enable OOB interrupt
+ * @Min: 0
+ * @Max: 3
+ * @Default: 0
+ *
+ * This ini is used to enable OOB GPIO feature
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+
+#define CFG_ENABLE_OOB_GPIO_FLAG_NAME "goob_gpio_flag"
+#define CFG_ENABLE_OOB_GPIO_FLAG_MIN (0)
+#define CFG_ENABLE_OOB_GPIO_FLAG_MAX (3)
+#define CFG_ENABLE_OOB_GPIO_FLAG_DEFAULT (0)
+#endif
+
/*
* Firmware uart print
*/
@@ -4160,6 +4202,25 @@ FG_BTC_BT_INTERVAL_PAGE_P2P_STA_DEFAULT
#define CFG_SET_TSF_GPIO_PIN_HOST_MAX (254)
#define CFG_SET_TSF_GPIO_PIN_HOST_DEFAULT (45)
+/*
+ * <ini>
+ * gtsf_by_register - get tsf by register
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to get tsf by register
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+
+#define CFG_GET_TSF_BY_REGISTER_NAME "gtsf_by_register"
+#define CFG_GET_TSF_BY_REGISTER_MIN (0)
+#define CFG_GET_TSF_BY_REGISTER_MAX (1)
+#define CFG_GET_TSF_BY_REGISTER_DEFAULT (0)
+
#ifdef WLAN_FEATURE_TSF_PLUS
/* PTP options */
#define CFG_SET_TSF_PTP_OPT_NAME "gtsf_ptp_options"
@@ -5962,6 +6023,10 @@ struct hdd_config {
v_BOOL_t enableTCPChkSumOffld;
v_BOOL_t enableIPChecksumOffload;
v_BOOL_t enablePowersaveOffload;
+#ifdef CONFIG_GPIO_OOB
+ v_U32_t oob_gpio_num;
+ v_U32_t oob_gpio_flag;
+#endif
v_BOOL_t enablefwprint;
v_BOOL_t enablefwlog;
v_BOOL_t fastfwdump;
@@ -6266,6 +6331,7 @@ struct hdd_config {
#ifdef WLAN_FEATURE_TSF
uint32_t tsf_gpio_pin;
uint32_t tsf_gpio_pin_host;
+ uint8_t tsf_by_register;
#ifdef WLAN_FEATURE_TSF_PLUS
uint8_t tsf_ptp_options;
#endif /* WLAN_FEATURE_TSF_PLUS */
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index d60734a149af..ee2bc560d9f5 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1177,6 +1177,19 @@ struct hdd_netif_queue_history {
uint32_t pause_map;
};
+/**
+ * enum HDD_TSF_ID - TSF ID
+ * HDD_TSF1 - TSF 1
+ * HDD_TSF2 - TSF 2
+ * HDD_TSF_NUM_MAX - max tsf num
+ * HDD_TSF_INVALID - invalid tsf id
+ */
+typedef enum {
+ HDD_TSF1,
+ HDD_TSF2,
+ HDD_TSF_NUM_MAX,
+ HDD_TSF_INVALID,
+}HDD_TSF_ID;
struct hdd_adapter_s
{
@@ -1334,16 +1347,20 @@ struct hdd_adapter_s
}sessionCtx;
#ifdef WLAN_FEATURE_TSF
+#define MAX_INVALD_TIME_NUM 4
/* tsf value get from firmware */
uint64_t cur_target_time;
+ uint64_t cur_host_time;
+ uint64_t last_host_time;
+ uint64_t last_target_time;
vos_timer_t host_capture_req_timer;
+ uint64_t invalid_target_time[MAX_INVALD_TIME_NUM];
+ uint64_t invalid_host_time[MAX_INVALD_TIME_NUM];
+ uint8_t invalid_time_num;
#ifdef WLAN_FEATURE_TSF_PLUS
/* spin lock for read/write timestamps */
adf_os_spinlock_t host_target_sync_lock;
vos_timer_t host_target_sync_timer;
- uint64_t cur_host_time;
- uint64_t last_host_time;
- uint64_t last_target_time;
/* to store the count of continuous invalid tstamp-pair */
int continuous_error_count;
/* to indicate whether tsf_sync has been initialized */
@@ -1443,6 +1460,7 @@ struct hdd_adapter_s
adf_os_time_t total_unpause_time;
uint8_t history_index;
+ HDD_TSF_ID tsf_id;
struct hdd_netif_queue_history
queue_oper_history[WLAN_HDD_MAX_HISTORY_ENTRY];
struct hdd_netif_queue_stats queue_oper_stats[WLAN_REASON_TYPE_MAX];
@@ -1969,7 +1987,10 @@ struct hdd_context_s
int cur_tx_level;
uint64_t prev_tx;
#endif
-
+#ifdef CONFIG_IXC_TIMER
+ vos_timer_t set_ixc_prio_timer;
+ int ixc_pid;
+#endif
/* VHT80 allowed*/
v_BOOL_t isVHT80Allowed;
diff --git a/CORE/HDD/inc/wlan_hdd_tsf.h b/CORE/HDD/inc/wlan_hdd_tsf.h
index a1a329b87fc4..2ea0a8c2a360 100644
--- a/CORE/HDD/inc/wlan_hdd_tsf.h
+++ b/CORE/HDD/inc/wlan_hdd_tsf.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015,2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015,2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -44,6 +44,11 @@
#ifdef WLAN_FEATURE_TSF
+#define REG_TSF1_L 0x1054
+#define REG_TSF1_H 0x1058
+#define REG_TSF2_L 0x10d4
+#define REG_TSF2_H 0x10d8
+
/**
* wlan_hdd_tsf_init() - set gpio and callbacks for
* capturing tsf and init tsf_plus
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 6fc2a9472f0f..9e517ef5a683 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2954,6 +2954,22 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_POWERSAVE_OFFLOAD_MIN,
CFG_POWERSAVE_OFFLOAD_MAX ),
+#ifdef CONFIG_GPIO_OOB
+ REG_VARIABLE(CFG_ENABLE_OOB_GPIO_FLAG_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, oob_gpio_flag,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
+ CFG_ENABLE_OOB_GPIO_FLAG_DEFAULT,
+ CFG_ENABLE_OOB_GPIO_FLAG_MIN,
+ CFG_ENABLE_OOB_GPIO_FLAG_MAX),
+
+ REG_VARIABLE(CFG_ENABLE_OOB_GPIO_NUM_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, oob_gpio_num,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
+ CFG_ENABLE_OOB_GPIO_NUM_DEFAULT,
+ CFG_ENABLE_OOB_GPIO_NUM_MIN,
+ CFG_ENABLE_OOB_GPIO_NUM_MAX),
+#endif
+
REG_VARIABLE( CFG_ENABLE_FW_UART_PRINT_NAME, WLAN_PARAM_Integer,
hdd_config_t, enablefwprint,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -4571,6 +4587,13 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_SET_TSF_GPIO_PIN_HOST_MIN,
CFG_SET_TSF_GPIO_PIN_HOST_MAX),
+ REG_VARIABLE(CFG_GET_TSF_BY_REGISTER_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, tsf_by_register,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_GET_TSF_BY_REGISTER_DEFAULT,
+ CFG_GET_TSF_BY_REGISTER_MIN,
+ CFG_GET_TSF_BY_REGISTER_MAX),
+
REG_VARIABLE(CFG_SET_TSF_GPIO_PIN_NAME, WLAN_PARAM_Integer,
hdd_config_t, tsf_gpio_pin,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5596,7 +5619,7 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)
memset(cfgIniTable, 0, sizeof(cfgIniTable));
- status = request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);
+ status = qca_request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);
if(status)
{
@@ -6560,7 +6583,7 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
memset(macTable, 0, sizeof(macTable));
- status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
+ status = qca_request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
if (status)
{
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index c6e467345965..bab809d68807 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -112,6 +112,7 @@
#include "csrApi.h"
#include "wmi_unified_priv.h"
+#include "limSessionUtils.h"
#define g_mode_rates_size (12)
#define a_mode_rates_size (8)
@@ -6647,8 +6648,34 @@ static int __wlan_hdd_cfg80211_ll_stats_ext_set_param(struct wiphy *wiphy,
/* period==0. Just disable mac counter */
if (thresh.period == 0) {
hddLog(VOS_TRACE_LEVEL_INFO,
- FL("Mac counter will be disaabled"));
+ FL("Mac counter will be disabled, reset max_sap_peers"));
+ if (ccmCfgSetInt(hdd_ctx->hHal, WNI_CFG_ASSOC_STA_LIMIT_AP,
+ hdd_ctx->cfg_ini->max_sap_peers, NULL,
+ eANI_BOOLEAN_FALSE)
+ == eHAL_STATUS_FAILURE)
+ hddLog(LOGE, "can't pass WNI_CFG_ASSOC_STA_LIMIT_AP to CCM");
goto set_param;
+ } else {
+#define MAC_COUNTER_MAX_PEER 2
+ tpAniSirGlobal mac = (tpAniSirGlobal)hdd_ctx->hHal;
+ uint32_t cur_peer_num = peGetCurrentSTAsCount(mac);
+ if (cur_peer_num > MAC_COUNTER_MAX_PEER) {
+ hddLog(LOGE, ("MAC counter can only support %d peers, current peer number is %d"),
+ MAC_COUNTER_MAX_PEER, cur_peer_num);
+ return -ENOMEM;
+ }
+
+ if (ccmCfgSetInt(hdd_ctx->hHal, WNI_CFG_ASSOC_STA_LIMIT_AP,
+ MAC_COUNTER_MAX_PEER, NULL, eANI_BOOLEAN_FALSE)
+ == eHAL_STATUS_FAILURE)
+ hddLog(LOGE,"can't pass WNI_CFG_ASSOC_STA_LIMIT_AP to CCM");
+ else
+ hddLog(VOS_TRACE_LEVEL_INFO,
+ FL("limit MAX peer count to %d"),
+ MAC_COUNTER_MAX_PEER);
+
+ hddLog(VOS_TRACE_LEVEL_INFO,
+ FL("MAC counter enabled"));
}
/* global thresh is not enabled */
@@ -14145,12 +14172,14 @@ static int hdd_convert_auth_type(uint32_t auth_type)
case eCSR_AUTH_TYPE_WAPI_WAI_PSK:
ret_val = QCA_WLAN_AUTH_TYPE_WAI_PSK;
break;
+#ifdef WLAN_FEATURE_11W
case eCSR_AUTH_TYPE_RSN_PSK_SHA256:
ret_val = QCA_WLAN_AUTH_TYPE_SHA256_PSK;
break;
case eCSR_AUTH_TYPE_RSN_8021X_SHA256:
ret_val = QCA_WLAN_AUTH_TYPE_SHA256;
break;
+#endif
case eCSR_NUM_OF_SUPPORT_AUTH_TYPE:
case eCSR_AUTH_TYPE_FAILED:
case eCSR_AUTH_TYPE_NONE:
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 85cfccfc4e04..f42bd901e5e4 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -8497,6 +8497,24 @@ mem_free:
} else if (strncmp(command, "STOP", 4) == 0) {
hddLog(LOG1, FL("STOP command"));
pHddCtx->driver_being_stopped = true;
+ } else if (strncmp(command, "BTCOEXSCAN", 10) == 0) {
+ hddLog(LOG1, FL("ignore BTCOEXSCAN and return -ENOTSUPP"));
+ ret = -ENOTSUPP;
+ } else if (strncmp(command, "RXFILTER", 8) == 0) {
+ hddLog(LOG1, FL("ignore RXFILTER and return -ENOTSUPP"));
+ ret = -ENOTSUPP;
+ } else if (strncmp(command, "RXFILTER-START", 14) == 0) {
+ hddLog(LOG1, FL("ignore RXFILTER-START and return 0"));
+ ret = 0;
+ } else if (strncmp(command, "RXFILTER-STOP", 13) == 0) {
+ hddLog(LOG1, FL("ignore RXFILTER-STOP and return 0"));
+ ret = 0;
+ } else if (strncmp(command, "BTCOEXSCAN-START", 16) == 0) {
+ hddLog(LOG1, FL("ignore BTCOEXSCAN-START and return 0"));
+ ret = 0;
+ } else if (strncmp(command, "BTCOEXSCAN-STOP", 15) == 0) {
+ hddLog(LOG1, FL("ignore BTCOEXSCAN-STOP and return 0"));
+ ret = 0;
} else {
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_UNSUPPORTED_IOCTL,
@@ -10558,7 +10576,7 @@ VOS_STATUS hdd_get_cfg_file_size(v_VOID_t *pCtx, char *pFileName, v_SIZE_t *pBuf
ENTER();
- status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
+ status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
if(status || !pHddCtx->fw || !pHddCtx->fw->data) {
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: CFG download failed",__func__);
@@ -10599,7 +10617,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,
ENTER();
- status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
+ status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
if(status || !pHddCtx->fw || !pHddCtx->fw->data) {
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: CFG download failed",__func__);
@@ -12177,6 +12195,8 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx,
/* Adapter successfully added. Increment the vdev count */
hdd_ctx->current_intf_count++;
+ adapter->tsf_id = HDD_TSF2;
+
hddLog(VOS_TRACE_LEVEL_DEBUG,
"%s: current_intf_count=%d", __func__,
hdd_ctx->current_intf_count);
@@ -14680,6 +14700,10 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
hdd_abort_mac_scan_all_adapters(pHddCtx);
hdd_deinit_bus_bw_timer(pHddCtx);
+#ifdef CONFIG_IXC_TIMER
+ vos_timer_stop(&pHddCtx->set_ixc_prio_timer);
+ vos_timer_destroy(&pHddCtx->set_ixc_prio_timer);
+#endif
#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
vosStatus = vos_timer_deinit(&pHddCtx->skip_acs_scan_timer);
if (!VOS_IS_STATUS_SUCCESS(vosStatus))
@@ -14693,6 +14717,16 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
adf_os_spin_unlock(&pHddCtx->acs_skip_lock);
#endif
+ if (pHddCtx->cfg_ini->sta_change_cc_via_beacon) {
+ if (pHddCtx->reg.reg_set_timer.state != 0) {
+ vosStatus = vos_timer_deinit(&(pHddCtx->reg.reg_set_timer));
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus))
+ hddLog(VOS_TRACE_LEVEL_FATAL,
+ "%s: deinit reg set timer failed reason %d",
+ __func__, vosStatus);
+ pHddCtx->reg.reg_set_timer.userData = NULL;
+ }
+ }
if (pConfig && !pConfig->enablePowersaveOffload)
{
@@ -15398,6 +15432,178 @@ static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
return status;
}
+#ifdef CONFIG_IXC_TIMER
+#ifdef CONFIG_PERF_MODE
+#define wmem_max "/proc/sys/net/core/wmem_max"
+#define wmem_default "/proc/sys/net/core/wmem_default"
+#define rmem_max "/proc/sys/net/core/rmem_max"
+#define rmem_default "/proc/sys/net/core/rmem_default"
+#define tcp_mem "/proc/sys/net/ipv4/tcp_mem"
+#define tcp_rmem "/proc/sys/net/ipv4/tcp_rmem"
+#define tcp_wmem "/proc/sys/net/ipv4/wcp_rmem"
+#define tcp_limit_output_bytes "/proc/sys/net/ipv4/tcp_limit_output_bytes"
+#define flush "/proc/sys/net/ipv4/route/flush"
+#define tcp_sack "/proc/sys/net/ipv4/tcp_sack"
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+#define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_path.dentry->d_inode
+#else
+#define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_dentry->d_inode
+#endif
+
+int _readwrite_file(const char *filename, char *rbuf,
+ const char *wbuf, size_t length, int mode)
+{
+ int ret = 0;
+ struct file *filp = (struct file *)-ENOENT;
+ mm_segment_t oldfs;
+ oldfs = get_fs();
+ set_fs(KERNEL_DS);
+
+ do {
+ filp = filp_open(filename, mode, S_IRUSR);
+
+ if (IS_ERR(filp) || !filp->f_op) {
+ ret = -ENOENT;
+ break;
+ }
+
+ if (length == 0) {
+ /* Read the length of the file only */
+ struct inode *inode;
+
+ inode = GET_INODE_FROM_FILEP(filp);
+ if (!inode) {
+ printk(KERN_ERR
+ "_readwrite_file: Error 2\n");
+ ret = -ENOENT;
+ break;
+ }
+ ret = i_size_read(inode->i_mapping->host);
+ break;
+ }
+
+ if (wbuf) {
+ ret = vfs_write(
+ filp, wbuf, length, &filp->f_pos);
+ if (ret < 0) {
+ printk(KERN_ERR
+ "_readwrite_file: Error 3\n");
+ break;
+ }
+ } else {
+ ret = vfs_read(
+ filp, rbuf, length, &filp->f_pos);
+ if (ret < 0) {
+ printk(KERN_ERR
+ "_readwrite_file: Error 4\n");
+ break;
+ }
+ }
+ } while (0);
+
+ if (!IS_ERR(filp)) {
+ filp_close(filp, NULL);
+ }
+
+ set_fs(oldfs);
+ return ret;
+}
+
+void write_sys_file(const char* filename, char* buf, unsigned int len)
+{
+ int ret;
+ ret = _readwrite_file(filename, NULL,
+ buf,
+ len,
+ (O_WRONLY | O_APPEND));
+ if (ret < 0) {
+ printk("%s:%d: fail to write %s\n", __func__, __LINE__, filename);
+ }
+}
+
+void enable_wlan_perf_mode(void)
+{
+ int i,cpu_num;
+ char file_name[128];
+
+ write_sys_file(wmem_max, "8000000", 7);
+ write_sys_file(wmem_default, "8000000", 7);
+ write_sys_file(rmem_max, "8000000", 7);
+ write_sys_file(rmem_default, "8000000", 7);
+
+ write_sys_file(tcp_mem, "8000000 8000000 8000000", 23);
+
+ write_sys_file(tcp_rmem, "10240 87380 8000000", 19);
+ write_sys_file(tcp_wmem, "10240 87380 8000000", 19);
+ write_sys_file(tcp_limit_output_bytes, "1048576", 7);
+ write_sys_file(flush, "1", 1);
+ write_sys_file(tcp_sack, "0", 1);
+ write_sys_file("/proc/sys/nbet/ipv4/tcp_use_rconfig", "1", 1);
+ write_sys_file("/proc/sys/nbet/ipv4/tcp_delack_seg", "60", 2);
+
+ cpu_num = num_possible_cpus();
+ for(i=0; i < cpu_num; i++) {
+ snprintf(file_name, sizeof(file_name), "/sys/bus/cpu/devices/cpu%d/online", i);
+ write_sys_file(file_name, "1", 1);
+ snprintf(file_name, sizeof(file_name),
+ "/sys/bus/cpu/devices/cpu%d/cpufreq/scaling_governor", i);
+ write_sys_file(file_name, "performance", 11);
+ }
+}
+#endif
+static void hdd_set_ixc_prio(void *priv)
+{
+ int i;
+ struct pid* pid;
+ struct task_struct* task;
+ char comm[128];
+ struct sched_param param = {.sched_priority = 99};
+ hdd_context_t *pHddCtx = (hdd_context_t *)priv;
+
+ if(pHddCtx->ixc_pid != 0) {
+ pid = find_get_pid(pHddCtx->ixc_pid);
+ if(pid) {
+ task = get_pid_task(pid, 0);
+ if(task){
+ memset(comm, 0, sizeof(comm));
+ strlcpy(comm, task->comm, sizeof(comm));
+ if(strstr(comm, "ixchariot") || strstr(comm, "iperf")) {
+ vos_timer_start(&pHddCtx->set_ixc_prio_timer, 10);
+ //we already set this task priority
+ return;
+ }
+ }
+ task = NULL;
+ }
+ }
+ for(i = 2; i < 32767; i++) {
+ pid = find_get_pid(i);
+ if(pid) {
+ task = get_pid_task(pid, 0);
+ if(task){
+ memset(comm, 0, sizeof(comm));
+ strlcpy(comm, task->comm, sizeof(comm));
+ if(strstr(comm, "ixchariot") || strstr(comm, "iperf")) {
+ sched_setscheduler(task, SCHED_FIFO, &param);
+#ifdef CONFIG_PERF_MODE
+ enable_wlan_perf_mode();
+#endif
+ pHddCtx->ixc_pid = i;
+ printk("set ixc prio, pid is %d\n", pHddCtx->ixc_pid);
+ vos_timer_start(&pHddCtx->set_ixc_prio_timer, 10);
+ return;
+ }
+ }
+ task = NULL;
+ }
+ }
+ vos_timer_start(&pHddCtx->set_ixc_prio_timer, 10);
+}
+#endif
+
#ifdef FEATURE_BUS_BANDWIDTH
#ifdef QCA_SUPPORT_TXRX_HL_BUNDLE
static void hdd_set_bundle_require(uint16_t session_id, hdd_context_t *hdd_ctx,
@@ -17166,16 +17372,22 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
NET_NAME_UNKNOWN,
rtnl_lock_enable);
} else {
+#ifndef SUPPORT_P2P_BY_ONE_INTF_WLAN
pAdapter = hdd_open_adapter(pHddCtx, WLAN_HDD_INFRA_STATION, "wlan%d",
wlan_hdd_get_intf_addr(pHddCtx),
NET_NAME_UNKNOWN,
rtnl_lock_enable);
+#endif
#ifdef WLAN_OPEN_P2P_INTERFACE
if(VOS_MONITOR_MODE != vos_get_conparam()){
/* Open P2P device interface */
+#ifndef SUPPORT_P2P_BY_ONE_INTF_WLAN
if (pAdapter != NULL &&
!hdd_cfg_is_sub20_channel_width_enabled(pHddCtx)) {
+#else
+ {
+#endif
if (pHddCtx->cfg_ini->isP2pDeviceAddrAdministrated &&
!(pHddCtx->cfg_ini->intfMacAddr[0].bytes[0] & 0x02)) {
vos_mem_copy(pHddCtx->p2pDeviceAddress.bytes,
@@ -17198,7 +17410,11 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
}
}
+#ifndef SUPPORT_P2P_BY_ONE_INTF_WLAN
pP2pAdapter = hdd_open_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE, "p2p%d",
+#else
+ pP2pAdapter = hdd_open_adapter(pHddCtx, WLAN_HDD_INFRA_STATION, "wlan%d",
+#endif
&pHddCtx->p2pDeviceAddress.bytes[0],
NET_NAME_UNKNOWN,
rtnl_lock_enable);
@@ -17229,6 +17445,10 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
}
}
+#ifdef SUPPORT_P2P_BY_ONE_INTF_WLAN
+ pAdapter = pP2pAdapter;
+#endif
+
if( pAdapter == NULL )
{
hddLog(VOS_TRACE_LEVEL_ERROR, "%s: hdd_open_adapter failed", __func__);
@@ -17525,6 +17745,14 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
vos_timer_init(&pHddCtx->tdls_source_timer, VOS_TIMER_TYPE_SW,
wlan_hdd_change_tdls_mode, (void *)pHddCtx);
+#ifdef CONFIG_IXC_TIMER
+ pHddCtx->ixc_pid = 0;
+ vos_timer_init(&pHddCtx->set_ixc_prio_timer,
+ VOS_TIMER_TYPE_SW,
+ hdd_set_ixc_prio,
+ (void *)pHddCtx);
+ vos_timer_start(&pHddCtx->set_ixc_prio_timer, 10);
+#endif
#ifdef FEATURE_BUS_BANDWIDTH
adf_os_spinlock_init(&pHddCtx->bus_bw_lock);
vos_timer_init(&pHddCtx->bus_bw_timer,
@@ -20633,3 +20861,4 @@ module_param(enable_11d, int,
module_param(country_code, charp,
S_IRUSR | S_IRGRP | S_IROTH);
+
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 73d00dda50dd..f5e15970cfb9 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2068,11 +2068,13 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
}
+#ifndef SUPPORT_P2P_BY_ONE_INTF_WLAN
if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
(type == SIR_MAC_MGMT_FRAME && subType == SIR_MAC_MGMT_PROBE_RSP)) {
/* Drop Probe response recieved from supplicant in sta mode */
goto err_rem_channel;
}
+#endif
//Call sme API to send out a action frame.
// OR can we send it directly through data path??
diff --git a/CORE/HDD/src/wlan_hdd_tsf.c b/CORE/HDD/src/wlan_hdd_tsf.c
index 6ad7f14af2c6..c6fb7f8c983b 100644
--- a/CORE/HDD/src/wlan_hdd_tsf.c
+++ b/CORE/HDD/src/wlan_hdd_tsf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -32,6 +32,13 @@
#include "wlan_hdd_main.h"
#include "wlan_hdd_tsf.h"
#include "wma_api.h"
+#if defined(HIF_PCI)
+#include "if_pci.h"
+#elif defined(HIF_USB)
+#include "if_usb.h"
+#elif defined(HIF_SDIO)
+#include "if_ath_sdio.h"
+#endif
#include <linux/errqueue.h>
#if defined(CONFIG_NON_QC_PLATFORM)
#include <linux/gpio.h>
@@ -651,6 +658,133 @@ static inline uint64_t hdd_get_monotonic_host_time(hdd_context_t *hdd_ctx)
ktime_get_ns() : ktime_get_real_ns());
}
+/**
+ * is_target_host_valid() - is target tsf valid or not
+ * @delt_host_time: current host time - last golden host time
+ * @delt_target_time: current target time - last golden target time
+ *
+ * Return: TRUE if target tsf is valid
+ */
+static inline bool is_target_host_valid(uint64_t delt_host_time,
+ uint64_t delt_target_time)
+{
+ if ((delt_target_time * HOST_TO_TARGET_TIME_RATIO >
+ (delt_host_time - delt_host_time/100)) &&
+ (delt_target_time * HOST_TO_TARGET_TIME_RATIO <
+ (delt_host_time + delt_host_time/100)))
+ return true;
+ else
+ return false;
+}
+
+/**
+ * update_target_host_time - update new captured target tsf
+ * @adapter: pointer to adapter
+ *
+ * Return True if current target tsf can be set as golden tsf.
+ */
+static bool update_target_host_time(hdd_adapter_t *adapter)
+{
+ uint64_t delt_host_time = 0;
+ uint64_t delt_target_time = 0;
+ int num_index = 0;
+ int i = 0;
+ bool update_time = false;
+
+ delt_host_time = adapter->cur_host_time - adapter->last_host_time;
+ delt_target_time = adapter->cur_target_time - adapter->last_target_time;
+
+ if ((!adapter->last_target_time) ||
+ is_target_host_valid(delt_host_time, delt_target_time)) {
+ adapter->last_host_time = adapter->cur_host_time;
+ adapter->last_target_time = adapter->cur_target_time;
+ adapter->invalid_time_num = 0;
+ return true;
+ } else if (adapter->invalid_time_num >= MAX_INVALD_TIME_NUM) {
+ update_time = true;
+ for (i = 0; i < MAX_INVALD_TIME_NUM; i++) {
+ num_index = (adapter->invalid_time_num - i - 1) %
+ MAX_INVALD_TIME_NUM;
+ delt_host_time = adapter->cur_host_time -
+ adapter->invalid_host_time[num_index];
+ delt_target_time = adapter->cur_target_time -
+ adapter->invalid_target_time[num_index];
+ if (!is_target_host_valid(delt_host_time,
+ delt_target_time)) {
+ update_time = false;
+ break;
+ }
+ }
+ }
+
+ if (update_time) {
+ adapter->last_host_time = adapter->cur_host_time;
+ adapter->last_target_time = adapter->cur_target_time;
+ adapter->invalid_time_num = 0;
+ return true;
+ } else {
+ num_index = adapter->invalid_time_num % MAX_INVALD_TIME_NUM;
+ adapter->invalid_host_time[num_index] = adapter->cur_host_time;
+ adapter->invalid_target_time[num_index] =
+ adapter->cur_target_time;
+ adapter->invalid_time_num++;
+ return false;
+ }
+}
+
+/**
+ * hdd_get_tsf_by_register() - get tsf by register
+ * @adapter: pointer to adapter
+ * @host_time: current host time
+ * @target_time: current target time.
+ *
+ * Return 0 if succeeds
+ */
+static inline int32_t hdd_get_tsf_by_register(hdd_adapter_t *adapter,
+ uint64_t host_time, uint64_t *target_time)
+{
+ v_PVOID_t pHifContext = NULL;
+ v_CONTEXT_t pVosContext = NULL;
+ uint32_t datal;
+ uint32_t datah;
+ uint32_t tsf_id = adapter->tsf_id;
+ int32_t ret = 0;
+
+ pVosContext = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+ if(!pVosContext)
+ return -EFAULT;
+ pHifContext = vos_get_context(VOS_MODULE_ID_HIF, pVosContext);
+ if (!pHifContext)
+ return -EFAULT;
+
+ if (tsf_id == HDD_TSF1) {
+ hif_get_reg(pHifContext, REG_TSF1_L, &datal);
+ hif_get_reg(pHifContext, REG_TSF1_H, &datah);
+ *target_time = datal + ((uint64_t)datah << 32);
+ } else if (tsf_id == HDD_TSF2) {
+ hif_get_reg(pHifContext, REG_TSF2_L, &datal);
+ hif_get_reg(pHifContext, REG_TSF2_H, &datah);
+ *target_time = datal + ((uint64_t)datah << 32);
+ } else {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("invalid tsf id %u"), tsf_id);
+ return -EFAULT;
+ }
+
+ adapter->cur_host_time = host_time;
+ if (!ret)
+ adapter->cur_target_time = *target_time;
+
+ if (!ret && update_target_host_time(adapter))
+ *target_time = adapter->cur_target_time;
+ else
+ *target_time = ((adapter->cur_host_time -
+ adapter->last_host_time) /
+ HOST_TO_TARGET_TIME_RATIO) +
+ adapter->last_target_time;
+
+ return 0;
+}
+
static ssize_t __hdd_wlan_tsf_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -668,10 +802,6 @@ static ssize_t __hdd_wlan_tsf_show(struct device *dev,
if (adapter->magic != WLAN_HDD_ADAPTER_MAGIC)
return scnprintf(buf, PAGE_SIZE, "Invalid device\n");
- if (!hdd_get_th_sync_status(adapter))
- return scnprintf(buf, PAGE_SIZE,
- "TSF sync is not initialized\n");
-
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
if (!hdd_ctx)
return scnprintf(buf, PAGE_SIZE, "Invalid HDD context\n");
@@ -692,12 +822,25 @@ static ssize_t __hdd_wlan_tsf_show(struct device *dev,
}
host_time = hdd_get_monotonic_host_time(hdd_ctx);
- if (hdd_get_targettime_from_hosttime(adapter, host_time,
- &target_time))
- size = scnprintf(buf, PAGE_SIZE, "Invalid timestamp\n");
- else
- size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM\n",
- buf, target_time, host_time, bssid);
+ if (hdd_ctx->cfg_ini->tsf_by_register) {
+ if (hdd_get_tsf_by_register(adapter, host_time,
+ &target_time))
+ size = scnprintf(buf, PAGE_SIZE, "Invalid timestamp\n");
+ else
+ size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM\n",
+ buf, target_time, host_time, bssid);
+ } else {
+ if (!hdd_get_th_sync_status(adapter))
+ return scnprintf(buf, PAGE_SIZE,
+ "TSF sync is not initialized\n");
+
+ if (hdd_get_targettime_from_hosttime(adapter, host_time,
+ &target_time))
+ size = scnprintf(buf, PAGE_SIZE, "Invalid timestamp\n");
+ else
+ size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM\n",
+ buf, target_time, host_time, bssid);
+ }
return size;
}
@@ -818,7 +961,6 @@ static enum hdd_tsf_op_result hdd_tsf_sync_init(hdd_adapter_t *adapter)
{
VOS_STATUS ret;
hdd_context_t *hddctx;
- struct net_device *net_dev;
if (!adapter)
return HDD_TSF_OP_FAIL;
@@ -856,9 +998,6 @@ static enum hdd_tsf_op_result hdd_tsf_sync_init(hdd_adapter_t *adapter)
goto fail;
}
- net_dev = adapter->dev;
- if (net_dev && HDD_TSF_IS_DBG_FS_SET(hddctx))
- device_create_file(&net_dev->dev, &dev_attr_tsf);
hdd_set_th_sync_status(adapter, true);
return HDD_TSF_OP_SUCC;
@@ -871,7 +1010,6 @@ static enum hdd_tsf_op_result hdd_tsf_sync_deinit(hdd_adapter_t *adapter)
{
VOS_STATUS ret;
hdd_context_t *hddctx;
- struct net_device *net_dev;
if (!adapter)
return HDD_TSF_OP_FAIL;
@@ -906,12 +1044,6 @@ static enum hdd_tsf_op_result hdd_tsf_sync_deinit(hdd_adapter_t *adapter)
hdd_reset_timestamps(adapter);
- net_dev = adapter->dev;
- if (net_dev && HDD_TSF_IS_DBG_FS_SET(hddctx)) {
- struct device *dev = &net_dev->dev;
-
- device_remove_file(dev, &dev_attr_tsf);
- }
return HDD_TSF_OP_SUCC;
}
@@ -951,10 +1083,20 @@ enum hdd_tsf_op_result hdd_netbuf_timestamp(adf_nbuf_t netbuf,
int hdd_start_tsf_sync(hdd_adapter_t *adapter)
{
enum hdd_tsf_op_result ret;
+ hdd_context_t *hddctx;
+ struct net_device *net_dev;
if (!adapter)
return -EINVAL;
+ net_dev = adapter->dev;
+ hddctx = WLAN_HDD_GET_CTX(adapter);
+ if (net_dev && HDD_TSF_IS_DBG_FS_SET(hddctx))
+ device_create_file(&net_dev->dev, &dev_attr_tsf);
+
+ if (hddctx->cfg_ini->tsf_by_register)
+ return 0;
+
ret = hdd_tsf_sync_init(adapter);
if (ret != HDD_TSF_OP_SUCC) {
hddLog(VOS_TRACE_LEVEL_ERROR,
@@ -969,10 +1111,22 @@ int hdd_start_tsf_sync(hdd_adapter_t *adapter)
int hdd_stop_tsf_sync(hdd_adapter_t *adapter)
{
enum hdd_tsf_op_result ret;
+ hdd_context_t *hddctx;
+ struct net_device *net_dev;
if (!adapter)
return -EINVAL;
+ hddctx = WLAN_HDD_GET_CTX(adapter);
+ net_dev = adapter->dev;
+ if (net_dev && HDD_TSF_IS_DBG_FS_SET(hddctx)) {
+ struct device *dev = &net_dev->dev;
+
+ device_remove_file(dev, &dev_attr_tsf);
+ }
+ if (hddctx->cfg_ini->tsf_by_register)
+ return 0;
+
ret = __hdd_stop_tsf_sync(adapter);
if (ret != HDD_TSF_OP_SUCC)
return -EINVAL;
@@ -1372,12 +1526,24 @@ static int wlan_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
}
host_time = hdd_get_monotonic_host_time(pHddCtx);
- if (hdd_get_targettime_from_hosttime(adapter, host_time,
- &target_time)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("get invalid target timestamp"));
- return -EINVAL;
+ if (pHddCtx->cfg_ini->tsf_by_register) {
+ if (hdd_get_tsf_by_register(adapter, host_time,
+ &target_time)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("get invalid target timestamp"));
+ return -EINVAL;
+ } else {
+ *ts = ns_to_timespec(target_time * NSEC_PER_USEC);
+ }
} else {
- *ts = ns_to_timespec(target_time * NSEC_PER_USEC);
+ if (hdd_get_targettime_from_hosttime(adapter, host_time,
+ &target_time)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("get invalid target timestamp"));
+ return -EINVAL;
+ } else {
+ *ts = ns_to_timespec(target_time * NSEC_PER_USEC);
+ }
}
return 0;
@@ -1440,12 +1606,24 @@ static int wlan_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
}
host_time = hdd_get_monotonic_host_time(pHddCtx);
- if (hdd_get_targettime_from_hosttime(adapter, host_time,
- &target_time)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("get invalid target timestamp"));
- return -EINVAL;
+ if (pHddCtx->cfg_ini->tsf_by_register) {
+ if (hdd_get_tsf_by_register(adapter, host_time,
+ &target_time)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("get invalid target timestamp"));
+ return -EINVAL;
+ } else {
+ *ts = ns_to_timespec64(target_time * NSEC_PER_USEC);
+ }
} else {
- *ts = ns_to_timespec64(target_time * NSEC_PER_USEC);
+ if (hdd_get_targettime_from_hosttime(adapter, host_time,
+ &target_time)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("get invalid target timestamp"));
+ return -EINVAL;
+ } else {
+ *ts = ns_to_timespec64(target_time * NSEC_PER_USEC);
+ }
}
return 0;
@@ -1521,6 +1699,22 @@ static int hdd_get_tsf_cb(void *pcb_cxt, struct stsf *ptsf)
return -EINVAL;
}
+ if (hddctx->cfg_ini->tsf_by_register) {
+ if (ptsf->tsf_id_valid) {
+ adapter->tsf_id = ptsf->tsf_id;
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("vdev id %u, tsf id %u"),
+ ptsf->vdev_id, ptsf->tsf_id);
+ return 0;
+ } else {
+ adapter->tsf_id = HDD_TSF_INVALID;
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("vdev id %u, invalid tsf id"),
+ ptsf->vdev_id);
+ return -EINVAL;
+ }
+ }
+
if (!hdd_tsf_is_initialized(adapter)) {
hddLog(VOS_TRACE_LEVEL_ERROR,
FL("tsf is not init, ignore tsf event"));
@@ -1563,6 +1757,17 @@ void wlan_hdd_tsf_init(hdd_context_t *hdd_ctx)
if (!hdd_ctx)
return;
+ if (hdd_ctx->cfg_ini->tsf_by_register) {
+ wlan_hdd_phc_init(hdd_ctx);
+ hal_status = sme_set_tsfcb(hdd_ctx->hHal, hdd_get_tsf_cb,
+ hdd_ctx);
+ if (eHAL_STATUS_SUCCESS != hal_status)
+ hddLog(LOGE, FL("get tsf id cb failed, status: %d"),
+ hal_status);
+
+ return;
+ }
+
if (adf_os_atomic_inc_return(&hdd_ctx->tsf_ready_flag) > 1)
return;
@@ -1609,6 +1814,15 @@ void wlan_hdd_tsf_deinit(hdd_context_t *hdd_ctx)
if (!hdd_ctx)
return;
+ if (hdd_ctx->cfg_ini->tsf_by_register) {
+ wlan_hdd_phc_deinit(hdd_ctx);
+ hal_status = sme_set_tsfcb(hdd_ctx->hHal, NULL, NULL);
+ if (eHAL_STATUS_SUCCESS != hal_status)
+ hddLog(LOGE, FL("reset tsf cb failed, status: %d"),
+ hal_status);
+ return;
+ }
+
if (!adf_os_atomic_read(&hdd_ctx->tsf_ready_flag))
return;
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index a023876cdf7f..859cec802ae3 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -7193,6 +7193,8 @@ struct sblock_info {
* @vdev_id: vdev id
* @tsf_low: low 32bits of tsf
* @tsf_high: high 32bits of tsf
+ * @tsf_id: tsf id
+ * @tsf_id_valid: valid tsf id or not
*
* driver use this struct to store the tsf info
*/
@@ -7200,6 +7202,8 @@ struct stsf {
uint32_t vdev_id;
uint32_t tsf_low;
uint32_t tsf_high;
+ uint32_t tsf_id;
+ uint32_t tsf_id_valid;
};
#ifdef WLAN_FEATURE_MOTION_DETECTION
@@ -8629,11 +8633,6 @@ struct sme_change_country_code_ind {
uint8_t country_code[WNI_CFG_COUNTRY_CODE_LEN];
};
-struct update_pwr_timer_data {
- void* mac_ptr;
- void* session_ptr;
-};
-
/**
* struct sir_set_rx_reorder_timeout_val - rx reorder timeout
* @rx_timeout_pri: reorder timeout for AC
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index 365cdce13756..a187b49cb192 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -483,7 +483,6 @@ typedef struct sPESession // Added to Support BT-AMP
tANI_U8 isKeyInstalled;
/* timer for reseting protection fileds at regular intervals */
vos_timer_t protection_fields_reset_timer;
- vos_timer_t reg_update_pwr_timer;
void *mac_ctx;
/*
* variable to store state of various protection struct like
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index f8d162f767d7..e70c24cf9128 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -48,8 +48,6 @@
#endif
#include "vos_utils.h"
-#define REG_PWR_SET_WAIT_MS 400
-
#ifdef WLAN_FEATURE_FILS_SK
/**
* lim_update_bss_with_fils_data: update fils data to bss descriptor
@@ -136,7 +134,7 @@ limDeactivateMinChannelTimerDuringScan(tpAniSirGlobal pMac)
return eSIR_SUCCESS;
} /*** end limDeactivateMinChannelTimerDuringScan() ***/
-static void
+void
lim_update_max_txpower_ind(tpAniSirGlobal mac_ptr, tpPESession session_ptr)
{
tSirMsgQ mmh_msg;
@@ -152,26 +150,6 @@ lim_update_max_txpower_ind(tpAniSirGlobal mac_ptr, tpPESession session_ptr)
return;
}
-
-static void hdd_update_pwr_timer_expired_handler(void *arg)
-{
- struct update_pwr_timer_data *timer_data = NULL;
- tpAniSirGlobal mac_ptr = NULL;
- tpPESession session_ptr = NULL;
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- ("%s ENTER "), __func__);
-
- if (!arg)
- return;
- timer_data = (struct update_pwr_timer_data *)arg;
- mac_ptr = (tpAniSirGlobal)timer_data->mac_ptr;
- session_ptr = (tpPESession)timer_data->session_ptr;
- vos_timer_destroy(&(session_ptr->reg_update_pwr_timer));
- lim_update_max_txpower_ind(mac_ptr, session_ptr);
- vos_mem_free(session_ptr->reg_update_pwr_timer.userData);
- session_ptr->reg_update_pwr_timer.userData = NULL;
-}
-
/**
* lim_check_and_change_cc: indicate upper layer country code changed
* @mac_ptr: Pointer to Global MAC structure
@@ -189,9 +167,6 @@ lim_check_and_change_cc(tpAniSirGlobal mac_ptr,
tANI_U16 msg_len = 0;
struct sme_change_country_code_ind *change_cc_ind_ptr = NULL;
v_BOOL_t country_code_not_changed;
- VOS_TIMER_STATE timer_status;
- struct update_pwr_timer_data *pwr_timer_data = NULL;
- uint32_t count = 0;
limLog(mac_ptr, LOG1, FL("enter new cc %c%c old cc: %c%c"),
beacon_ptr->countryInfoParam.countryString[0],
@@ -223,32 +198,6 @@ lim_check_and_change_cc(tpAniSirGlobal mac_ptr,
mmh_msg.bodyval = 0;
limSysProcessMmhMsgApi(mac_ptr, &mmh_msg, ePROT);
- if (session_ptr->reg_update_pwr_timer.state == 0)
- timer_status = VOS_TIMER_STATE_UNUSED;
- else {
- do {
- timer_status =
- vos_timer_getCurrentState(&(session_ptr->reg_update_pwr_timer));
- count++;
- if (count > 255) {
- limLog(mac_ptr, LOGE, FL("pwr timer busy!"));
- return;
- }
- } while (timer_status != VOS_TIMER_STATE_UNUSED);
- }
-
- pwr_timer_data = vos_mem_malloc(sizeof(*pwr_timer_data));
- if (pwr_timer_data == NULL) {
- limLog(mac_ptr, LOGE, FL("Mem alloc failed"));
- return;
- }
- pwr_timer_data->session_ptr = session_ptr;
- pwr_timer_data->mac_ptr = mac_ptr;
- vos_timer_init(&(session_ptr->reg_update_pwr_timer), VOS_TIMER_TYPE_SW,
- hdd_update_pwr_timer_expired_handler,
- (void *)pwr_timer_data);
- vos_timer_start(&(session_ptr->reg_update_pwr_timer), REG_PWR_SET_WAIT_MS);
-
return;
}
}
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.h b/CORE/MAC/src/pe/lim/limScanResultUtils.h
index 020085c9bcd3..7287603cf250 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.h
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -64,6 +64,8 @@ void limCheckAndAddBssDescription(tpAniSirGlobal, tpSirProbeRespBeacon, tANI_
void lim_check_and_change_cc(tpAniSirGlobal mac_ptr,
tpSirProbeRespBeacon beacon_ptr,
tpPESession session_ptr);
+void
+lim_update_max_txpower_ind(tpAniSirGlobal mac_ptr, tpPESession session_ptr);
#if defined WLAN_FEATURE_VOWIFI
void limCollectBssDescription(tpAniSirGlobal,
diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c
index f39a069805a0..b23acacce4cc 100644
--- a/CORE/MAC/src/pe/lim/limSession.c
+++ b/CORE/MAC/src/pe/lim/limSession.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -753,14 +753,6 @@ void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry)
vos_timer_destroy(&psessionEntry->protection_fields_reset_timer);
}
- if (psessionEntry->reg_update_pwr_timer.state != 0) {
- vos_timer_stop(&psessionEntry->reg_update_pwr_timer);
- vos_timer_destroy(&psessionEntry->reg_update_pwr_timer);
- if (psessionEntry->reg_update_pwr_timer.userData != NULL)
- vos_mem_free(psessionEntry->reg_update_pwr_timer.userData);
- psessionEntry->reg_update_pwr_timer.userData = NULL;
- }
-
#if defined (WLAN_FEATURE_VOWIFI_11R)
/* Delete FT related information */
limFTCleanup(pMac, psessionEntry);
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index 0965d91e3dce..c3767c63f5e7 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -248,22 +248,22 @@ static inline int limSelectCBMode(tDphHashNode *pStaDs, tpPESession psessionEntr
if ( channel== 36 || channel == 52 || channel == 100 ||
channel == 116 || channel == 149 )
{
- return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW - 1;
+ return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
}
else if ( channel == 40 || channel == 56 || channel == 104 ||
channel == 120 || channel == 153 )
{
- return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW - 1;
+ return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
}
else if ( channel == 44 || channel == 60 || channel == 108 ||
channel == 124 || channel == 157 )
{
- return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH -1;
+ return PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
}
else if ( channel == 48 || channel == 64 || channel == 112 ||
channel == 128 || channel == 161 )
{
- return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH - 1;
+ return PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
}
else if ( channel == 165 )
{
@@ -277,14 +277,14 @@ static inline int limSelectCBMode(tDphHashNode *pStaDs, tpPESession psessionEntr
channel == 120 || channel == 128 || channel == 136 ||
channel == 144 || channel == 153 || channel == 161 )
{
- return PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
+ return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
}
else if ( channel== 36 || channel == 44 || channel == 52 ||
channel == 60 || channel == 100 || channel == 108 ||
channel == 116 || channel == 124 || channel == 132 ||
channel == 140 || channel == 149 || channel == 157 )
{
- return PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+ return PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
}
else if ( channel == 165 )
{
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c
index 4289a7e041ca..c08a8a7a1871 100644
--- a/CORE/SERVICES/BMI/ol_fw.c
+++ b/CORE/SERVICES/BMI/ol_fw.c
@@ -257,7 +257,7 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,
__func__));
}
- if (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
+ if (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("%s: Failed to get %s\n",
@@ -751,7 +751,7 @@ defined(CONFIG_NON_QC_PLATFORM_PCI)
break;
}
- status = request_firmware(&fw_entry, filename, scn->sc_osdev->device);
+ status = qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device);
if (status)
{
pr_err("%s: Failed to get %s:%d\n", __func__, filename, status);
@@ -772,7 +772,7 @@ defined(CONFIG_NON_QC_PLATFORM_PCI)
pr_info("%s: Trying to load default %s\n",
__func__, filename);
- status = request_firmware(&fw_entry, filename,
+ status = qca_request_firmware(&fw_entry, filename,
scn->sc_osdev->device);
if (status) {
pr_err("%s: Failed to get %s:%d\n",
diff --git a/CORE/SERVICES/COMMON/ol_if_athvar.h b/CORE/SERVICES/COMMON/ol_if_athvar.h
index ee980552f62e..9946586ebbce 100644
--- a/CORE/SERVICES/COMMON/ol_if_athvar.h
+++ b/CORE/SERVICES/COMMON/ol_if_athvar.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -245,6 +245,10 @@ struct ol_softc {
#ifdef PERE_IP_HDR_ALIGNMENT_WAR
bool host_80211_enable; /* Enables native-wifi mode on host */
#endif
+#ifdef CONFIG_GPIO_OOB
+ u_int32_t oob_gpio_num;
+ u_int32_t oob_gpio_flag;
+#endif
bool enableuartprint; /* enable uart/serial prints from target */
bool enablefwlog; /* enable fwlog */
/* enable FW self-recovery for Rome USB */
diff --git a/CORE/SERVICES/COMMON/wlan_defs.h b/CORE/SERVICES/COMMON/wlan_defs.h
index a7f0503f25ca..516fc1c6aee7 100644
--- a/CORE/SERVICES/COMMON/wlan_defs.h
+++ b/CORE/SERVICES/COMMON/wlan_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004-2010, 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2004-2010, 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -198,6 +198,40 @@ typedef enum {
((mode) == MODE_11NG_HT40))
#define IS_MODE_11GONLY(mode) ((mode) == MODE_11GONLY)
+#define IS_MODE_LEGACY(phymode) ((phymode == MODE_11A) || \
+ (phymode == MODE_11G) || \
+ (phymode == MODE_11B) || \
+ (phymode == MODE_11GONLY))
+
+#define IS_MODE_11N(phymode) ((phymode >= MODE_11NA_HT20) && \
+ (phymode <= MODE_11NG_HT40))
+#ifdef CONFIG_160MHZ_SUPPORT
+ #define IS_MODE_11AC(phymode) ((phymode >= MODE_11AC_VHT20) && \
+ (phymode <= MODE_11AC_VHT160))
+#else
+ #define IS_MODE_11AC(phymode) ((phymode >= MODE_11AC_VHT20) && \
+ (phymode <= MODE_11AC_VHT80_2G))
+#endif /* CONFIG_160MHZ_SUPPORT */
+
+#if SUPPORT_11AX
+ #define IS_MODE_80MHZ(phymode) ((phymode == MODE_11AC_VHT80_2G) || \
+ (phymode == MODE_11AC_VHT80) || \
+ (phymode == MODE_11AX_HE80) || \
+ (phymode == MODE_11AX_HE80_2G))
+ #define IS_MODE_40MHZ(phymode) ((phymode == MODE_11AC_VHT40_2G) || \
+ (phymode == MODE_11AC_VHT40) || \
+ (phymode == MODE_11NG_HT40) || \
+ (phymode == MODE_11NA_HT40) || \
+ (phymode == MODE_11AX_HE40) || \
+ (phymode == MODE_11AX_HE40_2G))
+#else
+ #define IS_MODE_80MHZ(phymode) ((phymode == MODE_11AC_VHT80_2G) || \
+ (phymode == MODE_11AC_VHT80))
+ #define IS_MODE_40MHZ(phymode) ((phymode == MODE_11AC_VHT40_2G) || \
+ (phymode == MODE_11AC_VHT40) || \
+ (phymode == MODE_11NG_HT40) || \
+ (phymode == MODE_11NA_HT40))
+#endif /* SUPPORT_11AX */
enum {
REGDMN_MODE_11A = 0x00000001, /* 11a channels */
@@ -453,6 +487,13 @@ typedef struct {
A_UINT32 ptr;
/** size of the chunk */
A_UINT32 size;
+ /** ptr_high
+ * most significant bits of physical address of the memory chunk
+ * Only applicable for addressing more than 32 bit.
+ * This will only be non-zero if the target has set
+ * WMI_SERVICE_SUPPORT_EXTEND_ADDRESS flag.
+ */
+ A_UINT32 ptr_high;
} wlan_host_memory_chunk;
#define NUM_UNITS_IS_NUM_VDEVS 0x1
@@ -525,7 +566,61 @@ typedef enum {
* so that it is easy to handle the statistics in BE host.
*/
-struct wlan_dbg_tx_stats {
+/*
+ * wlan_dbg_tx_stats_v1, _v2:
+ * differing versions of the wlan_dbg_tx_stats struct used by different
+ * targets
+ */
+struct wlan_dbg_tx_stats_v1 {
+ /* Num HTT cookies queued to dispatch list */
+ A_INT32 comp_queued;
+ /* Num HTT cookies dispatched */
+ A_INT32 comp_delivered;
+ /* Num MSDU queued to WAL */
+ A_INT32 msdu_enqued;
+ /* Num MPDU queue to WAL */
+ A_INT32 mpdu_enqued;
+ /* Num MSDUs dropped by WMM limit */
+ A_INT32 wmm_drop;
+ /* Num Local frames queued */
+ A_INT32 local_enqued;
+ /* Num Local frames done */
+ A_INT32 local_freed;
+ /* Num queued to HW */
+ A_INT32 hw_queued;
+ /* Num PPDU reaped from HW */
+ A_INT32 hw_reaped;
+ /* Num underruns */
+ A_INT32 underrun;
+ /* Num PPDUs cleaned up in TX abort */
+ A_INT32 tx_abort;
+ /* Num MPDUs requed by SW */
+ A_INT32 mpdus_requed;
+ /* excessive retries */
+ A_UINT32 tx_ko;
+ /* data hw rate code */
+ A_UINT32 data_rc;
+ /* Scheduler self triggers */
+ A_UINT32 self_triggers;
+ /* frames dropped due to excessive sw retries */
+ A_UINT32 sw_retry_failure;
+ /* illegal rate phy errors */
+ A_UINT32 illgl_rate_phy_err;
+ /* wal pdev continous xretry */
+ A_UINT32 pdev_cont_xretry;
+ /* wal pdev continous xretry */
+ A_UINT32 pdev_tx_timeout;
+ /* wal pdev resets */
+ A_UINT32 pdev_resets;
+ /* frames dropped due to non-availability of stateless TIDs */
+ A_UINT32 stateless_tid_alloc_failure;
+ /* PhY/BB underrun */
+ A_UINT32 phy_underrun;
+ /* MPDU is more than txop limit */
+ A_UINT32 txop_ovf;
+};
+
+struct wlan_dbg_tx_stats_v2 {
/* Num HTT cookies queued to dispatch list */
A_INT32 comp_queued;
/* Num HTT cookies dispatched */
@@ -546,19 +641,15 @@ struct wlan_dbg_tx_stats {
A_INT32 hw_reaped;
/* Num underruns */
A_INT32 underrun;
-#if defined(AR900B)
/* HW Paused. */
A_UINT32 hw_paused;
-#endif
/* Num PPDUs cleaned up in TX abort */
A_INT32 tx_abort;
/* Num MPDUs requed by SW */
A_INT32 mpdus_requed;
/* excessive retries */
A_UINT32 tx_ko;
-#if defined(AR900B)
A_UINT32 tx_xretry;
-#endif
/* data hw rate code */
A_UINT32 data_rc;
/* Scheduler self triggers */
@@ -579,7 +670,6 @@ struct wlan_dbg_tx_stats {
A_UINT32 phy_underrun;
/* MPDU is more than txop limit */
A_UINT32 txop_ovf;
-#if defined(AR900B)
/* Number of Sequences posted */
A_UINT32 seq_posted;
/* Number of Sequences failed queueing */
@@ -600,12 +690,46 @@ struct wlan_dbg_tx_stats {
A_INT32 mpdus_ack_failed;
/* Num MPDUs that was dropped du to expiry. */
A_INT32 mpdus_expired;
- /* Num mc drops */
- //A_UINT32 mc_drop;
+};
+
+#if defined(AR900B)
+#define wlan_dbg_tx_stats wlan_dbg_tx_stats_v2
+#else
+#define wlan_dbg_tx_stats wlan_dbg_tx_stats_v1
#endif
+
+/*
+ * wlan_dbg_rx_stats_v1, _v2:
+ * differing versions of the wlan_dbg_rx_stats struct used by different
+ * targets
+ */
+struct wlan_dbg_rx_stats_v1 {
+ /* Cnts any change in ring routing mid-ppdu */
+ A_INT32 mid_ppdu_route_change;
+ /* Total number of statuses processed */
+ A_INT32 status_rcvd;
+ /* Extra frags on rings 0-3 */
+ A_INT32 r0_frags;
+ A_INT32 r1_frags;
+ A_INT32 r2_frags;
+ A_INT32 r3_frags;
+ /* MSDUs / MPDUs delivered to HTT */
+ A_INT32 htt_msdus;
+ A_INT32 htt_mpdus;
+ /* MSDUs / MPDUs delivered to local stack */
+ A_INT32 loc_msdus;
+ A_INT32 loc_mpdus;
+ /* AMSDUs that have more MSDUs than the status ring size */
+ A_INT32 oversize_amsdu;
+ /* Number of PHY errors */
+ A_INT32 phy_errs;
+ /* Number of PHY errors drops */
+ A_INT32 phy_err_drop;
+ /* Number of mpdu errors - FCS, MIC, ENC etc. */
+ A_INT32 mpdu_errs;
};
-struct wlan_dbg_rx_stats {
+struct wlan_dbg_rx_stats_v2 {
/* Cnts any change in ring routing mid-ppdu */
A_INT32 mid_ppdu_route_change;
/* Total number of statuses processed */
@@ -629,12 +753,15 @@ struct wlan_dbg_rx_stats {
A_INT32 phy_err_drop;
/* Number of mpdu errors - FCS, MIC, ENC etc. */
A_INT32 mpdu_errs;
-#if defined(AR900B)
/* Number of rx overflow errors. */
A_INT32 rx_ovfl_errs;
-#endif
};
+#if defined(AR900B)
+#define wlan_dbg_rx_stats wlan_dbg_rx_stats_v2
+#else
+#define wlan_dbg_rx_stats wlan_dbg_rx_stats_v1
+#endif
struct wlan_dbg_mem_stats {
A_UINT32 iram_free_size;
@@ -646,6 +773,28 @@ struct wlan_dbg_peer_stats {
A_INT32 dummy; /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
};
+/*
+ * wlan_dbg_rx_rate_info_v1a_t, _v1b_t:
+ * differing versions of the wlan_dbg_rx_rate_info struct used by different
+ * targets
+ */
+typedef struct {
+ A_UINT32 mcs[10];
+ A_UINT32 sgi[10];
+ A_UINT32 nss[4];
+ A_UINT32 nsts;
+ A_UINT32 stbc[10];
+ A_UINT32 bw[3];
+ A_UINT32 pream[6];
+ A_UINT32 ldpc;
+ A_UINT32 txbf;
+ A_UINT32 mgmt_rssi;
+ A_UINT32 data_rssi;
+ A_UINT32 rssi_chain0;
+ A_UINT32 rssi_chain1;
+ A_UINT32 rssi_chain2;
+} wlan_dbg_rx_rate_info_v1a_t;
+
typedef struct {
A_UINT32 mcs[10];
A_UINT32 sgi[10];
@@ -664,12 +813,15 @@ typedef struct {
/*
* TEMPORARY: leave rssi_chain3 in place for AR900B builds until code using
* rssi_chain3 has been converted to use wlan_dbg_rx_rate_info_v2_t.
- * At that time, this rssi_chain3 field will be deleted.
*/
-#if defined(AR900B)
A_UINT32 rssi_chain3;
+} wlan_dbg_rx_rate_info_v1b_t;
+
+#if defined(AR900B)
+#define wlan_dbg_rx_rate_info_t wlan_dbg_rx_rate_info_v1b_t
+#else
+#define wlan_dbg_rx_rate_info_t wlan_dbg_rx_rate_info_v1a_t
#endif
-} wlan_dbg_rx_rate_info_t ;
typedef struct {
A_UINT32 mcs[10];
@@ -828,25 +980,56 @@ typedef struct wlan_dbg_stats_wifi2 {
wlan_dgb_sifs_resp_stats_t sifs_resp_info;
} wlan_dbg_wifi2_stats_t;
+/*
+ * wlan_dbg_rx_rate_info_v1a, _v1b:
+ * differing versions of the wlan_dbg_rx_rate_info struct used by different
+ * targets
+ */
+typedef struct {
+ wlan_dbg_rx_rate_info_v1a_t rx_phy_info;
+ wlan_dbg_tx_rate_info_t tx_rate_info;
+} wlan_dbg_rate_info_v1a_t;
+
typedef struct {
- wlan_dbg_rx_rate_info_t rx_phy_info;
+ wlan_dbg_rx_rate_info_v1b_t rx_phy_info;
wlan_dbg_tx_rate_info_t tx_rate_info;
-} wlan_dbg_rate_info_t;
+} wlan_dbg_rate_info_v1b_t;
+
+#if defined(AR900B)
+#define wlan_dbg_rate_info_t wlan_dbg_rate_info_v1b_t
+#else
+#define wlan_dbg_rate_info_t wlan_dbg_rate_info_v1a_t
+#endif
typedef struct {
wlan_dbg_rx_rate_info_v2_t rx_phy_info;
wlan_dbg_tx_rate_info_v2_t tx_rate_info;
} wlan_dbg_rate_info_v2_t;
-struct wlan_dbg_stats {
- struct wlan_dbg_tx_stats tx;
- struct wlan_dbg_rx_stats rx;
-#if defined(AR900B)
+/*
+ * wlan_dbg_stats_v1, _v2:
+ * differing versions of the wlan_dbg_stats struct used by different
+ * targets
+ */
+struct wlan_dbg_stats_v1 {
+ struct wlan_dbg_tx_stats_v1 tx;
+ struct wlan_dbg_rx_stats_v1 rx;
+ struct wlan_dbg_peer_stats peer;
+};
+
+struct wlan_dbg_stats_v2 {
+ struct wlan_dbg_tx_stats_v2 tx;
+ struct wlan_dbg_rx_stats_v2 rx;
struct wlan_dbg_mem_stats mem;
-#endif
struct wlan_dbg_peer_stats peer;
};
+#if defined(AR900B)
+#define wlan_dbg_stats wlan_dbg_stats_v2
+#else
+#define wlan_dbg_stats wlan_dbg_stats_v1
+#endif
+
#define DBG_STATS_MAX_HWQ_NUM 10
#define DBG_STATS_MAX_TID_NUM 20
#define DBG_STATS_MAX_CONG_NUM 16
diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h
index 2b4989687766..0c461117ab6b 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -360,6 +360,118 @@ typedef enum {
WMI_SERVICE_ESP_SUPPORT=170, /* Support for Estimated Service Params IE */
WMI_SERVICE_PEER_CHWIDTH_CHANGE = 171, /* Support for host to update/re-intersect the node capability */
WMI_SERVICE_WLAN_HPCS_PULSE=172, /* Support for High Precision Clock Synchronization feature */
+ WMI_SERVICE_PER_VDEV_CHAINMASK_CONFIG_SUPPORT=173, /* Support for configuring chainmask per VDEV */
+ WMI_SERVICE_TX_DATA_MGMT_ACK_RSSI=174, /* ACK RSSI indication to host for host TX data and mgmt frame */
+ WMI_SERVICE_NAN_DISABLE_SUPPORT=175, /* indicates firmware is dependent on host to disable NAN incase of concurrencies */
+ WMI_SERVICE_NAN_DISABLE_SUPPORT__prototype = WMI_SERVICE_NAN_DISABLE_SUPPORT, /* alias, to clarify that NAN_DISABLE_SUPPORT is for prototype testing purposes */
+ WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN=176, /* indicates FW supports uniformly excluding the HTC header length from the HTT H2T message length */
+ WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION=177, /* indicates FW supports FDD coex with unequal isolation between BT and each of the WLAN chains */
+
+ /* WMI_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT:
+ * Support HW+FW db2dbm conversion for RSSI fields in rx descriptors
+ * and host/target messages.
+ * If enabled, HW and FW will convert SNR to RSSI by adding noise floor
+ * and rssi_offset from BDF to RSSI values that formerly had units of
+ * dB w.r.t. noise floor to convert the units to dBm.
+ * MAC beacon RSSI average register return a signed value for RSSI,
+ * as well as hw descriptors.
+ *-------------------------------------------------------------------------
+ * The RSSI field of below WMI messages will be changed to dBm units:
+ * WMI_MGMT_RX_EVENTID:
+ * wmi_mgmt_rx_hdr.rssi_ctl;
+ * WMI_UPDATE_STATS_EVENTID:
+ * wmi_rssi_stats.rssi_avg_beacon;
+ * wmi_rssi_stats.rssi_avg_data;
+ * wmi_snr_info.bcn_snr;
+ * wmi_snr_info.dat_snr;
+ * wmi_vdev_stats.bcn_rssi_history; (NOT USED IN FW)
+ * wmi_peer_stats.peer_rssi;
+ * WMI_WOW_WAKEUP_HOST_EVENTID:
+ * wmi_rssi_breach_event_fixed_param.rssi;
+ * wmi_roam_event_fixed_param.rssi;
+ * WMI_PEER_STA_KICKOUT_EVENTID:
+ * wmi_peer_sta_kickout_event_fixed_param.rssi;
+ * WMI_PASSPOINT_MATCH_EVENTID:
+ * wmi_passpoint_event_hdr.rssi;(NOT USED IN FW)
+ * WMI_PEER_INFO_EVENTID:
+ * wmi_peer_info.rssi;
+ * WMI_ROAM_SYNCH_EVENTID:
+ * wmi_roam_synch_event_fixed_param.rssi;
+ * WMI_ROAM_SCAN_STATS_EVENTID:
+ * wmi_roam_scan_stats_event_fixed_param.rssi;
+ * wmi_pdev_div_rssi_antid_event_id:
+ * wmi_pdev_div_rssi_antid_event_fixed_param.chain_rssi;
+ * wmi_rssi_breach_event_id
+ * WMI_INST_RSSI_STATS_EVENTID:
+ * wmi_inst_rssi_stats_resp_fixed_param.iRSSI;
+ * RSSI thresholds configured by host
+ * WMI_ROAM_SCAN_RSSI_THRESHOLD
+ * roam_scan_rssi_thresh snr
+ * boost_threshold_5g snr
+ * penalty_threshold_5g snr
+ * good_rssi_threshold snr
+ * roam_bg_scan_bad_rssi_thresh snr
+ * roam_earlystop_thres_min snr
+ * roam_earlystop_thres_max snr
+ * WMI_ROAM_AP_PROFILE
+ * rssi_abs_thresh snr
+ * WMI_ROAM_CONFIGURE_MAWC_CMDID:
+ * best_ap_rssi_threshold Snr
+ * wmi_ap_profile.rssi_abs_thresh;
+ * WMI_ROAM_SCAN_RSSI_THRESHOLD:
+ * wmi_roam_scan_extended_threshold_param.boost_threshold_5g;
+ * wmi_roam_scan_extended_threshold_param.penalty_threshold_5g;
+ * wmi_roam_scan_extended_threshold_param.good_rssi_threshold;
+ * wmi_roam_scan_rssi_threshold_fixed_param.roam_scan_rssi_thresh;
+ * wmi_roam_bg_scan_roaming_param.roam_bg_scan_bad_rssi_thresh;
+ * WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID:
+ * wmi_vdev_spectral_configure_cmd_fixed_param.spectral_scan_rssi_rpt_mode;
+ * wmi_vdev_spectral_configure_cmd_fixed_param.spectral_scan_rssi_thr;
+ * WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID:
+ * wmi_rssi_breach_monitor_config_fixed_param.low_rssi_breach_threshold;
+ * wmi_rssi_breach_monitor_config_fixed_param.hi_rssi_breach_threshold;
+ * WMI_STA_SMPS_PARAM_CMDID:
+ * wmi_sta_smps_param.value of below cmd IDs:
+ * // RSSI threshold to enter Dynamic SMPS mode from inactive mode
+ * WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
+ * // RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode
+ * // or to enter D-SMPS mode from Stalled-D-SMPS mode
+ * WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
+ * // RSSI threshold to disable SMPS modes
+ * WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
+ * // Upper threshold for beacon-RSSI. Used to reduce RX chainmask.
+ * WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
+ * // Lower threshold for beacon-RSSI. Used to increase RX chainmask
+ * WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
+ * // Enable/Disable DTIM 1chRx feature
+ * WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
+ * WMI_TDLS_SET_STATE_CMDID:
+ * wmi_tdls_set_state_cmd_fixed_param.rssi_teardown_threshold;
+ * wmi_tdls_set_state_cmd_fixed_param.rssi_delta;
+ *-------------------------------------------------------------------------
+ * The RSSI fields of below HTT data type will change to dBm units:
+ * PREPACK struct htt_tx_wbm_completion.ack_frame_rssi;
+ * PREPACK struct htt_tx_wbm_transmit_status.ack_frame_rssi;
+ * htt_ppdu_stats_user_cmpltn_common_tlv.ack_rssi;
+ */
+ WMI_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT = 178,
+ WMI_SERVICE_SUPPORT_EXTEND_ADDRESS=179, /* indicates firmware supports host memory addresses larger than 32 bit */
+ WMI_SERVICE_BEACON_RECEPTION_STATS=180, /* Support per vdev beacon stats info */
+ WMI_SERVICE_FETCH_TX_PN=181,
+ WMI_SERVICE_PEER_UNMAP_RESPONSE_SUPPORT = 182, /* support peer ids unmap response from host */
+ WMI_SERVICE_TX_PER_PEER_AMPDU_SIZE = 183, /* indicate FW support per peer TX AMPDU size */
+ WMI_SERVICE_BSS_COLOR_SWITCH_COUNT = 184, /* Firmware supports bss-color switch count handling */
+ WMI_SERVICE_HTT_PEER_STATS_SUPPORT = 185, /* Supports the feature where FW sends peer stats autonomously to Host via the HTT_T2H PEER_STATS_IND message */
+ WMI_SERVICE_UL_RU26_ALLOWED = 186, /* indicates support for RU26 in UL OFDMA */
+ WMI_SERVICE_GET_MWS_COEX_STATE = 187, /* FW provides MWS Coex info */
+ WMI_SERVICE_GET_MWS_DPWB_STATE = 188, /* FW provides LTE-Coex Dynamic Power Back-off info */
+ WMI_SERVICE_GET_MWS_TDM_STATE = 189, /* FW provides LTE-Coex TDM info */
+ WMI_SERVICE_GET_MWS_IDRX_STATE = 190, /* FW provides LTE-Coex IDRx info */
+ WMI_SERVICE_GET_MWS_ANTENNA_SHARING_STATE = 191, /* FW provides LTE-Coex Antenna sharing info */
+ WMI_SERVICE_ENHANCED_TPC_CONFIG_EVENT = 192, /* FW provides enhanced tx power control configuration dump */
+ WMI_SERVICE_WLM_STATS_REQUEST = 193, /* FW supports WLAN latency manager stats request */
+ WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT = 194, /* Extended Peer Tid configuration support for QoS related settings */
+
/******* ADD NEW SERVICES HERE *******/
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index a6a6f9162ac4..3215790ac023 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -832,6 +832,8 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param,
WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param,
WMITLV_TAG_STRUC_wmi_roam_rssi_rejection_oce_config_param,
+ WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param = /* alias */
+ WMITLV_TAG_STRUC_wmi_roam_rssi_rejection_oce_config_param,
WMITLV_TAG_STRUC_wmi_unit_test_event_fixed_param,
WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param,
WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param,
@@ -927,6 +929,35 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param,
WMITLV_TAG_STRUC_wmi_peer_extd2_stats,
WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_check_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_nan_event_info,
+ WMITLV_TAG_STRUC_wmi_ndp_channel_info,
+ WMITLV_TAG_STRUC_wmi_ndp_cmd_param,
+ WMITLV_TAG_STRUC_wmi_ndp_event_param,
+ WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info,
+ WMITLV_TAG_STRUC_wmi_quiet_offload_info,
+ WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_bcn_recv_stats_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_peer_tx_pn_request_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_peer_tx_pn_response_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param,
+ WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_roam_bss_load_config_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_csc_vdev_list,
+ WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_info_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param,
+ WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_wlm_link_stats,
} WMITLV_TAG_ID;
/*
@@ -1309,6 +1340,16 @@ typedef enum {
OP(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID) \
OP(WMI_PDEV_HE_TB_ACTION_FRM_CMDID) \
OP(WMI_HPCS_PULSE_START_CMDID) \
+ OP(WMI_VDEV_CHAINMASK_CONFIG_CMDID) \
+ OP(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID) \
+ OP(WMI_NDP_CMDID) \
+ OP(WMI_PDEV_PKTLOG_FILTER_CMDID) \
+ OP(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID) \
+ OP(WMI_PEER_TX_PN_REQUEST_CMDID) \
+ OP(WMI_PEER_UNMAP_RESPONSE_CMDID) \
+ OP(WMI_ROAM_BSS_LOAD_CONFIG_CMDID) \
+ OP(WMI_VDEV_GET_MWS_COEX_INFO_CMDID) \
+ OP(WMI_REQUEST_WLM_STATS_CMDID) \
/* add new CMD_LIST elements above this line */
/*
@@ -1516,6 +1557,18 @@ typedef enum {
OP(WMI_MOTION_DET_HOST_EVENTID) \
OP(WMI_MOTION_DET_BASE_LINE_HOST_EVENTID) \
OP(WMI_ESP_ESTIMATE_EVENTID) \
+ OP(WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID) \
+ OP(WMI_NDP_EVENTID) \
+ OP(WMI_VDEV_BCN_RECEPTION_STATS_EVENTID) \
+ OP(WMI_PEER_TX_PN_RESPONSE_EVENTID) \
+ OP(WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID) \
+ OP(WMI_ROAM_BLACKLIST_EVENTID) \
+ OP(WMI_VDEV_GET_MWS_COEX_STATE_EVENTID) \
+ OP(WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID) \
+ OP(WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID) \
+ OP(WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID) \
+ OP(WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID) \
+ OP(WMI_WLM_STATS_EVENTID) \
/* add new EVT_LIST elements above this line */
@@ -1543,7 +1596,14 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_CREATE_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_PEER_DELETE_CMDID);
-/* Peer flush Cmd*/
+/* Peer unmap response Cmd */
+#define WMITLV_TABLE_WMI_PEER_UNMAP_RESPONSE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param, wmi_peer_unmap_response_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, peer_ids, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_PEER_UNMAP_RESPONSE_CMDID);
+
+/* Peer flush Cmd */
#define WMITLV_TABLE_WMI_PEER_FLUSH_TIDS_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param, wmi_peer_flush_tids_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -2100,6 +2160,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_STATS_CMDID);
+/* PN Request Cmd */
+#define WMITLV_TABLE_WMI_PEER_TX_PN_REQUEST_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_tx_pn_request_cmd_fixed_param, wmi_peer_tx_pn_request_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_PEER_TX_PN_REQUEST_CMDID);
+
/* Request for memory dump stats Cmd */
#define WMITLV_TABLE_WMI_GET_FW_MEM_DUMP_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param, wmi_get_fw_mem_dump_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
@@ -2138,6 +2204,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_CLEAR_LINK_STATS_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_LINK_STATS_CMDID);
+/* Request wlm stats Cmd */
+#define WMITLV_TABLE_WMI_REQUEST_WLM_STATS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param, wmi_request_wlm_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_WLM_STATS_CMDID);
+
/* Network list offload config Cmd */
#define WMITLV_TABLE_WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param, wmi_nlo_config_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
@@ -2421,6 +2493,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
+#define WMITLV_TABLE_WMI_VDEV_CHAINMASK_CONFIG_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param, wmi_vdev_chainmask_config_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
+
/* PDEV Set Base Mac Address Cmd */
#define WMITLV_TABLE_WMI_PDEV_SET_BASE_MACADDR_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param, wmi_pdev_set_base_macaddr_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -2595,6 +2672,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_SET_QUIET_MODE_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_QUIET_MODE_CMDID);
+/* vdev set offload quiet Cmd */
+#define WMITLV_TABLE_WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param, wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
+
/* Setting custom aggregation size using command */
#define WMITLV_TABLE_WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param, wmi_vdev_set_custom_aggr_size_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -2898,6 +2981,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_LPI_STOP_SCAN_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
+/* BSS load parameters for roam trigger */
+#define WMITLV_TABLE_WMI_ROAM_BSS_LOAD_CONFIG_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_bss_load_config_cmd_fixed_param, wmi_roam_bss_load_config_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
+
+#define WMITLV_TABLE_WMI_ROAM_BLACKLIST_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param, wmi_roam_blacklist_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_blacklist_with_timeout_tlv_param, blacklist_with_timeout, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_BLACKLIST_EVENTID);
+
#define WMITLV_TABLE_WMI_LPI_RESULT_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_lpi_result_event_fixed_param, wmi_lpi_result_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
@@ -2994,6 +3087,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_NDP_RESPONDER_REQ_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_end_req_PROTOTYPE, ndp_end_req_list, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_REQ_CMDID);
+/* NDP Request */
+#define WMITLV_TABLE_WMI_NDP_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ndp_cmd_param, wmi_ndp_cmd_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_NDP_CMDID);
+
/* RCPI Info Request Cmd */
#define WMITLV_TABLE_WMI_REQUEST_RCPI_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param, wmi_request_rcpi_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -3237,7 +3335,7 @@ WMITLV_CREATE_PARAM_STRUC(WMI_DCC_UPDATE_NDL_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, bssid_preferred_list, WMITLV_SIZE_VAR) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, bssid_preferred_factor, WMITLV_SIZE_VAR) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_lca_disallow_config_tlv_param, lca_disallow_param, WMITLV_SIZE_VAR) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_rssi_rejection_oce_config_param, rssi_rejection_list, WMITLV_SIZE_VAR)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_rejection_list_config_param, rssi_rejection_list, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_FILTER_CMDID);
/* TSF timestamp action cmd */
@@ -3548,6 +3646,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MNT_FILTER_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_chip_power_stats_cmd_fixed_param, wmi_pdev_get_chip_power_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
+/* WLAN GET mws conflict */
+#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_INFO_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_info_cmd_fixed_param, wmi_vdev_get_mws_coex_info_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
+
+/* WLAN GET beacon reception Stats*/
+#define WMITLV_TABLE_WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param, wmi_vdev_get_bcn_recv_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
+
/* pdev set stats threshold cmd*/
#define WMITLV_TABLE_WMI_PDEV_SET_STATS_THRESHOLD_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param, wmi_pdev_set_stats_threshold_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
@@ -3775,6 +3883,13 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param, wmi_hpcs_pulse_start_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_HPCS_PULSE_START_CMDID);
+/* PDev Packet Log filter Cmd */
+#define WMITLV_TABLE_WMI_PDEV_PKTLOG_FILTER_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param, wmi_pdev_pktlog_filter_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_pdev_pktlog_filter_info, pdev_pktlog_filter_info, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_PKTLOG_FILTER_CMDID);
+
/************************** TLV definitions of WMI events *******************************/
/* Service Ready event */
@@ -3877,14 +3992,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_EXTSCAN_CAPABILITIES_EVENTID);
WMITLV_CREATE_PARAM_STRUC(WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID);
/* Update_whal_mib_stats Event */
-#define WMITLV_TABLE_WMI_UPDATE_WHAL_MIB_STATS_EVENTID(id,op,buf,len) \
+#define WMITLV_TABLE_WMI_UPDATE_WHAL_MIB_STATS_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param, wmi_update_whal_mib_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_WHAL_MIB_STATS_EVENTID);
/* PDEV TPC Config Event */
-#define WMITLV_TABLE_WMI_PDEV_TPC_CONFIG_EVENTID(id,op,buf,len) \
+#define WMITLV_TABLE_WMI_PDEV_TPC_CONFIG_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param, wmi_pdev_tpc_config_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ratesArray, WMITLV_SIZE_VAR)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ratesArray, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_tlv_arrays_len_param, ctlPwrTbl_param, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ctlPwrTbl_buf, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_TPC_CONFIG_EVENTID);
/* PDEV DIV RSSI Antenna index Event */
@@ -3939,7 +4056,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID);
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_mgmt_tx_compl_bundle_event_fixed_param, wmi_mgmt_tx_compl_bundle_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, desc_ids, WMITLV_SIZE_VAR) \
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, status, WMITLV_SIZE_VAR) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ppdu_id, WMITLV_SIZE_VAR)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ppdu_id, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ack_rssi, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID);
/* VDEV Start response Event */
@@ -4187,7 +4305,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_OEM_DMA_BUF_RELEASE_EVENTID);
#define WMITLV_TABLE_WMI_HOST_SWBA_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param, wmi_host_swba_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_tim_info, tim_info, WMITLV_SIZE_VAR) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_p2p_noa_info, p2p_noa_info, WMITLV_SIZE_VAR)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_p2p_noa_info, p2p_noa_info, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_quiet_offload_info, quiet_offload_info, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_HOST_SWBA_EVENTID);
@@ -4215,6 +4334,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_HOST_SWFDA_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_congestion_stats, congestion_stats, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_STATS_EVENTID);
+/* Update PN response Event */
+#define WMITLV_TABLE_WMI_PEER_TX_PN_RESPONSE_EVENTID(id,op,buf,len)\
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_tx_pn_response_event_fixed_param, wmi_peer_tx_pn_response_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_PEER_TX_PN_RESPONSE_EVENTID);
+
/* For vdev based ht/vht info upload*/
#define WMITLV_TABLE_WMI_UPDATE_VDEV_RATE_STATS_EVENTID(id,op,buf,len)\
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, wmi_vdev_rate_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
@@ -4262,6 +4386,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_LINK_STATS_EVENTID);
WMITLV_CREATE_PARAM_STRUC(WMI_RADIO_LINK_STATS_EVENTID);
+/* Update WLM stats event */
+#define WMITLV_TABLE_WMI_WLM_STATS_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param, wmi_wlm_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_wlm_link_stats, wlm_link_stats, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_WLM_STATS_EVENTID);
+
/* PDEV QVIT Event */
#define WMITLV_TABLE_WMI_PDEV_QVIT_EVENTID(id,op,buf,len)\
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
@@ -4406,9 +4536,10 @@ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param,
WMITLV_CREATE_PARAM_STRUC(WMI_OEM_DMA_RING_CFG_RSP_EVENTID)
/* NAN Response/Indication Event */
-#define WMITLV_TABLE_WMI_NAN_EVENTID(id,op,buf,len) \
+#define WMITLV_TABLE_WMI_NAN_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nan_event_hdr, wmi_nan_event_hdr, fixed_param, WMITLV_SIZE_FIX) \
-WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_nan_event_info, event_info, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_NAN_EVENTID);
/* NAN discovery interface created event */
@@ -4494,9 +4625,20 @@ WMITLV_CREATE_PARAM_STRUC(WMI_NDP_INDICATION_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_app_info, WMITLV_SIZE_VAR) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_channel, ndp_channel_list, WMITLV_SIZE_VAR) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, nss_list, WMITLV_SIZE_VAR) \
-WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param, wmi_ndp_transport_ip_param, ndp_transport_ip_param, WMITLV_SIZE_FIX)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param, wmi_ndp_transport_ip_param, ndp_transport_ip_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_channel_info, ndp_channel_info, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_NDP_CONFIRM_EVENTID);
+/** NDP end indication event
+ *
+ * TLV (tag length value ) parameters follow the ndp_end_indication
+ * structure. The TLV's are:
+ * wmi_ndp_end_indication ndp_end_indication_list[];
+ */
+#define WMITLV_TABLE_WMI_NDP_END_INDICATION_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_end_indication_PROTOTYPE, ndp_end_indication_list, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_INDICATION_EVENTID);
+
/** NDL schedule update event
* TLV (tag lenght value ) parameters follow the ndl_schedule_update
* structure. The TLV's are:
@@ -4507,18 +4649,14 @@ WMITLV_CREATE_PARAM_STRUC(WMI_NDP_CONFIRM_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param, wmi_ndl_schedule_update_fixed_param_PROTOTYPE, fixed_param, WMITLV_SIZE_FIX) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ndp_instance_list, WMITLV_SIZE_VAR) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_channel, ndl_channel_list, WMITLV_SIZE_VAR) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, nss_list, WMITLV_SIZE_VAR)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, nss_list, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_channel_info, ndp_channel_info, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_NDL_SCHEDULE_UPDATE_EVENTID);
-/** NDP end indication event
- *
- * TLV (tag length value ) parameters follow the ndp_end_indication
- * structure. The TLV's are:
- * wmi_ndp_end_indication ndp_end_indication_list[];
- */
-#define WMITLV_TABLE_WMI_NDP_END_INDICATION_EVENTID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_end_indication_PROTOTYPE, ndp_end_indication_list, WMITLV_SIZE_VAR)
-WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_INDICATION_EVENTID);
+/* NDP Event */
+#define WMITLV_TABLE_WMI_NDP_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ndp_event_param, wmi_ndp_event_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_NDP_EVENTID);
/* Update RCPI Info Event */
#define WMITLV_TABLE_WMI_UPDATE_RCPI_EVENTID(id,op,buf,len) \
@@ -4761,6 +4899,35 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, debug_registers, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CHIP_POWER_STATS_EVENTID);
+#define WMITLV_TABLE_WMI_VDEV_BCN_RECEPTION_STATS_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_bcn_recv_stats_event_fixed_param, wmi_vdev_bcn_recv_stats_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_BCN_RECEPTION_STATS_EVENTID);
+
+/* WLAN GET mws coex state */
+#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_STATE_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param, wmi_vdev_get_mws_coex_state_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_STATE_EVENTID);
+
+/* WLAN GET Dynamic power back-off state */
+#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param, wmi_vdev_get_mws_coex_dpwb_state_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID);
+
+/* WLAN GET TDM state */
+#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param, wmi_vdev_get_mws_coex_tdm_state_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID);
+
+/* WLAN GET Idrx state */
+#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param, wmi_vdev_get_mws_coex_idrx_state_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID);
+
+/* WLAN GET antenna sharing state */
+#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param, wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID);
+
#define WMITLV_TABLE_WMI_PDEV_ANI_OFDM_LEVEL_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param, wmi_ani_ofdm_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_ANI_OFDM_LEVEL_EVENTID);
@@ -4961,6 +5128,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, vdev_ids, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID);
+#define WMITLV_TABLE_WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param, wmi_pdev_csc_switch_count_status_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_csc_vdev_list, vdev_info, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID);
+
/* cal version response event */
#define WMITLV_TABLE_WMI_PDEV_CHECK_CAL_VERSION_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param, wmi_pdev_check_cal_version_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -5000,6 +5172,10 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_UNIT_TEST_EVENTID);
+/* ctl failsafe check event */
+#define WMITLV_TABLE_WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_check_fixed_param, wmi_pdev_ctl_failsafe_check_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID);
/* enabling TWT complete Event */
#define WMITLV_TABLE_WMI_TWT_ENABLE_COMPLETE_EVENTID(id,op,buf,len) \
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index 5426215664a6..2332e8711a9d 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -404,6 +404,8 @@ typedef enum {
WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
/* enable/disable Action frame response as HE TB PPDU */
WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
+ /** filter packet log based on MAC address */
+ WMI_PDEV_PKTLOG_FILTER_CMDID,
/* VDEV (virtual device) specific commands */
/** vdev create */
@@ -468,6 +470,12 @@ typedef enum {
WMI_VDEV_LIMIT_OFFCHAN_CMDID,
/** To set custom software retries per-AC for vdev */
WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
+ /** To set chainmask configuration for vdev */
+ WMI_VDEV_CHAINMASK_CONFIG_CMDID,
+
+ WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
+ /* request LTE-Coex info */
+ WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
/* peer specific commands */
@@ -554,6 +562,13 @@ typedef enum {
/** WMI command related to AP channel width switching */
WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
+ /** WMI command to fetch current tx PN for the peer */
+ WMI_PEER_TX_PN_REQUEST_CMDID,
+
+ /** unmap response with peer ids */
+ WMI_PEER_UNMAP_RESPONSE_CMDID,
+
+
/* beacon/management specific commands */
/** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
@@ -584,6 +599,8 @@ typedef enum {
WMI_BCN_OFFLOAD_CTRL_CMDID,
/** Cmd to enable FW handling BSS color change notification from AP. */
WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
+ /** To configure Beacon offload quiet-ie params */
+ WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
/** commands to directly control ba negotiation directly from host. only used in test mode */
/** turn off FW Auto addba mode and let host control addba */
@@ -661,7 +678,9 @@ typedef enum {
/** Enable or Disable Fast Initial Link Setup (FILS) feature */
WMI_ENABLE_FILS_CMDID,
/** Request for roam scan stats */
- WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
+ WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
+ /** Configure BSS load parameters for roam trigger */
+ WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
/** offload scan specific commands */
/** set offload scan AP profile */
@@ -819,6 +838,10 @@ typedef enum {
/** One time request for radio channel stats */
WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
+ /** request for WLM (wlan latency manager) stats */
+ WMI_REQUEST_WLM_STATS_CMDID,
+
+
/** ARP OFFLOAD REQUEST*/
WMI_SET_ARP_NS_OFFLOAD_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
@@ -1144,6 +1167,7 @@ typedef enum {
WMI_NDP_INITIATOR_REQ_CMDID,
WMI_NDP_RESPONDER_REQ_CMDID,
WMI_NDP_END_REQ_CMDID,
+ WMI_NDP_CMDID,
/** WMI commands related to HW data filtering **/
WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
@@ -1299,6 +1323,24 @@ typedef enum {
/** get tx power event in response to VDEV_GET_TX_POWER request */
WMI_VDEV_GET_TX_POWER_EVENTID,
+ WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
+
+ /* provide LTE-Coex state */
+ WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
+
+ /* provide LTE-Coex Dynamic Power Back-off info */
+ WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
+
+ /* provide LTE-Coex TDM info */
+ WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
+
+ /* provide LTE-Coex IDRx info */
+ WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
+
+ /* provide LTE-Coex antenna sharing info */
+ WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
+
+
/* peer specific events */
/** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
@@ -1358,6 +1400,14 @@ typedef enum {
/** Peer operating mode change indication sent to host to update stats */
WMI_PEER_OPER_MODE_CHANGE_EVENTID,
+ /** WMI Event to deliver CTL Failsafe application */
+ WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
+
+ /* Event to report the switch count in BSS color of one or more VDEVs */
+ WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
+
+ /** report the current tx PN for the peer */
+ WMI_PEER_TX_PN_RESPONSE_EVENTID,
/* beacon/mgmt specific events */
/** RX management frame. the entire frame is carried along with the event. */
@@ -1418,7 +1468,9 @@ typedef enum {
/** roam synch frame event */
WMI_ROAM_SYNCH_FRAME_EVENTID,
/** various roam scan stats */
- WMI_ROAM_SCAN_STATS_EVENTID,
+ WMI_ROAM_SCAN_STATS_EVENTID,
+ /** Blacklisted AP information event */
+ WMI_ROAM_BLACKLIST_EVENTID,
/** P2P disc found */
WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
@@ -1495,6 +1547,11 @@ typedef enum {
* and report radio channel stats to host */
WMI_RADIO_CHAN_STATS_EVENTID,
+ /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
+ * and report WLM (WLAN latency manager) stats info to host */
+ WMI_WLM_STATS_EVENTID,
+
+
/* NLO specific events */
/** NLO match event after the first match */
WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
@@ -1724,6 +1781,7 @@ typedef enum {
WMI_NDP_END_INDICATION_EVENTID,
WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
WMI_NDL_SCHEDULE_UPDATE_EVENTID,
+ WMI_NDP_EVENTID,
/** WMI events related to motion detection */
WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
@@ -1944,6 +2002,10 @@ WMI_CHANNEL_CHANGE_CAUSE_CSA,
#define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
#define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
+/* Notification bit for Ext MCS 10/11 support */
+#define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
+#define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
+
#define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
@@ -2503,6 +2565,14 @@ typedef struct {
* Peer ID can be up to num_total_peers + num_extra_peers.
*/
A_UINT32 num_extra_peers;
+ /*
+ * max_ast_index - max AST index that Firmware can generate
+ * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
+ * based on num_peers configutation from Host. Hence Host needs to know the
+ * max_ast_index that Firmware can generate.
+ * A 0x0 value for max_ast_index means the target has not specified a limit.
+ */
+ A_UINT32 max_ast_index;
/*
* This fixed_param TLV is followed by these additional TLVs:
* mac_addr_list[num_extra_mac_addr];
@@ -2842,6 +2912,47 @@ typedef struct {
#define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
#define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
+ /*
+ * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
+ * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
+ * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
+ * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
+ */
+ #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
+ #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
+
+ /*
+ * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
+ * include the HTC header length in the payload length for all HTT_H2T
+ * messages.
+ * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
+ * payload length includes HTC header length. Other HTT_H2T messages'
+ * payload length does not include HTC header length.
+ * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
+ * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
+ * flag to indicate its support for this option.
+ */
+ #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
+ #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
+
+ #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
+ #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
+
+ /*
+ * If this HTT_PEER_STATS is set, then the target should use the
+ * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
+ * else the target should avoid sending the PEER_STATS_IND message.
+ */
+ #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
+ #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
+
+ /*
+ * If this BIT is set, then the target should use peer_tid_ext to analyze
+ * per peer per tid extended configurations
+ */
+ #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
+ #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
+
A_UINT32 flag1;
/** @brief smart_ant_cap - Smart Antenna capabilities information
@@ -3069,6 +3180,32 @@ typedef struct {
#define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
+#define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
+ WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
+#define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
+ WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
+
+#define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
+ WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
+#define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
+ WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
+
+#define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
+ WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
+#define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
+ WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
+
+#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
+ WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
+#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
+ WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
+
+#define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
+ WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
+#define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
+ WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
+
+
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
@@ -3148,6 +3285,43 @@ typedef struct {
*/
} wmi_tlv_buf_len_param;
+/**
+ * TLV used for specifying the demensions of a multi-dimensional array
+ * that has been stored in a flat buffer
+ */
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
+ /**
+ * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
+ * for a multi-dimensional array.
+ * If the length of outer dimension is not 1, the inner dimension
+ * shouldn't be 1.
+ * If the multi-dimensional array has less than 4 dimensions, the outer
+ * dimensions' lengths should be 1. For example, a buf[3][4] array
+ * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
+ * The outermost dimension of the array can be inferred from the array
+ * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
+ * the outermost (5th) dimension would be
+ * array length / (d1_len * d2_len * d3_len * d4_len)
+ *
+ * For security (to ensure no out-of-bounds memory access),
+ * the receiver shall validate that the product of all dimensions
+ * is equal to (or less than) the array length.
+ */
+ A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
+ A_UINT32 d2_len; /* the length of 2nd dimension array */
+ A_UINT32 d3_len; /* the length of 3rd dimension array */
+ A_UINT32 d4_len; /* the length of 4th dimension array */
+ /**
+ * Following this structure is the TLV multi-dimension array buffer:
+ * <type> buf[L1*L2*L3*L4];
+ * where, L1, L2, L3, and L4 are the values of
+ * d1_len, d2_len, d3_len and d4_len.
+ * To access the 4-D element a[i][j][k][l], the buf[] array would be
+ * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
+ */
+} wmi_tlv_arrays_len_param;
+
typedef struct {
/** Len of the SSID */
A_UINT32 ssid_len;
@@ -4425,6 +4599,33 @@ typedef struct {
A_UINT32 enabled; /* enable/disable */
} wmi_vdev_set_quiet_cmd_fixed_param;
+/*
+ * START_STOP flag value: 1 - Start, 0 - Stop
+ */
+#define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
+/*
+ * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
+ * This flag is only relevant if the START_STOP flag == 1 (start).
+ */
+#define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
+/*
+ * Enable/Disable sending Quiet IE info in SWBA event from the target
+ * 0 - Don't include Quiet IE in WMI SWBA Event
+ * 1 - Include Quiet IE in WMI SWBA Event
+ */
+#define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
+ A_UINT32 vdev_id; /* Virtual interface ID */
+ A_UINT32 period; /* period in TUs */
+ A_UINT32 duration; /* duration in TUs */
+ A_UINT32 next_start; /* offset in TUs from beacon */
+ A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
+ * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
+ */
+} wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
+
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
@@ -4516,6 +4717,43 @@ typedef struct {
A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
} wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
+typedef struct {
+ /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
+ A_UINT32 vdev_id;
+ /* number of chains to use for transmissions in 2.4 GHz band */
+ A_UINT32 num_tx_chains_2g;
+ /* number of chains to use for reception in 2.4 GHz band */
+ A_UINT32 num_rx_chains_2g;
+ /* nss to use for transmissions in 2.4 GHz band */
+ A_UINT32 tx_nss_2g;
+ /* nss to use for reception in 2.4 GHz band */
+ A_UINT32 rx_nss_2g;
+ /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
+ A_UINT32 num_tx_chains_b;
+ /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
+ A_UINT32 num_tx_chains_g;
+ /* number of chains to use for transmissions in 5 GHz band */
+ A_UINT32 num_tx_chains_5g;
+ /* number of chains to use for reception in 5 GHz band */
+ A_UINT32 num_rx_chains_5g;
+ /* nss to use for transmissions in 5 GHz band */
+ A_UINT32 tx_nss_5g;
+ /* nss to use for reception in 5 GHz band */
+ A_UINT32 rx_nss_5g;
+ /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
+ A_UINT32 num_tx_chains_a;
+ /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
+ A_UINT32 disable_tx_mrc_2g;
+ /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
+ A_UINT32 disable_rx_mrc_2g;
+ /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
+ A_UINT32 disable_tx_mrc_5g;
+ /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
+ A_UINT32 disable_rx_mrc_5g;
+} wmi_vdev_chainmask_config_cmd_fixed_param;
+
/*
* Command to enable/disable Green AP Power Save.
* This helps conserve power during AP operation. When the AP has no
@@ -5305,8 +5543,83 @@ typedef enum {
* 0- Don't use NOL in firmware
*/
WMI_PDEV_PARAM_USE_NOL,
+ /*
+ * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
+ * trigger frames sent by AP
+ * 1 - Allow RU26
+ * 0 - Do not allow RU26
+ */
+ WMI_PDEV_PARAM_UL_RU26_ALLOWED,
+
+ /*
+ * Enable/Disable sub channel marking
+ * 1 - Enable sub channel marking
+ * 0 - Disable sub channel marking (default value)
+ */
+ WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
+
+ /*
+ * Enable/Disable/Set MGMT_TTL in milliseconds.
+ * non_zero - Enable, with the specified value
+ * 0 - Disable
+ */
+ WMI_PDEV_PARAM_SET_MGMT_TTL,
+
+ /*
+ * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
+ * non_zero - Enable, with the specified value
+ * 0 - Disable
+ */
+ WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
+
+ /*
+ * TBTT_CTRL_CFG
+ * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
+ * 0 - DEFAULT -> HW_TBTT
+ * 1 - SW_TBTT -> HW_TBTT disabled,
+ * software would truncate BURST near TBTT
+ * 2 - IGNORE_TBTT
+ *
+ * BITS 3 - 31 Reserved, must be set to 0x0
+ */
+ WMI_PDEV_PARAM_SET_TBTT_CTRL,
+
} WMI_PDEV_PARAM;
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
+ /** pdev_id for identifying the MAC
+ * See macros starting with WMI_PDEV_ID_ for values.
+ */
+ A_UINT32 pdev_id;
+ /** parameter id */
+ A_UINT32 param_id;/* WMI_PDEV_PARAM */
+ /** parameter value */
+ A_UINT32 param_value;
+} wmi_pdev_set_param_cmd_fixed_param;
+
+/* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
+typedef enum {
+ WMI_TBTT_CTRL_HW_TRUNCATE = 0,
+ WMI_TBTT_CTRL_SW_TRUNCATE,
+ WMI_TBTT_CTRL_IGNORE_TBTT,
+
+ WMI_TBTT_CTRL_MAX = 0x7,
+} WMI_TBTT_CTRL_CFG;
+
+/** MACRO to set / get TBTT_CTRL_CFG bit-field within
+ * WMI_PDEV_PARAM_SET_TBTT_CTRL:
+ * bits 0~2 : TBTT_CTRL_CFG
+ * bits 3~31: Reserved (set to 0x0)
+ */
+#define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
+#define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
+
+#define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
+ WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
+#define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
+ WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
+
typedef enum {
/** Set the loglevel */
WMI_DBGLOG_LOG_LEVEL = 0x1,
@@ -5352,18 +5665,6 @@ typedef enum {
} WMI_CTS_CBW;
typedef struct {
- A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
- /** pdev_id for identifying the MAC
- * See macros starting with WMI_PDEV_ID_ for values.
- */
- A_UINT32 pdev_id;
- /** parameter id */
- A_UINT32 param_id;/* WMI_PDEV_PARAM */
- /** parameter value */
- A_UINT32 param_value;
-} wmi_pdev_set_param_cmd_fixed_param;
-
-typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
/** pdev_id for identifying the MAC
* See macros starting with WMI_PDEV_ID_ for values.
@@ -5550,6 +5851,13 @@ typedef struct {
* A ppdu_id value of 0x0 is invalid, and should be ignored.
*/
A_UINT32 ppdu_id;
+ /* ack_rssi
+ * TX mgmt ack RSSI report to host.
+ * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
+ * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
+ * the noise floor.
+ */
+ A_UINT32 ack_rssi;
} wmi_mgmt_tx_compl_event_fixed_param;
typedef struct {
@@ -5574,6 +5882,8 @@ typedef struct {
* A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
* A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
* A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
+ * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
+ * RSSI units = dB w.r.t. noise floor
*/
} wmi_mgmt_tx_compl_bundle_event_fixed_param;
@@ -5582,9 +5892,14 @@ typedef struct {
#define WMI_TPC_TX_NUM_CHAIN 4
typedef enum {
- WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
- WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
- WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
+ /* bits 0-7 for table flags */
+ WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
+ WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
+ WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
+
+ /* bits 8-11 for interface version flags */
+ WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
+ WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
} WMI_TPC_CONFIG_EVENT_FLAG;
typedef struct {
@@ -5605,13 +5920,26 @@ typedef struct {
A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
- /** pdev_id for identifying the MAC
+ /** pdev_id for identifying the MAC
* See macros starting with WMI_PDEV_ID_ for values.
*/
A_UINT32 pdev_id;
- /* This TLV is followed by a byte array:
- * A_UINT8 ratesArray[];
- */
+/* This TLV is followed by further TLVs:
+ * 1. byte array:
+ * A_UINT8 ratesArray[];
+ * 2a. multi-dimensional array dimension spec:
+ * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
+ *
+ * 2b. ctl power table
+ * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
+ * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
+ * bf is [0 or 1] for [on or off].
+ * For 2G, modes is [0, 1, 2, or 3] for
+ * [cck, legacy, (v)ht20, or (v)ht40]
+ * For 5G, modes is [0, 1, 2, or 3] for
+ * [legacy, (v)ht20, (v)ht40, or vht80]
+ * nss is [0, 1, 2, or 3] for the number of streams 1~4.
+ */
} wmi_pdev_tpc_config_event_fixed_param;
typedef struct {
@@ -5625,6 +5953,8 @@ typedef struct {
A_UINT32 ant_id[WMI_MAX_CHAINS];
/** mac address of diversity peer */
wmi_mac_addr macaddr;
+ /* EVM value for stream0 and stream1 20Mhz, dB units */
+ A_INT32 chain_evm[WMI_MAX_CHAINS];
} wmi_pdev_div_rssi_antid_event_fixed_param;
typedef struct {
@@ -5733,6 +6063,11 @@ typedef enum {
WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
} WMI_PKTLOG_ENABLE;
+typedef enum {
+ WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
+ WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
+} WMI_PKTLOG_FILTER_TYPE;
+
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
/** pdev_id for identifying the MAC
@@ -5752,6 +6087,32 @@ typedef struct {
} wmi_pdev_pktlog_disable_cmd_fixed_param;
typedef struct {
+ /** TLV tag and len; tag equals
+ * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
+ A_UINT32 tlv_header;
+ /** mac addr of the peer to be filtered */
+ wmi_mac_addr peer_mac_address;
+} wmi_pdev_pktlog_filter_info;
+
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
+ /** pdev_id for identifying the MAC
+ * See macros starting with WMI_PDEV_ID_ for values.
+ */
+ A_UINT32 pdev_id;
+ /** 0 - disable filtering, 1 - enable filtering */
+ A_UINT32 enable;
+ A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
+ A_UINT32 num_of_mac_addresses;
+ /* This TLV is followed by another TLV of array of structs
+ * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
+ */
+} wmi_pdev_pktlog_filter_cmd_fixed_param;
+
+
+
+
+typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
/** pdev_id for identifying the MAC
* See macros starting with WMI_PDEV_ID_ for values.
@@ -6180,6 +6541,18 @@ typedef struct {
wmi_mac_addr peer_macaddr;
} wmi_request_link_stats_cmd_fixed_param;
+#define WLM_STATS_REQ_LINK 0x00000001
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** WLM event request bitmask
+ * Used by host to customize the wlm stats report.
+ * Filled with a combination of WLM_STATS_xxx values.
+ */
+ A_UINT32 request_bitmask;
+} wmi_request_wlm_stats_cmd_fixed_param;
+
/* channel statistics */
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
@@ -6502,6 +6875,60 @@ typedef struct {
*/
} wmi_iface_link_stats_event_fixed_param;
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
+ /** bitmask listing which WLM stats are provided.
+ * Copied from wlm_stats_cmd_fixed_param.
+ * (This field is provided for convenience rather than necessity, since
+ * the recipient can directly check which TLV arrays have non-zero length.)
+ */
+ A_UINT32 request_bitmask;
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /**
+ * timestamp of event report, in microseconds units
+ * This timestamp is for debugging purposes only.
+ * It can be used to correlate this WLM stats event data with
+ * other WLM information uploaded through other means.
+ */
+ A_UINT32 timestamp;
+ /**
+ * Interval between two consecutive WLM stats query requests,
+ * in microseconds units.
+ * This interval is used for converting the scan_period and pwr_on_period
+ * values from within wmi_wlm_link_stats from percentage units to time
+ * units.
+ */
+ A_UINT32 req_interval;
+/*
+ * This TLV is followed by another TLV of array of struct
+ * size of(struct wmi_wlm_link_stats);
+ */
+} wmi_wlm_stats_event_fixed_param;
+
+/** wlan latency manager stats report */
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_link_stats */
+ /** average beacon rssi in dbm */
+ A_INT32 bcn_rssi;
+ /** scan period, in units of percentage of req_interval */
+ A_UINT32 scan_period;
+ /** power on period, in units of percentage of req_interval */
+ A_UINT32 pwr_on_period;
+ /** congestion level, in units of percentage of req_interval */
+ A_UINT32 congestion_level;
+ /** total phy_err count within req_interval */
+ A_UINT32 phy_err;
+ /** total mpdu_err count within req_interval */
+ A_UINT32 mpdu_err;
+ /** last TX rate in Mbps to bss peer */
+ A_UINT32 last_tx_rate;
+ /** num_ac - how many elements of the ac_stats array contain valid data */
+ A_UINT32 num_ac;
+ /** wmm ac stats */
+ wmi_wmm_ac_stats ac_stats[WLAN_MAX_AC];
+} wmi_wlm_link_stats;
+
/** Suspend option */
enum {
WMI_PDEV_SUSPEND, /* suspend */
@@ -6554,6 +6981,31 @@ typedef struct {
} wmi_rx_aggr_failure_info;
typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** peer MAC address */
+ wmi_mac_addr peer_macaddr;
+ A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
+} wmi_peer_tx_pn_request_cmd_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** peer MAC address */
+ wmi_mac_addr peer_macaddr;
+ A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
+ /** Packet Number
+ * The PN is provided in little endian order, with bits 7:0 of the PN
+ * residing in pn[0].
+ * The key_type indirectly specifies the packet number length, and thus
+ * how many bytes within pn[] are filled with valid data.
+ */
+ A_UINT8 pn[16];
+} wmi_peer_tx_pn_response_event_fixed_param;
+
+typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
wmi_stats_id stats_id;
/** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
@@ -7165,8 +7617,23 @@ typedef struct {
/**
* PDEV statistics
- * @todo
- * add all PDEV stats here
+ *
+ * This struct incorporates the wlan_dbg_stats struct, which is
+ * conditionally defined, based on the AR900B flag.
+ * The below _v1 struct variant is the unconditional definition
+ * that matches what would be conditionally defined by builds that
+ * don't use the AR900B flag. The _v2 struct variant is the
+ * unconditional definition that matches what would be conditionally
+ * defined by builds that use the AR900B flag.
+ * The _v2 struct def can be used within host or target builds
+ * that don't use the AR900B flag, but needs to interoperate with a
+ * target or host build that does use the AR900B flag.
+ * Similarly, the _v1 struct def can be used by a host or target build
+ * that does use the AR900B flag, but needs to interoperate with a
+ * target or host build that doesn't use the AR900B flag.
+ *
+ * For backwards compatibility, wmi_pdev_stats is still (conditionally)
+ * defined, as an alias for either the _v1 or _v2 variant.
*/
typedef struct {
/** Channel noise floor */
@@ -7184,9 +7651,33 @@ typedef struct {
/** Channel Tx Power */
A_UINT32 chan_tx_pwr;
/** WAL dbg stats */
- struct wlan_dbg_stats pdev_stats;
+ struct wlan_dbg_stats_v1 pdev_stats;
+} wmi_pdev_stats_v1;
-} wmi_pdev_stats;
+typedef struct {
+ /** Channel noise floor */
+ A_INT32 chan_nf;
+ /** TX frame count */
+ A_UINT32 tx_frame_count;
+ /** RX frame count */
+ A_UINT32 rx_frame_count;
+ /** rx clear count */
+ A_UINT32 rx_clear_count;
+ /** cycle count */
+ A_UINT32 cycle_count;
+ /** Phy error count */
+ A_UINT32 phy_err_count;
+ /** Channel Tx Power */
+ A_UINT32 chan_tx_pwr;
+ /** WAL dbg stats */
+ struct wlan_dbg_stats_v2 pdev_stats;
+} wmi_pdev_stats_v2;
+
+#if defined(AR900B)
+#define wmi_pdev_stats wmi_pdev_stats_v2
+#else
+#define wmi_pdev_stats wmi_pdev_stats_v1
+#endif
/**
* VDEV statistics
@@ -7252,7 +7743,7 @@ typedef struct {
typedef struct {
/** peer MAC address */
wmi_mac_addr peer_macaddr;
- /* rx duration in microseconds*/
+ /* lower 32 bits of rx duration in microseconds */
A_UINT32 rx_duration;
/** Total TX bytes (including dot11 header) sent to peer */
A_UINT32 peer_tx_bytes;
@@ -7265,7 +7756,9 @@ typedef struct {
/* Total number of received multicast & broadcast data frames corresponding to this peer */
A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
- A_UINT32 reserved[3]; /** for future use - add new peer stats here */
+ /* upper 32 bits of rx duration in microseconds */
+ A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
+ A_UINT32 reserved[2]; /** for future use - add new peer stats here */
} wmi_peer_extd_stats;
typedef struct {
@@ -8953,6 +9446,13 @@ typedef enum {
/** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
+ /** Parameter used when MTU size is sent by the host
+ * In particular, this configuration message is used for cases where the
+ * encapsulation header results in a larger max frame size than the
+ * typical 802.3 + SNAP/LLC frame.
+ */
+ WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
+
/*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
* The below vdev param types are used for prototyping, and are
@@ -9331,6 +9831,16 @@ typedef struct {
A_UINT32 mbssid_ie_offset;
/** offset (in octets/bytes) of ESP IE in beacon frame */
A_UINT32 esp_ie_offset;
+ /** CSC IE color switch count offset from the beginning of data[]
+ * Value 0 indicates CSC IE is not present in beacon template.
+ */
+ A_UINT32 csc_switch_count_offset; /* units = bytes */
+ /** Specify when to send the CSC switch count status from FW to host.
+ * See WMI_CSC_EVENT_BMAP* below for more information.
+ * E.g. if CSA switch count event is needed to be sent when the switch count
+ * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
+ */
+ A_UINT32 csc_event_bitmap;
/*
* The TLVs follows:
@@ -9357,6 +9867,11 @@ typedef struct {
*/
} wmi_prb_tmpl_cmd_fixed_param;
+#define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
+#define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
+ Same can also be achieved by setting bitmap to 0X80000001 */
+#define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
+
typedef struct {
/** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
A_UINT32 tlv_header;
@@ -9837,30 +10352,39 @@ typedef struct {
} wmi_quiet_info;
/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
-#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
+#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
- typedef struct {
- A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
- /** Bit 0: Flag to indicate an update in NOA schedule
- * Bits 7-1: Reserved
- * Bits 15-8: Index (identifies the instance of NOA sub element)
- * Bit 16: Opp PS state of the AP
- * Bits 23-17: Ctwindow in TUs
- * Bits 31-24: Number of NOA descriptors
- */
- A_UINT32 noa_attributes;
- wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
- /** Use the vdev_id only if vdev_id_valid is set */
- A_UINT32 vdev_id_valid;
- /** unique id identifying the VDEV */
- A_UINT32 vdev_id;
- }wmi_p2p_noa_info;
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
+ /** Bit 0: Flag to indicate an update in NOA schedule
+ * Bits 7-1: Reserved
+ * Bits 15-8: Index (identifies the instance of NOA sub element)
+ * Bit 16: Opp PS state of the AP
+ * Bits 23-17: Ctwindow in TUs
+ * Bits 31-24: Number of NOA descriptors
+ */
+ A_UINT32 noa_attributes;
+ wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
+ /** Use the vdev_id only if vdev_id_valid is set */
+ A_UINT32 vdev_id_valid;
+ /** unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+} wmi_p2p_noa_info;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
+ A_UINT32 vdev_id; /* unique id identifying the VDEV */
+ A_UINT8 tbttcount; /* quiet start */
+ A_UINT8 period; /* beacon intervals between quiets */
+ A_UINT16 duration; /* TUs of each quiet */
+ A_UINT16 offset; /* TUs of from TBTT of quiet start */
+} wmi_quiet_offload_info;
-#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
-#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
+#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
+#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
- WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
+ WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
WMI_F_RMW((hdr)->noa_attributes, 0x1, \
@@ -9904,62 +10428,63 @@ typedef struct {
#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
- WMI_UNIFIED_NOA_ATTR_NUM_DESC);
+ WMI_UNIFIED_NOA_ATTR_NUM_DESC);
- typedef struct {
- /** TIM info */
- wmi_tim_info tim_info;
- /** P2P NOA info */
- wmi_p2p_noa_info p2p_noa_info;
- /* TBD: More info elements to be added later */
- } wmi_bcn_info;
+typedef struct {
+ /** TIM info */
+ wmi_tim_info tim_info;
+ /** P2P NOA info */
+ wmi_p2p_noa_info p2p_noa_info;
+/* TBD: More info elements to be added later */
+} wmi_bcn_info;
- typedef struct {
- A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
- /** bitmap identifying the VDEVs, generated by the caller */
- A_UINT32 vdev_map;
- /** how many vdev's info is included in this message
- * If this field is zero, then the number of vdevs is specified by
- * the number of bits set in the vdev_map bitmap.
- */
- A_UINT32 num_vdevs;
- /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
- * wmi_tim_info tim_info[];
- * wmi_p2p_noa_info p2p_noa_info[];
- *
- */
- } wmi_host_swba_event_fixed_param;
-
- #define WMI_MAX_AP_VDEV 16
-
- typedef struct {
- A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
- /** vdev_id identifying the VDEV for which FILS should be generated */
- A_UINT32 vdev_id;
- /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
- A_UINT32 fils_tt;
- /** next TBTT time (in TU) for this vdev */
- A_UINT32 tbtt;
- } wmi_host_swfda_event_fixed_param;
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
+ /** bitmap identifying the VDEVs, generated by the caller */
+ A_UINT32 vdev_map;
+ /** how many vdev's info is included in this message
+ * If this field is zero, then the number of vdevs is specified by
+ * the number of bits set in the vdev_map bitmap.
+ */
+ A_UINT32 num_vdevs;
+/* This TLV is followed by tim_info and p2p_noa_info for each vdev:
+ * wmi_tim_info tim_info[];
+ * wmi_p2p_noa_info p2p_noa_info[];
+ * wmi_quiet_offload_info quiet_offload_info[0/1];
+ *
+ */
+} wmi_host_swba_event_fixed_param;
- typedef struct {
- A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
- /** bimtap of VDEVs that has tbtt offset updated */
- A_UINT32 vdev_map;
- /* The TLVs for tbttoffset_list will follow this TLV.
- * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
- * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
- */
- } wmi_tbtt_offset_event_fixed_param;
+#define WMI_MAX_AP_VDEV 16
- typedef struct {
- /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
- A_UINT32 tlv_header;
- /** unique id identifying the VDEV */
- A_UINT32 vdev_id;
- /** tbttoffset in TUs */
- A_UINT32 tbttoffset;
- } wmi_tbtt_offset_info;
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
+ /** vdev_id identifying the VDEV for which FILS should be generated */
+ A_UINT32 vdev_id;
+ /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
+ A_UINT32 fils_tt;
+ /** next TBTT time (in TU) for this vdev */
+ A_UINT32 tbtt;
+} wmi_host_swfda_event_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
+ /** bimtap of VDEVs that has tbtt offset updated */
+ A_UINT32 vdev_map;
+/* The TLVs for tbttoffset_list will follow this TLV.
+ * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
+ * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
+ */
+} wmi_tbtt_offset_event_fixed_param;
+
+typedef struct {
+ /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
+ A_UINT32 tlv_header;
+ /** unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+ /** tbttoffset in TUs */
+ A_UINT32 tbttoffset;
+} wmi_tbtt_offset_info;
/** Use this event if number of vdevs > 32 */
typedef struct {
@@ -10014,48 +10539,52 @@ typedef struct {
report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
} wmi_peer_set_rate_report_condition_fixed_param;
- /* Peer Type:
- * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
- * on address and vdev opmode. This is largely here to allow host to indicate that
- * peer is explicitly a TDLS peer
- */
- enum wmi_peer_type {
- WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
- WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
- WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
- WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
- WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
- WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
- * is assigned up to 127 */
- /* Reserved from 128 - 255 for
- * target internal use.*/
- WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
- };
+/* Peer Type:
+ * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
+ * on address and vdev opmode. This is largely here to allow host to indicate that
+ * peer is explicitly a TDLS peer
+ */
+enum wmi_peer_type {
+ WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
+ WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
+ WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
+ WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
+ WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
+ WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
+ /* Reserved from 128 - 255 for target internal use.*/
+ WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
+};
- typedef struct {
- A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
- /** unique id identifying the VDEV, generated by the caller */
- A_UINT32 vdev_id;
- /** peer MAC address */
- wmi_mac_addr peer_macaddr;
- /** peer type: see enum values above */
- A_UINT32 peer_type;
- } wmi_peer_create_cmd_fixed_param;
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** peer MAC address */
+ wmi_mac_addr peer_macaddr;
+ /** peer type: see enum values above */
+ A_UINT32 peer_type;
+} wmi_peer_create_cmd_fixed_param;
- typedef struct {
- A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
- /** unique id identifying the VDEV, generated by the caller */
- A_UINT32 vdev_id;
- /** peer MAC address */
- wmi_mac_addr peer_macaddr;
- } wmi_peer_delete_cmd_fixed_param;
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** peer MAC address */
+ wmi_mac_addr peer_macaddr;
+} wmi_peer_delete_cmd_fixed_param;
typedef struct {
- /**
- * TLV tag and len; tag equals
- * WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param
- */
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
A_UINT32 tlv_header;
+ /*
+ * Following this struct is the TLV:
+ * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
+ * that have been unmapped by the host
+ */
+} wmi_peer_unmap_response_cmd_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
/** unique id identifying the VDEV, generated by the caller */
A_UINT32 vdev_id;
/** peer MAC address */
@@ -10315,9 +10844,28 @@ typedef struct {
/**
* default ring routing for peer data packets,
* param_value = bit 0 for hash based routing enabled or not
- * (value 1 is enabled, value 0 is disabled)
- * bits 1:5 are for ring 32 (i.e. ring id value
- * selected from 0 to 31 values)
+ * (value 1 is enabled, value 0 is disabled)
+ * bits 1:5 are for ring 32 (i.e. ring id value
+ * selected from 0 to 31 values)
+ * bit 8 for peer based ring selection enabled or not
+ * (value 1 is enabled, value 0 is disabled
+ * bits 9-15 are valid when bit 8 is set to 1)
+ * bit 9 is for ring selection enabled for filter-pass
+ * unicast or not (value 1 is enabled, value 0 is disabled)
+ * bit 10 is for ring selection enabled for filter-pass
+ * mcast or not (value 1 is enabled, value 0 is disabled)
+ * bit 11 is for ring selection enabled for filter-pass
+ * BAR or not (value 1 is enabled, value 0 is disabled)
+ * bit 12-13 is for source ring selection value
+ * (value 0 for wbm2rxdma buf ring,
+ * value 1 for fw2rxdma buf ring,
+ * value 2 for sw2rxdma buf ring,
+ * value 3 for no buf ring)
+ * bit 14-15 is for destination ring selection value
+ * (value 0 for wbm release ring,
+ * value 1 for rxdma2fw ring,
+ * value 2 for rxdma2sw ring,
+ * value 3 for rxdma2reo ring)
*/
#define WMI_PEER_SET_DEFAULT_ROUTING 0x13
/* peer NSS for VHT160 - Extended NSS support */
@@ -10347,7 +10895,13 @@ typedef struct {
* param_value = follow 11ax spec definition
* bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
*/
-#define WMI_PEER_RARAM_XMIT_OMI 0x1c
+#define WMI_PEER_PARAM_XMIT_OMI 0x1c
+#define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
+
+/* Disable burst and assist */
+#define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
+/* Enable 11r FT Roaming */
+#define WMI_PEER_PARAM_ENABLE_FT 0x1e
/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
#define WMI_PEER_MIMO_PS_NONE 0x0
@@ -10459,13 +11013,18 @@ typedef struct {
* into multiple words for convenience
*/
typedef struct {
- A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
A_UINT32 rx_max_rate; /* Max Rx data rate */
- A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
+ A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
A_UINT32 tx_max_rate; /* Max Tx data rate */
- A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
+ /*
+ * bit [15:0] indicates MCS 0 to 9
+ * bit [23:16] indicates MCS 10 & 11
+ * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
+ */
+ A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
-}wmi_vht_rate_set;
+} wmi_vht_rate_set;
/* NOTE: It would bea good idea to represent the Tx MCS
* info in one word and Rx in another word. This is split
@@ -10958,16 +11517,22 @@ typedef struct {
* BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
* BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
* BIT 6 : Enable/Disable solicited BTM
- * BIT 7-31 : Reserved
- */
-#define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
-#define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
-#define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
-#define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
-#define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
-#define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
-#define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
-#define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
+ * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
+ * BIT 8 : BTM query preference over 11k neighbor report request
+ * BIT 9-31 : Reserved
+ */
+#define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
+#define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
+#define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
+#define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
+#define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
+#define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
+#define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
+#define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
+#define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
+#define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
+#define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
+#define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
/** WMI_ROAM_BTM_SET_NON_MATCHING_CNDS_ACTION definition: When BTM candidate is not matched with cache by WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION, determine what to do */
#define WMI_ROAM_BTM_NON_MATCHING_CNDS_SCAN_CONSUME 0 /** Invoke roam scan and consume within firmware. Applicable only when ROAM_SCAN_MODE is enabled. If ROAM_SCAN_MODE is disabled, firmware won't scan and forward it to host */
@@ -11004,6 +11569,14 @@ typedef struct {
* Default value: 300 will be set if invalid value is given
*/
A_UINT32 stick_time_seconds;
+ /* Disassoc time threshold in milli seconds
+ * This time threshold allows the target to judge whether the STA
+ * should can move to another AP immediately, or if the STA has time
+ * to calculate roaming candidates.
+ * If the disassoc_timer_threshold value is 0x0, the field should be
+ * disregarded.
+ */
+ A_UINT32 disassoc_timer_threshold;
} wmi_btm_config_fixed_param;
#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
@@ -11334,6 +11907,8 @@ typedef struct {
nss_scoring :- NSS scoring percentage information.
esp_qbss_scoring :- ESP/QBSS scoring percentage information
oce_wan_scoring : OCE WAN metrics percentage information
+ roam_score_delta_pcnt :- consider scanned AP as roam eligible candidate only if scanned AP score is at least roam_score_delta % better than connected AP score
+ roam_score_delta_mask :- roam trigger bitmap for which roam_score_delta needs to apply. The WMI_ROAM_TRIGGER_REASON_ID enum values identify which bit within the mask is used for which roam trigger cause.
*/
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
@@ -11355,6 +11930,8 @@ typedef struct {
wmi_roam_cnd_nss_scoring nss_scoring;
wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
+ A_UINT32 roam_score_delta_pcnt;
+ A_UINT32 roam_score_delta_mask;
} wmi_roam_cnd_scoring_param;
/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
@@ -11614,6 +12191,7 @@ typedef struct {
* current BSS */
A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
+ A_UINT32 roam_candidate_validity_time; /* In msec. validity duration of each entry in roam cache. If the value is 0x0, this field should be disregarded. */
} wmi_roam_offload_tlv_param;
/* flags for 11i offload */
@@ -11673,6 +12251,27 @@ typedef struct {
} wmi_roam_ese_offload_tlv_param;
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
+ A_UINT32 tlv_header;
+ /** Blaclisted AP mac address */
+ wmi_mac_addr bssid;
+ /** How much time in milli seconds to keep AP in blacklist */
+ A_UINT32 timeout;
+} wmi_roam_blacklist_with_timeout_tlv_param;
+
+/** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
+ * Ex: AP which sends BTM request with disassoc imminent is set should be
+ * moved to blacklist until disassociation timer expires
+ */
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
+ A_UINT32 vdev_id;
+ /* This TLV is followed by further TLVs:
+ * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
+ */
+} wmi_roam_blacklist_event_fixed_param;
+
/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
* generated when ever a better AP is found in the recent roam scan (or)
* when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
@@ -11880,7 +12479,7 @@ enum {
#define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
typedef struct {
- /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rssi_rejection_oce_config_param */
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
A_UINT32 tlv_header;
/** BSSID of AP, who reject (re-)assoc due to low RSSI */
wmi_mac_addr bssid;
@@ -11888,7 +12487,8 @@ typedef struct {
A_UINT32 remaining_disallow_duration;
/** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
A_INT32 requested_rssi;
-} wmi_roam_rssi_rejection_oce_config_param;
+} wmi_roam_rejection_list_config_param;
+typedef wmi_roam_rejection_list_config_param wmi_roam_rssi_rejection_oce_config_param; /* retain old struct name as an alias for the new name */
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
@@ -11907,7 +12507,7 @@ typedef struct {
* wmi_mac_addr bssid_preferred_list[];
* A_UINT32 bssid_preferred_factor[];
* wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
- * wmi_roam_rssi_rejection_oce_config_param rssi_rejection_list[]
+ * wmi_roam_rejection_list_config_param rssi_rejection_list[]
*/
} wmi_roam_filter_fixed_param;
@@ -12663,16 +13263,12 @@ typedef struct {
* pattern confirguration.
*/
typedef struct {
- /*
- * TLV tag and len; tag equals
- * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
- */
- A_UINT32 tlv_header;
- A_UINT32 enable; // 1: enable, 0: disable
- A_UINT32 pin; // pin for host wakeup
- A_UINT32 interval_low; // interval for keeping low voltage, unit: ms
- A_UINT32 interval_high; // interval for keeping high voltage, unit: ms
- A_UINT32 repeat_cnt;// repeat times for pulse (0xffffffff means forever)
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
+ A_UINT32 enable; /* 1: enable, 0: disable */
+ A_UINT32 pin; /* pin for host wakeup */
+ A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
+ A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
+ A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
* If init_state is 0, a low --> high transition
* causes a host wakeup interrupt.
@@ -13767,6 +14363,9 @@ typedef enum
*/
WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
+ /* Disable burst and assist, and restrict A-MPDU size to 32 */
+ WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
+
/* Add any action before this line */
WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
} wmi_vendor_oui_action_id;
@@ -15572,6 +16171,15 @@ typedef enum {
WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
} WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
+/*
+ * values for tid_config_supported_bitmap field,
+ * in wmi_peer_tid_configurations_cmd structure.
+ */
+typedef enum {
+ /* Used to indicate that disable_rts_cts field is valid */
+ WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
+} WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
+
/**
* Command format for the TID configuration
*/
@@ -15615,6 +16223,15 @@ typedef struct {
* tx rate to use during each retransmission.
*/
A_UINT32 sw_retry_threshold;
+
+ /*--- Start of extended structure ---*/
+ /* Bitmap to indicate which fields in the extended structure are valid.
+ * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
+ */
+ A_UINT32 tid_config_supported_bitmap;
+
+ /* Knob to enable/disable RTS/CTS per TID */
+ A_UINT32 disable_rts_cts;
} wmi_peer_tid_configurations_cmd_fixed_param;
/* The below enable/disable macros are used for both per peer CFR capture
@@ -16287,7 +16904,9 @@ typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
-} wmi_nan_host_config_param;
+ A_UINT32 reserved:30;
+} wmi_nan_host_config_param_PROTOTYPE;
+#define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
@@ -16299,6 +16918,15 @@ typedef struct {
*/
} wmi_nan_event_hdr;
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
+ A_UINT32 mac_id; /* MAC ID associated with NAN primary discovery channel; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
+ A_UINT32 status:1; /** This bit when set to 0 indicates status is successful; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
+ A_UINT32 reserved:31;
+} wmi_nan_event_info_PROTOTYPE;
+
+#define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
+
/**
* Event to indicate NAN discovery interface created
*/
@@ -16411,6 +17039,22 @@ typedef struct {
#define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
+ A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
+} wmi_ndp_channel_info_PROTOTYPE;
+
+#define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
+
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
+ A_UINT32 vdev_id; /* NDI VDEV ID */
+ A_UINT32 ndp_termination_in_progress:1; /** This bit when set to 1 indicates to termination of all NDPs associated with NDI vdev ID is started */
+ A_UINT32 reserved:31;
+} wmi_ndp_event_param_PROTOTYPE;
+
+#define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
+
/**
* NDP Initiator requesting a data session
*/
@@ -16532,6 +17176,15 @@ typedef struct {
#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
+ A_UINT32 vdev_id; /* NDI VDEV ID */
+ A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
+ A_UINT32 reserved:31;
+} wmi_ndp_cmd_param_PROTOTYPE;
+
+#define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
+
/**
* NDP End request
*/
@@ -16628,6 +17281,7 @@ typedef struct {
} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
+
/**
* Active ndp instance id
*/
@@ -19432,6 +20086,18 @@ typedef struct {
A_UINT32 qtimer_low;
/* high 32 bits of qtimer */
A_UINT32 qtimer_high;
+ /*
+ * tsf_id: TSF ID for the current vdev
+ * This field should be ignored unless the tsf_id_valid flag is set.
+ */
+ A_UINT32 tsf_id;
+ A_UINT32 tsf_id_valid;
+ /*
+ * mac_id: MAC identifier
+ * This field should be ignored unless the mac_id_valid flag is set.
+ */
+ A_UINT32 mac_id;
+ A_UINT32 mac_id_valid;
} wmi_vdev_tsf_report_event_fixed_param;
/**
@@ -20996,6 +21662,31 @@ typedef struct {
} wmi_pdev_get_chip_power_stats_cmd_fixed_param;
typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
+ /** VDEV identifier */
+ A_UINT32 vdev_id;
+} wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
+
+/*
+ * wmi mws-coex command IDs
+ */
+typedef enum {
+ WMI_MWS_COEX_STATE = 0x01,
+ WMI_MWS_COEX_DPWB_STATE,
+ WMI_MWS_COEX_TDM_STATE,
+ WMI_MWS_COEX_IDRX_STATE,
+ WMI_MWS_COEX_ANTENNA_SHARING_STATE,
+} wmi_mws_coex_cmd_id;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
+ /** VDEV identifier */
+ A_UINT32 vdev_id;
+ /** Command ID (type: wmi_mws_coex_cmd_id) */
+ A_UINT32 cmd_id;
+} wmi_vdev_get_mws_coex_info_cmd_fixed_param;
+
+typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
A_UINT32 reserved0; /* for future need */
/*
@@ -21079,6 +21770,317 @@ typedef struct {
*/
} wmi_pdev_chip_power_stats_event_fixed_param;
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
+ A_UINT32 vdev_id;
+ /* total_bcn_cnt
+ * total beacon count (tbtt instances)
+ * After this value reaches 255 it saturates and stays at 255.
+ * This field is used to determine which of the 256 bits in the
+ * bmiss_bitmap field are valid.
+ */
+ A_UINT32 total_bcn_cnt;
+ /* total_bmiss_cnt
+ * Total beacon miss count in last 255 beacons, max value is 255.
+ * This value is the number of bits set within bmiss_bitmap.
+ */
+ A_UINT32 total_bmiss_cnt;
+ /* bmiss_bitmap
+ * This bitmap indicates the status of the last 255 beacons.
+ * If a bit is set, that means the corresponding beacon was missed.
+ * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
+ * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
+ * are valid.
+ */
+ A_UINT32 bmiss_bitmap[8];
+} wmi_vdev_bcn_recv_stats_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
+ A_UINT32 vdev_id;
+
+ /* LTE-WLAN coexistence scheme bitmap
+ * Indicates the final schemes applied for the currrent Coex scenario.
+ * Bit 0 - TDM policy
+ * Bit 1 - Forced TDM policy
+ * Bit 2 - Dynamic Power Back-off policy
+ * Bit 3 - Channel Avoidance policy
+ * Bit 4 - Static Power Back-off policy
+ */
+ A_UINT32 coex_scheme_bitmap;
+
+ /* Active conflict count
+ * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
+ */
+ A_UINT32 active_conflict_count;
+
+ /* Potential conflict count
+ * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
+ */
+ A_UINT32 potential_conflict_count;
+
+ /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
+ * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
+ */
+ A_UINT32 chavd_group0_bitmap;
+
+ /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
+ * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
+ */
+ A_UINT32 chavd_group1_bitmap;
+
+ /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
+ * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
+ */
+ A_UINT32 chavd_group2_bitmap;
+
+ /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
+ * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
+ */
+ A_UINT32 chavd_group3_bitmap;
+} wmi_vdev_get_mws_coex_state_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
+ A_UINT32 vdev_id;
+
+ /* Current state of the Dynamic Power Back-off state machine
+ * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
+ * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
+ * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
+ * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
+ * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
+ * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
+ * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
+ * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
+ * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
+ * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
+ * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
+ */
+ A_UINT32 current_dpwb_state;
+
+ /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
+ * where P(N) is the power applied during current cycle.
+ * ranges from 3dBm to 21 dBM
+ */
+ A_INT32 pnp1_value;
+
+ /* Indicates the duty cycle of current LTE frame.
+ * Duty cycle: Number of UL slots with uplink data and allocated RBs.
+ */
+ A_UINT32 lte_dutycycle;
+
+ /* LTE SINR value in dB, when WLAN is ON. */
+ A_INT32 sinr_wlan_on;
+
+ /* LTE SINR value in dB, when WLAN is OFF. */
+ A_INT32 sinr_wlan_off;
+
+ /* LTE blocks with error for the current bler report.
+ * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
+ */
+ A_UINT32 bler_count;
+
+ /* Number of LTE blocks considered for bler count report.
+ * Bler repot will be generated after the reception of every "block_count" number of blocks.
+ */
+ A_UINT32 block_count;
+
+ /* WLAN RSSI level
+ * WLAN RSSI is devided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
+ * 0-Good, 1-Moderate, 2-Low
+ */
+ A_UINT32 wlan_rssi_level;
+
+ /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
+ * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
+ */
+ A_INT32 wlan_rssi;
+
+ /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
+ * 1 - TDM triggered.
+ * 0 - TDM not triggered.
+ */
+ A_UINT32 is_tdm_running;
+} wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
+ A_UINT32 vdev_id;
+ /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
+ * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
+ * Bit 0 - SINR TDM policy.
+ * Bit 1 - RSSI TDM policy.
+ * Bit 2 - Low Rx rate TDM policy
+ * Bit 3 - Sticky TDM policy
+ */
+ A_UINT32 tdm_policy_bitmap;
+
+ /* TDM LTE/WLAN sub-frame bitmap
+ * Indicates the bitmap of LTE/WLAN sub-frames.
+ * value 0: WLAN slot.
+ * value 1: LTE slot.
+ */
+ A_UINT32 tdm_sf_bitmap;
+} wmi_vdev_get_mws_coex_tdm_state_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
+ A_UINT32 vdev_id;
+
+ /* SUB0 LTE-coex tech.
+ *------------------------
+ * TECH TECH_ID
+ *------------------------
+ * LTE 0
+ * TDSCDMA 1
+ * GSM1 2
+ * ONEX 3
+ * HDR 4
+ * WCDMA 5
+ * GSM2 6
+ * GSM3 7
+ * WCDMA2 8
+ * LTE2 9
+ * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
+ */
+ A_UINT32 sub0_techid;
+
+ /* SUB0 mitigation policy.
+ * Indicates the mitigation policy used to coexist with WLAN.
+ * 1 - Tx blanking
+ * 2 - Static power back-off
+ */
+ A_UINT32 sub0_policy;
+
+ /* Set if SUB0 is in link critical state.
+ * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
+ */
+ A_UINT32 sub0_is_link_critical;
+
+ /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
+ * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
+ */
+ A_INT32 sub0_static_power;
+
+ /* LTE SUB0 RSSI value in dBm */
+ A_INT32 sub0_rssi;
+
+ /* SUB1 LTE-coex tech.
+ *------------------------
+ * TECH TECH_ID
+ *------------------------
+ * LTE 0
+ * TDSCDMA 1
+ * GSM1 2
+ * ONEX 3
+ * HDR 4
+ * WCDMA 5
+ * GSM2 6
+ * GSM3 7
+ * WCDMA2 8
+ * LTE2 9
+ * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
+ */
+ A_UINT32 sub1_techid;
+
+ /* SUB1 mitigation policy.
+ * Indicates the mitigation policy used to coexist with WLAN.
+ * 1 - Tx blanking
+ * 2 - Static power back-off
+ */
+ A_UINT32 sub1_policy;
+
+ /* Set if SUB1 is in link critical state.
+ * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
+ */
+ A_UINT32 sub1_is_link_critical;
+
+ /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
+ * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
+ */
+ A_INT32 sub1_static_power;
+
+ /* LTE SUB1 RSSI value in dBm */
+ A_INT32 sub1_rssi;
+} wmi_vdev_get_mws_coex_idrx_state_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
+ A_UINT32 vdev_id;
+
+ /* BDF values of Coex flags.
+ * coexflag 0x1 = MWS Coex enabled
+ * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
+ */
+ A_UINT32 coex_flags;
+
+ /* BDF values of Coex Antenna sharing config
+ * coex_config 0x0 = no Antenna sharing
+ * coexconfig 0x1 = switched based Antenna sharing
+ * coexconfig 0x2 = splitter based Antenna sharing
+ */
+ A_UINT32 coex_config;
+
+ /* Tx Chain mask value
+ * Bit 0: Tx chain-0
+ * Bit 1: Tx Chain-1
+ * value: 0x1 - Operating in 1X1
+ * value: 0x3 - Operating in 2X2
+ */
+ A_UINT32 tx_chain_mask;
+
+ /* Rx Chain mask value
+ * Bit 0: Rx chain-0
+ * Bit 1: Rx Chain-1
+ * value: 0x1 - Operating in 1X1
+ * value: 0x3 - Operating in 2X2
+ */
+ A_UINT32 rx_chain_mask;
+
+ /* Currently active Rx Spatial streams
+ * Bit 0: Rx Spatial Stream-0
+ * Bit 1: Rx Spatial Stream-1
+ */
+ A_UINT32 rx_nss;
+
+ /* Forced MRC policy type
+ * BTC_FORCED (0x01)
+ * RSSI_FORCED (0x02)
+ * MODEM_ACQ_FORCED (0x04)
+ */
+ A_UINT32 force_mrc;
+
+ /* RSSI value considered for MRC
+ * 1: Data RSSI
+ * 2: Beacon RSSI
+ */
+ A_UINT32 rssi_type;
+
+ /* RSSI value measured at Chain-0 in dBm */
+ A_INT32 chain0_rssi;
+
+ /* RSSI value measured at Chain-1 in dBm */
+ A_INT32 chain1_rssi;
+
+ /* RSSI value of two chains combined in dBm */
+ A_INT32 combined_rssi;
+
+ /* Absolute imbalance between two Rx chains in dB */
+ A_UINT32 imbalance;
+
+ /* RSSI threshold defined for the above imbalance value in dBm.
+ * Based on the degree of imbalance between the rx chains, different
+ * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
+ * Combining) use of multiple rx chains is suitable.
+ * This field shows the RSSI threshold below which MRC is used.
+ */
+ A_INT32 mrc_threshold;
+
+ /* Antenna grant duration to WLAN, in milliseconds */
+ A_UINT32 grant_duration;
+} wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
+
typedef enum wmi_chip_power_save_failure_reason_code_type {
WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
WMI_HW_POWER_SAVE_FAILURE_REASON,
@@ -21173,7 +22175,22 @@ typedef enum wmi_coex_config_type {
WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
- WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN antenna, arg1 isolation in db*/
+ WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
+ * The arguments are interpreted differently
+ * depending on whether the target suppports
+ * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
+ * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
+ * arg1 => isolation between BT and WLAN chains,
+ * dB units,
+ * same isolation for all chains
+ * Else:
+ * arg1 bits 7:0 - chain 0 isolation, in dB
+ * arg1 bits 15:8 - chain 1 isolation, in dB
+ * arg1 bits 23:16 - chain 2 isolation, in dB
+ * arg1 bits 31:24 - chain 3 isolation, in dB
+ * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
+ * 1 => Different isolation b/w BT and each WLAN chain
+ */
WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26,/*config BT low rssi threshold (dbm units)*/
WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27,/*config bt interference level (dbm units)
arg1 low - lower limit
@@ -21187,6 +22204,20 @@ typedef enum wmi_coex_config_type {
WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
+ /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
+ * config to T_PRIO T_DELAY parameter for each case
+ * arg1 - wlan/bt state
+ * 0: beacon tx
+ * 1: wlan connecting
+ * 2: wlan in dhcp
+ * 3: a2dp critical
+ * 4: eSCO
+ * arg2 - t_prio for low priority traffic (microsecond units)
+ * arg3 - t_delay for low priority traffic (microsecond units)
+ * arg4 - t_prio for high priority traffic (microsecond units)
+ * arg5 - t_delay for high priority traffic (microsecond units)
+ */
+ WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
} WMI_COEX_CONFIG_TYPE;
typedef struct {
@@ -21493,6 +22524,8 @@ typedef struct {
* - .
* - .
* - bit 23 - for NSS 8
+ * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
+ * are valid
* Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
*/
A_UINT32 vht_supp_mcs_2G;
@@ -21535,6 +22568,8 @@ typedef struct {
* - .
* - .
* - bit 23 - for NSS 8
+ * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
+ * are valid
* Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
*/
A_UINT32 vht_supp_mcs_5G;
@@ -21991,6 +23026,8 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
/* request peer info from FW to get PEER_INFO_EVENTID */
WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
+ /* unmap response for a peer */
+ WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
/* beacon/management specific commands */
@@ -22516,6 +23553,16 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
+ WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
+ WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
+ WMI_RETURN_STRING(WMI_NDP_CMDID);
+ WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
+ WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
+ WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
+ WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
+ WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
+ WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
+ WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
}
return "Invalid WMI cmd";
@@ -22817,6 +23864,28 @@ typedef struct {
*/
} wmi_pdev_csa_switch_count_status_event_fixed_param;
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
+ A_UINT32 vdev_id;
+ A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
+} wmi_csc_vdev_list;
+
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
+ A_UINT32 tlv_header;
+ /** pdev_id for identifying the MAC
+ * See macros starting with WMI_PDEV_ID_ for values.
+ * In non-DBDC case host should set it to 0
+ */
+ A_UINT32 pdev_id;
+ /** CSC switch count value in the last transmitted beacon */
+ A_UINT32 current_switch_count;
+
+ /* The TLVs follows this structure:
+ * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
+ */
+} wmi_pdev_csc_switch_count_status_event_fixed_param;
+
/* Operation types for packet routing command */
typedef enum {
WMI_PDEV_ADD_PKT_ROUTING,
@@ -23019,7 +24088,7 @@ typedef enum {
#define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
/* bit 2-3: define policy of dwell time/duration of each foreign channel
- (b2 b3)
+ (b3 b2)
(0 0 ): Default dwell time
(0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
@@ -23037,7 +24106,7 @@ typedef enum {
/* bit 6-7 of flags is used for roaming operation */
/* bit 6-7: define roaming policy:
- (b6 b7)
+ (b7 b6)
(0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
(0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
(1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
@@ -23075,6 +24144,7 @@ typedef enum {
WMI_ROAM_TRIGGER_REASON_FORCED,
WMI_ROAM_TRIGGER_REASON_BTM,
WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
+ WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
WMI_ROAM_TRIGGER_REASON_MAX,
} WMI_ROAM_TRIGGER_REASON_ID;
@@ -23182,7 +24252,7 @@ typedef struct {
*/
A_UINT32 mode;
A_UINT32 rate; /* rate index */
- A_UINT32 nss; /* number of spacial stream */
+ A_UINT32 nss; /* number of spatial stream */
A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
A_UINT32 chain_mask; /* mask for the antenna set to get power */
A_UINT32 chain_index; /* index for the antenna */
@@ -23789,6 +24859,13 @@ typedef struct {
* Hence sending the NF values in dBm units as meta data information.
*/
A_INT32 noise_floor[WMI_MAX_CHAINS];
+ /**
+ * The time taken by target in micro seconds to complete the reset routine
+ * and re-initiate the spectral scan.
+ * If the delay is 0, the WAR to bookkeep the timestamp wont be exercised
+ * in HOST.
+ */
+ A_UINT32 reset_delay;
} wmi_dma_buf_release_spectral_meta_data;
typedef enum {
@@ -23802,8 +24879,7 @@ typedef enum {
AGC_GAIN_RSSI_CORR_BASED = 1,
} WMI_SPECTRAL_SCALING_FORMULA_ID;
-typedef struct
-{
+typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
@@ -23814,6 +24890,12 @@ typedef struct
} wmi_spectral_bin_scaling_params;
typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
+ A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
+ A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
+} wmi_pdev_ctl_failsafe_check_fixed_param;
+
+typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
A_UINT32 enable; /* Enable/disable */
@@ -24895,6 +25977,18 @@ typedef struct
A_UINT32 rx_stats;
} wmi_ocb_channel_t;
+/** BSS load configuration parameters for roam trigger */
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
+ A_UINT32 vdev_id;
+ /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
+ A_UINT32 beacons_min_count;
+ /** Monitor time window in seconds */
+ A_UINT32 monitor_time_window;
+ /** BSS load threshold after which roam scan should trigger */
+ A_UINT32 bss_load_threshold;
+} wmi_roam_bss_load_config_cmd_fixed_param;
+
typedef struct {
/** TLV tag and len; tag equals
* WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index 96c590fa5d5d..46334354db4c 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/wmi_version.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -36,7 +36,7 @@
#define __WMI_VER_MINOR_ 0
/** WMI revision number has to be incremented when there is a
* change that may or may not break compatibility. */
-#define __WMI_REVISION_ 581
+#define __WMI_REVISION_ 621
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 9a937b60eda8..baa582ff9352 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -3406,6 +3406,13 @@ void hif_pci_save_htc_htt_config_endpoint(int htc_endpoint)
scn->hif_sc->htc_endpoint = htc_endpoint;
}
+void hif_get_reg(void *ol_sc, u32 address, u32 *data)
+{
+ struct ol_softc *scn = (struct ol_softc *)ol_sc;
+
+ HIFDiagReadAccess(scn->hif_hdl, address, data);
+}
+
void hif_get_hw_info(void *ol_sc, u32 *version, u32 *revision)
{
*version = ((struct ol_softc *)ol_sc)->target_version;
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.h b/CORE/SERVICES/HIF/PCIe/if_pci.h
index 4ab0749b832e..5849e3fccee5 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.h
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016 2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -176,6 +176,16 @@ void hif_deinit_adf_ctx(void *ol_sc);
void hif_get_hw_info(void *ol_sc, u32 *version, u32 *revision);
void hif_set_fw_info(void *ol_sc, u32 target_fw_version);
+/**
+ * hif_get_reg() - get register value
+ * @ol_sc: pointer to ol_sc
+ * @address: register address
+ * @data register value
+ *
+ * Return NULL
+ */
+void hif_get_reg(void *ol_sc, u32 address, u32 *data);
+
#ifdef IPA_UC_OFFLOAD
/*
* Micro controller needs PCI BAR address to access CE register
diff --git a/CORE/SERVICES/HIF/USB/if_usb.c b/CORE/SERVICES/HIF/USB/if_usb.c
index 2aadfc2ea2db..56ffd63ff055 100644
--- a/CORE/SERVICES/HIF/USB/if_usb.c
+++ b/CORE/SERVICES/HIF/USB/if_usb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016, 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016, 2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -434,6 +434,7 @@ static int hif_usb_resume(struct usb_interface *interface)
return 0;
}
+#ifndef USB_RESET_RESUME_PERSISTENCE
static int hif_usb_reset_resume(struct usb_interface *intf)
{
HIF_DEVICE_USB *device = usb_get_intfdata(intf);
@@ -444,6 +445,14 @@ static int hif_usb_reset_resume(struct usb_interface *intf)
printk("Exit:%s,Line:%d \n\r", __func__,__LINE__);
return 0;
}
+#else
+static int hif_usb_reset_resume(struct usb_interface *intf)
+{
+ printk("Enter:%s,Line:%d \n\r", __func__,__LINE__);
+ hif_usb_resume(intf);
+ printk("Exit:%s,Line:%d \n\r", __func__,__LINE__);
+}
+#endif
static struct usb_device_id hif_usb_id_table[] = {
{USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ATHR, 0x9378, 0xFF, 0xFF, 0xFF)},
@@ -639,6 +648,13 @@ void hif_reset_soc(void *ol_sc)
/* TODO */
}
+void hif_get_reg(void *ol_sc, u32 address, u32 *data)
+{
+ struct ol_softc *scn = (struct ol_softc *)ol_sc;
+
+ HIFDiagReadAccess(scn->hif_hdl, address, data);
+}
+
void hif_get_hw_info(void *ol_sc, u32 *version, u32 *revision)
{
u_int32_t hif_type, target_type;
diff --git a/CORE/SERVICES/HIF/USB/if_usb.h b/CORE/SERVICES/HIF/USB/if_usb.h
index 1cd06d2f0c91..51e37c976f48 100644
--- a/CORE/SERVICES/HIF/USB/if_usb.h
+++ b/CORE/SERVICES/HIF/USB/if_usb.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -99,6 +99,16 @@ void hif_disable_isr(void *ol_sc);
void hif_reset_soc(void *ol_sc);
void hif_deinit_adf_ctx(void *ol_sc);
+/**
+ * hif_get_reg() - get register value
+ * @ol_sc: pointer to ol_sc
+ * @address: register address
+ * @data register value
+ *
+ * Return NULL
+ */
+void hif_get_reg(void *ol_sc, u32 address, u32 *data);
+
void hif_get_hw_info(void *ol_sc, u32 *version, u32 *revision);
void hif_set_fw_info(void *ol_sc, u32 target_fw_version);
#endif /* __ATH_USB_H__ */
diff --git a/CORE/SERVICES/HIF/hif_oob.c b/CORE/SERVICES/HIF/hif_oob.c
new file mode 100644
index 000000000000..61eac69ad0a8
--- /dev/null
+++ b/CORE/SERVICES/HIF/hif_oob.c
@@ -0,0 +1,262 @@
+/*
+ * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <linux/gpio.h>
+#include <hif_oob.h>
+#include <vos_api.h>
+#if defined(HIF_SDIO)
+#include <hif_internal.h>
+#endif
+#define ATH_MODULE_NAME hif
+#include "a_debug.h"
+
+#if defined(HIF_SDIO)
+#define hif_device_oob_ctx(device) (&((device)->hif_oob))
+#define hif_oob_irq_handler_ctx(device) ((device)->func)
+#else
+/*Please add oob context if USB, PCIE supports OOB*/
+#define hif_device_oob_ctx(device) NULL
+#define hif_oob_irq_handler_ctx(device) NULL
+#endif
+
+#define OOB_INVALID_GPIO 255
+/**
+ * hif_oob_irq() - oob irq handler
+ * @irq: irq number
+ * @dev_id: HIF DEVICE
+ *
+ * Return: IRQ_HANDLED
+ */
+static irqreturn_t hif_oob_irq(int irq, void *dev)
+{
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx((HIF_DEVICE *)dev);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return IRQ_HANDLED;
+ }
+
+ if (hif_oob->oob_gpio_flag & GPIO_OOB_INTERRUPT_ENABLE)
+ up(&hif_oob->oob_sem);
+
+ return IRQ_HANDLED;
+}
+
+/**
+ * oob_task() - thread to handle all the oob interrupts
+ * @pm_oob: HIF DEVICE
+ *
+ * Return: 0
+ */
+static int oob_task(void *pm_oob)
+{
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx((HIF_DEVICE *)pm_oob);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return A_ERROR;
+ }
+ while (!hif_oob->oob_shutdown) {
+ if (down_interruptible(&hif_oob->oob_sem) != 0)
+ continue;
+ while (!gpio_get_value(hif_oob->oob_gpio_num))
+ if (hif_oob->wow_maskint)
+ break;
+ hif_oob->oob_irq_handler(
+ hif_oob_irq_handler_ctx((HIF_DEVICE *)pm_oob));
+ }
+
+ complete_and_exit(&hif_oob->oob_completion, 0);
+
+ return 0;
+}
+
+int hif_oob_claim_irq(oob_irq_handler_t handler, HIF_DEVICE *hif_device)
+{
+ struct sched_param param = { .sched_priority = 1 };
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx(hif_device);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return A_ERROR;
+ }
+ if (hif_oob->oob_task) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("oob task already created"));
+ return 0;
+ }
+ sema_init(&hif_oob->oob_sem, 0);
+ hif_oob->oob_task = kthread_create(oob_task, hif_device,
+ "koobirqd");
+ if (IS_ERR(hif_oob->oob_task)) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("fail to create oob task"));
+ hif_oob->oob_task = NULL;
+ return A_ERROR;
+ } else {
+ hif_oob->oob_irq_handler = handler;
+ hif_oob->oob_shutdown = 0;
+ sched_setscheduler(hif_oob->oob_task, SCHED_FIFO,
+ &param);
+ wake_up_process(hif_oob->oob_task);
+ up(&hif_oob->oob_sem);
+ AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("start oob task"));
+ }
+
+ return 0;
+}
+
+int hif_oob_release_irq(HIF_DEVICE *hif_device)
+{
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx(hif_device);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return A_ERROR;
+ }
+ if (!hif_oob->oob_task) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("oob_task is NULL. return"));
+ } else {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("try to kill the oob task"));
+ init_completion(&hif_oob->oob_completion);
+ hif_oob->oob_shutdown = 1;
+ up(&hif_oob->oob_sem);
+ wait_for_completion(&hif_oob->oob_completion);
+ hif_oob->oob_task = NULL;
+ }
+
+ return 0;
+}
+
+void hif_oob_gpio_deinit(HIF_DEVICE *device)
+{
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx(device);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return;
+ }
+
+ if (hif_oob->oob_irq_num >= 0 && hif_oob->oob_gpio_flag) {
+ if (hif_oob->oob_irq_wake_enabled) {
+ if (!disable_irq_wake(hif_oob->oob_irq_num))
+ hif_oob->oob_irq_wake_enabled = false;
+ }
+ disable_irq(hif_oob->oob_irq_num);
+ free_irq(hif_oob->oob_irq_num, device);
+ gpio_free(hif_oob->oob_gpio_num);
+ hif_oob->oob_irq_num = -1;
+ }
+}
+
+int hif_oob_gpio_init(HIF_DEVICE *device, uint32_t oob_gpio,
+ uint32_t oob_gpio_flag)
+{
+ int ret = 0;
+ unsigned long irq_flags = 0;
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx(device);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return A_ERROR;
+ }
+
+ ret = gpio_request(oob_gpio, "oob_irq");
+
+ if (ret) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("gpio_request %d ret %d", oob_gpio, ret));
+ goto err_oob_req;
+ }
+
+ ret = gpio_direction_input(oob_gpio);
+
+ if (ret) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("gpio_direction_input %d ret %d", oob_gpio, ret));
+ goto err_oob_int;
+ }
+
+ hif_oob->oob_irq_num = gpio_to_irq(oob_gpio);
+ if (hif_oob->oob_irq_num < 0) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("%s: gpio_to_irq %d ret %d", __func__, oob_gpio, ret));
+ goto err_oob_int;
+ }
+
+ if (oob_gpio_flag & GPIO_OOB_INTERRUPT_ENABLE)
+ irq_flags = IRQF_TRIGGER_FALLING;
+ else
+ irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
+
+ ret = request_irq(hif_oob->oob_irq_num, hif_oob_irq, irq_flags,
+ "oob_irq", device);
+ if (ret) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("%s: request_irq %d ret %d", __func__, oob_gpio, ret));
+ goto err_oob_int;
+ } else {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("%s: gpio %d request oob irq", __func__, oob_gpio));
+ if (oob_gpio_flag & GPIO_OOB_WAKEUP_ENABLE) {
+ ret = enable_irq_wake(hif_oob->oob_irq_num);
+ if (ret) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("enable irq wake failed %d", ret));
+ hif_oob->oob_irq_wake_enabled = false;
+ goto err_oob_wakeup;
+ } else {
+ hif_oob->oob_irq_wake_enabled = true;
+ }
+ }
+ }
+ hif_oob->oob_gpio_num = oob_gpio;
+ hif_oob->oob_gpio_flag = oob_gpio_flag;
+
+ return ret;
+
+err_oob_wakeup:
+ disable_irq(hif_oob->oob_irq_num);
+ free_irq(hif_oob->oob_irq_num, device);
+err_oob_int:
+ gpio_free(oob_gpio);
+err_oob_req:
+ hif_oob->oob_irq_num = -1;
+ hif_oob->oob_gpio_num = OOB_INVALID_GPIO;
+ hif_oob->oob_irq_wake_enabled = false;
+ return ret;
+}
+
+int hif_set_wow_maskint(HIF_DEVICE *device, bool value)
+{
+ struct hif_oob_ctx *hif_oob = hif_device_oob_ctx(device);
+
+ if (!hif_oob) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("NULL hif oob\n"));
+
+ return A_ERROR;
+ }
+
+ hif_oob->wow_maskint = value;
+
+ return A_OK;
+}
diff --git a/CORE/SERVICES/HIF/hif_oob.h b/CORE/SERVICES/HIF/hif_oob.h
new file mode 100644
index 000000000000..0d045e1d510f
--- /dev/null
+++ b/CORE/SERVICES/HIF/hif_oob.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _HIF_OOB_H_
+#define _HIF_OOB_H_
+
+#include <linux/kthread.h>
+
+#include <hif.h>
+
+#define GPIO_OOB_WAKEUP_ENABLE (1 << 0)
+
+#define GPIO_OOB_INTERRUPT_ENABLE (1 << 1)
+
+#ifdef CONFIG_GPIO_OOB
+typedef void (*oob_irq_handler_t) (void *dev_para);
+
+struct hif_oob_ctx {
+ struct semaphore oob_sem;
+ struct completion oob_completion;
+ struct task_struct *oob_task;
+ int oob_irq_num;
+ uint32_t oob_gpio_num;
+ uint32_t oob_gpio_flag;
+ bool oob_irq_wake_enabled;
+ bool oob_shutdown;
+ oob_irq_handler_t oob_irq_handler;
+ bool wow_maskint;
+};
+
+/**
+ * hif_oob_gpio_init() - initialize gpio oob
+ * @device: HIF handle
+ * @oob_gpio: oob gpio number
+ * @oob_gpio_flag: oob gpio flag
+ *
+ * Return: 0 if succeeds.
+ */
+int hif_oob_gpio_init(HIF_DEVICE *device, uint32_t oob_gpio,
+ uint32_t oob_gpio_flag);
+
+/**
+ * hif_oob_gpio_deinit() - deinitialize gpio oob
+ * @device: HIF handle
+ *
+ * Return: NULL
+ */
+void hif_oob_gpio_deinit(HIF_DEVICE *device);
+
+/**
+ * hif_oob_claim_irq() - create oob task
+ * @handler: oob irq handler
+ * @hif_device: HIF DEVICE
+ *
+ * Return: 0 if succeeds
+ */
+int hif_oob_claim_irq(oob_irq_handler_t handler, HIF_DEVICE *hif_device);
+
+/**
+ * hif_oob_release_irq() - delete oob task
+ * @hif_device: HIF DEVICE
+ *
+ * Return: 0
+ */
+int hif_oob_release_irq(HIF_DEVICE *hif_device);
+
+/**
+ * hif_set_wow_maskint() - configure wow maskint
+ * @hif_device: HIF DEVICE
+ * @value: value to set
+ *
+ * Return: 0 if succeeds
+ */
+int hif_set_wow_maskint(HIF_DEVICE *device, bool value);
+#else
+static inline int hif_oob_gpio_init(HIF_DEVICE *device, uint32_t oob_gpio,
+ uint32_t oob_gpio_flag)
+{
+ return 0;
+}
+
+static inline void hif_oob_gpio_deinit(HIF_DEVICE *device)
+{
+}
+
+static inline int hif_set_wow_maskint(HIF_DEVICE *device, bool value)
+{
+ return 0;
+}
+#endif
+
+#endif
diff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
index 12c5fd47dbb3..0da4defafc3e 100644
--- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
+++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -481,6 +481,13 @@ void hif_reset_soc(void *ol_sc)
ENTER("- dummy function!");
}
+void hif_get_reg(void *ol_sc, u32 address, u32 *data)
+{
+ struct ol_softc *scn = (struct ol_softc *)ol_sc;
+
+ HIFDiagReadAccess(scn->hif_hdl, address, data);
+}
+
void hif_get_hw_info(void *ol_sc, u32 *version, u32 *revision)
{
struct ol_softc *ol_sc_local = (struct ol_softc *)ol_sc;
diff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.h b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.h
index 198d40c2c907..ccb0d3cec26e 100644
--- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.h
+++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -104,6 +104,16 @@ void hif_reset_soc(void *ol_sc);
void hif_register_tbl_attach(u32 hif_type);
void target_register_tbl_attach(u32 target_type);
+/**
+ * hif_get_reg() - get register value
+ * @ol_sc: pointer to ol_sc
+ * @address: register address
+ * @data register value
+ *
+ * Return NULL
+ */
+void hif_get_reg(void *ol_sc, u32 address, u32 *data);
+
void hif_get_hw_info(void *ol_sc, u32 *version, u32 *revision);
void hif_set_fw_info(void *ol_sc, u32 target_fw_version);
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
index 9d3ae4f07093..0b4b80a02936 100644
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014, 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 2016-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -36,6 +36,7 @@
#include <adf_os_lock.h>
#include "hif.h"
#include "hif_sdio_common.h"
+#include "hif_oob.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
#include <linux/scatterlist.h>
#define HIF_LINUX_MMC_SCATTER_SUPPORT
@@ -54,9 +55,11 @@ struct bus_request_record {
u_int32_t len;
u_int64_t time;
};
-
+#ifdef QCA_TXRX_PERF
+#define BUS_REQUEST_MAX_NUM 163
+#else
#define BUS_REQUEST_MAX_NUM 105
-
+#endif
#define SDIO_CLOCK_FREQUENCY_DEFAULT 25000000
#define SDWLAN_ENABLE_DISABLE_TIMEOUT 20
#define FLAGS_CARD_ENAB 0x02
@@ -135,6 +138,9 @@ struct hif_device {
/* mailbox swapping for control and data svc*/
A_BOOL swap_mailbox;
bool ctrl_response_timeout;
+#ifdef CONFIG_GPIO_OOB
+ struct hif_oob_ctx hif_oob;
+#endif
};
#define HIF_DMA_BUFFER_SIZE (4 * 1024)
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
index 894f20b6b44a..8cfcc97b0223 100644
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1873,10 +1873,86 @@ HIFAckInterrupt(HIF_DEVICE *device)
/* Acknowledge our function IRQ */
}
+#ifdef CONFIG_GPIO_OOB
void
HIFUnMaskInterrupt(HIF_DEVICE *device)
{
- int ret;;
+ int ret;
+
+ if (!device || !device->func)
+ return;
+
+ ENTER();
+ /*
+ * On HP Elitebook 8460P, interrupt mode is not stable in high
+ * throughput, so polling method should be used instead of
+ * interrupt mode
+ */
+ if (brokenirq) {
+ pr_err("AR6000:Using broken IRQ mode\n");
+ /* disable IRQ support even the capability exists */
+ device->func->card->host->caps &= ~MMC_CAP_SDIO_IRQ;
+ }
+ /* Register the IRQ Handler */
+ sdio_claim_host(device->func);
+ if (device->hif_oob.oob_gpio_flag & GPIO_OOB_INTERRUPT_ENABLE) {
+ ret = hif_oob_claim_irq(hif_oob_irq_handler, device);
+ } else {
+ if (false == vos_oob_enabled())
+ ret = sdio_claim_irq(device->func, hifIRQHandler);
+ else
+ ret = vos_register_oob_irq_handler(hif_oob_irq_handler,
+ device->func);
+ }
+
+ sdio_release_host(device->func);
+ AR_DEBUG_ASSERT(ret == 0);
+ EXIT();
+}
+
+void HIFMaskInterrupt(HIF_DEVICE *device)
+{
+ int ret;
+
+ if (!device || !device->func)
+ return;
+ ENTER();
+
+ /* Mask our function IRQ */
+ sdio_claim_host(device->func);
+ while (atomic_read(&device->irqHandling)) {
+ sdio_release_host(device->func);
+ schedule_timeout_interruptible(HZ / 10);
+ sdio_claim_host(device->func);
+ }
+
+ if (device->hif_oob.oob_gpio_flag & GPIO_OOB_INTERRUPT_ENABLE) {
+ ret = hif_oob_release_irq(device);
+ } else {
+ if (false == vos_oob_enabled())
+ ret = sdio_release_irq(device->func);
+ else
+ ret = vos_unregister_oob_irq_handler(device->func);
+ }
+
+ sdio_release_host(device->func);
+ if (ret) {
+ if (ret == -ETIMEDOUT) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_WARN,
+ ("AR6000: Timeout mask interrupt. Card rm?"));
+ } else {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
+ ("AR6000: Unable to mask interrupt %d\n", ret));
+ AR_DEBUG_ASSERT(ret == 0);
+ }
+ }
+ EXIT();
+}
+#else
+void
+HIFUnMaskInterrupt(HIF_DEVICE *device)
+{
+ int ret;
if (device == NULL || device->func == NULL)
return;
@@ -1937,6 +2013,7 @@ void HIFMaskInterrupt(HIF_DEVICE *device)
}
EXIT();
}
+#endif
void hif_release_bus_requests(HIF_DEVICE *device)
{
@@ -2397,6 +2474,7 @@ static int hifDeviceSuspend(struct device *dev)
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: set sdio pm flags MMC_PM_WAKE_SDIO_IRQ failed: %d\n",ret));
return ret;
}
+ hif_set_wow_maskint(device, true);
HIFMaskInterrupt(device);
device->DeviceState = HIF_DEVICE_STATE_WOW;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("hifDeviceSuspend: wow success\n"));
@@ -2414,6 +2492,7 @@ static int hifDeviceSuspend(struct device *dev)
* But before adding finishe callback function to these handler, sleep wait is a simple method.
*/
msleep(100);
+ hif_set_wow_maskint(device, true);
HIFMaskInterrupt(device);
device->DeviceState = HIF_DEVICE_STATE_DEEPSLEEP;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("hifDeviceSuspend: deep sleep success\n"));
@@ -2486,6 +2565,7 @@ static int hifDeviceResume(struct device *dev)
}
}
else if(device->DeviceState == HIF_DEVICE_STATE_DEEPSLEEP){
+ hif_set_wow_maskint(device, false);
HIFUnMaskInterrupt(device);
// hifRestartAllVap((struct ol_ath_softc_net80211 *)device->claimedContext);
}
@@ -2501,6 +2581,7 @@ static int hifDeviceResume(struct device *dev)
return status;
}
/*TODO:WOW support*/
+ hif_set_wow_maskint(device, false);
HIFUnMaskInterrupt(device);
}
diff --git a/CORE/SERVICES/HTC/htc.c b/CORE/SERVICES/HTC/htc.c
index 09936a01b5de..0667c6c597f9 100644
--- a/CORE/SERVICES/HTC/htc.c
+++ b/CORE/SERVICES/HTC/htc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -35,6 +35,7 @@
#include <vos_getBin.h>
#include "epping_main.h"
#include "htc_api.h"
+#include <hif_oob.h>
#define MAX_HTC_RX_BUNDLE 2
@@ -309,6 +310,7 @@ void HTCDestroy(HTC_HANDLE HTCHandle)
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCDestroy .. Destroying :0x%pK \n",target));
HIFStop(HTCGetHifDevice(HTCHandle));
+ hif_oob_gpio_deinit(HTCGetHifDevice(HTCHandle));
HTCCleanup(target);
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCDestroy \n"));
}
@@ -528,6 +530,30 @@ A_UINT8 HTCGetCreditAllocation(HTC_TARGET *target, A_UINT16 ServiceID)
return allocation;
}
+/**
+ * get_oob_gpio_config() - get oob gpio config
+ * @HTCHandle - pointer to HTC handle
+ * @gpio_num - pointer to gpio num
+ * @gpio_flag - pointer to gpio flag
+ *
+ * Return NULL
+ */
+#ifdef CONFIG_GPIO_OOB
+static void get_oob_gpio_config(HTC_HANDLE htc_handle, uint32_t *gpio_num,
+ uint32_t *gpio_flag)
+{
+ HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(htc_handle);
+ struct ol_softc *scn = (struct ol_softc *)target->HTCInitInfo.pContext;
+
+ *gpio_num = scn->oob_gpio_num;
+ *gpio_flag = scn->oob_gpio_flag;
+}
+#else
+static void get_oob_gpio_config(HTC_HANDLE htc_handle, uint32_t *gpio_num,
+ uint32_t *gpio_flag)
+{
+}
+#endif
A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle)
{
@@ -540,12 +566,18 @@ A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle)
A_UINT16 htc_rdy_msg_id;
A_UINT8 i = 0;
HTC_PACKET *pRxBundlePacket, *pTempBundlePacket;
+ uint32_t gpio_num = 0;
+ uint32_t gpio_flag = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCWaitTarget - Enter (target:0x%pK) \n", HTCHandle));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("+HWT\n"));
do {
-
+ get_oob_gpio_config(HTCHandle, &gpio_num, &gpio_flag);
+ if (gpio_flag) {
+ if (hif_oob_gpio_init(target->hif_dev, gpio_num, gpio_flag))
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("OOB init failed\n"));
+ }
status = HIFStart(target->hif_dev);
if (A_FAILED(status)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("HIFStart failed\n"));
@@ -800,6 +832,7 @@ void HTCStop(HTC_HANDLE HTCHandle)
*/
HIFStop(target->hif_dev);
+ hif_oob_gpio_deinit(target->hif_dev);
#ifdef RX_SG_SUPPORT
LOCK_HTC_RX(target);
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 06bad7751882..61cf463a7b79 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -4563,6 +4563,17 @@ static int wma_group_num_bss_to_scan_id(const u_int8_t *cmd_param_info,
t_cached_result = cached_result;
t_scan_id_grp = &t_cached_result->result[0];
+ if ((t_cached_result->num_scan_ids *
+ MIN(t_scan_id_grp->num_results,
+ param_buf->num_bssid_list)) > param_buf->num_bssid_list) {
+ WMA_LOGE("%s:num_scan_ids %d, num_results %d num_bssid_list %d",
+ __func__,
+ t_cached_result->num_scan_ids,
+ t_scan_id_grp->num_results,
+ param_buf->num_bssid_list);
+ return -EINVAL;
+ }
+
WMA_LOGD("%s: num_scan_ids:%d", __func__,
t_cached_result->num_scan_ids);
for (i = 0; i < t_cached_result->num_scan_ids; i++) {
@@ -21325,8 +21336,8 @@ static void wma_set_max_tx_power(WMA_HANDLE handle,
}
if (wma_handle->interfaces[vdev_id].max_tx_power == tx_pwr_params->power) {
- ret = 0;
- goto end;
+ WMA_LOGI("Set MAX TX pwr limit equal to current used %d",
+ wma_handle->interfaces[vdev_id].max_tx_power);
}
prev_max_power = wma_handle->interfaces[vdev_id].max_tx_power;
wma_handle->interfaces[vdev_id].max_tx_power = tx_pwr_params->power;
@@ -37087,10 +37098,14 @@ static int wma_vdev_tsf_handler(void *handle, uint8_t *data,
ptsf->vdev_id = tsf_event->vdev_id;
ptsf->tsf_low = tsf_event->tsf_low;
ptsf->tsf_high = tsf_event->tsf_high;
+ ptsf->tsf_id = tsf_event->tsf_id;
+ ptsf->tsf_id_valid = tsf_event->tsf_id_valid;
WMA_LOGD("%s: receive WMI_VDEV_TSF_REPORT_EVENTID ", __func__);
WMA_LOGD("%s: vdev_id = %u,tsf_low =%u, tsf_high = %u", __func__,
ptsf->vdev_id, ptsf->tsf_low, ptsf->tsf_high);
+ WMA_LOGD("%s: vdev_id = %u,tsf_id =%u, tsf_id_valid = %u", __func__,
+ ptsf->vdev_id, ptsf->tsf_id, ptsf->tsf_id_valid);
vos_msg.type = eWNI_SME_TSF_EVENT;
vos_msg.bodyptr = ptsf;
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index 291d71ce230c..3d9e5bf7f6b2 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -800,6 +800,16 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
CASE_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
CASE_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
CASE_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
+ CASE_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
+ CASE_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
+ CASE_RETURN_STRING(WMI_NDP_CMDID);
+ CASE_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
+ CASE_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
+ CASE_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
+ CASE_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
+ CASE_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
+ CASE_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
+ CASE_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
}
return "Invalid WMI cmd";
}
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 874b2a4e0b93..be1aca8d99da 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -4899,7 +4899,7 @@ typedef struct {
for success case in coarse detection*/
uint32_t fine_Q; /** number of times motion is expected to be detected
for success case in fine detection*/
- uint8_t md_coarse_thr_high; /** higher threshold value (in percent)
+ uint32_t md_coarse_thr_high; /** higher threshold value (in percent)
from host to FW, which will be used in
coarse detection phase of motion detection.
This is the threshold for the correlation
@@ -4908,19 +4908,19 @@ typedef struct {
environment. A value of 100(%) indicates
that neither the transceiver nor any
nearby objects have changed position. */
- uint8_t md_fine_thr_high; /** higher threshold value (in percent)
+ uint32_t md_fine_thr_high; /** higher threshold value (in percent)
from host to FW, which will be used in
fine detection phase of motion detection.
This is the threshold for correlation
between the old and current RF environments,
as explained above. */
- uint8_t md_coarse_thr_low; /** lower threshold value (in percent)
+ uint32_t md_coarse_thr_low; /** lower threshold value (in percent)
for immediate detection of motion in
coarse detection phase.
This is the threshold for correlation
between the old and current RF environments,
as explained above. */
- uint8_t md_fine_thr_low; /** lower threshold value (in percent)
+ uint32_t md_fine_thr_low; /** lower threshold value (in percent)
for immediate detection of motion in
fine detection phase.
This is the threshold for correlation
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index f83b9fa285af..9ef47384d525 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -2351,21 +2351,16 @@ eHalStatus sme_handle_update_pwr_ind(tHalHandle hal_ptr, uint32_t pesession_id)
cfgGetRegulatoryMaxTransmitPower(mac_ptr,
pesession_ptr->currentOperChannel);
maxTxPower = VOS_MIN(regMax, mac_ptr->roam.configParam.nTxPowerCap);
- if (maxTxPower != pesession_ptr->maxTxPower) {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
- "updating new maxTx power %d to HAL from old pwr %d",
- maxTxPower, pesession_ptr->maxTxPower);
- if(limSendSetMaxTxPowerReq(mac_ptr,
- maxTxPower,
- pesession_ptr) == eSIR_SUCCESS)
- pesession_ptr->maxTxPower = maxTxPower;
- else {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "Set max txpwr req fail");
- }
- } else {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
+ "updating new maxTx power %d to HAL from old pwr %d",
+ maxTxPower, pesession_ptr->maxTxPower);
+ if(limSendSetMaxTxPowerReq(mac_ptr,
+ maxTxPower,
+ pesession_ptr) == eSIR_SUCCESS)
+ pesession_ptr->maxTxPower = maxTxPower;
+ else {
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "no change on current max txpwr %d", maxTxPower);
+ "Set max txpwr req fail");
}
return eHAL_STATUS_SUCCESS;
diff --git a/CORE/VOSS/inc/i_vos_types.h b/CORE/VOSS/inc/i_vos_types.h
index 756234d33189..d097eee96cc1 100644
--- a/CORE/VOSS/inc/i_vos_types.h
+++ b/CORE/VOSS/inc/i_vos_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -38,6 +38,10 @@
#include <linux/version.h>
#include <asm/div64.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
+#include <uapi/linux/sched/types.h>
+#endif
+
/**=========================================================================
\file i_vos_Types.h
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index 416b35b6d1c2..2fab5cc8df84 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -72,6 +72,7 @@
#include <vos_threads.h>
#include <vos_timer.h>
#include <vos_pack_align.h>
+#include <linux/firmware.h>
#define VOS_WDA_TIMEOUT 15000
@@ -463,4 +464,9 @@ v_BOOL_t vos_is_ch_switch_with_csa_enabled(void);
#ifdef FEATURE_WLAN_DISABLE_CHANNEL_SWITCH
bool vos_is_chan_ok_for_dnbs(uint8_t channel);
#endif
+
+int qca_request_firmware(const struct firmware **firmware_p,
+ const char *name,
+ struct device *device);
+
#endif // if !defined __VOS_API_H
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index 825cfd88d815..ff597ed77c6e 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -93,6 +93,7 @@
#include "wma.h"
#include "vos_utils.h"
+#include<adf_os_module.h>
/*---------------------------------------------------------------------------
* Preprocessor Definitions and Constants
@@ -413,7 +414,24 @@ static void vos_set_ac_specs_params(tMacOpenParameters *param,
}
}
-
+/**
+ * set_oob_gpio_config() - set oob gpio config
+ * @scn: pointer to scn
+ * @hdd_ctx: pointer to hdd_ctx
+ *
+ * Return NULL
+ */
+#ifdef CONFIG_GPIO_OOB
+static void set_oob_gpio_config(struct ol_softc *scn, hdd_context_t *hdd_ctx)
+{
+ scn->oob_gpio_num = hdd_ctx->cfg_ini->oob_gpio_num;
+ scn->oob_gpio_flag = hdd_ctx->cfg_ini->oob_gpio_flag;
+}
+#else
+static void set_oob_gpio_config(struct ol_softc *scn, hdd_context_t *hdd_ctx)
+{
+}
+#endif
/*---------------------------------------------------------------------------
\brief vos_open() - Open the vOSS Module
@@ -547,6 +565,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize )
scn->enableFwSelfRecovery = pHddCtx->cfg_ini->enableFwSelfRecovery;
scn->fastfwdump_host = pHddCtx->cfg_ini->fastfwdump;
scn->max_no_of_peers = pHddCtx->max_peers;
+ set_oob_gpio_config(scn, pHddCtx);
#ifdef WLAN_FEATURE_LPSS
scn->enablelpasssupport = pHddCtx->cfg_ini->enablelpasssupport;
#endif
@@ -3530,3 +3549,164 @@ bool vos_is_chan_ok_for_dnbs(uint8_t channel)
return true;
}
#endif
+
+#ifdef CUSTOMIZED_FIRMWARE_PATH
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+#define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_path.dentry->d_inode
+#else
+#define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_dentry->d_inode
+#endif
+#define A_ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+char *qca_fw_path= "";
+#define DEFAULT_QCA_FW_PATH "/system/etc/wifi/qca9379"
+static int qca_readwrite_file(const char *filename,
+ char *rbuf,
+ const char *wbuf,
+ size_t length)
+{
+ int ret = 0;
+ struct file *filp = (struct file *)-ENOENT;
+ mm_segment_t oldfs;
+ oldfs = get_fs();
+ set_fs(KERNEL_DS);
+
+ hddLog(VOS_TRACE_LEVEL_INFO, "%s: filename %s \n", __func__, filename);
+
+ do {
+ int mode = (wbuf) ? O_RDWR : O_RDONLY;
+ filp = filp_open(filename, mode, S_IRUSR);
+ if (IS_ERR(filp) || !filp->f_op) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: filename %s \n", __func__, filename);
+ ret = -ENOENT;
+ break;
+ }
+
+ if (length == 0) {
+ /* Read the length of the file only */
+ struct inode *inode;
+
+ inode = GET_INODE_FROM_FILEP(filp);
+ if (!inode) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Get inode from %s failed \n",
+ __func__, filename);
+ ret = -ENOENT;
+ break;
+ }
+ ret = i_size_read(inode->i_mapping->host);
+ break;
+ }
+
+ if (wbuf) {
+ if ( (ret=filp->f_op->write(filp, wbuf, length, &filp->f_pos)) < 0) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Write %u bytes to file %s error %d\n",
+ __FUNCTION__,
+ (unsigned int)length, filename, ret);
+ break;
+ }
+ } else {
+ if ( (ret=filp->f_op->read(filp, rbuf, length, &filp->f_pos)) < 0) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,"%s: Read %u bytes from file %s error %d\n",
+ __FUNCTION__,
+ (unsigned int)length, filename, ret);
+ break;
+ }
+ }
+ } while (0);
+
+ if (!IS_ERR(filp)) {
+ filp_close(filp, NULL);
+ }
+ set_fs(oldfs);
+
+ return ret;
+}
+
+static int customized_request_firmware(const struct firmware **firmware_p,
+ const char *name,
+ struct device *device)
+{
+ int ret = 0;
+ struct firmware *firmware;
+ char filename[256];
+ const char *raw_filename = name;
+ int customized = 1;
+ *firmware_p = firmware = A_MALLOC(sizeof(*firmware));
+ if (!firmware)
+ return -ENOMEM;
+ A_MEMZERO(firmware, sizeof(*firmware));
+ do {
+ size_t length, bufsize, bmisize;
+
+ if (strcmp(qca_fw_path, "") == 0)
+ customized = 0;
+ if (snprintf(filename, sizeof(filename), "%s/%s",
+ customized?qca_fw_path:DEFAULT_QCA_FW_PATH,
+ raw_filename) >= sizeof(filename)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "snprintf: %s/%s\n",
+ customized?qca_fw_path:DEFAULT_QCA_FW_PATH, raw_filename);
+ ret = -1;
+ break;
+ }
+ if ( (ret=qca_readwrite_file(filename, NULL, NULL, 0)) < 0) {
+ break;
+ } else {
+ length = ret;
+ }
+
+ if (strcmp(raw_filename, "softmac") == 0) {
+ bufsize = length = 17;
+ } else {
+ bufsize = ALIGN(length, PAGE_SIZE);
+ bmisize = A_ROUND_UP(length, 4);
+ bufsize = max(bmisize, bufsize);
+ }
+ firmware->data = vmalloc(bufsize);
+ firmware->size = length;
+
+ if (!firmware->data) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Cannot allocate buffer for firmware\n",
+ __FUNCTION__);
+ ret = -ENOMEM;
+ break;
+ }
+
+ if ( (ret=qca_readwrite_file(filename, (char*)firmware->data, NULL, length)) != length) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: file read error, ret %d request %d\n",
+ __FUNCTION__,ret,(int)length);
+ ret = -1;
+ break;
+ }
+
+ } while (0);
+
+ if (ret<0) {
+ if (firmware) {
+ if (firmware->data)
+ vfree(firmware->data);
+ A_FREE(firmware);
+ }
+ *firmware_p = NULL;
+ } else {
+ ret = 0;
+ }
+ return ret;
+}
+
+module_param(qca_fw_path, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+
+#endif
+
+int qca_request_firmware(const struct firmware **firmware_p,
+ const char *name,
+ struct device *device)
+{
+#ifdef CUSTOMIZED_FIRMWARE_PATH
+ return customized_request_firmware(firmware_p, name,device);
+#else
+ return request_firmware(firmware_p, name,device);
+#endif
+}
+
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index a3a325ef28a4..7b0268d70f26 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -53,6 +53,8 @@
#include "regdomain.h"
#include "regdomain_common.h"
#include "vos_cnss.h"
+#include "limSession.h"
+#include "limScanResultUtils.h"
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) && !defined(WITH_BACKPORTS)
#define IEEE80211_CHAN_NO_80MHZ 1<<7
@@ -2285,15 +2287,39 @@ static void restore_custom_reg_settings(struct wiphy *wiphy)
static void hdd_debug_cc_timer_expired_handler(void *arg)
{
- hdd_context_t *pHddCtx;
+ hdd_context_t *hdd_ctx_ptr = NULL;
+ tpAniSirGlobal mac_ptr = NULL;
+ tpPESession pesession = NULL;
+ uint32_t roam_session_id = 0;
+ uint8_t pe_session_id = 0;
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
("%s ENTER "), __func__);
if (!arg)
return;
- pHddCtx = (hdd_context_t *)arg;
- vos_timer_destroy(&(pHddCtx->reg.reg_set_timer));
- regdmn_set_regval(&pHddCtx->reg);
+ hdd_ctx_ptr = (hdd_context_t *)arg;
+ mac_ptr = PMAC_STRUCT(hdd_ctx_ptr->hHal);
+ vos_timer_destroy(&(hdd_ctx_ptr->reg.reg_set_timer));
+ regdmn_set_regval(&hdd_ctx_ptr->reg);
+
+ if (vos_get_concurrency_mode() == VOS_STA ||
+ vos_get_concurrency_mode() == VOS_STA_SAP)
+ for (roam_session_id = 0;
+ roam_session_id < CSR_ROAM_SESSION_MAX;
+ roam_session_id++) {
+ if (!CSR_IS_SESSION_VALID(mac_ptr, roam_session_id)) {
+ continue;
+ }
+ if (mac_ptr->roam.roamSession[roam_session_id].connectState ==
+ eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED) {
+ pesession =
+ peFindSessionByBssid(mac_ptr,
+ mac_ptr->roam.roamSession[roam_session_id].connectedProfile.bssid,
+ &pe_session_id);
+ lim_update_max_txpower_ind(mac_ptr, pesession);
+ return;
+ }
+ }
}
/*
diff --git a/Kbuild b/Kbuild
index e919a4d887a7..efa914aeeddc 100644
--- a/Kbuild
+++ b/Kbuild
@@ -137,6 +137,9 @@ ifeq ($(KERNEL_BUILD), 0)
ifeq ($(CONFIG_ROME_IF),sdio)
CONFIG_WLAN_FEATURE_11W := y
endif
+ ifeq ($(CONFIG_ROME_IF),pci)
+ CONFIG_WLAN_FEATURE_11W := y
+ endif
ifneq ($(CONFIG_MOBILE_ROUTER), y)
#Flag to enable NAN
@@ -396,6 +399,10 @@ HIF_COMMON_DIR := CORE/SERVICES/HIF/common
HIF_COMMON_OBJS := $(HIF_COMMON_DIR)/hif_bmi_reg_access.o \
$(HIF_COMMON_DIR)/hif_diag_reg_access.o
+ifeq ($(CONFIG_GPIO_OOB),y)
+HIF_DIR_OBJS += $(HIF_DIR)/hif_oob.o
+endif
+
HIF_SDIO_DIR := CORE/SERVICES/HIF/sdio
HIF_SDIO_OBJS := $(HIF_SDIO_DIR)/hif_sdio_send.o \
$(HIF_SDIO_DIR)/hif_sdio_dev.o \
@@ -415,6 +422,7 @@ HIF_SDIO_NATIVE_OBJS := $(HIF_SDIO_NATIVE_SRC_DIR)/hif.o \
$(HIF_SDIO_NATIVE_SRC_DIR)/hif_scatter.o
HIF_INC := -I$(WLAN_ROOT)/$(HIF_COMMON_DIR) \
+ -I$(WLAN_ROOT)/$(HIF_DIR) \
-I$(WLAN_ROOT)/$(HIF_SDIO_DIR) \
-I$(WLAN_ROOT)/$(HIF_SDIO_LINUX_DIR) \
-I$(WLAN_ROOT)/$(HIF_SDIO_NATIVE_INC_DIR) \
@@ -869,10 +877,15 @@ HIF_DIR := CORE/SERVICES/HIF
ifeq ($(CONFIG_HIF_PCI), 1)
HIF_PCIE_DIR := $(HIF_DIR)/PCIe
-HIF_INC := -I$(WLAN_ROOT)/$(HIF_PCIE_DIR)
+HIF_INC := -I$(WLAN_ROOT)/$(HIF_PCIE_DIR) \
+ -I$(WLAN_ROOT)/$(HIF_DIR)
HIF_OBJS := $(HIF_DIR)/ath_procfs.o
+ifeq ($(CONFIG_GPIO_OOB),y)
+HIF_OBJS += $(HIF_DIR)/hif_oob.o
+endif
+
HIF_PCIE_OBJS := $(HIF_PCIE_DIR)/copy_engine.o \
$(HIF_PCIE_DIR)/hif_pci.o \
$(HIF_PCIE_DIR)/if_pci.o \
@@ -884,10 +897,15 @@ endif
ifeq ($(CONFIG_HIF_USB), 1)
HIF_USB_DIR := $(HIF_DIR)/USB
-HIF_INC := -I$(WLAN_ROOT)/$(HIF_USB_DIR)
+HIF_INC := -I$(WLAN_ROOT)/$(HIF_USB_DIR) \
+ -I$(WLAN_ROOT)/$(HIF_DIR)
HIF_OBJS := $(HIF_DIR)/ath_procfs.o
+ifeq ($(CONFIG_GPIO_OOB),y)
+HIF_OBJS += $(HIF_DIR)/hif_oob.o
+endif
+
HIF_USB_OBJS := $(HIF_USB_DIR)/usbdrv.o \
$(HIF_USB_DIR)/hif_usb.o \
$(HIF_USB_DIR)/if_usb.o \
@@ -1107,10 +1125,30 @@ ifneq ($(TARGET_BUILD_VARIANT),user)
CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
endif
+ifeq ($(CONFIG_TXRX_PERF), y)
+CDEFINES += -DQCA_TXRX_PERF \
+ -DTX_COMPLETION_THREAD \
+ -DMSM8976_TCP_PERF \
+ -DQCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK \
+ -DFEATURE_BUS_BANDWIDTH \
+ -DCONFIG_PERF_NON_QC_PLATFORM \
+ -DHIF_RX_THREAD
+endif
+
# Enable SDIO HIF Rx Thread
ifeq ($(CONFIG_HIF_RX_THREAD), y)
CDEFINES += -DHIF_RX_THREAD
endif
+
+
+ifeq ($(CONFIG_TXRX_PERF_EXT), y)
+CDEFINES += -DCONFIG_IXC_TIMER \
+ -DCONFIG_PERF_MODE
+endif
+endif
+
+ifeq ($(CONFIG_CUSTOMIZED_FIRMWARE_PATH), y)
+CDEFINES += -DCUSTOMIZED_FIRMWARE_PATH
endif
ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y)
@@ -1279,8 +1317,10 @@ endif
ifneq ($(TARGET_BUILD_VARIANT),user)
CDEFINES += -DDEBUG_RX_RING_BUFFER
+ifneq ($(CONFIG_TXRX_PERF),y)
CDEFINES += -DQCA_PKT_PROTO_TRACE
endif
+endif
# enable the MAC Address auto-generation feature
CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
@@ -1633,6 +1673,10 @@ CDEFINES += -DCONFIG_NON_QC_PLATFORM
CDEFINES += -DTARGET_DUMP_FOR_NON_QC_PLATFORM
endif
+ifeq ($(CONFIG_GPIO_OOB),y)
+CDEFINES += -DCONFIG_GPIO_OOB
+endif
+
ifeq ($(CONFIG_NON_QC_PLATFORM), y)
ifeq ($(CONFIG_ROME_IF),pci)
CDEFINES += -DCONFIG_NON_QC_PLATFORM_PCI
@@ -1713,6 +1757,10 @@ CDEFINES += -DWLAN_FEATURE_WOW_PULSE
CDEFINES += -DFEATURE_PBM_MAGIC_WOW
endif
+ifeq ($(CONFIG_USB_RESET_RESUME_PERSISTENCE), y)
+CDEFINES += -DUSB_RESET_RESUME_PERSISTENCE
+endif
+
ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH),y)
CDEFINES += -DWLAN_FEATURE_NAN_DATAPATH
endif
@@ -1725,6 +1773,10 @@ ifeq ($(CONFIG_HIF_PCI), 1)
CDEFINES += -DFORCE_LEGACY_PCI_INTERRUPTS
endif
+ifeq ($(CONFIG_SUPPORT_P2P_BY_ONE_INTF_WLAN), y)
+CDEFINES += -DSUPPORT_P2P_BY_ONE_INTF_WLAN
+endif
+
ifeq ($(CONFIG_WLAN_THERMAL_SHUTDOWN), 1)
CDEFINES += -DFEATURE_WLAN_THERMAL_SHUTDOWN
CDEFINES += -DFEATURE_WLAN_AUTO_SHUTDOWN