summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-23 04:55:14 -0600
committerLinux Build Service Account <lnxbuild@localhost>2016-08-23 04:55:14 -0600
commite4a2da946fac28032b5393352a8db60e1c909477 (patch)
tree5d778c563a6d9181a5ae042c9ebbe17af4352fc4
parentf2a58117fced98819db0e88932e7d0daba154de6 (diff)
parente0676b5d59514be521d37e620a06a8e3ae760224 (diff)
Promotion of wlan-cld3.driver.lnx.1.1-00084.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 1049254 Iceaf1226edbf909ca3881e049c33f7d121860ef2 qcacld-3.0: Correct wow wakeup counters 937663 I87781017f43b2e40ede02448d7332b6ee18465f1 qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ 970647 Id515729c059e2c9717f6a0332d9041bf9a454ed7 qcacld-3.0: Add packetlog bit in rx indication from firm 688141 Icf7dc61f1ec321f3d6330a26f74c4f8a6b55e933 Release 5.1.0.24 955272 Iab55a394a28ff452c06c739f3fbd47506eda85eb qcacld-3.0: Add a new ini item to control the INDOOR cha 688141 I88868651e2c4144434d5dc3646d994d7a4c500f7 Release 5.1.0.23X 970527 I5a2367302e0eac3a024626795a4469d1ced76e8c qcacld-3.0: Fix the memory leak caused by pmfSaQueryTime 1023663 Icc6e8378ba3cbfca8aeb54b5084840e621639582 qcacld-3.0: Add USB bus support (Kbuild) 1050004 Iae10aa4a8c0931cdb796cd9c8ff558d4bc8e0aed qcacld-3.0: Provide support enable RX LDPC in certain ca 1048651 I2d6e5d095d2f4b2dd474b9338bfc830b04bfa533 qcacld-3.0: Add ipv4 and ipv6 packet checks 1056091 Ie40ccf274e6e44441a16ff3d6f36a3007b732c09 qcacld-3.0: Serialize the LRO manager array access 1056036 I1d69c9d440e641b052fd6098d1c99f22a64e9a9d qcacld-3.0: Fix sap_acs_channel_check 1056331 I4d112441b5aa7ff91dafa9e43f9aceb18d0e13f0 qcacld-3.0: Start ap adapter from __wlan_hdd_add_virtual 1057329 If7d7ca5939f7586b12d84d6e070e94bb5e7e6c2c Revert "qcacld-3.0: Check if vdev is up before sending v 1049254 Ic2af69032262237b8751019817ae181913346818 qcacld-3.0: Add check to find IPV6 mcast packet 1023663 I572a78cd9de1f7e531f300ced69a7eb51f4a167f qcacld-3.0: Add USB bus support (HDD) 865207 Ib7ee708c9235e86cf9588d011de29df1e34ad690 qcacld-3.0: CL 1607151 - update fw common interface file 1008872 Ife09989e1f0f0c4d619f73c5960968d3a6721b6e qcacld-3.0: Change structure names for WIN compilation f 1047214 I2ddd67d3c29a448dd2a1d3a63113750783fb6731 qcacld-3.0: Modify DFS region for KR and CN 688141 Ib55a200a64fc6a52852cb0517791b36265c0e10f Release 5.1.0.23Z 1057347 I99842eb646371e186ade3b126ea0e8f84b7f2187 Revert "qcacld-3.0: Force delete peer entry during LFR3 1056442 Ica15ea70527f0ea116b960dd7958da73f304288b qcacld-3.0: fix peer map handler race condition 973054 If433cff18ce511e7fdffadff69ee13b762a1719b qcacld-3.0: Increase WMA_STA_WOW_DEFAULT_PTRN_MAX to 5 967535 I14c722c9a1189f4ba4fbc2c8a554ae85b7a61fa8 qcacld-3.0: BPF fixes for check connection state, set ma 1055660 I9fb21f6f75cc689620a6befd997956610e2ca3ae qcacld-3.0: Set NAPI event after hif layer is initialize 970647 I5773b67a9269063531d038d46ac404c978818dcc qcacld-3.0: Log rx packet in packetlog as per rx ind mes 937663 I09ed8f80764cc7b55bbcdd506253f56b5ee07937 qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ 1020079 I00f9fb0c8231fd69f6c108ced8028eb19315006e qcacld-3.0: Update ICMP and ICMPV6 WOW wake up stats 688141 Id4896dbda7ef8703d78363407f1a947cb28ab158 Release 5.1.0.23W 1023663 Icf9d2097d23945c6fab6d3d06dbff04578c8054e qcacld-3.0: Add USB bus support (BMI) 937663 If71de96e81600f2a5136a0907b2404a8e2a05a8b qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ 1023663 Id6fe6b79b2dbf41a93ee815c20f44972122c9bb7 qcacld-3.0: Add USB bus support (Tgt Config HL) 937663 Ia181a89d55b2e584739a543a0d163877b474d3ae qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ 865207 Ica0b6cd11df8a84a0b7e0771354795aa082f20fe qcacld-3.0: CL 1602603 - update fw common interface file 865207 Ic822863cbbaffe7303dedf7f6c16ba92c2d0a5d3 qcacld-3.0: CL 1598475 - update fw common interface file 1047382 I8936a408a7da21ad293b6da7af146298c049052d qcacld-3.0: Changes to support WDI_EVENT_SW_EVENT for pa 937659 I58b2214ba1243e93dd5e3c9b6774c08537094139 qcacld-3.0: Convert wlan_hdd_ftm.c to unified logging 937663 Id394b038f35c3f663ae6a00f49c903dc52f4f4a2 qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ 937663 Ibfd53f4f2703dba8c7ce96368392afa3c0c12d5b qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ 865207 If2f122a6879b60052849b7efb738e7fc1a4c23f3 qcacld-3.0: CL 1605795 - update fw common interface file 970647 Ia17f659e16221985be5cd9e75ebf0c46f2dc5693 qcacld-3.0: Add support to enable/disable packetlog usin 1023663 I030ee8a5e6dd13ed8bd970d80f435219677c4e4b qcacld-3.0: Add USB bus support (PLD) 1023663 Iabb6f5bbfa4d0c2a8026262d2ecb11cdc0533742 qcacld-3.0: Add USB bus support (DP) 1053513 I539d2720f08026a06669b1c5117523667dfcef52 qcacld-3.0: Fix regulatory domain issues 1054102 I4222aef646ede78d97b554faaf7f0c5b627feec0 qcacld-3.0: Conditionally disable channel 144 in wiphy 688141 Id3726a27cc0f0a3600c1e961cb5282f16369283f Release 5.1.0.23T 688141 Idb9abe998d5e24777c17343b49b218bac8489d34 Release 5.1.0.23V 1037816 Ifee4ce15771b57ac3cc1e85650c56f426c34c833 qcacld-3.0: Disallow chain mask request for 2x2 if hardw 1023663 I4186d22e4f0af258ee92fb269db9a987cdd0c933 qcacld-3.0: Add USB bus support (WMA) 1046754 Ib028c29863d4e95ccac434f7d47bfedd59ef883f qcacld-3.0: Force delete peer entry during LFR3 roaming 1055071 I99b1ada48573e8b03ab42a94d98f92f7b0b0e871 qcacld-3.0: Fix overlapping channel selection in ACS 1047817 I75708a215f51b558a6b7573bcc730a08d2e4bd11 qcacld-3.0: SAP: Add radar pulse table for KR and CN 688141 I9b6d5c1ccb88c478e7eecb9f82d4aae56f132820 Release 5.1.0.23S 970647 I3138e252e02009094d61150a55172b49f9fca4fd qcacld-3.0: Enable packet logging during driver init/re- 688141 I25f943db875a686133e45039774c334a704f268a Release 5.1.0.23Y 688141 Iceb664a4c098fc700c18eb1c77ab1cd43e3426e7 Release 5.1.0.23U 958964 Ie043323d90f63c19de2da9d1b8b54bc28d2c8f3d qcacld-3.0: Get wakelock stats 937663 I4eaedea4a7e7da5d4f0284be4ad2ca5d05f8b98a qcacld-3.0: Convert wlan_hdd_main.c to unified logging [ Change-Id: Ib4608017830e03895f7c69e512718abc0c10ed80 CRs-Fixed: 937659, 1055071, 1008872, 1056331, 1020079, 865207, 970527, 1047817, 970647, 1023663, 1046754, 1037816, 955272, 1055660, 937663, 958964, 1047382, 1056091, 1057329, 688141, 967535, 973054, 1057347, 1050004, 1056036, 1049254, 1047214, 1053513, 1056442, 1048651, 1054102
-rw-r--r--Kbuild39
-rw-r--r--core/bmi/src/bmi.c1
-rw-r--r--core/bmi/src/i_bmi.h2
-rw-r--r--core/bmi/src/ol_fw.c26
-rw-r--r--core/bmi/src/ol_fw_common.c40
-rw-r--r--core/cds/inc/cds_concurrency.h41
-rw-r--r--core/cds/inc/cds_reg_service.h24
-rw-r--r--core/cds/inc/cds_regdomain.h14
-rw-r--r--core/cds/inc/cds_utils.h12
-rw-r--r--core/cds/src/cds_concurrency.c111
-rw-r--r--core/cds/src/cds_reg_service.c7
-rw-r--r--core/cds/src/cds_regdomain.c3
-rw-r--r--core/cds/src/cds_utils.c2
-rw-r--r--core/dp/htt/htt.c2
-rw-r--r--core/dp/htt/htt_rx.c8
-rw-r--r--core/dp/ol/inc/ol_htt_rx_api.h3
-rw-r--r--core/dp/txrx/ol_rx.c35
-rw-r--r--core/dp/txrx/ol_rx_reorder_timeout.c3
-rw-r--r--core/dp/txrx/ol_tx_classify.c8
-rw-r--r--core/dp/txrx/ol_tx_queue.c4
-rw-r--r--core/dp/txrx/ol_txrx.c43
-rw-r--r--core/dp/txrx/ol_txrx_peer_find.c69
-rw-r--r--core/dp/txrx/wdi_event.h1
-rw-r--r--core/hdd/inc/qc_sap_ioctl.h3
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h10
-rw-r--r--core/hdd/inc/wlan_hdd_ipa.h26
-rw-r--r--core/hdd/inc/wlan_hdd_lro.h2
-rw-r--r--core/hdd/inc/wlan_hdd_main.h15
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c6
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c14
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c259
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h63
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c46
-rw-r--r--core/hdd/src/wlan_hdd_ftm.c13
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c50
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c140
-rw-r--r--core/hdd/src/wlan_hdd_lro.c23
-rw-r--r--core/hdd/src/wlan_hdd_main.c606
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c14
-rw-r--r--core/hdd/src/wlan_hdd_power.c3
-rw-r--r--core/hdd/src/wlan_hdd_regulatory.c117
-rw-r--r--core/hdd/src/wlan_hdd_wext.c12
-rw-r--r--core/mac/inc/qwlan_version.h6
-rw-r--r--core/mac/inc/sir_api.h68
-rw-r--r--core/mac/src/pe/lim/lim_utils.c16
-rw-r--r--core/pld/inc/pld_common.h5
-rw-r--r--core/pld/src/pld_common.c26
-rw-r--r--core/pld/src/pld_usb.c211
-rw-r--r--core/pld/src/pld_usb.h52
-rw-r--r--core/sap/dfs/inc/radar_filters.h55
-rw-r--r--core/sap/dfs/src/dfs_init.c85
-rw-r--r--core/sap/src/sap_fsm.c7
-rw-r--r--core/sap/src/sap_module.c4
-rw-r--r--core/sme/inc/csr_api.h1
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/src/common/sme_api.c2
-rw-r--r--core/sme/src/csr/csr_api_roam.c55
-rw-r--r--core/utils/pktlog/include/pktlog_ac.h16
-rw-r--r--core/utils/pktlog/include/pktlog_ac_i.h2
-rw-r--r--core/utils/pktlog/linux_ac.c31
-rw-r--r--core/utils/pktlog/pktlog_ac.c92
-rw-r--r--core/utils/pktlog/pktlog_internal.c64
-rw-r--r--core/wma/inc/wma.h11
-rw-r--r--core/wma/inc/wma_api.h25
-rw-r--r--core/wma/inc/wma_internal.h11
-rw-r--r--core/wma/src/wma_data.c7
-rw-r--r--core/wma/src/wma_dev_if.c41
-rw-r--r--core/wma/src/wma_features.c151
-rw-r--r--core/wma/src/wma_main.c158
-rw-r--r--core/wma/src/wma_scan_roam.c42
-rw-r--r--target/inc/htt.h10
-rw-r--r--target/inc/wlan_tgt_def_config_hl.h2
-rw-r--r--target/inc/wmi_tlv_defs.h21
-rw-r--r--target/inc/wmi_unified.h97
-rw-r--r--target/inc/wmi_version.h2
-rw-r--r--uapi/linux/pktlog_ac_fmt.h11
76 files changed, 2439 insertions, 869 deletions
diff --git a/Kbuild b/Kbuild
index e9909d190d1e..b5dd1edc7581 100644
--- a/Kbuild
+++ b/Kbuild
@@ -234,6 +234,11 @@ ifeq ($(CONFIG_ROME_IF),pci)
CONFIG_HIF_PCI := 1
endif
+#Enable USB specific APIS
+ifeq ($(CONFIG_ROME_IF),usb)
+ CONFIG_HIF_USB := 1
+endif
+
#Enable pci read/write config functions
ifeq ($(CONFIG_ROME_IF),pci)
CONFIG_ATH_PCI := 1
@@ -243,10 +248,6 @@ ifeq ($(CONFIG_ROME_IF),snoc)
CONFIG_HIF_SNOC:= 1
endif
-ifeq ($(CONFIG_ROME_IF),usb)
-#CONFIG_ATH_PCI := 1
-endif
-
ifneq ($(CONFIG_MOBILE_ROUTER), y)
#Enable IBSS support on CLD
CONFIG_QCA_IBSS_SUPPORT := 1
@@ -799,6 +800,7 @@ HIF_DISPATCHER_DIR := $(HIF_DIR)/src/dispatcher
HIF_PCIE_DIR := $(HIF_DIR)/src/pcie
HIF_SNOC_DIR := $(HIF_DIR)/src/snoc
+HIF_USB_DIR := $(HIF_DIR)/src/usb
HIF_SDIO_DIR := $(HIF_DIR)/src/sdio
HIF_SDIO_NATIVE_DIR := $(HIF_SDIO_DIR)/native_sdio
@@ -819,6 +821,11 @@ HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_SNOC_DIR)
endif
+ifeq ($(CONFIG_HIF_USB), 1)
+HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
+HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_USB_DIR)
+endif
+
ifeq ($(CONFIG_HIF_SDIO), 1)
HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_SDIO_DIR)
@@ -836,6 +843,11 @@ HIF_CE_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_bmi.o \
$(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_tasklet.o \
$(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/regtable.o
+HIF_USB_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/usbdrv.o \
+ $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/hif_usb.o \
+ $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/if_usb.o \
+ $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/regtable_usb.o
+
HIF_SDIO_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio_send.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_bmi_reg_access.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_diag_reg_access.o \
@@ -879,6 +891,12 @@ HIF_OBJS += $(HIF_COMMON_OBJS)
HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus_sdio.o
endif
+ifeq ($(CONFIG_HIF_USB), 1)
+HIF_OBJS += $(HIF_USB_OBJS)
+HIF_OBJS += $(HIF_COMMON_OBJS)
+HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus_usb.o
+endif
+
############ WMA ############
WMA_DIR := core/wma
@@ -928,6 +946,9 @@ endif
ifeq ($(CONFIG_CNSS_SDIO),y)
PLD_OBJS += $(PLD_SRC_DIR)/pld_sdio.o
endif
+ifeq ($(CONFIG_USB), y)
+PLD_OBJS += $(PLD_SRC_DIR)/pld_usb.o
+endif
TARGET_INC := -I$(WLAN_ROOT)/target/inc
@@ -1044,12 +1065,15 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
-DWMI_INTERFACE_EVENT_LOGGING \
-DATH_SUPPORT_WAPI \
-DWLAN_FEATURE_LINK_LAYER_STATS \
- -DWLAN_LOGGING_SOCK_SVC_ENABLE \
-DFEATURE_WLAN_EXTSCAN \
-DWLAN_FEATURE_MBSSID \
-DCONFIG_160MHZ_SUPPORT \
-DCONFIG_MCL
+ifneq ($(CONFIG_HIF_USB), 1)
+CDEFINES += -DWLAN_LOGGING_SOCK_SVC_ENABLE
+endif
+
ifeq ($(CONFIG_CNSS), y)
ifeq ($(CONFIG_CNSS_SDIO), y)
CDEFINES += -DCONFIG_PLD_SDIO_CNSS
@@ -1169,7 +1193,6 @@ ifeq ($(CONFIG_HIF_USB), 1)
CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
CDEFINES += -DQCA_SUPPORT_OL_RX_REORDER_TIMEOUT
CDEFINES += -DCONFIG_ATH_PCIE_MAX_PERF=0 -DCONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD=0 -DCONFIG_DISABLE_CDC_MAX_PERF_WAR=0
-CDEFINES += -DQCA_TX_HTT2_SUPPORT
endif
ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
@@ -1263,8 +1286,8 @@ endif
#Enable USB specific APIS
ifeq ($(CONFIG_HIF_USB), 1)
-CDEFINES += -DHIF_USB
-CDEFINES += -DCONFIG_HL_SUPPORT
+CDEFINES += -DHIF_USB \
+ -DCONFIG_HL_SUPPORT
endif
#Enable FW logs through ini
diff --git a/core/bmi/src/bmi.c b/core/bmi/src/bmi.c
index de021a760ae8..4b88469782a3 100644
--- a/core/bmi/src/bmi.c
+++ b/core/bmi/src/bmi.c
@@ -200,6 +200,7 @@ bmi_get_target_info(struct bmi_target_info *targ_info,
switch (hif_get_bus_type(scn)) {
case QDF_BUS_TYPE_PCI:
case QDF_BUS_TYPE_SNOC:
+ case QDF_BUS_TYPE_USB:
status = bmi_get_target_info_message_based(targ_info, ol_ctx);
break;
#ifdef HIF_SDIO
diff --git a/core/bmi/src/i_bmi.h b/core/bmi/src/i_bmi.h
index 087db4fe03fe..712bf9e30be5 100644
--- a/core/bmi/src/i_bmi.h
+++ b/core/bmi/src/i_bmi.h
@@ -188,7 +188,7 @@ struct ol_config_info *ol_get_ini_handle(struct ol_context *ol_ctx);
QDF_STATUS hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx,
struct bmi_target_info *targ_info);
#endif
-#if defined(HIF_PCI) || defined(SNOC) || defined(HIF_AHB)
+#if defined(HIF_PCI) || defined(SNOC) || defined(HIF_AHB) || defined(HIF_USB)
static inline QDF_STATUS
hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx,
struct bmi_target_info *targ_info)
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c
index f654c9674ed7..5e62213193b3 100644
--- a/core/bmi/src/ol_fw.c
+++ b/core/bmi/src/ol_fw.c
@@ -42,11 +42,17 @@
#include "if_sdio.h"
#include "regtable_sdio.h"
#endif
+#if defined(HIF_USB)
+#include "if_usb.h"
+#include "regtable_usb.h"
+#endif
#include "pld_common.h"
+#include "hif_main.h"
#include "i_bmi.h"
#include "qwlan_version.h"
#include "cds_concurrency.h"
+#include "dbglog_host.h"
#ifdef FEATURE_SECURE_FIRMWARE
static struct hash_fw fw_hash;
@@ -604,6 +610,12 @@ void ol_target_failure(void *instance, QDF_STATUS status)
hif_set_target_status(scn, TARGET_STATUS_RESET);
+ if (hif_get_bus_type(scn) == QDF_BUS_TYPE_USB) {
+ if (status == QDF_STATUS_E_USB_ERROR)
+ hif_ramdump_handler(scn);
+ return;
+ }
+
if (cds_is_driver_recovering()) {
BMI_ERR("%s: Recovery in progress, ignore!\n", __func__);
return;
@@ -1248,11 +1260,12 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
__func__, address);
}
- ret = ol_patch_pll_switch(ol_ctx);
-
- if (ret != QDF_STATUS_SUCCESS) {
- BMI_ERR("pll switch failed. status %d", ret);
- return ret;
+ if (hif_get_bus_type(scn) != QDF_BUS_TYPE_USB) {
+ ret = ol_patch_pll_switch(ol_ctx);
+ if (ret != QDF_STATUS_SUCCESS) {
+ BMI_ERR("pll switch failed. status %d", ret);
+ return ret;
+ }
}
if (ol_ctx->cal_in_flash) {
@@ -1541,7 +1554,8 @@ void ol_dump_target_memory(struct hif_opaque_softc *scn, void *memory_block)
u_int32_t address = 0;
u_int32_t size = 0;
- if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SDIO)
+ if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SDIO ||
+ hif_get_bus_type(scn) == QDF_BUS_TYPE_USB)
return;
for (; section_count < 2; section_count++) {
diff --git a/core/bmi/src/ol_fw_common.c b/core/bmi/src/ol_fw_common.c
index 3709235dc24d..48e7fd0c1bf4 100644
--- a/core/bmi/src/ol_fw_common.c
+++ b/core/bmi/src/ol_fw_common.c
@@ -36,6 +36,9 @@
#if defined(HIF_SDIO)
#include "regtable_sdio.h"
#endif
+#if defined(HIF_USB)
+#include "regtable_usb.h"
+#endif
#if defined(CONFIG_CNSS)
#include <net/cnss.h>
#endif
@@ -66,6 +69,33 @@ static inline void ol_sdio_disable_sleep(struct ol_context *ol_ctx)
#endif
+/**
+ * ol_usb_extra_initialization() - USB extra initilization
+ * @ol_ctx: pointer to ol_context
+ *
+ * USB specific initialization after firmware download
+ *
+ * Return: QDF_STATUS_SUCCESS on success and error QDF status on failure
+ */
+static QDF_STATUS
+ol_usb_extra_initialization(struct ol_context *ol_ctx)
+{
+ struct hif_opaque_softc *scn = ol_ctx->scn;
+ struct hif_target_info *tgt_info =
+ hif_get_target_info_handle(scn);
+ QDF_STATUS status = !QDF_STATUS_SUCCESS;
+ u_int32_t param = 0;
+
+ param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
+ status = bmi_write_memory(
+ hif_hia_item_address(tgt_info->target_type,
+ offsetof(struct host_interest_s,
+ hi_acs_flags)),
+ (u_int8_t *)&param, 4, ol_ctx);
+
+ return status;
+}
+
/*Setting SDIO block size, mbox ISR yield limit for SDIO based HIF*/
static
QDF_STATUS ol_sdio_extra_initialization(struct ol_context *ol_ctx)
@@ -144,12 +174,22 @@ exit:
return status;
}
+/**
+* ol_extra_initialization() - OL extra initilization
+* @ol_ctx: pointer to ol_context
+*
+* Bus specific initialization after firmware download
+*
+* Return: QDF_STATUS_SUCCESS on success and error QDF status on failure
+*/
QDF_STATUS ol_extra_initialization(struct ol_context *ol_ctx)
{
struct hif_opaque_softc *scn = ol_ctx->scn;
if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SDIO)
return ol_sdio_extra_initialization(ol_ctx);
+ else if (hif_get_bus_type(scn) == QDF_BUS_TYPE_USB)
+ return ol_usb_extra_initialization(ol_ctx);
return QDF_STATUS_SUCCESS;
}
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h
index bb992eff76f9..997af35553ee 100644
--- a/core/cds/inc/cds_concurrency.h
+++ b/core/cds/inc/cds_concurrency.h
@@ -66,6 +66,47 @@
#define WEIGHT_OF_NON_PCL_CHANNELS 1
/**
+ * enum hw_mode_ss_config - Possible spatial stream configuration
+ * @SS_0x0: Unused Tx and Rx of MAC
+ * @SS_1x1: 1 Tx SS and 1 Rx SS
+ * @SS_2x2: 2 Tx SS and 2 Rx SS
+ * @SS_3x3: 3 Tx SS and 3 Rx SS
+ * @SS_4x4: 4 Tx SS and 4 Rx SS
+ *
+ * Note: Right now only 1x1 and 2x2 are being supported. Other modes should
+ * be added when supported. Asymmetric configuration like 1x2, 2x1 are also
+ * not supported now. But, they are still valid. Right now, Tx/Rx SS support is
+ * 4 bits long. So, we can go upto 15x15
+ */
+enum hw_mode_ss_config {
+ HW_MODE_SS_0x0,
+ HW_MODE_SS_1x1,
+ HW_MODE_SS_2x2,
+ HW_MODE_SS_3x3,
+ HW_MODE_SS_4x4,
+};
+
+/**
+ * enum hw_mode_dbs_capab - DBS HW mode capability
+ * @HW_MODE_DBS_NONE: Non DBS capable
+ * @HW_MODE_DBS: DFS capable
+ */
+enum hw_mode_dbs_capab {
+ HW_MODE_DBS_NONE,
+ HW_MODE_DBS,
+};
+
+/**
+ * enum hw_mode_agile_dfs_capab - Agile DFS HW mode capability
+ * @HW_MODE_AGILE_DFS_NONE: Non Agile DFS capable
+ * @HW_MODE_AGILE_DFS: Agile DFS capable
+ */
+enum hw_mode_agile_dfs_capab {
+ HW_MODE_AGILE_DFS_NONE,
+ HW_MODE_AGILE_DFS,
+};
+
+/**
* enum cds_pcl_group_id - Identifies the pcl groups to be used
* @CDS_PCL_GROUP_ID1_ID2: Use weights of group1 and group2
* @CDS_PCL_GROUP_ID2_ID2: Use weights of group2 and group3
diff --git a/core/cds/inc/cds_reg_service.h b/core/cds/inc/cds_reg_service.h
index 7a87e942fa83..4fc7a5223b4a 100644
--- a/core/cds/inc/cds_reg_service.h
+++ b/core/cds/inc/cds_reg_service.h
@@ -343,6 +343,26 @@ struct ch_params_s {
uint8_t center_freq_seg1;
};
+/**
+ * enum dfs_region - DFS region
+ * @DFS_UNINIT_REGION: un-initialized region
+ * @DFS_FCC_REGION: FCC region
+ * @DFS_ETSI_REGION: ETSI region
+ * @DFS_MKK_REGION: MKK region
+ * @DFS_CN_REGION: China region
+ * @DFS_KR_REGION: Korea region
+ * @DFS_UNDEF_REGION: Undefined region
+ */
+enum dfs_region {
+ DFS_UNINIT_REGION = 0,
+ DFS_FCC_REGION = 1,
+ DFS_ETSI_REGION = 2,
+ DFS_MKK_REGION = 3,
+ DFS_CN_REGION = 4,
+ DFS_KR_REGION = 5,
+ DFS_UNDEF_REGION
+};
+
extern const struct chan_map chan_mapping[NUM_CHANNELS];
extern struct regulatory_channel reg_channels[NUM_CHANNELS];
@@ -357,8 +377,8 @@ QDF_STATUS cds_get_channel_list_with_power(struct channel_power
uint8_t *num_base_channels);
enum channel_state cds_get_channel_state(uint32_t chan_num);
-QDF_STATUS cds_get_dfs_region(uint8_t *dfs_region);
-QDF_STATUS cds_put_dfs_region(uint8_t dfs_region);
+QDF_STATUS cds_get_dfs_region(enum dfs_region *dfs_reg);
+QDF_STATUS cds_put_dfs_region(enum dfs_region dfs_reg);
bool cds_is_dsrc_channel(uint16_t center_freq);
enum channel_state cds_get_5g_bonded_channel_state(uint16_t chan_num,
diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h
index d1c134d0ced7..ac202b7f1dc1 100644
--- a/core/cds/inc/cds_regdomain.h
+++ b/core/cds/inc/cds_regdomain.h
@@ -473,20 +473,6 @@ enum ctl_val {
};
/**
- * enum dfs_region - DFS region
- * @DFS_UNINIT_REGION: un-initialized region
- * @DFS_FCC_REGION: FCC region
- * @DFS_ETSI_REGION: ETSI region
- * @DFS_MKK_REGION: MKK region
- */
-enum dfs_region {
- DFS_UNINIT_REGION = 0,
- DFS_FCC_REGION = 1,
- DFS_ETSI_REGION = 2,
- DFS_MKK_REGION = 3
-};
-
-/**
* enum offset_t: channel offset
* @BW20: 20 mhz channel
* @BW40_LOW_PRIMARY: lower channel in 40 mhz
diff --git a/core/cds/inc/cds_utils.h b/core/cds/inc/cds_utils.h
index 1bc711484120..daaa1647c03e 100644
--- a/core/cds/inc/cds_utils.h
+++ b/core/cds/inc/cds_utils.h
@@ -51,8 +51,6 @@
------------------------------------------------------------------------*/
#define CDS_DIGEST_SHA1_SIZE (20)
#define CDS_DIGEST_MD5_SIZE (16)
-#define CDS_BAND_2GHZ (1)
-#define CDS_BAND_5GHZ (2)
#define CDS_24_GHZ_BASE_FREQ (2407)
#define CDS_5_GHZ_BASE_FREQ (5000)
@@ -82,9 +80,11 @@
cds_logfl(QDF_TRACE_LEVEL_INFO_HIGH, format, ## args)
#define cds_debug(format, args...) \
cds_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
-/*--------------------------------------------------------------------------
- Type declarations
- ------------------------------------------------------------------------*/
+
+enum cds_band_type {
+ CDS_BAND_2GHZ = 1,
+ CDS_BAND_5GHZ = 2
+};
/*-------------------------------------------------------------------------
Function declarations and documenation
@@ -178,7 +178,7 @@ QDF_STATUS cds_decrypt_aes(uint32_t cryptHandle, /* Handle */
uint32_t cds_chan_to_freq(uint8_t chan);
uint8_t cds_freq_to_chan(uint32_t freq);
-uint8_t cds_chan_to_band(uint32_t chan);
+enum cds_band_type cds_chan_to_band(uint32_t chan);
#ifdef WLAN_FEATURE_11W
bool cds_is_mmie_valid(uint8_t *key, uint8_t *ipn,
uint8_t *frm, uint8_t *efrm);
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index c8781fc0a37a..c4a61b468ca3 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -2604,6 +2604,19 @@ QDF_STATUS cds_pdev_set_hw_mode(uint32_t session_id,
return QDF_STATUS_E_FAILURE;
}
+ /*
+ * if HW is not capable of doing 2x2 or ini config disabled 2x2, don't
+ * allow to request FW for 2x2
+ */
+ if ((HW_MODE_SS_2x2 == mac0_ss) && (!hdd_ctx->config->enable2x2)) {
+ cds_info("2x2 is not allowed downgrading to 1x1 for mac0");
+ mac0_ss = HW_MODE_SS_1x1;
+ }
+ if ((HW_MODE_SS_2x2 == mac1_ss) && (!hdd_ctx->config->enable2x2)) {
+ cds_info("2x2 is not allowed downgrading to 1x1 for mac1");
+ mac1_ss = HW_MODE_SS_1x1;
+ }
+
hw_mode_index = wma_get_hw_mode_idx_from_dbs_hw_list(mac0_ss,
mac0_bw, mac1_ss, mac1_bw, dbs, dfs);
if (hw_mode_index < 0) {
@@ -3663,7 +3676,7 @@ enum cds_conc_next_action cds_need_opportunistic_upgrade(void)
/* Is there any connection had an initial connection with 2x2 */
for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
conn_index++) {
- if ((conc_connection_list[conn_index].original_nss == 1) &&
+ if ((conc_connection_list[conn_index].original_nss == 2) &&
conc_connection_list[conn_index].in_use) {
upgrade = CDS_SINGLE_MAC_UPGRADE;
goto done;
@@ -6056,62 +6069,6 @@ done:
}
/**
- * cds_wait_for_nss_update() - finds out if we need to wait
- * for all nss update to finish before requesting for HW mode
- * update
- * @action: next action to happen at policy mgr after
- * beacon update
- *
- * This function finds out if we need to wait
- * for all nss update to finish before requesting for HW mode
- * update
- *
- * Return: boolean. True = wait for nss update, False = go ahead
- * with HW mode update
- */
-bool cds_wait_for_nss_update(uint8_t action)
-{
- uint32_t conn_index = 0;
- bool wait = false;
- if (CDS_DBS == action) {
- for (conn_index = 0;
- conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
- conn_index++) {
- if ((conc_connection_list
- [conn_index].original_nss == 2) &&
- (conc_connection_list
- [conn_index].chain_mask == CDS_TWO_TWO) &&
- conc_connection_list[conn_index].in_use &&
- ((conc_connection_list[conn_index].mode ==
- CDS_P2P_GO_MODE) ||
- (conc_connection_list[conn_index].mode ==
- CDS_SAP_MODE))) {
- wait = true;
- break;
- }
- }
- } else if (CDS_SINGLE_MAC == action) {
- for (conn_index = 0;
- conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
- conn_index++) {
- if ((conc_connection_list
- [conn_index].original_nss == 2) &&
- (conc_connection_list
- [conn_index].chain_mask == CDS_TWO_TWO) &&
- conc_connection_list[conn_index].in_use &&
- ((conc_connection_list[conn_index].mode ==
- CDS_P2P_GO_MODE) ||
- (conc_connection_list[conn_index].mode ==
- CDS_SAP_MODE))) {
- wait = true;
- break;
- }
- }
- }
- return wait;
-}
-
-/**
* cds_nss_update_cb() - callback from SME confirming nss
* update
* @hdd_ctx: HDD Context
@@ -6133,12 +6090,9 @@ void cds_nss_update_cb(void *context, uint8_t tx_status, uint8_t vdev_id,
{
cds_context_type *cds_ctx;
uint32_t conn_index = 0;
- bool wait = true;
- if (QDF_STATUS_E_FAILURE == tx_status) {
- cds_err("nss update failed for vdev %d", vdev_id);
- return;
- }
+ if (QDF_STATUS_SUCCESS != tx_status)
+ cds_err("nss update failed(%d) for vdev %d", tx_status, vdev_id);
cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
if (!cds_ctx) {
@@ -6156,24 +6110,9 @@ void cds_nss_update_cb(void *context, uint8_t tx_status, uint8_t vdev_id,
cds_err("connection not found for vdev %d", vdev_id);
return;
}
- switch (next_action) {
- case CDS_DBS:
- wait = cds_wait_for_nss_update(next_action);
- break;
- case CDS_SINGLE_MAC:
- wait = cds_wait_for_nss_update(next_action);
- break;
- default:
- cds_err("unexpected action %d", next_action);
- break;
- }
-
- cds_debug("vdev:%d wait:%d", vdev_id, wait);
- if (!wait)
- cds_next_actions(vdev_id,
- next_action,
- reason);
+ cds_debug("nss update successful for vdev:%d", vdev_id);
+ cds_next_actions(vdev_id, next_action, reason);
qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
return;
}
@@ -6231,7 +6170,7 @@ QDF_STATUS cds_complete_action(uint8_t new_nss, uint8_t next_action,
continue;
}
- if (1 == conc_connection_list[list[index]].original_nss) {
+ if (2 == conc_connection_list[list[index]].original_nss) {
status = sme_nss_update_request(hdd_ctx->hHal,
conc_connection_list
[list[index]].vdev_id, new_nss,
@@ -6254,7 +6193,7 @@ QDF_STATUS cds_complete_action(uint8_t new_nss, uint8_t next_action,
conc_connection_list[list[index]].vdev_id);
continue;
}
- if (1 == conc_connection_list[list[index]].original_nss) {
+ if (2 == conc_connection_list[list[index]].original_nss) {
status = sme_nss_update_request(hdd_ctx->hHal,
conc_connection_list
[list[index]].vdev_id, new_nss,
@@ -6340,6 +6279,16 @@ QDF_STATUS cds_next_actions(uint32_t session_id,
break;
case CDS_SINGLE_MAC_UPGRADE:
/*
+ * change the HW mode first before the NSS upgrade
+ */
+ status = cds_pdev_set_hw_mode(session_id,
+ HW_MODE_SS_2x2,
+ HW_MODE_80_MHZ,
+ HW_MODE_SS_0x0, HW_MODE_BW_NONE,
+ HW_MODE_DBS_NONE,
+ HW_MODE_AGILE_DFS_NONE,
+ reason);
+ /*
* check if we have a beaconing entity that advertised 2x2
* intially. If yes, update the beacon template & notify FW.
* Once FW confirms beacon updated, send the HW mode change req
diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c
index b15f99fef296..32cfc719d767 100644
--- a/core/cds/src/cds_reg_service.c
+++ b/core/cds/src/cds_reg_service.c
@@ -40,6 +40,7 @@
#include "cds_reg_service.h"
#include "cds_regdomain.h"
+
const struct chan_map chan_mapping[NUM_CHANNELS] = {
[CHAN_ENUM_1] = {2412, 1},
[CHAN_ENUM_2] = {2417, 2},
@@ -152,7 +153,7 @@ static const enum phy_ch_width next_lower_bw[] = {
struct regulatory_channel reg_channels[NUM_CHANNELS];
static uint8_t default_country[CDS_COUNTRY_CODE_LEN + 1];
-static uint8_t dfs_region;
+static enum dfs_region dfs_region;
/**
* cds_get_channel_list_with_power() - retrieve channel list with power
@@ -580,7 +581,7 @@ void cds_set_channel_params(uint16_t oper_ch, uint16_t sec_ch_2g,
*
* Return: QDF_STATUS
*/
-QDF_STATUS cds_get_dfs_region(uint8_t *dfs_reg)
+QDF_STATUS cds_get_dfs_region(enum dfs_region *dfs_reg)
{
*dfs_reg = dfs_region;
@@ -670,7 +671,7 @@ QDF_STATUS cds_set_reg_domain(void *client_ctxt, v_REGDOMAIN_t reg_domain)
*
* Return: QDF_STATUS
*/
-QDF_STATUS cds_put_dfs_region(uint8_t dfs_reg)
+QDF_STATUS cds_put_dfs_region(enum dfs_region dfs_reg)
{
dfs_region = dfs_reg;
diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c
index 60d8c518d235..3d4c38e0e1fa 100644
--- a/core/cds/src/cds_regdomain.c
+++ b/core/cds/src/cds_regdomain.c
@@ -187,6 +187,7 @@ static const struct reg_dmn_pair g_reg_dmn_pairs[] = {
{APL1_ETSIC, APL1, ETSIC, CTRY_DEFAULT},
{APL6_WORLD, APL6, WORLD, CTRY_DEFAULT},
{APL7_FCCA, APL7, FCCA, CTRY_DEFAULT},
+ {APL8_WORLD, APL8, WORLD, CTRY_DEFAULT},
{APL9_WORLD, APL9, WORLD, CTRY_DEFAULT},
{APL10_WORLD, APL10, WORLD, CTRY_DEFAULT},
{APL12_WORLD, APL12, WORLD, CTRY_DEFAULT},
@@ -369,7 +370,7 @@ static const struct country_code_to_reg_dmn g_all_countries[] = {
{CTRY_UKRAINE, ETSI9_WORLD, "UA", "UKRAINE"},
{CTRY_UAE, FCC3_WORLD, "AE", "UNITED ARAB EMIRATES"},
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB", "UNITED KINGDOM"},
- {CTRY_UNITED_STATES, FCC8_FCCA, "US", "UNITED STATES"},
+ {CTRY_UNITED_STATES, FCC3_FCCA, "US", "UNITED STATES"},
{CTRY_UNITED_STATES_PS, FCC4_FCCA, "PS", "US PUBLIC SAFETY"},
{CTRY_URUGUAY, FCC2_WORLD, "UY", "URUGUAY"},
{CTRY_UZBEKISTAN, ETSI3_WORLD, "UZ", "UZBEKISTAN"},
diff --git a/core/cds/src/cds_utils.c b/core/cds/src/cds_utils.c
index c818f4980a2c..68726fdee775 100644
--- a/core/cds/src/cds_utils.c
+++ b/core/cds/src/cds_utils.c
@@ -1128,7 +1128,7 @@ uint8_t cds_freq_to_chan(uint32_t freq)
return chan;
}
-uint8_t cds_chan_to_band(uint32_t chan)
+enum cds_band_type cds_chan_to_band(uint32_t chan)
{
if (chan <= CDS_24_GHZ_CHANNEL_14)
return CDS_BAND_2GHZ;
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c
index 56f4df39aeb8..857b25cd4a34 100644
--- a/core/dp/htt/htt.c
+++ b/core/dp/htt/htt.c
@@ -178,7 +178,7 @@ htt_htc_tx_htt2_service_start(struct htt_pdev_t *pdev,
/* Enable HTC schedule mechanism for TX HTT2 service. */
connect_req->ConnectionFlags |= HTC_CONNECT_FLAGS_ENABLE_HTC_SCHEDULE;
- connect_req->ServiceID = HTT_DATA2_MSG_SVC;
+ connect_req->service_id = HTT_DATA2_MSG_SVC;
status = htc_connect_service(pdev->htc_pdev, connect_req, connect_resp);
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c
index 8283e60bffa2..3462c827dec9 100644
--- a/core/dp/htt/htt_rx.c
+++ b/core/dp/htt/htt_rx.c
@@ -1937,6 +1937,14 @@ void htt_rx_mon_note_capture_channel(htt_pdev_handle pdev, int mon_ch)
extern void
dump_pkt(qdf_nbuf_t nbuf, uint32_t nbuf_paddr, int len);
+uint32_t htt_rx_amsdu_rx_in_order_get_pktlog(qdf_nbuf_t rx_ind_msg)
+{
+ uint32_t *msg_word;
+
+ msg_word = (uint32_t *) qdf_nbuf_data(rx_ind_msg);
+ return HTT_RX_IN_ORD_PADDR_IND_PKTLOG_GET(*msg_word);
+}
+
/* Return values: 1 - success, 0 - failure */
int
htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
diff --git a/core/dp/ol/inc/ol_htt_rx_api.h b/core/dp/ol/inc/ol_htt_rx_api.h
index 303819a8732d..e2149be366df 100644
--- a/core/dp/ol/inc/ol_htt_rx_api.h
+++ b/core/dp/ol/inc/ol_htt_rx_api.h
@@ -862,4 +862,7 @@ htt_rx_offload_paddr_msdu_pop_ll(htt_pdev_handle pdev,
int *tid,
uint8_t *fw_desc,
qdf_nbuf_t *head_buf, qdf_nbuf_t *tail_buf);
+
+uint32_t htt_rx_amsdu_rx_in_order_get_pktlog(qdf_nbuf_t rx_ind_msg);
+
#endif /* _OL_HTT_RX_API__H_ */
diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c
index d201313ac259..760500c71642 100644
--- a/core/dp/txrx/ol_rx.c
+++ b/core/dp/txrx/ol_rx.c
@@ -69,14 +69,19 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer,
* @pdev: pdev handle
* @peer: peer handle
* @msdu: skb list
+ * @pktlog_bit: packetlog bit from firmware
*
* Return: none
*/
+#ifdef HELIUMPLUS
void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
- struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu)
+ struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit)
{
struct ol_rx_remote_data data;
+ if (!pktlog_bit)
+ return;
+
data.msdu = msdu;
if (peer)
data.mac_id = peer->vdev->mac_id;
@@ -85,6 +90,21 @@ void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
wdi_event_handler(WDI_EVENT_RX_DESC_REMOTE, pdev, &data);
}
+#else
+void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
+ struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit)
+{
+ struct ol_rx_remote_data data;
+
+ data.msdu = msdu;
+ if (peer)
+ data.mac_id = peer->vdev->mac_id;
+ else
+ data.mac_id = 0;
+
+ wdi_event_handler(WDI_EVENT_RX_DESC_REMOTE, pdev, &data);
+}
+#endif
#ifdef HTT_RX_RESTORE
@@ -529,7 +549,7 @@ ol_rx_indication_handler(ol_txrx_pdev_handle pdev,
/* Pktlog */
#ifdef WDI_EVENT_ENABLE
- ol_rx_send_pktlog_event(pdev, peer, head_msdu);
+ ol_rx_send_pktlog_event(pdev, peer, head_msdu, 1);
#endif
if (msdu_chaining) {
@@ -607,7 +627,7 @@ ol_rx_indication_handler(ol_txrx_pdev_handle pdev,
if (status != htt_rx_status_ctrl_mgmt_null) {
/* Pktlog */
ol_rx_send_pktlog_event(pdev,
- peer, head_msdu);
+ peer, head_msdu, 1);
}
#endif
if (status == htt_rx_status_err_inv_peer) {
@@ -1309,6 +1329,9 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
htt_pdev_handle htt_pdev = NULL;
int status;
qdf_nbuf_t head_msdu, tail_msdu = NULL;
+#ifdef WDI_EVENT_ENABLE
+ uint8_t pktlog_bit;
+#endif
if (pdev) {
if (qdf_unlikely(QDF_GLOBAL_MONITOR_MODE == cds_get_conparam()))
@@ -1328,6 +1351,10 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
__func__, __LINE__, rx_ind_msg, peer_id, tid, is_offload);
#endif
+#ifdef WDI_EVENT_ENABLE
+ pktlog_bit = (htt_rx_amsdu_rx_in_order_get_pktlog(rx_ind_msg) == 0x01);
+#endif
+
/*
* Get a linked list of the MSDUs in the rx in order indication.
* This also attaches each rx MSDU descriptor to the
@@ -1351,7 +1378,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
/* Pktlog */
#ifdef WDI_EVENT_ENABLE
- ol_rx_send_pktlog_event(pdev, peer, head_msdu);
+ ol_rx_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
#endif
/* if this is an offload indication, peer id is carried in the
diff --git a/core/dp/txrx/ol_rx_reorder_timeout.c b/core/dp/txrx/ol_rx_reorder_timeout.c
index 02ab4255b051..d2a9f8a17a15 100644
--- a/core/dp/txrx/ol_rx_reorder_timeout.c
+++ b/core/dp/txrx/ol_rx_reorder_timeout.c
@@ -180,7 +180,8 @@ void ol_rx_reorder_timeout_init(struct ol_txrx_pdev_t *pdev)
qdf_timer_init(pdev->osdev,
&rx_reorder_timeout_ac->timer,
ol_rx_reorder_timeout,
- rx_reorder_timeout_ac);
+ rx_reorder_timeout_ac,
+ QDF_TIMER_TYPE_SW);
/* init the virtual timer list */
TAILQ_INIT(&rx_reorder_timeout_ac->virtual_timer_list);
rx_reorder_timeout_ac->pdev = pdev;
diff --git a/core/dp/txrx/ol_tx_classify.c b/core/dp/txrx/ol_tx_classify.c
index b45d24863918..55a4e930c315 100644
--- a/core/dp/txrx/ol_tx_classify.c
+++ b/core/dp/txrx/ol_tx_classify.c
@@ -694,9 +694,11 @@ ol_tx_classify_mgmt(
mac_addr,
&peer->mac_addr) != 0) {
qdf_atomic_dec(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d",
- __func__, peer,
- qdf_atomic_read
+ QDF_TRACE(QDF_MODULE_ID_TXRX,
+ QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read
(&peer->ref_cnt));
peer = NULL;
}
diff --git a/core/dp/txrx/ol_tx_queue.c b/core/dp/txrx/ol_tx_queue.c
index 7cf2fdfb1aad..3044210dbbb8 100644
--- a/core/dp/txrx/ol_tx_queue.c
+++ b/core/dp/txrx/ol_tx_queue.c
@@ -92,7 +92,9 @@ ol_tx_queue_vdev_flush(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev)
txq = &peer->txqs[i];
if (txq->frms) {
qdf_atomic_inc(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d",
+ QDF_TRACE(QDF_MODULE_ID_TXRX,
+ QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d",
__func__, peer,
qdf_atomic_read
(&peer->ref_cnt));
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 435f3a98e50f..0592b158fa3f 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -258,8 +258,9 @@ ol_txrx_find_peer_by_addr_and_vdev(ol_txrx_pdev_handle pdev,
return NULL;
*peer_id = peer->local_id;
qdf_atomic_dec(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return peer;
}
@@ -314,8 +315,9 @@ ol_txrx_peer_handle ol_txrx_find_peer_by_addr(ol_txrx_pdev_handle pdev,
return NULL;
*peer_id = peer->local_id;
qdf_atomic_dec(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return peer;
}
@@ -2155,16 +2157,14 @@ ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
/* keep one reference for ol_rx_peer_map_handler */
qdf_atomic_inc(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
peer->valid = 1;
ol_txrx_peer_find_hash_add(pdev, peer);
- TXRX_PRINT(TXRX_PRINT_LEVEL_INFO2,
- "vdev %p created peer %p (%02x:%02x:%02x:%02x:%02x:%02x)\n",
- vdev, peer,
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "vdev %p created peer %p ref_cnt %d (%02x:%02x:%02x:%02x:%02x:%02x)\n",
+ vdev, peer, qdf_atomic_read(&peer->ref_cnt),
peer->mac_addr.raw[0], peer->mac_addr.raw[1],
peer->mac_addr.raw[2], peer->mac_addr.raw[3],
peer->mac_addr.raw[4], peer->mac_addr.raw[5]);
@@ -2554,8 +2554,9 @@ QDF_STATUS ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev,
__func__);
#endif
qdf_atomic_dec(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return QDF_STATUS_SUCCESS;
}
@@ -2586,8 +2587,9 @@ QDF_STATUS ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev,
}
}
qdf_atomic_dec(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
/* Set the state after the Pause to avoid the race condiction
with ADDBA check in tx path */
peer->state = state;
@@ -2690,8 +2692,9 @@ ol_txrx_peer_update(ol_txrx_vdev_handle vdev,
}
}
qdf_atomic_dec(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
}
uint8_t
@@ -2768,7 +2771,7 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
u_int16_t peer_id;
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "Deleting peer %p (%02x:%02x:%02x:%02x:%02x:%02x)\n",
+ "Deleting peer %p (%02x:%02x:%02x:%02x:%02x:%02x)",
peer,
peer->mac_addr.raw[0], peer->mac_addr.raw[1],
peer->mac_addr.raw[2], peer->mac_addr.raw[3],
@@ -2817,7 +2820,7 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: deleting vdev object %p "
"(%02x:%02x:%02x:%02x:%02x:%02x)"
- " - its last peer is done\n",
+ " - its last peer is done",
__func__, vdev,
vdev->mac_addr.raw[0],
vdev->mac_addr.raw[1],
@@ -2860,9 +2863,9 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
qdf_mem_free(peer);
} else {
- TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: peer %p peer->ref_cnt = %d\n", __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt = %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
}
}
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index 93b44736bf6d..37acb70c3aa8 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -181,9 +181,10 @@ struct ol_txrx_peer_t *ol_txrx_peer_vdev_find_hash(struct ol_txrx_pdev_t *pdev,
/* found it - increment the ref count before releasing
the lock */
qdf_atomic_inc(&peer->ref_cnt);
- qdf_print("%s: peer %p peer->ref_cnt %d",
- __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
return peer;
}
@@ -217,9 +218,10 @@ struct ol_txrx_peer_t *ol_txrx_peer_find_hash_find(struct ol_txrx_pdev_t *pdev,
releasing the lock */
qdf_atomic_inc(&peer->ref_cnt);
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
- qdf_print("%s: peer %p peer->ref_cnt %d",
- __func__, peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return peer;
}
}
@@ -284,10 +286,11 @@ void ol_txrx_peer_find_hash_erase(struct ol_txrx_pdev_t *pdev)
*/
qdf_atomic_init(&peer->ref_cnt); /* set to 0 */
qdf_atomic_inc(&peer->ref_cnt); /* incr to 1 */
- TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: Delete Peer %p ref_cnt %d\n", __func__,
- peer,
- qdf_atomic_read(&peer->ref_cnt));
+ QDF_TRACE(QDF_MODULE_ID_TXRX,
+ QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: Delete Peer %p ref_cnt %d\n",
+ __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
ol_txrx_peer_unref_delete(peer);
}
}
@@ -337,18 +340,19 @@ ol_txrx_peer_find_add_id(struct ol_txrx_pdev_t *pdev,
peer =
ol_txrx_peer_find_hash_find(pdev, peer_mac_addr,
1 /* is aligned */, 0);
- if (!peer) {
+
+ if (!peer || peer_id == HTT_INVALID_PEER) {
/*
* Currently peer IDs are assigned for vdevs as well as peers.
* If the peer ID is for a vdev, then we will fail to find a
* peer with a matching MAC address.
*/
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: peer not found for ID %d\n", __func__, peer_id);
+ "%s: peer not found or peer ID is %d invalid",
+ __func__, peer_id);
return;
}
-
qdf_spin_lock(&pdev->peer_map_unmap_lock);
/* peer's ref count was already incremented by
@@ -370,11 +374,10 @@ ol_txrx_peer_find_add_id(struct ol_txrx_pdev_t *pdev,
if (peer->peer_ids[i] == HTT_INVALID_PEER) {
peer->peer_ids[i] = peer_id;
status = 0;
+ break;
}
}
- qdf_spin_unlock(&pdev->peer_map_unmap_lock);
-
/*
* remove the reference added in ol_txrx_peer_find_hash_find.
* the reference for the first peer id is already added in
@@ -382,22 +385,18 @@ ol_txrx_peer_find_add_id(struct ol_txrx_pdev_t *pdev,
* Riva/Pronto has one peer id for each peer.
* Peregrine/Rome has two peer id for each peer.
*/
- if (del_peer_ref) {
- TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: peer %p ID %d peer_id_ref_cnt %d peer->ref_cnt %d\n",
- __func__, peer, peer_id,
- qdf_atomic_read(&pdev->
- peer_id_to_obj_map[peer_id].
- peer_id_ref_cnt),
- qdf_atomic_read(&peer->ref_cnt));
- /* Keeping ol_txrx_peer_unref_delete outside the
- * peer_map_unmap_spinlock as the unref function is protected by
- * peer_ref_mutex
- */
+ if (del_peer_ref)
ol_txrx_peer_unref_delete(peer);
- }
+ qdf_spin_unlock(&pdev->peer_map_unmap_lock);
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p ID %d peer_id[%d] peer_id_ref_cnt %d peer->ref_cnt %d",
+ __func__, peer, peer_id, i,
+ qdf_atomic_read(&pdev->
+ peer_id_to_obj_map[peer_id].
+ peer_id_ref_cnt),
+ qdf_atomic_read(&peer->ref_cnt));
if (status) {
/* TBDXXX: assert for now */
@@ -519,6 +518,8 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
return;
}
+ qdf_spin_lock(&pdev->peer_map_unmap_lock);
+
peer = pdev->peer_id_to_obj_map[peer_id].peer;
if (peer == NULL) {
@@ -527,11 +528,10 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
* If the peer ID is for a vdev, then the peer pointer stored
* in peer_id_to_obj_map will be NULL.
*/
+ qdf_spin_unlock(&pdev->peer_map_unmap_lock);
return;
}
- qdf_spin_lock(&pdev->peer_map_unmap_lock);
-
if (qdf_atomic_dec_and_test
(&pdev->peer_id_to_obj_map[peer_id].peer_id_ref_cnt)) {
pdev->peer_id_to_obj_map[peer_id].peer = NULL;
@@ -547,7 +547,7 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
qdf_spin_unlock(&pdev->peer_map_unmap_lock);
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: Remove the ID %d reference to peer %p peer_id_ref_cnt %d\n",
+ "%s: Remove the ID %d reference to peer %p peer_id_ref_cnt %d",
__func__, peer_id, peer,
qdf_atomic_read
(&pdev->peer_id_to_obj_map[peer_id].peer_id_ref_cnt));
@@ -572,9 +572,10 @@ struct ol_txrx_peer_t *ol_txrx_assoc_peer_find(struct ol_txrx_vdev_t *vdev)
&& vdev->last_real_peer->peer_ids[0] != HTT_INVALID_PEER_ID) {
qdf_atomic_inc(&vdev->last_real_peer->ref_cnt);
peer = vdev->last_real_peer;
- qdf_print("%s: peer %p peer->ref_cnt %d",
- __func__, peer,
- qdf_atomic_read
+ QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read
(&peer->ref_cnt));
} else {
peer = NULL;
diff --git a/core/dp/txrx/wdi_event.h b/core/dp/txrx/wdi_event.h
index 70eb7954b87b..2b0d4915f1a4 100644
--- a/core/dp/txrx/wdi_event.h
+++ b/core/dp/txrx/wdi_event.h
@@ -38,6 +38,7 @@ enum WDI_EVENT {
WDI_EVENT_RX_DESC_REMOTE,
WDI_EVENT_RATE_FIND,
WDI_EVENT_RATE_UPDATE,
+ WDI_EVENT_SW_EVENT,
WDI_EVENT_RX_PEER_INVALID,
/* End of new event items */
diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h
index 33dd11d68278..ed8bec7dd5e4 100644
--- a/core/hdd/inc/qc_sap_ioctl.h
+++ b/core/hdd/inc/qc_sap_ioctl.h
@@ -144,7 +144,8 @@ typedef struct {
#define QCSAP_IOCTL_GET_CHANNEL (SIOCIWFIRSTPRIV + 9)
#define QCSAP_IOCTL_ASSOC_STA_MACADDR (SIOCIWFIRSTPRIV + 10)
#define QCSAP_IOCTL_DISASSOC_STA (SIOCIWFIRSTPRIV + 11)
-/* (SIOCIWFIRSTPRIV+12) is unused */
+#define QCSAP_IOCTL_SET_PKTLOG (SIOCIWFIRSTPRIV + 12)
+
/* Private ioctls and their sub-ioctls */
#define QCSAP_PRIV_GET_CHAR_SET_NONE (SIOCIWFIRSTPRIV + 13)
#define QCSAP_GET_STATS 1
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 8db4b79d4fa8..0d5857fdff54 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3469,6 +3469,15 @@ enum dot11p_mode {
*/
#define CFG_RPS_RX_QUEUE_CPU_MAP_LIST_LEN 30
+/*
+ * Support to start sap in indoor channel
+ * Customer can config this item to enable/disable sap in indoor channel
+ * Default: Disable
+ */
+#define CFG_INDOOR_CHANNEL_SUPPORT_NAME "gindoor_channel_support"
+#define CFG_INDOOR_CHANNEL_SUPPORT_MIN (0)
+#define CFG_INDOOR_CHANNEL_SUPPORT_MAX (1)
+#define CFG_INDOOR_CHANNEL_SUPPORT_DEFAULT (0)
/*---------------------------------------------------------------------------
Type declarations
@@ -4129,6 +4138,7 @@ struct hdd_config {
#endif
uint32_t iface_change_wait_time;
enum cfg_sub_20_channel_width enable_sub_20_channel_width;
+ bool indoor_channel_support;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
diff --git a/core/hdd/inc/wlan_hdd_ipa.h b/core/hdd/inc/wlan_hdd_ipa.h
index a7e8d5f7908d..f7221a653daf 100644
--- a/core/hdd/inc/wlan_hdd_ipa.h
+++ b/core/hdd/inc/wlan_hdd_ipa.h
@@ -35,7 +35,27 @@
* Originally written by Qualcomm Atheros, Inc
*/
-#include <linux/ipa.h>
+/**
+ * enum hdd_ipa_wlan_event - HDD IPA events
+ * @HDD_IPA_CLIENT_CONNECT: Client Connects
+ * @HDD_IPA_CLIENT_DISCONNECT: Client Disconnects
+ * @HDD_IPA_AP_CONNECT: SoftAP is started
+ * @HDD_IPA_AP_DISCONNECT: SoftAP is stopped
+ * @HDD_IPA_STA_CONNECT: STA associates to AP
+ * @HDD_IPA_STA_DISCONNECT: STA dissociates from AP
+ * @HDD_IPA_CLIENT_CONNECT_EX: Peer associates/re-associates to softap
+ * @HDD_IPA_WLAN_EVENT_MAX: Max value for the enum
+ */
+enum hdd_ipa_wlan_event {
+ HDD_IPA_CLIENT_CONNECT,
+ HDD_IPA_CLIENT_DISCONNECT,
+ HDD_IPA_AP_CONNECT,
+ HDD_IPA_AP_DISCONNECT,
+ HDD_IPA_STA_CONNECT,
+ HDD_IPA_STA_DISCONNECT,
+ HDD_IPA_CLIENT_CONNECT_EX,
+ HDD_IPA_WLAN_EVENT_MAX
+};
#ifdef IPA_OFFLOAD
/* Include files */
@@ -57,7 +77,7 @@ QDF_STATUS hdd_ipa_cleanup(hdd_context_t *hdd_ctx);
QDF_STATUS hdd_ipa_process_rxt(void *cds_context, qdf_nbuf_t rxBuf,
uint8_t sta_id);
int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
- enum ipa_wlan_event type, uint8_t *mac_addr);
+ enum hdd_ipa_wlan_event type, uint8_t *mac_addr);
int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx, uint64_t tx_packets,
uint64_t rx_packets);
int hdd_ipa_suspend(hdd_context_t *hdd_ctx);
@@ -92,7 +112,7 @@ static inline QDF_STATUS hdd_ipa_process_rxt(void *cds_context,
}
static inline int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
- enum ipa_wlan_event type, uint8_t *mac_addr)
+ enum hdd_ipa_wlan_event type, uint8_t *mac_addr)
{
return 0;
}
diff --git a/core/hdd/inc/wlan_hdd_lro.h b/core/hdd/inc/wlan_hdd_lro.h
index 61a5452be165..760347cc2f96 100644
--- a/core/hdd/inc/wlan_hdd_lro.h
+++ b/core/hdd/inc/wlan_hdd_lro.h
@@ -101,7 +101,7 @@ struct hdd_lro_desc_info {
* hdd_lro_s - LRO information per HDD adapter
* @lro_mgr: LRO manager
* @lro_desc_info: LRO descriptor information
- * @lroi_mgr_arr_access_lock: Lock to access LRO manager array.
+ * @lro_mgr_arr_access_lock: Lock to access LRO manager array.
*/
struct hdd_lro_s {
struct net_lro_mgr *lro_mgr;
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index b42f2fa81528..40242313f10e 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1690,6 +1690,20 @@ static inline QDF_STATUS hdd_register_for_sap_restart_with_channel_switch(void)
}
#endif
+#if !defined(REMOVE_PKT_LOG)
+int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value);
+int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, uint8_t);
+#else
+int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, uint8_t)
+{
+ return 0;
+}
+int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
+{
+ return 0;
+}
+#endif /* REMOVE_PKT_LOG */
+
#ifdef FEATURE_TSO
/**
* hdd_set_tso_flags() - enable TSO flags in the network device
@@ -1805,4 +1819,5 @@ static inline void hdd_enable_fastpath(struct hdd_config *hdd_cfg,
}
#endif
void hdd_wlan_update_target_info(hdd_context_t *hdd_ctx, void *context);
+
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index f6919bbb1269..bed513cd29ae 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1593,8 +1593,8 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
if (hdd_ipa_is_enabled(pHddCtx))
hdd_ipa_wlan_evt(pAdapter, pHddStaCtx->conn_info.staId[0],
- WLAN_STA_DISCONNECT,
- pHddStaCtx->conn_info.bssId.bytes);
+ HDD_IPA_STA_DISCONNECT,
+ pHddStaCtx->conn_info.bssId.bytes);
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
wlan_hdd_auto_shutdown_enable(pHddCtx, true);
@@ -2453,7 +2453,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
if (hdd_ipa_is_enabled(pHddCtx))
hdd_ipa_wlan_evt(pAdapter, pRoamInfo->staId,
- WLAN_STA_CONNECT,
+ HDD_IPA_STA_CONNECT,
pRoamInfo->bssid.bytes);
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 6b38770d723c..29fc5aa8f16b 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3993,6 +3993,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
VAR_FLAGS_OPTIONAL,
(void *)CFG_RPS_RX_QUEUE_CPU_MAP_LIST_DEFAULT),
+ REG_VARIABLE(CFG_INDOOR_CHANNEL_SUPPORT_NAME,
+ WLAN_PARAM_Integer,
+ struct hdd_config, indoor_channel_support,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_INDOOR_CHANNEL_SUPPORT_DEFAULT,
+ CFG_INDOOR_CHANNEL_SUPPORT_MIN,
+ CFG_INDOOR_CHANNEL_SUPPORT_MAX),
+
REG_VARIABLE(CFG_INTERFACE_CHANGE_WAIT_NAME, WLAN_PARAM_Integer,
struct hdd_config, iface_change_wait_time,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -5970,11 +5978,6 @@ QDF_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx)
/* Loop through the registry table and apply all these configs */
qdf_status = hdd_apply_cfg_ini(pHddCtx, cfgIniTable, i);
hdd_set_rx_mode_value(pHddCtx);
-#ifdef FEATURE_NAPI
- if (QDF_STATUS_SUCCESS == qdf_status)
- hdd_napi_event(NAPI_EVT_INI_FILE,
- (void *)pHddCtx->napi_enable);
-#endif /* FEATURE_NAPI */
if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())
hdd_override_all_ps(pHddCtx);
@@ -7153,6 +7156,7 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
smeConfig->csrConfig.scanCfgAgingTime = pConfig->scanAgingTimeout;
smeConfig->csrConfig.enableTxLdpc = pConfig->enableTxLdpc;
+ smeConfig->csrConfig.enableRxLDPC = pConfig->enableRxLDPC;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode;
#endif
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 5bcf100a23c2..b0c9328e7445 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -6073,13 +6073,13 @@ static int hdd_get_bpf_offload(hdd_context_t *hdd_ctx)
* hdd_set_reset_bpf_offload - Post set/reset bpf to SME
* @hdd_ctx: Hdd context
* @tb: Length of @data
- * @session_id: Session identifier
+ * @adapter: pointer to adapter struct
*
* Return: 0 on success; errno on failure
*/
static int hdd_set_reset_bpf_offload(hdd_context_t *hdd_ctx,
struct nlattr **tb,
- uint8_t session_id)
+ hdd_adapter_t *adapter)
{
struct sir_bpf_set_offload *bpf_set_offload;
QDF_STATUS status;
@@ -6088,6 +6088,15 @@ static int hdd_set_reset_bpf_offload(hdd_context_t *hdd_ctx,
ENTER();
+ if (adapter->device_mode == QDF_STA_MODE ||
+ adapter->device_mode == QDF_P2P_CLIENT_MODE) {
+ if (!hdd_conn_is_connected(
+ WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
+ hdd_err("Not in Connected state!");
+ return -ENOTSUPP;
+ }
+ }
+
bpf_set_offload = qdf_mem_malloc(sizeof(*bpf_set_offload));
if (bpf_set_offload == NULL) {
hdd_err("qdf_mem_malloc failed for bpf_set_offload");
@@ -6126,7 +6135,7 @@ static int hdd_set_reset_bpf_offload(hdd_context_t *hdd_ctx,
bpf_set_offload->current_length = prog_len;
nla_memcpy(bpf_set_offload->program, tb[BPF_PROGRAM], prog_len);
- bpf_set_offload->session_id = session_id;
+ bpf_set_offload->session_id = adapter->sessionId;
/* Parse and fetch filter Id */
if (!tb[BPF_FILTER_ID]) {
@@ -6221,7 +6230,7 @@ __wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy,
return hdd_get_bpf_offload(hdd_ctx);
else
return hdd_set_reset_bpf_offload(hdd_ctx, tb,
- pAdapter->sessionId);
+ pAdapter);
}
/**
@@ -6819,6 +6828,236 @@ static int wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy,
#undef BPF_CURRENT_OFFSET
#undef BPF_PROGRAM
#undef BPF_MAX
+
+/**
+ * define short names for the global vendor params
+ * used by wlan_hdd_cfg80211_wakelock_stats_rsp_callback()
+ */
+#define PARAM_TOTAL_CMD_EVENT_WAKE \
+ QCA_WLAN_VENDOR_ATTR_TOTAL_CMD_EVENT_WAKE
+#define PARAM_CMD_EVENT_WAKE_CNT_PTR \
+ QCA_WLAN_VENDOR_ATTR_CMD_EVENT_WAKE_CNT_PTR
+#define PARAM_CMD_EVENT_WAKE_CNT_SZ \
+ QCA_WLAN_VENDOR_ATTR_CMD_EVENT_WAKE_CNT_SZ
+#define PARAM_TOTAL_DRIVER_FW_LOCAL_WAKE \
+ QCA_WLAN_VENDOR_ATTR_TOTAL_DRIVER_FW_LOCAL_WAKE
+#define PARAM_DRIVER_FW_LOCAL_WAKE_CNT_PTR \
+ QCA_WLAN_VENDOR_ATTR_DRIVER_FW_LOCAL_WAKE_CNT_PTR
+#define PARAM_DRIVER_FW_LOCAL_WAKE_CNT_SZ \
+ QCA_WLAN_VENDOR_ATTR_DRIVER_FW_LOCAL_WAKE_CNT_SZ
+#define PARAM_TOTAL_RX_DATA_WAKE \
+ QCA_WLAN_VENDOR_ATTR_TOTAL_RX_DATA_WAKE
+#define PARAM_RX_UNICAST_CNT \
+ QCA_WLAN_VENDOR_ATTR_RX_UNICAST_CNT
+#define PARAM_RX_MULTICAST_CNT \
+ QCA_WLAN_VENDOR_ATTR_RX_MULTICAST_CNT
+#define PARAM_RX_BROADCAST_CNT \
+ QCA_WLAN_VENDOR_ATTR_RX_BROADCAST_CNT
+#define PARAM_ICMP_PKT \
+ QCA_WLAN_VENDOR_ATTR_ICMP_PKT
+#define PARAM_ICMP6_PKT \
+ QCA_WLAN_VENDOR_ATTR_ICMP6_PKT
+#define PARAM_ICMP6_RA \
+ QCA_WLAN_VENDOR_ATTR_ICMP6_RA
+#define PARAM_ICMP6_NA \
+ QCA_WLAN_VENDOR_ATTR_ICMP6_NA
+#define PARAM_ICMP6_NS \
+ QCA_WLAN_VENDOR_ATTR_ICMP6_NS
+#define PARAM_ICMP4_RX_MULTICAST_CNT \
+ QCA_WLAN_VENDOR_ATTR_ICMP4_RX_MULTICAST_CNT
+#define PARAM_ICMP6_RX_MULTICAST_CNT \
+ QCA_WLAN_VENDOR_ATTR_ICMP6_RX_MULTICAST_CNT
+#define PARAM_OTHER_RX_MULTICAST_CNT \
+ QCA_WLAN_VENDOR_ATTR_OTHER_RX_MULTICAST_CNT
+
+
+/**
+ * hdd_send_wakelock_stats() - API to send wakelock stats
+ * @ctx: context to be passed to callback
+ * @data: data passed to callback
+ *
+ * This function is used to send wake lock stats to HAL layer
+ *
+ * Return: 0 on success, error number otherwise.
+ */
+static uint32_t hdd_send_wakelock_stats(hdd_context_t *hdd_ctx,
+ const struct sir_wake_lock_stats *data)
+{
+ struct sk_buff *skb;
+ uint32_t nl_buf_len;
+ uint32_t total_rx_data_wake, rx_multicast_cnt;
+ uint32_t ipv6_rx_multicast_addr_cnt;
+ uint32_t icmpv6_cnt;
+
+ ENTER();
+
+ nl_buf_len = NLMSG_HDRLEN;
+ nl_buf_len +=
+ QCA_WLAN_VENDOR_GET_WAKE_STATS_MAX *
+ (NLMSG_HDRLEN + sizeof(uint32_t));
+
+ skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len);
+
+ if (!skb) {
+ hdd_log(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed"));
+ return -ENOMEM;
+ }
+
+ hdd_log(LOG1, "wow_ucast_wake_up_count %d",
+ data->wow_ucast_wake_up_count);
+ hdd_log(LOG1, "wow_bcast_wake_up_count %d",
+ data->wow_bcast_wake_up_count);
+ hdd_log(LOG1, "wow_ipv4_mcast_wake_up_count %d",
+ data->wow_ipv4_mcast_wake_up_count);
+ hdd_log(LOG1, "wow_ipv6_mcast_wake_up_count %d",
+ data->wow_ipv6_mcast_wake_up_count);
+ hdd_log(LOG1, "wow_ipv6_mcast_ra_stats %d",
+ data->wow_ipv6_mcast_ra_stats);
+ hdd_log(LOG1, "wow_ipv6_mcast_ns_stats %d",
+ data->wow_ipv6_mcast_ns_stats);
+ hdd_log(LOG1, "wow_ipv6_mcast_na_stats %d",
+ data->wow_ipv6_mcast_na_stats);
+ hdd_log(LOG1, "wow_icmpv4_count %d", data->wow_icmpv4_count);
+ hdd_log(LOG1, "wow_icmpv6_count %d",
+ data->wow_icmpv6_count);
+
+ ipv6_rx_multicast_addr_cnt =
+ data->wow_ipv6_mcast_wake_up_count;
+
+ icmpv6_cnt =
+ data->wow_icmpv6_count;
+
+ rx_multicast_cnt =
+ data->wow_ipv4_mcast_wake_up_count +
+ ipv6_rx_multicast_addr_cnt;
+
+ total_rx_data_wake =
+ data->wow_ucast_wake_up_count +
+ data->wow_bcast_wake_up_count +
+ rx_multicast_cnt;
+
+ if (nla_put_u32(skb, PARAM_TOTAL_CMD_EVENT_WAKE, 0) ||
+ nla_put_u32(skb, PARAM_CMD_EVENT_WAKE_CNT_PTR, 0) ||
+ nla_put_u32(skb, PARAM_CMD_EVENT_WAKE_CNT_SZ, 0) ||
+ nla_put_u32(skb, PARAM_TOTAL_DRIVER_FW_LOCAL_WAKE, 0) ||
+ nla_put_u32(skb, PARAM_DRIVER_FW_LOCAL_WAKE_CNT_PTR, 0) ||
+ nla_put_u32(skb, PARAM_DRIVER_FW_LOCAL_WAKE_CNT_SZ, 0) ||
+ nla_put_u32(skb, PARAM_TOTAL_RX_DATA_WAKE,
+ total_rx_data_wake) ||
+ nla_put_u32(skb, PARAM_RX_UNICAST_CNT,
+ data->wow_ucast_wake_up_count) ||
+ nla_put_u32(skb, PARAM_RX_MULTICAST_CNT,
+ rx_multicast_cnt) ||
+ nla_put_u32(skb, PARAM_RX_BROADCAST_CNT,
+ data->wow_bcast_wake_up_count) ||
+ nla_put_u32(skb, PARAM_ICMP_PKT,
+ data->wow_icmpv4_count) ||
+ nla_put_u32(skb, PARAM_ICMP6_PKT,
+ icmpv6_cnt) ||
+ nla_put_u32(skb, PARAM_ICMP6_RA,
+ data->wow_ipv6_mcast_ra_stats) ||
+ nla_put_u32(skb, PARAM_ICMP6_NA,
+ data->wow_ipv6_mcast_na_stats) ||
+ nla_put_u32(skb, PARAM_ICMP6_NS,
+ data->wow_ipv6_mcast_ns_stats) ||
+ nla_put_u32(skb, PARAM_ICMP4_RX_MULTICAST_CNT,
+ data->wow_ipv4_mcast_wake_up_count) ||
+ nla_put_u32(skb, PARAM_ICMP6_RX_MULTICAST_CNT,
+ ipv6_rx_multicast_addr_cnt) ||
+ nla_put_u32(skb, PARAM_OTHER_RX_MULTICAST_CNT, 0)) {
+ hdd_log(LOGE, FL("nla put fail"));
+ goto nla_put_failure;
+ }
+
+ cfg80211_vendor_cmd_reply(skb);
+
+ EXIT();
+ return 0;
+
+nla_put_failure:
+ kfree_skb(skb);
+ return -EINVAL;
+}
+
+/**
+ * __wlan_hdd_cfg80211_get_wakelock_stats() - gets wake lock stats
+ * @wiphy: wiphy pointer
+ * @wdev: pointer to struct wireless_dev
+ * @data: pointer to incoming NL vendor data
+ * @data_len: length of @data
+ *
+ * This function parses the incoming NL vendor command data attributes and
+ * invokes the SME Api and blocks on a completion variable.
+ * WMA copies required data and invokes callback
+ * wlan_hdd_cfg80211_wakelock_stats_rsp_callback to send wake lock stats.
+ *
+ * Return: 0 on success; error number otherwise.
+ */
+static int __wlan_hdd_cfg80211_get_wakelock_stats(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
+{
+ hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
+ int status, ret;
+ struct sir_wake_lock_stats wake_lock_stats;
+ QDF_STATUS qdf_status;
+
+ ENTER();
+
+ if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
+ hdd_log(LOGE, FL("Command not allowed in FTM mode"));
+ return -EINVAL;
+ }
+
+ status = wlan_hdd_validate_context(hdd_ctx);
+ if (0 != status)
+ return -EINVAL;
+
+ qdf_status = wma_get_wakelock_stats(&wake_lock_stats);
+ if (qdf_status != QDF_STATUS_SUCCESS) {
+ hdd_log(LOGE,
+ FL("failed to get wakelock stats(err=%d)"), qdf_status);
+ return -EINVAL;
+ }
+
+ ret = hdd_send_wakelock_stats(hdd_ctx,
+ &wake_lock_stats);
+ if (ret)
+ hdd_log(LOGE, FL("Failed to post wake lock stats"));
+
+ EXIT();
+ return ret;
+}
+
+/**
+ * wlan_hdd_cfg80211_get_wakelock_stats() - gets wake lock stats
+ * @wiphy: wiphy pointer
+ * @wdev: pointer to struct wireless_dev
+ * @data: pointer to incoming NL vendor data
+ * @data_len: length of @data
+ *
+ * This function parses the incoming NL vendor command data attributes and
+ * invokes the SME Api and blocks on a completion variable.
+ * WMA copies required data and invokes callback
+ * wlan_hdd_cfg80211_wakelock_stats_rsp_callback to send wake lock stats.
+ *
+ * Return: 0 on success; error number otherwise.
+ */
+static int wlan_hdd_cfg80211_get_wakelock_stats(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ int ret;
+
+ cds_ssr_protect(__func__);
+ ret = __wlan_hdd_cfg80211_get_wakelock_stats(wiphy, wdev, data,
+ data_len);
+ cds_ssr_protect(__func__);
+
+ return ret;
+}
+
const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -7352,6 +7591,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
.doit = wlan_hdd_cfg80211_process_ndp_cmd
},
#endif
+ {
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
+ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_WAKE_REASON_STATS,
+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+ WIPHY_VENDOR_CMD_NEED_NETDEV |
+ WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .doit = wlan_hdd_cfg80211_get_wakelock_stats
+ },
};
/**
@@ -12082,7 +12329,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
pAdapter->
aStaInfo[i].
ucSTAId,
- WLAN_CLIENT_DISCONNECT,
+ HDD_IPA_CLIENT_DISCONNECT,
mac);
}
hdd_notice("Delete STA with MAC::"
@@ -12126,7 +12373,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
if (hdd_ipa_uc_is_enabled(pHddCtx)) {
hdd_ipa_wlan_evt(pAdapter, staId,
- WLAN_CLIENT_DISCONNECT, mac);
+ HDD_IPA_CLIENT_DISCONNECT, mac);
}
if (pAdapter->aStaInfo[staId].isDeauthInProgress ==
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 1bd642d9d583..3edf6cbceda9 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -374,6 +374,9 @@ enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_NDP = 81,
QCA_NL80211_VENDOR_SUBCMD_PACKET_FILTER = 83,
+
+ QCA_NL80211_VENDOR_SUBCMD_GET_WAKE_REASON_STATS = 85,
+
/* OCB commands */
QCA_NL80211_VENDOR_SUBCMD_OCB_SET_CONFIG = 92,
QCA_NL80211_VENDOR_SUBCMD_OCB_SET_UTC_TIME = 93,
@@ -2421,6 +2424,66 @@ enum qca_wlan_vendor_attr_packet_filter {
};
/**
+ * enum qca_wlan_vendor_attr_wake_stats - wake lock stats
+ * @QCA_WLAN_VENDOR_ATTR_GET_WAKE_STATS_INVALID: invalid
+ * @QCA_WLAN_VENDOR_ATTR_TOTAL_CMD_EVENT_WAKE:
+ * @QCA_WLAN_VENDOR_ATTR_CMD_EVENT_WAKE_CNT_PTR:
+ * @QCA_WLAN_VENDOR_ATTR_CMD_EVENT_WAKE_CNT_SZ:
+ * @QCA_WLAN_VENDOR_ATTR_TOTAL_DRIVER_FW_LOCAL_WAKE:
+ * @QCA_WLAN_VENDOR_ATTR_DRIVER_FW_LOCAL_WAKE_CNT_PTR:
+ * @QCA_WLAN_VENDOR_ATTR_DRIVER_FW_LOCAL_WAKE_CNT_SZ:
+ * @QCA_WLAN_VENDOR_ATTR_TOTAL_RX_DATA_WAKE:
+ * total rx wakeup count
+ * @QCA_WLAN_VENDOR_ATTR_RX_UNICAST_CNT:
+ * Total rx unicast packet which woke up host
+ * @QCA_WLAN_VENDOR_ATTR_RX_MULTICAST_CNT:
+ * Total rx multicast packet which woke up host
+ * @QCA_WLAN_VENDOR_ATTR_RX_BROADCAST_CNT:
+ * Total rx broadcast packet which woke up host
+ * @QCA_WLAN_VENDOR_ATTR_ICMP_PKT:
+ * wake icmp packet count
+ * @QCA_WLAN_VENDOR_ATTR_ICMP6_PKT:
+ * wake icmp6 packet count
+ * @QCA_WLAN_VENDOR_ATTR_ICMP6_RA:
+ * wake icmp6 RA packet count
+ * @QCA_WLAN_VENDOR_ATTR_ICMP6_NA:
+ * wake icmp6 NA packet count
+ * @QCA_WLAN_VENDOR_ATTR_ICMP6_NS:
+ * wake icmp6 NS packet count
+ * @QCA_WLAN_VENDOR_ATTR_ICMP4_RX_MULTICAST_CNT:
+ * Rx wake packet count due to ipv4 multicast
+ * @QCA_WLAN_VENDOR_ATTR_ICMP6_RX_MULTICAST_CNT:
+ * Rx wake packet count due to ipv6 multicast
+ * @QCA_WLAN_VENDOR_ATTR_OTHER_RX_MULTICAST_CNT:
+ * Rx wake packet count due to non-ipv4 and non-ipv6 packets
+ */
+enum qca_wlan_vendor_attr_wake_stats {
+ QCA_WLAN_VENDOR_ATTR_GET_WAKE_STATS_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_TOTAL_CMD_EVENT_WAKE,
+ QCA_WLAN_VENDOR_ATTR_CMD_EVENT_WAKE_CNT_PTR,
+ QCA_WLAN_VENDOR_ATTR_CMD_EVENT_WAKE_CNT_SZ,
+ QCA_WLAN_VENDOR_ATTR_TOTAL_DRIVER_FW_LOCAL_WAKE,
+ QCA_WLAN_VENDOR_ATTR_DRIVER_FW_LOCAL_WAKE_CNT_PTR,
+ QCA_WLAN_VENDOR_ATTR_DRIVER_FW_LOCAL_WAKE_CNT_SZ,
+ QCA_WLAN_VENDOR_ATTR_TOTAL_RX_DATA_WAKE,
+ QCA_WLAN_VENDOR_ATTR_RX_UNICAST_CNT,
+ QCA_WLAN_VENDOR_ATTR_RX_MULTICAST_CNT,
+ QCA_WLAN_VENDOR_ATTR_RX_BROADCAST_CNT,
+ QCA_WLAN_VENDOR_ATTR_ICMP_PKT,
+ QCA_WLAN_VENDOR_ATTR_ICMP6_PKT,
+ QCA_WLAN_VENDOR_ATTR_ICMP6_RA,
+ QCA_WLAN_VENDOR_ATTR_ICMP6_NA,
+ QCA_WLAN_VENDOR_ATTR_ICMP6_NS,
+ QCA_WLAN_VENDOR_ATTR_ICMP4_RX_MULTICAST_CNT,
+ QCA_WLAN_VENDOR_ATTR_ICMP6_RX_MULTICAST_CNT,
+ QCA_WLAN_VENDOR_ATTR_OTHER_RX_MULTICAST_CNT,
+ /* keep last */
+ QCA_WLAN_VENDOR_GET_WAKE_STATS_AFTER_LAST,
+ QCA_WLAN_VENDOR_GET_WAKE_STATS_MAX =
+ QCA_WLAN_VENDOR_GET_WAKE_STATS_AFTER_LAST - 1,
+};
+
+/**
* enum qca_vendor_attr_get_tsf: Vendor attributes for TSF capture
* @QCA_WLAN_VENDOR_ATTR_TSF_INVALID: Invalid attribute value
* @QCA_WLAN_VENDOR_ATTR_TSF_CMD: enum qca_tsf_operation (u32)
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index 2f9ef28f03fb..4470ca3e3994 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -193,6 +193,8 @@ static enum qdf_bus_type to_bus_type(enum pld_bus_type bus_type)
return QDF_BUS_TYPE_SNOC;
case PLD_BUS_TYPE_SDIO:
return QDF_BUS_TYPE_SDIO;
+ case PLD_BUS_TYPE_USB:
+ return QDF_BUS_TYPE_USB;
default:
return QDF_BUS_TYPE_NONE;
}
@@ -219,6 +221,12 @@ int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
struct hif_driver_state_callbacks cbk;
uint32_t mode = cds_get_conparam();
+ hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+
+ if (!hdd_ctx) {
+ hdd_err("hdd_ctx error");
+ return -EFAULT;
+ }
hdd_hif_init_driver_state_callbacks(dev, &cbk);
@@ -252,6 +260,9 @@ int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
ret, reinit);
ret = -EFAULT;
goto err_hif_close;
+ } else {
+ hdd_napi_event(NAPI_EVT_INI_FILE,
+ (void *)hdd_ctx->napi_enable);
}
}
@@ -437,7 +448,7 @@ static void wlan_hdd_remove(struct device *dev)
hdd_deinit();
- pr_info("%s: Driver Removed\n", WLAN_MODULE_NAME);
+ pr_info("%s: Driver De-initialized\n", WLAN_MODULE_NAME);
}
/**
@@ -649,6 +660,25 @@ int wlan_hdd_bus_resume(void)
return ret;
}
+/**
+ * wlan_hdd_bus_reset_resume() - resume wlan bus after reset
+ *
+ * This function is called to tell the driver that the device has been resumed
+ * and it has also been reset. The driver should redo any necessary
+ * initialization. It is mainly used by the USB bus
+ *
+ * Return: int 0 for success, non zero for failure
+ */
+static int wlan_hdd_bus_reset_resume(void)
+{
+ int ret;
+
+ cds_ssr_protect(__func__);
+ ret = hif_bus_reset_resume(cds_get_context(QDF_MODULE_ID_HIF));
+ cds_ssr_unprotect(__func__);
+ return ret;
+}
+
#ifdef FEATURE_RUNTIME_PM
/**
* __wlan_hdd_runtime_suspend() - suspend the wlan bus without apps suspend
@@ -893,6 +923,19 @@ static int wlan_hdd_pld_resume(struct device *dev,
}
/**
+ * wlan_hdd_pld_reset_resume() - reset resume function registered to PLD
+ * @dev: device
+ * @pld_bus_type: PLD bus type
+ *
+ * Return: 0 on success
+ */
+static int wlan_hdd_pld_reset_resume(struct device *dev,
+ enum pld_bus_type bus_type)
+{
+ return wlan_hdd_bus_reset_resume();
+}
+
+/**
* wlan_hdd_pld_notify_handler() - notify_handler function registered to PLD
* @dev: device
* @pld_bus_type: PLD bus type
@@ -943,6 +986,7 @@ struct pld_driver_ops wlan_drv_ops = {
.crash_shutdown = wlan_hdd_pld_crash_shutdown,
.suspend = wlan_hdd_pld_suspend,
.resume = wlan_hdd_pld_resume,
+ .reset_resume = wlan_hdd_pld_reset_resume,
.modem_status = wlan_hdd_pld_notify_handler,
#ifdef FEATURE_RUNTIME_PM
.runtime_suspend = wlan_hdd_pld_runtime_suspend,
diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c
index 83d4cdd723b6..54b90366af87 100644
--- a/core/hdd/src/wlan_hdd_ftm.c
+++ b/core/hdd/src/wlan_hdd_ftm.c
@@ -31,6 +31,9 @@
* This file contains the WLAN factory test mode implementation
*/
+/* denote that this file does not allow legacy hddLog */
+#define HDD_DISALLOW_LEGACY_HDDLOG 1
+
#include <cds_mq.h>
#include "cds_sched.h"
#include <cds_api.h>
@@ -76,6 +79,7 @@ typedef struct qcmbr_queue_s {
} qcmbr_queue_t;
LIST_HEAD(qcmbr_queue_head);
DEFINE_SPINLOCK(qcmbr_queue_lock);
+static void wlanqcmbr_mc_process_msg(void *message);
#endif
#endif
@@ -101,8 +105,7 @@ static uint32_t wlan_ftm_postmsg(uint8_t *cmd_ptr, uint16_t cmd_len)
if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA,
&ftmMsg)) {
- hddLog(QDF_TRACE_LEVEL_ERROR, "%s: : Failed to post Msg to HAL",
- __func__);
+ hdd_err("Failed to post Msg to HAL");
return QDF_STATUS_E_FAILURE;
}
@@ -376,16 +379,14 @@ QDF_STATUS wlan_hdd_ftm_testmode_cmd(void *data, int len)
qdf_mem_malloc(sizeof(*cmd_data));
if (!cmd_data) {
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
- ("Failed to allocate FTM command data"));
+ hdd_err("Failed to allocate FTM command data");
return QDF_STATUS_E_NOMEM;
}
cmd_data->data = qdf_mem_malloc(len);
if (!cmd_data->data) {
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
- ("Failed to allocate FTM command data buffer"));
+ hdd_err("Failed to allocate FTM command data buffer");
qdf_mem_free(cmd_data);
return QDF_STATUS_E_NOMEM;
}
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index d7c8aa302e13..22f74ef1ef36 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1078,7 +1078,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
if (hdd_ipa_is_enabled(pHddCtx)) {
status = hdd_ipa_wlan_evt(pHostapdAdapter,
pHddApCtx->uBCStaId,
- WLAN_AP_CONNECT,
+ HDD_IPA_AP_CONNECT,
pHostapdAdapter->dev->dev_addr);
if (status) {
hdd_err("WLAN_AP_CONNECT event failed!!");
@@ -1234,7 +1234,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
if (hdd_ipa_is_enabled(pHddCtx)) {
status = hdd_ipa_wlan_evt(pHostapdAdapter,
pHddApCtx->uBCStaId,
- WLAN_AP_DISCONNECT,
+ HDD_IPA_AP_DISCONNECT,
pHostapdAdapter->dev->dev_addr);
if (status) {
hdd_err("WLAN_AP_DISCONNECT event failed!!");
@@ -1473,7 +1473,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
status = hdd_ipa_wlan_evt(pHostapdAdapter,
pSapEvent->sapevt.
sapStationAssocReassocCompleteEvent.
- staId, WLAN_CLIENT_CONNECT_EX,
+ staId, HDD_IPA_CLIENT_CONNECT_EX,
pSapEvent->sapevt.
sapStationAssocReassocCompleteEvent.
staMac.bytes);
@@ -1608,7 +1608,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
#ifdef IPA_OFFLOAD
if (hdd_ipa_is_enabled(pHddCtx)) {
status = hdd_ipa_wlan_evt(pHostapdAdapter, staId,
- WLAN_CLIENT_DISCONNECT,
+ HDD_IPA_CLIENT_DISCONNECT,
pSapEvent->sapevt.
sapStationDisassocCompleteEvent.
staMac.bytes);
@@ -3603,6 +3603,39 @@ static iw_softap_set_max_tx_power(struct net_device *dev,
}
int
+static __iw_softap_set_pktlog(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ hdd_adapter_t *pHostapdAdapter = netdev_priv(dev);
+ hdd_context_t *hdd_ctx;
+ int *value = (int *)extra;
+
+ ENTER_DEV(dev);
+
+ if (NULL == value)
+ return -ENOMEM;
+
+ hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
+ return hdd_process_pktlog_command(hdd_ctx, value[0]);
+}
+
+int
+static iw_softap_set_pktlog(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ int ret;
+
+ cds_ssr_protect(__func__);
+ ret = __iw_softap_set_pktlog(dev, info, wrqu, extra);
+ cds_ssr_unprotect(__func__);
+
+ return ret;
+}
+
+
+int
static __iw_softap_set_tx_power(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
@@ -6096,6 +6129,12 @@ static const struct iw_priv_args hostapd_private_args[] = {
0, "setTxMaxPower"
}
,
+ {
+ QCSAP_IOCTL_SET_PKTLOG,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0, "pktlog"
+ }
+ ,
/* Set HDD CFG Ini param */
{
QCSAP_IOCTL_SET_INI_CFG,
@@ -6195,6 +6234,8 @@ static const iw_handler hostapd_private[] = {
iw_softap_set_tx_power,
[QCSAP_IOCTL_SET_MAX_TX_POWER - SIOCIWFIRSTPRIV] =
iw_softap_set_max_tx_power,
+ [QCSAP_IOCTL_SET_PKTLOG - SIOCIWFIRSTPRIV] =
+ iw_softap_set_pktlog,
[QCSAP_IOCTL_SET_INI_CFG - SIOCIWFIRSTPRIV] =
iw_softap_set_ini_cfg,
[QCSAP_IOCTL_GET_INI_CFG - SIOCIWFIRSTPRIV] =
@@ -7618,6 +7659,7 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
/* Protection parameter to enable or disable */
pConfig->protEnabled = iniConfig->apProtEnabled;
+ pConfig->enOverLapCh = iniConfig->gEnableOverLapCh;
pConfig->dtim_period = pBeacon->dtim_period;
hdd_info("****pConfig->dtim_period=%d***",
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 87ae722f5726..1377b92d31b6 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -35,6 +35,7 @@
#ifdef IPA_OFFLOAD
/* Include Files */
+#include <linux/ipa.h>
#include <wlan_hdd_includes.h>
#include <wlan_hdd_ipa.h>
@@ -593,6 +594,7 @@ static void hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
unsigned long data);
static void hdd_ipa_cleanup_iface(struct hdd_ipa_iface_context *iface_context);
+static void hdd_ipa_uc_proc_pending_event (struct hdd_ipa_priv *hdd_ipa);
/**
* hdd_ipa_is_enabled() - Is IPA enabled?
@@ -1290,40 +1292,6 @@ static void hdd_ipa_uc_rm_notify_defer(struct work_struct *work)
}
/**
- * hdd_ipa_uc_proc_pending_event() - Process IPA uC pending events
- * @hdd_ipa: Global HDD IPA context
- *
- * Return: None
- */
-static void hdd_ipa_uc_proc_pending_event(struct hdd_ipa_priv *hdd_ipa)
-{
- unsigned int pending_event_count;
- struct ipa_uc_pending_event *pending_event = NULL;
-
- pending_event_count = qdf_list_size(&hdd_ipa->pending_event);
- HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
- "%s, Pending Event Count %d", __func__, pending_event_count);
- if (!pending_event_count) {
- HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
- "%s, No Pending Event", __func__);
- return;
- }
-
- qdf_list_remove_front(&hdd_ipa->pending_event,
- (qdf_list_node_t **)&pending_event);
- while (pending_event != NULL) {
- hdd_ipa_wlan_evt(pending_event->adapter,
- pending_event->type,
- pending_event->sta_id,
- pending_event->mac_addr);
- qdf_mem_free(pending_event);
- pending_event = NULL;
- qdf_list_remove_front(&hdd_ipa->pending_event,
- (qdf_list_node_t **)&pending_event);
- }
-}
-
-/**
* hdd_ipa_uc_op_cb() - IPA uC operation callback
* @op_msg: operation message received from firmware
* @usr_ctxt: user context registered with TL (we register the HDD Global
@@ -3582,15 +3550,59 @@ static inline char *hdd_ipa_wlan_event_to_str(enum ipa_wlan_event event)
}
/**
- * hdd_ipa_wlan_evt() - IPA event handler
+ * hdd_to_ipa_wlan_event() - convert hdd_ipa_wlan_event to ipa_wlan_event
+ * @hdd_ipa_event_type: HDD IPA WLAN event to be converted to an ipa_wlan_event
+ *
+ * Return: ipa_wlan_event representing the hdd_ipa_wlan_event
+ */
+static enum ipa_wlan_event
+hdd_to_ipa_wlan_event(enum hdd_ipa_wlan_event hdd_ipa_event_type)
+{
+ enum ipa_wlan_event ipa_event;
+
+ switch (hdd_ipa_event_type) {
+ case HDD_IPA_CLIENT_CONNECT:
+ ipa_event = WLAN_CLIENT_CONNECT;
+ break;
+ case HDD_IPA_CLIENT_DISCONNECT:
+ ipa_event = WLAN_CLIENT_DISCONNECT;
+ break;
+ case HDD_IPA_AP_CONNECT:
+ ipa_event = WLAN_AP_CONNECT;
+ break;
+ case HDD_IPA_AP_DISCONNECT:
+ ipa_event = WLAN_AP_DISCONNECT;
+ break;
+ case HDD_IPA_STA_CONNECT:
+ ipa_event = WLAN_STA_CONNECT;
+ break;
+ case HDD_IPA_STA_DISCONNECT:
+ ipa_event = WLAN_STA_DISCONNECT;
+ break;
+ case HDD_IPA_CLIENT_CONNECT_EX:
+ ipa_event = WLAN_CLIENT_CONNECT_EX;
+ break;
+ case HDD_IPA_WLAN_EVENT_MAX:
+ default:
+ ipa_event = IPA_WLAN_EVENT_MAX;
+ break;
+ }
+ return ipa_event;
+
+}
+
+/**
+ * __hdd_ipa_wlan_evt() - IPA event handler
* @adapter: adapter upon which the event was received
* @sta_id: station id for the event
- * @type: the event type
+ * @type: event enum of type ipa_wlan_event
* @mac_address: MAC address associated with the event
*
+ * This function is meant to be called from within wlan_hdd_ipa.c
+ *
* Return: 0 on success, negative errno value on error
*/
-int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
+static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
enum ipa_wlan_event type, uint8_t *mac_addr)
{
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
@@ -3958,6 +3970,60 @@ end:
}
/**
+ * hdd_ipa_wlan_evt() - IPA event handler
+ * @adapter: adapter upon which the event was received
+ * @sta_id: station id for the event
+ * @hdd_event_type: event enum of type hdd_ipa_wlan_event
+ * @mac_address: MAC address associated with the event
+ *
+ * This function is meant to be called from outside of wlan_hdd_ipa.c.
+ *
+ * Return: 0 on success, negative errno value on error
+ */
+int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
+ enum hdd_ipa_wlan_event hdd_event_type, uint8_t *mac_addr)
+{
+ enum ipa_wlan_event type = hdd_to_ipa_wlan_event(hdd_event_type);
+
+ return __hdd_ipa_wlan_evt(adapter, sta_id, type, mac_addr);
+}
+
+/**
+ * hdd_ipa_uc_proc_pending_event() - Process IPA uC pending events
+ * @hdd_ipa: Global HDD IPA context
+ *
+ * Return: None
+ */
+static void
+hdd_ipa_uc_proc_pending_event(struct hdd_ipa_priv *hdd_ipa)
+{
+ unsigned int pending_event_count;
+ struct ipa_uc_pending_event *pending_event = NULL;
+
+ pending_event_count = qdf_list_size(&hdd_ipa->pending_event);
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
+ "%s, Pending Event Count %d", __func__, pending_event_count);
+ if (!pending_event_count) {
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
+ "%s, No Pending Event", __func__);
+ return;
+ }
+
+ qdf_list_remove_front(&hdd_ipa->pending_event,
+ (qdf_list_node_t **)&pending_event);
+ while (pending_event != NULL) {
+ __hdd_ipa_wlan_evt(pending_event->adapter,
+ pending_event->type,
+ pending_event->sta_id,
+ pending_event->mac_addr);
+ qdf_mem_free(pending_event);
+ pending_event = NULL;
+ qdf_list_remove_front(&hdd_ipa->pending_event,
+ (qdf_list_node_t **)&pending_event);
+ }
+}
+
+/**
* hdd_ipa_rm_state_to_str() - Convert IPA RM state to string
* @state: IPA RM state value
*
diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c
index d80681ef67f3..4669746b95d3 100644
--- a/core/hdd/src/wlan_hdd_lro.c
+++ b/core/hdd/src/wlan_hdd_lro.c
@@ -419,11 +419,10 @@ void hdd_lro_flush_pkt(struct net_lro_mgr *lro_mgr,
lro_desc = hdd_lro_get_desc(lro_mgr, lro_mgr->lro_arr, iph, tcph);
- if (!lro_desc)
- return;
-
- hdd_lro_desc_free(lro_desc, adapter);
- lro_flush_desc(lro_mgr, lro_desc);
+ if (lro_desc) {
+ hdd_lro_desc_free(lro_desc, adapter);
+ lro_flush_desc(lro_mgr, lro_desc);
+ }
}
/**
@@ -438,10 +437,10 @@ void hdd_lro_flush_pkt(struct net_lro_mgr *lro_mgr,
void hdd_lro_flush(void *data)
{
hdd_adapter_t *adapter = (hdd_adapter_t *)data;
- struct hdd_lro_s *hdd_info = &adapter->lro_info;
+ struct hdd_lro_s *hdd_lro = &adapter->lro_info;
int i;
- qdf_spin_lock_bh(&hdd_info->lro_mgr_arr_access_lock);
+ qdf_spin_lock_bh(&hdd_lro->lro_mgr_arr_access_lock);
for (i = 0; i < adapter->lro_info.lro_mgr->max_desc; i++) {
if (adapter->lro_info.lro_mgr->lro_arr[i].active) {
hdd_lro_desc_free(
@@ -451,7 +450,7 @@ void hdd_lro_flush(void *data)
&adapter->lro_info.lro_mgr->lro_arr[i]);
}
}
- qdf_spin_unlock_bh(&hdd_info->lro_mgr_arr_access_lock);
+ qdf_spin_unlock_bh(&hdd_lro->lro_mgr_arr_access_lock);
}
/**
@@ -634,8 +633,11 @@ enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx,
struct iphdr *iph;
struct tcphdr *tcph;
struct net_lro_desc *lro_desc = NULL;
+ struct hdd_lro_s *hdd_lro = &adapter->lro_info;
iph = (struct iphdr *)skb->data;
tcph = (struct tcphdr *)(skb->data + QDF_NBUF_CB_RX_TCP_OFFSET(skb));
+ qdf_spin_lock_bh(
+ &hdd_lro->lro_mgr_arr_access_lock);
if (hdd_lro_eligible(adapter, skb, iph, tcph, &lro_desc)) {
struct net_lro_info hdd_lro_info;
@@ -652,14 +654,17 @@ enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx,
lro_receive_skb_ext(adapter->lro_info.lro_mgr, skb,
(void *)adapter, &hdd_lro_info);
- if (!hdd_lro_info.lro_desc->active)
+ if (!hdd_lro_info.lro_desc->active) {
hdd_lro_desc_free(lro_desc, adapter);
+ }
status = HDD_LRO_RX;
} else {
hdd_lro_flush_pkt(adapter->lro_info.lro_mgr,
iph, tcph, adapter);
}
+ qdf_spin_unlock_bh(
+ &hdd_lro->lro_mgr_arr_access_lock);
}
return status;
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 30e2c6b35d86..1d65118396ed 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -32,6 +32,9 @@
*
*/
+/* denote that this file does not allow legacy hddLog */
+#define HDD_DISALLOW_LEGACY_HDDLOG 1
+
/* Include Files */
#include <wlan_hdd_includes.h>
#include <cds_api.h>
@@ -368,25 +371,25 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
if ((adapter->magic != WLAN_HDD_ADAPTER_MAGIC) &&
(adapter->dev != dev)) {
- hddLog(LOGE, FL("device adapter is not matching!!!"));
+ hdd_err("device adapter is not matching!!!");
return NOTIFY_DONE;
}
if (!dev->ieee80211_ptr) {
- hddLog(LOGE, FL("ieee80211_ptr is NULL!!!"));
+ hdd_err("ieee80211_ptr is NULL!!!");
return NOTIFY_DONE;
}
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
if (NULL == hdd_ctx) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("HDD Context Null Pointer"));
+ hdd_alert("HDD Context Null Pointer");
QDF_ASSERT(0);
return NOTIFY_DONE;
}
if (cds_is_driver_recovering())
return NOTIFY_DONE;
- hddLog(QDF_TRACE_LEVEL_INFO, FL("%s New Net Device State = %lu"),
+ hdd_notice("%s New Net Device State = %lu",
dev->name, state);
switch (state) {
@@ -420,12 +423,10 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
&adapter->scan_info.abortscan_event_var,
msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN));
if (!rc) {
- hddLog(LOGE,
- FL("Timeout occurred while waiting for abortscan"));
+ hdd_err("Timeout occurred while waiting for abortscan");
}
} else {
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("Scan is not Pending from user"));
+ hdd_notice("Scan is not Pending from user");
}
break;
@@ -592,13 +593,13 @@ void hdd_checkandupdate_phymode(hdd_context_t *hdd_ctx)
struct hdd_config *cfg_param = NULL;
if (NULL == hdd_ctx) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("HDD Context is null !!"));
+ hdd_alert("HDD Context is null !!");
return;
}
adapter = hdd_get_adapter(hdd_ctx, QDF_STA_MODE);
if (NULL == adapter) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("adapter is null !!"));
+ hdd_alert("adapter is null !!");
return;
}
@@ -606,8 +607,7 @@ void hdd_checkandupdate_phymode(hdd_context_t *hdd_ctx)
cfg_param = hdd_ctx->config;
if (NULL == cfg_param) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("cfg_params not available !!"));
+ hdd_alert("cfg_params not available !!");
return;
}
@@ -617,8 +617,7 @@ void hdd_checkandupdate_phymode(hdd_context_t *hdd_ctx)
if ((eCSR_DOT11_MODE_AUTO == phyMode) ||
(eCSR_DOT11_MODE_11ac == phyMode) ||
(eCSR_DOT11_MODE_11ac_ONLY == phyMode)) {
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("Setting phymode to 11n!!"));
+ hdd_notice("Setting phymode to 11n!!");
sme_set_phy_mode(WLAN_HDD_GET_HAL_CTX(adapter),
eCSR_DOT11_MODE_11n);
}
@@ -652,8 +651,7 @@ void hdd_checkandupdate_phymode(hdd_context_t *hdd_ctx)
&adapter->disconnect_comp_var,
msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
if (!rc)
- hddLog(LOGE,
- FL("failure waiting for disconnect_comp_var"));
+ hdd_err("failure waiting for disconnect_comp_var");
}
}
}
@@ -675,8 +673,7 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
if (hdd_ctx == NULL) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("HDD context is null"));
+ hdd_err("HDD context is null");
return QDF_STATUS_E_FAILURE;
}
@@ -685,8 +682,7 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->ibssATIMWinSize,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE failed %d"), ret);
+ hdd_err("WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE failed %d", ret);
return QDF_STATUS_E_FAILURE;
}
@@ -695,9 +691,8 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->isIbssPowerSaveAllowed,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED failed %d"),
- ret);
+ hdd_err("WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED failed %d",
+ ret);
return QDF_STATUS_E_FAILURE;
}
@@ -706,9 +701,8 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->
isIbssPowerCollapseAllowed, VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED failed %d"),
- ret);
+ hdd_err("WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED failed %d",
+ ret);
return QDF_STATUS_E_FAILURE;
}
@@ -717,8 +711,7 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->isIbssAwakeOnTxRx,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX failed %d"), ret);
+ hdd_err("WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX failed %d", ret);
return QDF_STATUS_E_FAILURE;
}
@@ -727,8 +720,7 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->ibssInactivityCount,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WMA_VDEV_IBSS_SET_INACTIVITY_TIME failed %d"), ret);
+ hdd_err("WMA_VDEV_IBSS_SET_INACTIVITY_TIME failed %d", ret);
return QDF_STATUS_E_FAILURE;
}
@@ -737,11 +729,8 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->ibssTxSpEndInactivityTime,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL(
- "WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME failed %d"
- ),
- ret);
+ hdd_err("WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME failed %d",
+ ret);
return QDF_STATUS_E_FAILURE;
}
@@ -750,9 +739,8 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->ibssPsWarmupTime,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS failed %d"),
- ret);
+ hdd_err("WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS failed %d",
+ ret);
return QDF_STATUS_E_FAILURE;
}
@@ -761,11 +749,8 @@ QDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *adapter)
hdd_ctx->config->ibssPs1RxChainInAtimEnable,
VDEV_CMD);
if (0 != ret) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL(
- "WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW failed %d"
- ),
- ret);
+ hdd_err("WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW failed %d",
+ ret);
return QDF_STATUS_E_FAILURE;
}
@@ -815,7 +800,7 @@ void hdd_update_macaddr(struct hdd_config *config,
/* Set locally administered bit */
config->intfMacAddr[i].bytes[0] |= 0x02;
config->intfMacAddr[i].bytes[3] = macaddr_b3;
- hddLog(QDF_TRACE_LEVEL_INFO, "config->intfMacAddr[%d]: "
+ hdd_notice("config->intfMacAddr[%d]: "
MAC_ADDRESS_STR, i,
MAC_ADDR_ARRAY(config->intfMacAddr[i].bytes));
}
@@ -839,8 +824,7 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
#ifdef FEATURE_WLAN_SCAN_PNO
/* PNO offload */
- hddLog(QDF_TRACE_LEVEL_INFO_HIGH,
- FL("PNO Capability in f/w = %d"), cfg->pno_offload);
+ hdd_info("PNO Capability in f/w = %d", cfg->pno_offload);
if (cfg->pno_offload)
config->PnoOffload = true;
#endif
@@ -903,8 +887,7 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_MPDU_DENSITY, &value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get MPDU DENSITY"));
+ hdd_err("could not get MPDU DENSITY");
value = 0;
}
@@ -918,15 +901,13 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
cfg->mpdu_density);
if (status == QDF_STATUS_E_FAILURE)
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set MPDU DENSITY to CCM"));
+ hdd_alert("could not set MPDU DENSITY to CCM");
}
/* get the HT capability info */
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO, &val32);
if (QDF_STATUS_SUCCESS != status) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get HT capability info"));
+ hdd_err("could not get HT capability info");
return;
}
val16 = (uint16_t) val32;
@@ -958,10 +939,7 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1)
== QDF_STATUS_E_FAILURE) {
- hddLog(LOGE,
- FL(
- "Could not pass on WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE to CCM"
- ));
+ hdd_err("Could not pass on WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE to CCM");
}
/* Update Tx Highest Long GI data Rate */
@@ -970,9 +948,7 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1) ==
QDF_STATUS_E_FAILURE) {
- hddLog(LOGE,
- FL(
- "VHT_TX_HIGHEST_SUPP_RATE_1_1 to CCM fail"));
+ hdd_err("VHT_TX_HIGHEST_SUPP_RATE_1_1 to CCM fail");
}
}
if (!(cfg->ht_tx_stbc && pconfig->enable2x2))
@@ -982,13 +958,12 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
val32 = val16;
status = sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO, val32);
if (status != QDF_STATUS_SUCCESS)
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set HT capability to CCM"));
+ hdd_alert("could not set HT capability to CCM");
#define WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES 0xff
value = SIZE_OF_SUPPORTED_MCS_SET;
if (sme_cfg_get_str(hdd_ctx->hHal, WNI_CFG_SUPPORTED_MCS_SET, mcs_set,
&value) == QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_INFO, FL("Read MCS rate set"));
+ hdd_notice("Read MCS rate set");
if (pconfig->enable2x2) {
for (value = 0; value < cfg->num_rf_chains; value++)
@@ -1001,8 +976,7 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
mcs_set,
SIZE_OF_SUPPORTED_MCS_SET);
if (status == QDF_STATUS_E_FAILURE)
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set MCS SET to CCM"));
+ hdd_alert("could not set MCS SET to CCM");
}
}
#undef WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES
@@ -1025,7 +999,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR, FL("could not get MPDU LENGTH"));
+ hdd_err("could not get MPDU LENGTH");
value = 0;
}
@@ -1040,8 +1014,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_max_mpdu);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set VHT MAX MPDU LENGTH"));
+ hdd_alert("could not set VHT MAX MPDU LENGTH");
}
}
@@ -1051,8 +1024,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get MPDU LENGTH"));
+ hdd_err("could not get MPDU LENGTH");
value = 0;
}
@@ -1094,8 +1066,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT LDPC CODING CAP"));
+ hdd_err("could not get VHT LDPC CODING CAP");
value = 0;
}
@@ -1106,8 +1077,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_rx_ldpc);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set VHT LDPC CODING CAP to CCM"));
+ hdd_alert("could not set VHT LDPC CODING CAP to CCM");
}
}
@@ -1116,8 +1086,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get SHORT GI 80MHZ"));
+ hdd_err("could not get SHORT GI 80MHZ");
value = 0;
}
@@ -1128,8 +1097,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_short_gi_80);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set SHORT GI 80MHZ to CCM"));
+ hdd_alert("could not set SHORT GI 80MHZ to CCM");
}
}
@@ -1139,8 +1107,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get SHORT GI 80 & 160"));
+ hdd_err("could not get SHORT GI 80 & 160");
value = 0;
}
@@ -1148,8 +1115,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_TXSTBC, &value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT TX STBC"));
+ hdd_err("could not get VHT TX STBC");
value = 0;
}
@@ -1159,8 +1125,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_tx_stbc);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set the VHT TX STBC to CCM"));
+ hdd_alert("could not set the VHT TX STBC to CCM");
}
}
@@ -1168,8 +1133,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_RXSTBC, &value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT RX STBC"));
+ hdd_err("could not get VHT RX STBC");
value = 0;
}
@@ -1179,8 +1143,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_rx_stbc);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set the VHT RX STBC to CCM"));
+ hdd_alert("could not set the VHT RX STBC to CCM");
}
}
@@ -1189,8 +1152,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT SU BEAMFORMER CAP"));
+ hdd_err("could not get VHT SU BEAMFORMER CAP");
value = 0;
}
@@ -1201,8 +1163,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_su_bformer);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set VHT SU BEAMFORMER CAP"));
+ hdd_alert("could not set VHT SU BEAMFORMER CAP");
}
}
@@ -1215,8 +1176,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
pconfig->enableTxBF);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set VHT SU BEAMFORMEE CAP"));
+ hdd_alert("could not set VHT SU BEAMFORMEE CAP");
}
/* Get VHT MU Beamformer cap */
@@ -1224,8 +1184,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT MU BEAMFORMER CAP"));
+ hdd_err("could not get VHT MU BEAMFORMER CAP");
value = 0;
}
@@ -1236,10 +1195,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_mu_bformer);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL(
- "could not set the VHT MU BEAMFORMER CAP to CCM"
- ));
+ hdd_alert("could not set the VHT MU BEAMFORMER CAP to CCM");
}
}
@@ -1248,8 +1204,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT MU BEAMFORMEE CAP"));
+ hdd_err("could not get VHT MU BEAMFORMEE CAP");
value = 0;
}
@@ -1260,8 +1215,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_mu_bformee);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set VHT MU BEAMFORMER CAP"));
+ hdd_alert("could not set VHT MU BEAMFORMER CAP");
}
}
@@ -1270,8 +1224,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
&value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT AMPDU LEN"));
+ hdd_err("could not get VHT AMPDU LEN");
value = 0;
}
@@ -1289,8 +1242,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_max_ampdu_len_exp);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set the VHT AMPDU LEN EXP"));
+ hdd_alert("could not set the VHT AMPDU LEN EXP");
}
}
@@ -1298,8 +1250,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_TXOP_PS, &value);
if (status != QDF_STATUS_SUCCESS) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("could not get VHT TXOP PS"));
+ hdd_err("could not get VHT TXOP PS");
value = 0;
}
@@ -1309,8 +1260,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
cfg->vht_txop_ps);
if (status == QDF_STATUS_E_FAILURE) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("could not set the VHT TXOP PS"));
+ hdd_alert("could not set the VHT TXOP PS");
}
}
@@ -1430,8 +1380,7 @@ void hdd_update_tgt_cfg(void *context, void *param)
else if ((hdd_ctx->config->nBandCapability != eCSR_BAND_ALL) &&
(temp_band_cap != eCSR_BAND_ALL) &&
(hdd_ctx->config->nBandCapability != temp_band_cap)) {
- hddLog(QDF_TRACE_LEVEL_WARN,
- FL("ini BandCapability not supported by the target"));
+ hdd_warn("ini BandCapability not supported by the target");
}
if (!cds_is_driver_recovering()) {
@@ -1483,7 +1432,7 @@ void hdd_update_tgt_cfg(void *context, void *param)
hdd_ctx->config->fine_time_meas_cap &= cfg->fine_time_measurement_cap;
hdd_ctx->fine_time_meas_cap_target = cfg->fine_time_measurement_cap;
- hdd_info(FL("fine_time_meas_cap: 0x%x"),
+ hdd_info("fine_time_meas_cap: 0x%x",
hdd_ctx->config->fine_time_meas_cap);
hdd_ctx->current_antenna_mode =
@@ -1496,6 +1445,15 @@ void hdd_update_tgt_cfg(void *context, void *param)
cfg->bpf_enabled, hdd_ctx->config->bpf_packet_filter_enable);
hdd_ctx->bpf_enabled = (cfg->bpf_enabled &&
hdd_ctx->config->bpf_packet_filter_enable);
+
+ /*
+ * If BPF is enabled, maxWowFilters set to WMA_STA_WOW_DEFAULT_PTRN_MAX
+ * because we need atleast WMA_STA_WOW_DEFAULT_PTRN_MAX free slots to
+ * configure the STA mode wow pattern.
+ */
+ if (hdd_ctx->bpf_enabled)
+ hdd_ctx->config->maxWoWFilters = WMA_STA_WOW_DEFAULT_PTRN_MAX;
+
/* Configure NAN datapath features */
hdd_nan_datapath_target_config(hdd_ctx, cfg);
}
@@ -1928,20 +1886,19 @@ static int __hdd_stop(struct net_device *dev)
/* Nothing to be done if the interface is not opened */
if (false == test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags)) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("NETDEV Interface is not OPENED"));
+ hdd_err("NETDEV Interface is not OPENED");
return -ENODEV;
}
/* Make sure the interface is marked as closed */
clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
- hddLog(QDF_TRACE_LEVEL_INFO, FL("Disabling OS Tx queues"));
+ hdd_notice("Disabling OS Tx queues");
/*
* Disable TX on the interface, after this hard_start_xmit() will not
* be called on that interface
*/
- hddLog(LOG1, FL("Disabling queues"));
+ hdd_notice("Disabling queues");
wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER,
WLAN_CONTROL_PATH);
@@ -2025,17 +1982,17 @@ static void __hdd_uninit(struct net_device *dev)
do {
if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) {
- hddLog(LOGP, FL("Invalid magic"));
+ hdd_alert("Invalid magic");
break;
}
if (NULL == adapter->pHddCtx) {
- hddLog(LOGP, FL("NULL hdd_ctx"));
+ hdd_alert("NULL hdd_ctx");
break;
}
if (dev != adapter->dev) {
- hddLog(LOGP, FL("Invalid device reference"));
+ hdd_alert("Invalid device reference");
/*
* we haven't validated all cases so let this go for
* now
@@ -2091,8 +2048,7 @@ static int hdd_open_cesium_nl_sock(void)
#endif
if (cesium_nl_srv_sock == NULL) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("NLINK: cesium netlink_kernel_create failed"));
+ hdd_err("NLINK: cesium netlink_kernel_create failed");
ret = -ECONNREFUSED;
}
@@ -2220,18 +2176,13 @@ static void __hdd_set_multicast_list(struct net_device *dev)
return;
if (dev->flags & IFF_ALLMULTI) {
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("allow all multicast frames"));
+ hdd_notice("allow all multicast frames");
adapter->mc_addr_list.mc_cnt = 0;
} else {
mc_count = netdev_mc_count(dev);
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("mc_count = %u"), mc_count);
+ hdd_notice("mc_count = %u", mc_count);
if (mc_count > WLAN_HDD_MAX_MC_ADDR_LIST) {
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL(
- "No free filter available; allow all multicast frames"
- ));
+ hdd_notice("No free filter available; allow all multicast frames");
adapter->mc_addr_list.mc_cnt = 0;
return;
}
@@ -2262,8 +2213,7 @@ static void __hdd_set_multicast_list(struct net_device *dev)
ETH_ALEN);
memcpy(&(adapter->mc_addr_list.addr[i][0]), ha->addr,
ETH_ALEN);
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("mlist[%d] = " MAC_ADDRESS_STR), i,
+ hdd_notice("mlist[%d] = " MAC_ADDRESS_STR, i,
MAC_ADDR_ARRAY(adapter->mc_addr_list.addr[i]));
i++;
}
@@ -2477,20 +2427,17 @@ QDF_STATUS hdd_register_interface(hdd_adapter_t *adapter,
if (rtnl_held) {
if (strnchr(pWlanDev->name, strlen(pWlanDev->name), '%')) {
if (dev_alloc_name(pWlanDev, pWlanDev->name) < 0) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Failed:dev_alloc_name"));
+ hdd_err("Failed:dev_alloc_name");
return QDF_STATUS_E_FAILURE;
}
}
if (register_netdevice(pWlanDev)) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Failed:register_netdev"));
+ hdd_err("Failed:register_netdev");
return QDF_STATUS_E_FAILURE;
}
} else {
if (register_netdev(pWlanDev)) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Failed:register_netdev"));
+ hdd_err("Failed:register_netdev");
return QDF_STATUS_E_FAILURE;
}
}
@@ -2504,12 +2451,12 @@ QDF_STATUS hdd_sme_close_session_callback(void *pContext)
hdd_adapter_t *adapter = pContext;
if (NULL == adapter) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("NULL adapter"));
+ hdd_alert("NULL adapter");
return QDF_STATUS_E_INVAL;
}
if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("Invalid magic"));
+ hdd_alert("Invalid magic");
return QDF_STATUS_NOT_INITIALIZED;
}
@@ -2549,7 +2496,7 @@ static QDF_STATUS hdd_check_and_init_tdls(hdd_adapter_t *adapter, uint32_t type)
{
if (QDF_IBSS_MODE != type) {
if (0 != wlan_hdd_tdls_init(adapter)) {
- hddLog(LOGE, FL("wlan_hdd_tdls_init failed"));
+ hdd_err("wlan_hdd_tdls_init failed");
return QDF_STATUS_E_FAILURE;
}
set_bit(TDLS_INIT_DONE, &adapter->event_flags);
@@ -2579,7 +2526,7 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
sme_set_pdev_ht_vht_ies(hdd_ctx->hHal, hdd_ctx->config->enable2x2);
status = cds_get_vdev_types(adapter->device_mode, &type, &subType);
if (QDF_STATUS_SUCCESS != status) {
- hddLog(LOGE, FL("failed to get vdev type"));
+ hdd_err("failed to get vdev type");
goto error_sme_open;
}
/* Open a SME session for future operation */
@@ -2588,8 +2535,7 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
(uint8_t *) &adapter->macAddressCurrent,
&adapter->sessionId, type, subType);
if (!QDF_IS_STATUS_SUCCESS(qdf_ret_status)) {
- hddLog(LOGP,
- FL("sme_open_session() failed, status code %08d [x%08x]"),
+ hdd_alert("sme_open_session() failed, status code %08d [x%08x]",
qdf_ret_status, qdf_ret_status);
status = QDF_STATUS_E_FAILURE;
goto error_sme_open;
@@ -2599,8 +2545,7 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
&adapter->session_open_comp_var,
msecs_to_jiffies(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
if (!rc) {
- hddLog(LOGP,
- FL("Session is not opened within timeout period code %ld"),
+ hdd_alert("Session is not opened within timeout period code %ld",
rc);
status = QDF_STATUS_E_FAILURE;
goto error_sme_open;
@@ -2609,15 +2554,13 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
/* Register wireless extensions */
qdf_ret_status = hdd_register_wext(pWlanDev);
if (QDF_STATUS_SUCCESS != qdf_ret_status) {
- hddLog(LOGP,
- FL("hdd_register_wext() failed, status code %08d [x%08x]"),
+ hdd_alert("hdd_register_wext() failed, status code %08d [x%08x]",
qdf_ret_status, qdf_ret_status);
status = QDF_STATUS_E_FAILURE;
goto error_register_wext;
}
/* Set the Connection State to Not Connected */
- hddLog(LOG1,
- FL("Set HDD connState to eConnectionState_NotConnected"));
+ hdd_notice("Set HDD connState to eConnectionState_NotConnected");
pHddStaCtx->conn_info.connState = eConnectionState_NotConnected;
/* Set the default operation channel */
@@ -2629,8 +2572,7 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
status = hdd_init_tx_rx(adapter);
if (QDF_STATUS_SUCCESS != status) {
- hddLog(LOGP,
- FL("hdd_init_tx_rx() failed, status code %08d [x%08x]"),
+ hdd_alert("hdd_init_tx_rx() failed, status code %08d [x%08x]",
status, status);
goto error_init_txrx;
}
@@ -2639,8 +2581,7 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
status = hdd_wmm_adapter_init(adapter);
if (QDF_STATUS_SUCCESS != status) {
- hddLog(LOGP,
- FL("hdd_wmm_adapter_init() failed, status code %08d [x%08x]"),
+ hdd_alert("hdd_wmm_adapter_init() failed, status code %08d [x%08x]",
status, status);
goto error_wmm_init;
}
@@ -2653,8 +2594,7 @@ QDF_STATUS hdd_init_station_mode(hdd_adapter_t *adapter)
PDEV_CMD);
if (0 != ret_val) {
- hddLog(LOGE,
- FL("WMI_PDEV_PARAM_BURST_ENABLE set failed %d"),
+ hdd_err("WMI_PDEV_PARAM_BURST_ENABLE set failed %d",
ret_val);
}
status = hdd_check_and_init_tdls(adapter, type);
@@ -2691,8 +2631,7 @@ error_register_wext:
msecs_to_jiffies
(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
if (rc <= 0)
- hddLog(LOGE,
- FL("Session is not opened within timeout period code %ld"),
+ hdd_err("Session is not opened within timeout period code %ld",
rc);
}
}
@@ -2712,8 +2651,7 @@ void hdd_cleanup_actionframe(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
&adapter->tx_action_cnf_event,
msecs_to_jiffies(ACTION_FRAME_TX_TIMEOUT));
if (!rc) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("HDD Wait for Action Confirmation Failed!!"));
+ hdd_err("HDD Wait for Action Confirmation Failed!!");
/*
* Inform tx status as FAILURE to upper layer and free
* cfgState->buf
@@ -2817,7 +2755,7 @@ void hdd_cleanup_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
if (adapter)
pWlanDev = adapter->dev;
else {
- hddLog(LOGE, FL("adapter is Null"));
+ hdd_err("adapter is Null");
return;
}
@@ -3227,15 +3165,14 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type,
/* Initialize the WoWL service */
if (!hdd_init_wowl(adapter)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("hdd_init_wowl failed"));
+ hdd_alert("hdd_init_wowl failed");
goto err_lro_cleanup;
}
/* Adapter successfully added. Increment the vdev count */
hdd_ctx->current_intf_count++;
- hddLog(QDF_TRACE_LEVEL_DEBUG, FL("current_intf_count=%d"),
+ hdd_debug("current_intf_count=%d",
hdd_ctx->current_intf_count);
cds_check_and_restart_sap_with_non_dfs_acs();
@@ -3263,7 +3200,7 @@ QDF_STATUS hdd_close_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
status = hdd_get_front_adapter(hdd_ctx, &pCurrent);
if (QDF_STATUS_SUCCESS != status) {
- hddLog(QDF_TRACE_LEVEL_WARN, FL("adapter list empty %d"),
+ hdd_warn("adapter list empty %d",
status);
return status;
}
@@ -3351,8 +3288,7 @@ void wlan_hdd_reset_prob_rspies(hdd_adapter_t *pHostapdAdapter)
* wlan_hdd_reset_prob_rspies should not have been called
* for these kind of devices
*/
- hddLog(LOGE,
- FL("Unexpected request for the current device type %d"),
+ hdd_err("Unexpected request for the current device type %d",
pHostapdAdapter->device_mode);
return;
}
@@ -3366,7 +3302,7 @@ void wlan_hdd_reset_prob_rspies(hdd_adapter_t *pHostapdAdapter)
if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(pHostapdAdapter),
&updateIE,
eUPDATE_IE_PROBE_RESP) == QDF_STATUS_E_FAILURE) {
- hddLog(LOGE, FL("Could not pass on PROBE_RSP_BCN data to PE"));
+ hdd_err("Could not pass on PROBE_RSP_BCN data to PE");
}
}
@@ -3418,7 +3354,7 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
ENTER();
- hddLog(LOG1, FL("Disabling queues"));
+ hdd_notice("Disabling queues");
wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER,
WLAN_CONTROL_PATH);
switch (adapter->device_mode) {
@@ -3460,16 +3396,10 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
msecs_to_jiffies
(WLAN_WAIT_TIME_DISCONNECT));
if (!rc) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL(
- "wait on disconnect_comp_var failed"
- ));
+ hdd_err("wait on disconnect_comp_var failed");
}
} else {
- hddLog(LOGE,
- FL(
- "failed to post disconnect event to SME"
- ));
+ hdd_err("failed to post disconnect event to SME");
}
memset(&wrqu, '\0', sizeof(wrqu));
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -3511,8 +3441,7 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
* is no sap restart work pending.
*/
cds_flush_work(&hdd_ctx->sap_start_work);
- hddLog(QDF_TRACE_LEVEL_INFO_HIGH,
- FL("Canceled the pending SAP restart work"));
+ hdd_info("Canceled the pending SAP restart work");
cds_change_sap_restart_required_status(false);
}
/* Any softap specific cleanup here... */
@@ -3546,14 +3475,11 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
BSS_WAIT_TIMEOUT);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
- hddLog(LOGE,
- FL(
- "failure waiting for wlansap_stop_bss %d"
- ),
- qdf_status);
+ hdd_err("failure waiting for wlansap_stop_bss %d",
+ qdf_status);
}
} else {
- hddLog(LOGE, FL("failure in wlansap_stop_bss"));
+ hdd_err("failure in wlansap_stop_bss");
}
clear_bit(SOFTAP_BSS_STARTED, &adapter->event_flags);
cds_decr_session_set_pcl(
@@ -3571,20 +3497,14 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(adapter),
&updateIE, eUPDATE_IE_PROBE_BCN)
== QDF_STATUS_E_FAILURE) {
- hddLog(LOGE,
- FL(
- "Could not pass on PROBE_RSP_BCN data to PE"
- ));
+ hdd_err("Could not pass on PROBE_RSP_BCN data to PE");
}
/* Assoc resp reset */
if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(adapter),
&updateIE,
eUPDATE_IE_ASSOC_RESP) ==
QDF_STATUS_E_FAILURE) {
- hddLog(LOGE,
- FL(
- "Could not pass on ASSOC_RSP data to PE"
- ));
+ hdd_err("Could not pass on ASSOC_RSP data to PE");
}
/* Reset WNI_CFG_PROBE_RSP Flags */
wlan_hdd_reset_prob_rspies(adapter);
@@ -3645,7 +3565,7 @@ QDF_STATUS hdd_reset_all_adapters(hdd_context_t *hdd_ctx)
while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) {
adapter = adapterNode->pAdapter;
- hddLog(LOG1, FL("Disabling queues"));
+ hdd_notice("Disabling queues");
wlan_hdd_netif_queue_control(adapter,
WLAN_NETIF_TX_DISABLE_N_CARRIER,
WLAN_CONTROL_PATH);
@@ -3762,12 +3682,10 @@ QDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx)
case QDF_P2P_GO_MODE:
#ifdef MSM_PLATFORM
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("[SSR] send stop ap to supplicant"));
+ hdd_err("[SSR] send stop ap to supplicant");
cfg80211_ap_stopped(adapter->dev, GFP_KERNEL);
#else
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("[SSR] send restart supplicant"));
+ hdd_err("[SSR] send restart supplicant");
/* event supplicant to restart */
cfg80211_del_sta(adapter->dev,
(const u8 *)&bcastMac.bytes[0],
@@ -3902,8 +3820,7 @@ hdd_adapter_t *hdd_get_adapter_by_vdev(hdd_context_t *hdd_ctx,
adapterNode = pNext;
}
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("vdev_id %d does not exist with host"), vdev_id);
+ hdd_err("vdev_id %d does not exist with host", vdev_id);
return NULL;
}
@@ -4480,8 +4397,7 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
if (!QDF_IS_STATUS_SUCCESS
(qdf_mc_timer_destroy(&hdd_ctx->bus_bw_timer))) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Cannot deallocate Bus bandwidth timer"));
+ hdd_err("Cannot deallocate Bus bandwidth timer");
}
#endif
@@ -4493,8 +4409,7 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
if (!QDF_IS_STATUS_SUCCESS
(qdf_mc_timer_destroy(&hdd_ctx->skip_acs_scan_timer))) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Cannot deallocate ACS Skip timer"));
+ hdd_err("Cannot deallocate ACS Skip timer");
}
#endif
@@ -4539,8 +4454,7 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
*/
qdf_status = cds_sched_close(p_cds_context);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("Failed to close CDS Scheduler"));
+ hdd_alert("Failed to close CDS Scheduler");
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
@@ -4585,7 +4499,7 @@ void __hdd_wlan_exit(void)
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("Invalid HDD Context"));
+ hdd_alert("Invalid HDD Context");
EXIT();
return;
}
@@ -4606,7 +4520,7 @@ void hdd_skip_acs_scan_timer_handler(void *data)
{
hdd_context_t *hdd_ctx = (hdd_context_t *) data;
- hddLog(LOG1, FL("ACS Scan result expired. Reset ACS scan skip"));
+ hdd_notice("ACS Scan result expired. Reset ACS scan skip");
hdd_ctx->skip_acs_scan_status = eSAP_DO_NEW_ACS_SCAN;
if (!hdd_ctx->hHal)
@@ -4646,7 +4560,7 @@ int hdd_wlan_set_ht2040_mode(hdd_adapter_t *adapter, uint16_t staId,
qdf_status = sme_notify_ht2040_mode(hdd_ctx->hHal, staId, macAddrSTA,
adapter->sessionId, channel_type);
if (QDF_STATUS_SUCCESS != qdf_status) {
- hddLog(LOGE, "Fail to send notification with ht2040 mode");
+ hdd_err("Fail to send notification with ht2040 mode");
return -EINVAL;
}
@@ -4678,8 +4592,7 @@ int hdd_wlan_notify_modem_power_state(int state)
qdf_status = sme_notify_modem_power_state(hdd_ctx->hHal, state);
if (QDF_STATUS_SUCCESS != qdf_status) {
- hddLog(LOGE,
- "Fail to send notification with modem power state %d",
+ hdd_err("Fail to send notification with modem power state %d",
state);
return -EINVAL;
}
@@ -4703,11 +4616,8 @@ QDF_STATUS hdd_post_cds_enable_config(hdd_context_t *hdd_ctx)
*/
qdf_ret_status = sme_hdd_ready_ind(hdd_ctx->hHal);
if (!QDF_IS_STATUS_SUCCESS(qdf_ret_status)) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL(
- "sme_hdd_ready_ind() failed with status code %08d [x%08x]"
- ),
- qdf_ret_status, qdf_ret_status);
+ hdd_err("sme_hdd_ready_ind() failed with status code %08d [x%08x]",
+ qdf_ret_status, qdf_ret_status);
return QDF_STATUS_E_FAILURE;
}
@@ -4765,20 +4675,14 @@ void hdd_exchange_version_and_caps(hdd_context_t *hdd_ctx)
vstatus = sme_get_wcnss_wlan_compiled_version(hdd_ctx->hHal,
&versionCompiled);
if (!QDF_IS_STATUS_SUCCESS(vstatus)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL(
- "unable to retrieve WCNSS WLAN compiled version"
- ));
+ hdd_alert("unable to retrieve WCNSS WLAN compiled version");
break;
}
vstatus = sme_get_wcnss_wlan_reported_version(hdd_ctx->hHal,
&versionReported);
if (!QDF_IS_STATUS_SUCCESS(vstatus)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL(
- "unable to retrieve WCNSS WLAN reported version"
- ));
+ hdd_alert("unable to retrieve WCNSS WLAN reported version");
break;
}
@@ -4810,10 +4714,7 @@ void hdd_exchange_version_and_caps(hdd_context_t *hdd_ctx)
versionString,
sizeof(versionString));
if (!QDF_IS_STATUS_SUCCESS(vstatus)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL(
- "unable to retrieve WCNSS software version string"
- ));
+ hdd_alert("unable to retrieve WCNSS software version string");
break;
}
@@ -4824,8 +4725,7 @@ void hdd_exchange_version_and_caps(hdd_context_t *hdd_ctx)
versionString,
sizeof(versionString));
if (!QDF_IS_STATUS_SUCCESS(vstatus)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL(
+ hdd_alert(FL(
"unable to retrieve WCNSS hardware version string"
));
break;
@@ -5134,8 +5034,7 @@ static void hdd_bus_bw_compute_cbk(void *priv)
rx_packets += (uint64_t)ipa_rx_packets;
if (!connected) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("bus bandwidth timer running in disconnected state"));
+ hdd_err("bus bandwidth timer running in disconnected state");
return;
}
@@ -5160,7 +5059,7 @@ int wlan_hdd_init_tx_rx_histogram(hdd_context_t *hdd_ctx)
hdd_ctx->hdd_txrx_hist = qdf_mem_malloc(
(sizeof(struct hdd_tx_rx_histogram) * NUM_TX_RX_HISTOGRAM));
if (hdd_ctx->hdd_txrx_hist == NULL) {
- hdd_err("%s: Failed malloc for hdd_txrx_hist", __func__);
+ hdd_err("Failed malloc for hdd_txrx_hist");
return -ENOMEM;
}
return 0;
@@ -5209,32 +5108,28 @@ void wlan_hdd_display_tx_rx_histogram(hdd_context_t *hdd_ctx)
int i;
#ifdef MSM_PLATFORM
- hddLog(QDF_TRACE_LEVEL_ERROR, "BW compute Interval: %dms",
+ hdd_err("BW compute Interval: %dms",
hdd_ctx->config->busBandwidthComputeInterval);
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "BW High TH: %d BW Med TH: %d BW Low TH: %d",
+ hdd_err("BW High TH: %d BW Med TH: %d BW Low TH: %d",
hdd_ctx->config->busBandwidthHighThreshold,
hdd_ctx->config->busBandwidthMediumThreshold,
hdd_ctx->config->busBandwidthLowThreshold);
- hddLog(QDF_TRACE_LEVEL_ERROR, "Enable TCP DEL ACK: %d",
+ hdd_err("Enable TCP DEL ACK: %d",
hdd_ctx->config->enable_tcp_delack);
- hddLog(QDF_TRACE_LEVEL_ERROR, "TCP DEL High TH: %d TCP DEL Low TH: %d",
+ hdd_err("TCP DEL High TH: %d TCP DEL Low TH: %d",
hdd_ctx->config->tcpDelackThresholdHigh,
hdd_ctx->config->tcpDelackThresholdLow);
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "TCP TX HIGH TP TH: %d (Use to set tcp_output_bytes_limit)",
+ hdd_err("TCP TX HIGH TP TH: %d (Use to set tcp_output_bytes_limit)",
hdd_ctx->config->tcp_tx_high_tput_thres);
#endif
- hddLog(QDF_TRACE_LEVEL_ERROR, "Total entries: %d Current index: %d",
+ hdd_err("Total entries: %d Current index: %d",
NUM_TX_RX_HISTOGRAM, hdd_ctx->hdd_txrx_hist_idx);
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "index, total_rx, interval_rx, total_tx, interval_tx, bus_bw_level, RX TP Level, TX TP Level");
+ hdd_err("index, total_rx, interval_rx, total_tx, interval_tx, bus_bw_level, RX TP Level, TX TP Level");
for (i = 0; i < NUM_TX_RX_HISTOGRAM; i++) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "%d: %llu, %llu, %llu, %llu, %s, %s, %s",
+ hdd_err("%d: %llu, %llu, %llu, %llu, %s, %s, %s",
i, hdd_ctx->hdd_txrx_hist[i].total_rx,
hdd_ctx->hdd_txrx_hist[i].interval_rx,
hdd_ctx->hdd_txrx_hist[i].total_tx,
@@ -5281,13 +5176,10 @@ void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx)
while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) {
adapter = adapter_node->pAdapter;
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "\nNetif queue operation statistics:");
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "Session_id %d device mode %d",
+ hdd_err("\nNetif queue operation statistics:");
+ hdd_err("Session_id %d device mode %d",
adapter->sessionId, adapter->device_mode);
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "Current pause_map value %x", adapter->pause_map);
+ hdd_err("Current pause_map value %x", adapter->pause_map);
curr_time = qdf_system_ticks();
total = curr_time - adapter->start_time;
delta = curr_time - adapter->last_time;
@@ -5298,13 +5190,11 @@ void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx)
unpause = adapter->total_unpause_time + delta;
pause = adapter->total_pause_time;
}
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "Total: %ums Pause: %ums Unpause: %ums",
+ hdd_err("Total: %ums Pause: %ums Unpause: %ums",
qdf_system_ticks_to_msecs(total),
qdf_system_ticks_to_msecs(pause),
qdf_system_ticks_to_msecs(unpause));
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "reason_type: pause_cnt: unpause_cnt: pause_time");
+ hdd_err("reason_type: pause_cnt: unpause_cnt: pause_time");
for (i = WLAN_CONTROL_PATH; i < WLAN_REASON_TYPE_MAX; i++) {
qdf_time_t pause_delta = 0;
@@ -5312,8 +5202,7 @@ void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx)
if (adapter->pause_map & (1 << i))
pause_delta = delta;
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "%s: %d: %d: %ums",
+ hdd_err("%s: %d: %d: %ums",
hdd_reason_type_to_string(i),
adapter->queue_oper_stats[i].pause_count,
adapter->queue_oper_stats[i].unpause_count,
@@ -5322,18 +5211,14 @@ void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx)
pause_delta));
}
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "\nNetif queue operation history:");
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "Total entries: %d current index %d",
+ hdd_err("\nNetif queue operation history:");
+ hdd_err("Total entries: %d current index %d",
WLAN_HDD_MAX_HISTORY_ENTRY, adapter->history_index);
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "index: time: action_type: reason_type: pause_map");
+ hdd_err("index: time: action_type: reason_type: pause_map");
for (i = 0; i < WLAN_HDD_MAX_HISTORY_ENTRY; i++) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- "%d: %u: %s: %s: %x",
+ hdd_err("%d: %u: %s: %s: %x",
i, qdf_system_ticks_to_msecs(
adapter->queue_oper_history[i].time),
hdd_action_type_to_string(
@@ -5648,7 +5533,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
/* Basic sanity */
if (!hdd_context || !indi_param) {
- hddLog(QDF_TRACE_LEVEL_ERROR, FL("Invalid arguments"));
+ hdd_err("Invalid arguments");
return;
}
@@ -5657,8 +5542,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
cds_context = hdd_ctxt->pcds_context;
/* Make unsafe channel list */
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("band count %d"),
+ hdd_notice("band count %d",
ch_avoid_indi->avoid_range_count);
/* generate vendor specific event */
@@ -5682,7 +5566,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
for (range_loop = 0; range_loop < ch_avoid_indi->avoid_range_count;
range_loop++) {
if (hdd_ctxt->unsafe_channel_count >= NUM_CHANNELS) {
- hddLog(LOGW, FL("LTE Coex unsafe channel list full"));
+ hdd_warn("LTE Coex unsafe channel list full");
break;
}
@@ -5690,7 +5574,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
ch_avoid_indi->avoid_freq_range[range_loop].start_freq);
end_channel = ieee80211_frequency_to_channel(
ch_avoid_indi->avoid_freq_range[range_loop].end_freq);
- hddLog(LOG1, "%s : start %d : %d, end %d : %d", __func__,
+ hdd_notice("start %d : %d, end %d : %d",
ch_avoid_indi->avoid_freq_range[range_loop].start_freq,
start_channel,
ch_avoid_indi->avoid_freq_range[range_loop].end_freq,
@@ -5736,14 +5620,13 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
CDS_CHANNEL_FREQ(channel_loop);
if (hdd_ctxt->unsafe_channel_count >=
NUM_CHANNELS) {
- hddLog(LOGW, FL("LTECoex unsafe ch list full"));
+ hdd_warn("LTECoex unsafe ch list full");
break;
}
}
}
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("number of unsafe channels is %d "),
+ hdd_notice("number of unsafe channels is %d ",
hdd_ctxt->unsafe_channel_count);
if (pld_set_wlan_unsafe_channel(hdd_ctxt->parent_dev,
@@ -5761,8 +5644,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
for (channel_loop = 0;
channel_loop < hdd_ctxt->unsafe_channel_count; channel_loop++) {
- hddLog(QDF_TRACE_LEVEL_INFO,
- FL("channel %d is not safe "),
+ hdd_notice("channel %d is not safe ",
hdd_ctxt->unsafe_channel_list[channel_loop]);
}
@@ -5851,14 +5733,14 @@ static void hdd_init_channel_avoidance(hdd_context_t *hdd_ctx)
&(hdd_ctx->unsafe_channel_count),
sizeof(uint16_t) * NUM_CHANNELS);
- hddLog(QDF_TRACE_LEVEL_INFO, FL("num of unsafe channels is %d"),
+ hdd_notice("num of unsafe channels is %d",
hdd_ctx->unsafe_channel_count);
unsafe_channel_count = QDF_MIN((uint16_t)hdd_ctx->unsafe_channel_count,
(uint16_t)NUM_CHANNELS);
for (index = 0; index < unsafe_channel_count; index++) {
- hddLog(QDF_TRACE_LEVEL_INFO, FL("channel %d is not safe"),
+ hdd_notice("channel %d is not safe",
hdd_ctx->unsafe_channel_list[index]);
}
@@ -6694,6 +6576,79 @@ static inline bool hdd_hold_rtnl_lock(void) { return false; }
static inline void hdd_release_rtnl_lock(void) { }
#endif
+#if !defined(REMOVE_PKT_LOG)
+
+/**
+ * hdd_process_pktlog_command() - process pktlog command
+ * @hdd_ctx: hdd context
+ * @set_value: value set by user
+ *
+ * Return: 0 for success or error.
+ */
+int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
+{
+ int ret;
+ bool enable;
+ uint8_t user_triggered = 0;
+
+ ret = wlan_hdd_validate_context(hdd_ctx);
+ if (0 != ret)
+ return ret;
+
+ hdd_info("set pktlog %d", set_value);
+
+ if (set_value > 2) {
+ hdd_err("invalid pktlog value %d", set_value);
+ return -EINVAL;
+ }
+
+ /*
+ * set_value = 0 then disable packetlog
+ * set_value = 1 enable packetlog forcefully
+ * set_vlaue = 2 then disable packetlog if disabled through ini or
+ * enable packetlog with AUTO type.
+ */
+ enable = ((set_value > 0) && cds_is_packet_log_enabled()) ?
+ true : false;
+
+ if (1 == set_value) {
+ enable = true;
+ user_triggered = 1;
+ }
+
+ return hdd_pktlog_enable_disable(hdd_ctx, enable, user_triggered);
+}
+/**
+ * hdd_pktlog_enable_disable() - Enable/Disable packet logging
+ * @hdd_ctx: HDD context
+ * @enable: Flag to enable/disable
+ *
+ * Return: 0 on success; error number otherwise
+ */
+int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable,
+ uint8_t user_triggered)
+{
+ struct sir_wifi_start_log start_log;
+ QDF_STATUS status;
+
+ start_log.ring_id = RING_ID_PER_PACKET_STATS;
+ start_log.verbose_level =
+ enable ? WLAN_LOG_LEVEL_ACTIVE : WLAN_LOG_LEVEL_OFF;
+ start_log.ini_triggered = cds_is_packet_log_enabled();
+ start_log.user_triggered = user_triggered;
+
+ status = sme_wifi_start_logger(hdd_ctx->hHal, start_log);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("sme_wifi_start_logger failed(err=%d)", status);
+ EXIT();
+ return -EINVAL;
+ }
+
+ return 0;
+}
+#endif /* REMOVE_PKT_LOG */
+
+
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
/**
* hdd_register_for_sap_restart_with_channel_switch() - Register for SAP channel
@@ -6765,7 +6720,7 @@ static void hdd_populate_random_mac_addr(hdd_context_t *hdd_ctx, uint32_t num)
macaddr_b3 ^= (1 << INTF_MACADDR_MASK);
buf[0] |= 0x02;
buf[3] = macaddr_b3;
- hdd_info(FL(MAC_ADDRESS_STR), MAC_ADDR_ARRAY(buf));
+ hdd_info(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(buf));
}
}
@@ -6803,7 +6758,7 @@ static int hdd_cnss_wlan_mac(hdd_context_t *hdd_ctx)
for (iter = 0; iter < no_of_mac_addr; ++iter, addr += mac_addr_size) {
buf = ini->intfMacAddr[iter].bytes;
qdf_mem_copy(buf, addr, QDF_MAC_ADDR_SIZE);
- hdd_info(FL(MAC_ADDRESS_STR), MAC_ADDR_ARRAY(buf));
+ hdd_info(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(buf));
}
status = sme_set_custom_mac_addr(mac_addr);
@@ -7430,7 +7385,7 @@ int hdd_wlan_startup(struct device *dev)
hdd_ctx->hHal = cds_get_context(QDF_MODULE_ID_SME);
if (NULL == hdd_ctx->hHal) {
- hddLog(QDF_TRACE_LEVEL_FATAL, FL("HAL context is null"));
+ hdd_alert("HAL context is null");
goto err_stop_modules;
}
@@ -7453,8 +7408,7 @@ int hdd_wlan_startup(struct device *dev)
adapter = hdd_open_interfaces(hdd_ctx, rtnl_held);
if (IS_ERR(adapter)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("Failed to open interface, adapter is NULL"));
+ hdd_alert("Failed to open interface, adapter is NULL");
ret = PTR_ERR(adapter);
goto err_ipa_cleanup;
}
@@ -7480,7 +7434,7 @@ int hdd_wlan_startup(struct device *dev)
hdd_skip_acs_scan_timer_handler,
(void *)hdd_ctx);
if (!QDF_IS_STATUS_SUCCESS(status))
- hddLog(LOGE, FL("Failed to init ACS Skip timer"));
+ hdd_err("Failed to init ACS Skip timer");
#endif
#ifdef MSM_PLATFORM
@@ -7498,6 +7452,10 @@ int hdd_wlan_startup(struct device *dev)
if (hdd_ctx->rps)
hdd_set_rps_cpu_mask(hdd_ctx);
+
+ if (cds_is_packet_log_enabled())
+ hdd_pktlog_enable_disable(hdd_ctx, true, 0);
+
ret = hdd_register_notifiers(hdd_ctx);
if (ret)
goto err_debugfs_exit;
@@ -7536,8 +7494,7 @@ err_stop_modules:
status = cds_sched_close(hdd_ctx->pcds_context);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(QDF_TRACE_LEVEL_FATAL,
- FL("Failed to close CDS Scheduler"));
+ hdd_alert("Failed to close CDS Scheduler");
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(status));
}
@@ -7718,7 +7675,7 @@ QDF_STATUS hdd_softap_sta_deauth(hdd_adapter_t *adapter,
ENTER();
- hddLog(LOG1, FL("hdd_softap_sta_deauth:(%p, false)"),
+ hdd_notice("hdd_softap_sta_deauth:(%p, false)",
(WLAN_HDD_GET_CTX(adapter))->pcds_context);
/* Ignore request to deauth bcmc station */
@@ -7754,7 +7711,7 @@ void hdd_softap_sta_disassoc(hdd_adapter_t *adapter,
ENTER();
- hddLog(LOGE, FL("hdd_softap_sta_disassoc:(%p, false)"),
+ hdd_err("hdd_softap_sta_disassoc:(%p, false)",
(WLAN_HDD_GET_CTX(adapter))->pcds_context);
/* Ignore request to disassoc bcmc station */
@@ -7778,7 +7735,7 @@ void hdd_softap_tkip_mic_fail_counter_measure(hdd_adapter_t *adapter,
ENTER();
- hddLog(LOGE, FL("hdd_softap_tkip_mic_fail_counter_measure:(%p, false)"),
+ hdd_err("hdd_softap_tkip_mic_fail_counter_measure:(%p, false)",
(WLAN_HDD_GET_CTX(adapter))->pcds_context);
#ifdef WLAN_FEATURE_MBSSID
@@ -7826,7 +7783,7 @@ void wlan_hdd_disable_roaming(hdd_adapter_t *adapter)
hdd_ctx->config->isRoamOffloadScanEnabled &&
QDF_STA_MODE == adapter->device_mode &&
cds_is_sta_active_connection_exists()) {
- hddLog(LOG1, FL("Connect received on STA sessionId(%d)"),
+ hdd_notice("Connect received on STA sessionId(%d)",
adapter->sessionId);
/*
* Loop through adapter and disable roaming for each STA device
@@ -7839,8 +7796,7 @@ void wlan_hdd_disable_roaming(hdd_adapter_t *adapter)
if (QDF_STA_MODE == adapterIdx->device_mode
&& adapter->sessionId != adapterIdx->sessionId) {
- hddLog(LOG1,
- FL("Disable Roaming on sessionId(%d)"),
+ hdd_notice("Disable Roaming on sessionId(%d)",
adapterIdx->sessionId);
sme_stop_roaming(WLAN_HDD_GET_HAL_CTX
(adapterIdx),
@@ -7878,7 +7834,7 @@ void wlan_hdd_enable_roaming(hdd_adapter_t *adapter)
hdd_ctx->config->isRoamOffloadScanEnabled &&
QDF_STA_MODE == adapter->device_mode &&
cds_is_sta_active_connection_exists()) {
- hddLog(LOG1, FL("Disconnect received on STA sessionId(%d)"),
+ hdd_notice("Disconnect received on STA sessionId(%d)",
adapter->sessionId);
/*
* Loop through adapter and enable roaming for each STA device
@@ -7891,8 +7847,7 @@ void wlan_hdd_enable_roaming(hdd_adapter_t *adapter)
if (QDF_STA_MODE == adapterIdx->device_mode
&& adapter->sessionId != adapterIdx->sessionId) {
- hddLog(LOG1,
- FL("Enabling Roaming on sessionId(%d)"),
+ hdd_notice("Enabling Roaming on sessionId(%d)",
adapterIdx->sessionId);
sme_start_roaming(WLAN_HDD_GET_HAL_CTX
(adapterIdx),
@@ -7922,7 +7877,7 @@ void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len)
skb = alloc_skb(NLMSG_SPACE(WLAN_NL_MAX_PAYLOAD), flags);
if (skb == NULL) {
- hddLog(QDF_TRACE_LEVEL_ERROR, FL("alloc_skb failed"));
+ hdd_err("alloc_skb failed");
return;
}
@@ -7961,8 +7916,7 @@ void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len)
break;
default:
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("WLAN SVC: Attempt to send unknown nlink message %d"),
+ hdd_err("WLAN SVC: Attempt to send unknown nlink message %d",
type);
kfree_skb(skb);
return;
@@ -7976,7 +7930,7 @@ void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len)
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
void wlan_hdd_auto_shutdown_cb(void)
{
- hddLog(LOGE, FL("Wlan Idle. Sending Shutdown event.."));
+ hdd_err("Wlan Idle. Sending Shutdown event..");
wlan_hdd_send_svc_nlink_msg(WLAN_SVC_WLAN_AUTO_SHUTDOWN_IND, NULL, 0);
}
@@ -7998,8 +7952,7 @@ void wlan_hdd_auto_shutdown_enable(hdd_context_t *hdd_ctx, bool enable)
if (enable == false) {
if (sme_set_auto_shutdown_timer(hal_handle, 0) !=
QDF_STATUS_SUCCESS) {
- hddLog(LOGE,
- FL("Failed to stop wlan auto shutdown timer"));
+ hdd_err("Failed to stop wlan auto shutdown timer");
}
wlan_hdd_send_svc_nlink_msg(
WLAN_SVC_WLAN_AUTO_SHUTDOWN_CANCEL_IND, NULL, 0);
@@ -8038,19 +7991,16 @@ void wlan_hdd_auto_shutdown_enable(hdd_context_t *hdd_ctx, bool enable)
}
if (ap_connected == true || sta_connected == true) {
- hddLog(LOG1,
- FL("CC Session active. Shutdown timer not enabled"));
+ hdd_notice("CC Session active. Shutdown timer not enabled");
return;
} else {
if (sme_set_auto_shutdown_timer(hal_handle,
hdd_ctx->config->
WlanAutoShutdown)
!= QDF_STATUS_SUCCESS)
- hddLog(LOGE,
- FL("Failed to start wlan auto shutdown timer"));
+ hdd_err("Failed to start wlan auto shutdown timer");
else
- hddLog(LOG1,
- FL("Auto Shutdown timer for %d seconds enabled"),
+ hdd_notice("Auto Shutdown timer for %d seconds enabled",
hdd_ctx->config->WlanAutoShutdown);
}
@@ -8114,8 +8064,7 @@ void hdd_stop_bus_bw_compute_timer(hdd_adapter_t *adapter)
if (QDF_TIMER_STATE_RUNNING !=
qdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) {
/* trying to stop timer, when not running is not good */
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("bus band width compute timer is not running"));
+ hdd_err("bus band width compute timer is not running");
return;
}
@@ -8191,15 +8140,13 @@ QDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
(channel_id < SIR_11A_CHANNEL_BEGIN)) {
if (hdd_ap_ctx->operatingChannel != channel_id) {
*concurrent_chnl_same = false;
- hddLog(QDF_TRACE_LEVEL_INFO_MED,
- FL("channels are different"));
+ hdd_info("channels are different");
}
} else if ((QDF_P2P_GO_MODE == device_mode) &&
(channel_id >= SIR_11A_CHANNEL_BEGIN)) {
if (hdd_ap_ctx->operatingChannel != channel_id) {
*concurrent_chnl_same = false;
- hddLog(QDF_TRACE_LEVEL_INFO_MED,
- FL("channels are different"));
+ hdd_info("channels are different");
}
}
} else {
@@ -8210,8 +8157,7 @@ QDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
* Return the status as failure so caller function could know
* that scan look up is failed.
*/
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Finding AP from scan cache failed"));
+ hdd_err("Finding AP from scan cache failed");
return QDF_STATUS_E_FAILURE;
}
return QDF_STATUS_SUCCESS;
@@ -8234,8 +8180,7 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
hdd_context_t *hdd_ctx;
if (NULL == ap_adapter) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("ap_adapter is NULL here"));
+ hdd_err("ap_adapter is NULL here");
return;
}
@@ -8249,8 +8194,7 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
wlan_hdd_del_station(ap_adapter);
hdd_cleanup_actionframe(hdd_ctx, ap_adapter);
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
- hddLog(QDF_TRACE_LEVEL_INFO_HIGH,
- FL("Now doing SAP STOPBSS"));
+ hdd_info("Now doing SAP STOPBSS");
qdf_event_reset(&hostapd_state->qdf_stop_bss_event);
if (QDF_STATUS_SUCCESS == wlansap_stop_bss(hdd_ap_ctx->
sapContext)) {
@@ -8259,19 +8203,16 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
BSS_WAIT_TIMEOUT);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
mutex_unlock(&hdd_ctx->sap_lock);
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("SAP Stop Failed"));
+ hdd_err("SAP Stop Failed");
return;
}
}
clear_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
cds_decr_session_set_pcl(ap_adapter->device_mode,
ap_adapter->sessionId);
- hddLog(QDF_TRACE_LEVEL_INFO_HIGH,
- FL("SAP Stop Success"));
+ hdd_info("SAP Stop Success");
} else {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("Can't stop ap because its not started"));
+ hdd_err("Can't stop ap because its not started");
}
mutex_unlock(&hdd_ctx->sap_lock);
return;
@@ -8294,8 +8235,7 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
tsap_Config_t *sap_config;
if (NULL == ap_adapter) {
- hddLog(QDF_TRACE_LEVEL_ERROR,
- FL("ap_adapter is NULL here"));
+ hdd_err("ap_adapter is NULL here");
return;
}
@@ -8317,7 +8257,7 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
goto end;
if (0 != wlan_hdd_cfg80211_update_apies(ap_adapter)) {
- hddLog(LOGE, FL("SAP Not able to set AP IEs"));
+ hdd_err("SAP Not able to set AP IEs");
wlansap_reset_sap_config_add_ie(sap_config, eUPDATE_IE_ALL);
goto end;
}
@@ -8328,15 +8268,14 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
!= QDF_STATUS_SUCCESS)
goto end;
- hddLog(QDF_TRACE_LEVEL_INFO_HIGH,
- FL("Waiting for SAP to start"));
+ hdd_info("Waiting for SAP to start");
qdf_status = qdf_wait_single_event(&hostapd_state->qdf_event,
BSS_WAIT_TIMEOUT);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
- hddLog(QDF_TRACE_LEVEL_ERROR, FL("SAP Start failed"));
+ hdd_err("SAP Start failed");
goto end;
}
- hddLog(QDF_TRACE_LEVEL_INFO_HIGH, FL("SAP Start Success"));
+ hdd_info("SAP Start Success");
set_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
cds_incr_active_session(ap_adapter->device_mode,
ap_adapter->sessionId);
@@ -8497,7 +8436,8 @@ static int __hdd_module_init(void)
ret = wlan_hdd_register_driver();
if (ret) {
- pr_err("%s: driver load failure\n", WLAN_MODULE_NAME);
+ pr_err("%s: driver load failure, err %d\n", WLAN_MODULE_NAME,
+ ret);
goto out;
}
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index a71f3549acc5..c5255ad23d48 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -1956,7 +1956,7 @@ static uint8_t wlan_hdd_get_session_type(enum nl80211_iftype type)
* @flags: moniter configuraiton flags (not used)
* @vif_params: virtual interface parameters (not used)
*
- * Return: the pointer of wireless dev, otherwise NULL.
+ * Return: the pointer of wireless dev, otherwise ERR_PTR.
*/
struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
const char *name,
@@ -2048,6 +2048,14 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
return ERR_PTR(-ENOSPC);
}
+ if (NL80211_IFTYPE_AP == type) {
+ ret = hdd_start_adapter(pAdapter);
+ if (ret) {
+ hdd_err("Failed to start %s", name);
+ return ERR_PTR(-EINVAL);
+ }
+ }
+
if (pHddCtx->rps)
hdd_send_rps_ind(pAdapter);
@@ -2065,7 +2073,7 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
* @flags: monitor mode configuration flags (not used)
* @vif_params: virtual interface parameters (not used)
*
- * Return: the pointer of wireless dev, otherwise NULL.
+ * Return: the pointer of wireless dev, otherwise ERR_PTR.
*/
struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
const char *name,
@@ -2092,7 +2100,7 @@ struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
* @flags: monitor mode configuration flags (not used)
* @vif_params: virtual interface parameters (not used)
*
- * Return: the pointer of wireless dev, otherwise NULL.
+ * Return: the pointer of wireless dev, otherwise ERR_PTR.
*/
struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
const char *name,
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 9c50fbbf7101..d538ff112010 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1443,6 +1443,9 @@ QDF_STATUS hdd_wlan_re_init(void)
if (QDF_IS_STATUS_ERROR(qdf_status))
goto err_cds_disable;
+ if (cds_is_packet_log_enabled())
+ hdd_pktlog_enable_disable(pHddCtx, true, 0);
+
hdd_err("WLAN host driver reinitiation completed!");
goto success;
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 6f7457ebe09b..69218fba8a9e 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -33,10 +33,10 @@
#include "qdf_types.h"
#include "cds_reg_service.h"
+#include "cds_regdomain.h"
#include "qdf_trace.h"
#include "sme_api.h"
#include "wlan_hdd_main.h"
-#include "cds_regdomain.h"
#include "wlan_hdd_regulatory.h"
#define WORLD_SKU_MASK 0x00F0
@@ -365,8 +365,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
{
int band_num;
int chan_num;
- int chan_enum = 0;
- struct ieee80211_channel *wiphy_chan;
+ enum channel_enum chan_enum = CHAN_ENUM_1;
+ struct ieee80211_channel *wiphy_chan, *wiphy_chan_144 = NULL;
struct regulatory_channel *cds_chan;
uint8_t band_capability;
@@ -385,6 +385,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
wiphy_chan =
&(wiphy->bands[band_num]->channels[chan_num]);
cds_chan = &(reg_channels[chan_enum]);
+ if (CHAN_ENUM_144 == chan_enum)
+ wiphy_chan_144 = wiphy_chan;
chan_enum++;
@@ -393,13 +395,17 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
if (wiphy_chan->flags & IEEE80211_CHAN_DISABLED) {
cds_chan->state = CHANNEL_STATE_DISABLE;
- } else if (wiphy_chan->flags &
- (IEEE80211_CHAN_RADAR |
- IEEE80211_CHAN_PASSIVE_SCAN |
- IEEE80211_CHAN_INDOOR_ONLY)) {
-
- if (wiphy_chan->flags &
- IEEE80211_CHAN_INDOOR_ONLY)
+ } else if ((wiphy_chan->flags &
+ (IEEE80211_CHAN_RADAR |
+ IEEE80211_CHAN_PASSIVE_SCAN)) ||
+ ((hdd_ctx->config->indoor_channel_support
+ == false) &&
+ (wiphy_chan->flags &
+ IEEE80211_CHAN_INDOOR_ONLY))) {
+ if ((wiphy_chan->flags &
+ IEEE80211_CHAN_INDOOR_ONLY) &&
+ (false ==
+ hdd_ctx->config->indoor_channel_support))
wiphy_chan->flags |=
IEEE80211_CHAN_PASSIVE_SCAN;
cds_chan->state = CHANNEL_STATE_DFS;
@@ -422,11 +428,50 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
(1 << WHAL_REG_EXT_FCC_CH_144))) {
cds_chan = &(reg_channels[CHAN_ENUM_144]);
cds_chan->state = CHANNEL_STATE_DISABLE;
+ if (NULL != wiphy_chan_144)
+ wiphy_chan_144->flags |= IEEE80211_CHAN_DISABLED;
}
wlan_hdd_cfg80211_update_band(wiphy, band_capability);
}
+/**
+ * hdd_set_dfs_region() - set the dfs_region
+ * @dfs_region: the dfs_region to set
+ *
+ * Return: void
+ */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) || defined(WITH_BACKPORTS)
+static void hdd_set_dfs_region(hdd_context_t *hdd_ctx,
+ enum dfs_region dfs_reg)
+{
+ cds_put_dfs_region(dfs_reg);
+}
+#else
+static void hdd_set_dfs_region(hdd_context_t *hdd_ctx,
+ enum dfs_region dfs_reg)
+{
+
+ /* remap the ctl code to dfs region code */
+ switch (hdd_ctx->reg.ctl_5g) {
+ case FCC:
+ cds_put_dfs_region(DFS_FCC_REGION);
+ break;
+ case ETSI:
+ cds_put_dfs_region(DFS_ETSI_REGION);
+ break;
+ case MKK:
+ cds_put_dfs_region(DFS_MKK_REGION);
+ break;
+ default:
+ /* set default dfs_region to FCC */
+ cds_put_dfs_region(DFS_FCC_REGION);
+ break;
+ }
+
+}
+#endif
+
/**
* hdd_regulatory_init() - regulatory_init
@@ -439,6 +484,7 @@ int hdd_regulatory_init(hdd_context_t *hdd_ctx, struct wiphy *wiphy)
{
int ret_val;
struct regulatory *reg_info;
+ enum dfs_region dfs_reg;
reg_info = &hdd_ctx->reg;
@@ -460,6 +506,10 @@ int hdd_regulatory_init(hdd_context_t *hdd_ctx, struct wiphy *wiphy)
cds_fill_and_send_ctl_to_fw(reg_info);
+ hdd_set_dfs_region(hdd_ctx, DFS_FCC_REGION);
+ cds_get_dfs_region(&dfs_reg);
+ cds_set_wma_dfs_region(dfs_reg);
+
return 0;
}
@@ -488,43 +538,6 @@ void hdd_program_country_code(hdd_context_t *hdd_ctx)
/**
- * hdd_set_dfs_region() - set the dfs_region
- * @dfs_region: the dfs_region to set
- *
- * Return: void
- */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) || defined(WITH_BACKPORTS)
-static void hdd_set_dfs_region(hdd_context_t *hdd_ctx,
- uint8_t dfs_reg)
-{
- cds_put_dfs_region(dfs_reg);
-}
-#else
-static void hdd_set_dfs_region(hdd_context_t *hdd_ctx,
- uint8_t dfs_reg)
-{
-
- /* remap the ctl code to dfs region code */
- switch (hdd_ctx->reg.ctl_5g) {
- case FCC:
- cds_put_dfs_region(DFS_FCC_REGION);
- break;
- case ETSI:
- cds_put_dfs_region(DFS_ETSI_REGION);
- break;
- case MKK:
- cds_put_dfs_region(DFS_MKK_REGION);
- break;
- default:
- /* set default dfs_region to FCC */
- cds_put_dfs_region(DFS_FCC_REGION);
- break;
- }
-
-}
-#endif
-
-/**
* hdd_restore_custom_reg_settings() - restore custom reg settings
* @wiphy: wiphy structure
* @country_alpha2: alpha2 of the country
@@ -601,7 +614,7 @@ void hdd_reg_notifier(struct wiphy *wiphy,
hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
bool vht80_allowed;
bool reset = false;
- uint8_t dfs_reg;
+ enum dfs_region dfs_reg;
hdd_info("country: %c%c, initiator %d, dfs_region: %d",
request->alpha2[0],
@@ -620,6 +633,14 @@ void hdd_reg_notifier(struct wiphy *wiphy,
return;
}
+ if (('K' == request->alpha2[0]) &&
+ ('R' == request->alpha2[1]))
+ request->dfs_region = DFS_KR_REGION;
+
+ if (('C' == request->alpha2[0]) &&
+ ('N' == request->alpha2[1]))
+ request->dfs_region = DFS_CN_REGION;
+
/* first check if this callback is in response to the driver callback */
switch (request->initiator) {
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index f6979d1ef69a..5d35da691eba 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -165,7 +165,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = {
#define WE_TXRX_FWSTATS_RESET 41
#define WE_SET_MAX_TX_POWER_2_4 42
#define WE_SET_MAX_TX_POWER_5_0 43
-/* 44 is unused */
+#define WE_SET_PKTLOG 44
/* Private ioctl for packet powe save */
#define WE_PPS_PAID_MATCH 45
#define WE_PPS_GID_MATCH 46
@@ -5158,6 +5158,11 @@ static int __iw_setint_getnone(struct net_device *dev,
break;
}
+ case WE_SET_PKTLOG:
+ {
+ hdd_process_pktlog_command(hdd_ctx, set_value);
+ break;
+ }
case WE_SET_HIGHER_DTIM_TRANSITION:
{
if (!((set_value == false) || (set_value == true))) {
@@ -9895,6 +9900,11 @@ static const struct iw_priv_args we_private_args[] = {
0,
"setTxMaxPower5G"},
+ {WE_SET_PKTLOG,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "pktlog"},
+
/* SAP has TxMax whereas STA has MaxTx, adding TxMax for STA
* as well to keep same syntax as in SAP. Now onwards, STA
* will support both */
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 18a4a7d42f95..b8731b5e5bf2 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -41,9 +41,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 1
#define QWLAN_VERSION_PATCH 0
-#define QWLAN_VERSION_EXTRA "R"
-#define QWLAN_VERSION_BUILD 23
+#define QWLAN_VERSION_EXTRA ""
+#define QWLAN_VERSION_BUILD 24
-#define QWLAN_VERSIONSTR "5.1.0.23R"
+#define QWLAN_VERSIONSTR "5.1.0.24"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index c4b7daf8a2cd..e294a02668fe 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -3174,33 +3174,17 @@ typedef struct {
* statistics, connectivity etc.
* @verbose_level: Verbose level which can be 0,1,2,3
* @flag: Flag field for future use
+ * @ini_triggered: triggered using ini
+ * @user_triggered: triggered by user
*/
struct sir_wifi_start_log {
uint32_t ring_id;
uint32_t verbose_level;
uint32_t flag;
+ bool ini_triggered;
+ uint8_t user_triggered;
};
-/**
- * enum hw_mode_ss_config - Possible spatial stream configuration
- * @SS_0x0: Unused Tx and Rx of MAC
- * @SS_1x1: 1 Tx SS and 1 Rx SS
- * @SS_2x2: 2 Tx SS and 2 Rx SS
- * @SS_3x3: 3 Tx SS and 3 Rx SS
- * @SS_4x4: 4 Tx SS and 4 Rx SS
- *
- * Note: Right now only 1x1 and 2x2 are being supported. Other modes should
- * be added when supported. Asymmetric configuration like 1x2, 2x1 are also
- * not supported now. But, they are still valid. Right now, Tx/Rx SS support is
- * 4 bits long. So, we can go upto 15x15
- */
-enum hw_mode_ss_config {
- HW_MODE_SS_0x0,
- HW_MODE_SS_1x1,
- HW_MODE_SS_2x2,
- HW_MODE_SS_3x3,
- HW_MODE_SS_4x4,
-};
/**
* enum hw_mode_bandwidth - bandwidth of wifi channel.
@@ -3230,26 +3214,6 @@ enum hw_mode_bandwidth {
};
/**
- * enum hw_mode_dbs_capab - DBS HW mode capability
- * @HW_MODE_DBS_NONE: Non DBS capable
- * @HW_MODE_DBS: DFS capable
- */
-enum hw_mode_dbs_capab {
- HW_MODE_DBS_NONE,
- HW_MODE_DBS,
-};
-
-/**
- * enum hw_mode_agile_dfs_capab - Agile DFS HW mode capability
- * @HW_MODE_AGILE_DFS_NONE: Non Agile DFS capable
- * @HW_MODE_AGILE_DFS: Agile DFS capable
- */
-enum hw_mode_agile_dfs_capab {
- HW_MODE_AGILE_DFS_NONE,
- HW_MODE_AGILE_DFS,
-};
-
-/**
* enum set_hw_mode_status - Status of set HW mode command
* @SET_HW_MODE_STATUS_OK: command successful
* @SET_HW_MODE_STATUS_EINVAL: Requested invalid hw_mode
@@ -5936,6 +5900,30 @@ struct sir_bpf_get_offload {
};
/**
+ * struct sir_wake_lock_stats - wake lock stats structure
+ * @wow_ucast_wake_up_count: Unicast wakeup count
+ * @wow_bcast_wake_up_count: Broadcast wakeup count
+ * @wow_ipv4_mcast_wake_up_count: ipv4 multicast wakeup count
+ * @wow_ipv6_mcast_wake_up_count: ipv6 multicast wakeup count
+ * @wow_ipv6_mcast_ra_stats: ipv6 multicast ra stats
+ * @wow_ipv6_mcast_ns_stats: ipv6 multicast ns stats
+ * @wow_ipv6_mcast_na_stats: ipv6 multicast na stats
+ * @wow_icmpv4_count: ipv4 icmp packet count
+ * @wow_icmpv6_count: ipv6 icmp packet count
+ */
+struct sir_wake_lock_stats {
+ uint32_t wow_ucast_wake_up_count;
+ uint32_t wow_bcast_wake_up_count;
+ uint32_t wow_ipv4_mcast_wake_up_count;
+ uint32_t wow_ipv6_mcast_wake_up_count;
+ uint32_t wow_ipv6_mcast_ra_stats;
+ uint32_t wow_ipv6_mcast_ns_stats;
+ uint32_t wow_ipv6_mcast_na_stats;
+ uint32_t wow_icmpv4_count;
+ uint32_t wow_icmpv6_count;
+};
+
+/**
* enum ht_capability_fields - HT Capabilities bit fields
* @HT_CAPS_LDPC: ldpc coding capability bit field
* @HT_CAPS_SUPPORTED_CHANNEL_SET: channel width set bit field
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index 01bdfb67ffb6..70814111a981 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -702,16 +702,12 @@ void lim_cleanup_mlm(tpAniSirGlobal mac_ctx)
* each STA associated per BSSId and deactivate/delete
* the pmfSaQueryTimer for it
*/
- if (cds_is_driver_recovering()) {
- QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
- FL("SSR is detected, proceed to clean up pmfSaQueryTimer"));
- for (bss_entry = 0; bss_entry < mac_ctx->lim.maxBssId;
- bss_entry++) {
- if (!mac_ctx->lim.gpSession[bss_entry].valid)
- continue;
- lim_deactivate_del_sta(mac_ctx, bss_entry,
- psession_entry, sta_ds);
- }
+ for (bss_entry = 0; bss_entry < mac_ctx->lim.maxBssId;
+ bss_entry++) {
+ if (!mac_ctx->lim.gpSession[bss_entry].valid)
+ continue;
+ lim_deactivate_del_sta(mac_ctx, bss_entry,
+ psession_entry, sta_ds);
}
#endif
diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h
index 345f69b06aa3..0882b9c4c31a 100644
--- a/core/pld/inc/pld_common.h
+++ b/core/pld/inc/pld_common.h
@@ -50,7 +50,8 @@ enum pld_bus_type {
PLD_BUS_TYPE_NONE = -1,
PLD_BUS_TYPE_PCIE = 0,
PLD_BUS_TYPE_SNOC,
- PLD_BUS_TYPE_SDIO
+ PLD_BUS_TYPE_SDIO,
+ PLD_BUS_TYPE_USB
};
#define PLD_MAX_FIRMWARE_SIZE (1 * 1024 * 1024)
@@ -316,6 +317,8 @@ struct pld_driver_ops {
pm_message_t state);
int (*resume)(struct device *dev,
enum pld_bus_type bus_type);
+ int (*reset_resume)(struct device *dev,
+ enum pld_bus_type bus_type);
void (*modem_status)(struct device *dev,
enum pld_bus_type bus_type,
int state);
diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c
index 0aa3017bbd90..59538421e4e7 100644
--- a/core/pld/src/pld_common.c
+++ b/core/pld/src/pld_common.c
@@ -44,10 +44,13 @@
#include "pld_pcie.h"
#include "pld_snoc.h"
#include "pld_sdio.h"
+#include "pld_usb.h"
#define PLD_PCIE_REGISTERED BIT(0)
#define PLD_SNOC_REGISTERED BIT(1)
#define PLD_SDIO_REGISTERED BIT(2)
+#define PLD_USB_REGISTERED BIT(3)
+#define PLD_BUS_MASK 0xf
static struct pld_context *pld_ctx;
@@ -238,6 +241,7 @@ int pld_register_driver(struct pld_driver_ops *ops)
}
pld_context->ops = ops;
+ pld_context->pld_driver_state = 0;
ret = pld_pcie_register_driver();
if (ret) {
@@ -260,8 +264,17 @@ int pld_register_driver(struct pld_driver_ops *ops)
}
pld_context->pld_driver_state |= PLD_SDIO_REGISTERED;
+ ret = pld_usb_register_driver();
+ if (ret) {
+ pr_err("Fail to register usb driver\n");
+ goto fail_usb;
+ }
+ pld_context->pld_driver_state |= PLD_USB_REGISTERED;
+
return ret;
+fail_usb:
+ pld_sdio_unregister_driver();
fail_sdio:
pld_snoc_unregister_driver();
fail_snoc:
@@ -301,6 +314,7 @@ void pld_unregister_driver(void)
pld_pcie_unregister_driver();
pld_snoc_unregister_driver();
pld_sdio_unregister_driver();
+ pld_usb_unregister_driver();
pld_context->pld_driver_state = 0;
@@ -460,6 +474,10 @@ int pld_get_fw_files_for_target(struct device *dev,
ret = pld_sdio_get_fw_files_for_target(pfw_files,
target_type, target_version);
break;
+ case PLD_BUS_TYPE_USB:
+ ret = pld_usb_get_fw_files_for_target(pfw_files,
+ target_type, target_version);
+ break;
default:
ret = -EINVAL;
break;
@@ -574,6 +592,8 @@ int pld_get_codeswap_struct(struct device *dev,
break;
case PLD_BUS_TYPE_SDIO:
break;
+ case PLD_BUS_TYPE_USB:
+ break;
default:
ret = -EINVAL;
break;
@@ -880,6 +900,8 @@ void pld_request_pm_qos(struct device *dev, u32 qos_val)
case PLD_BUS_TYPE_SDIO:
/* To do Add call cns API */
break;
+ case PLD_BUS_TYPE_USB:
+ break;
default:
pr_err("Invalid device type\n");
break;
@@ -1311,6 +1333,8 @@ void pld_lock_pm_sem(struct device *dev)
break;
case PLD_BUS_TYPE_SDIO:
break;
+ case PLD_BUS_TYPE_USB:
+ break;
default:
pr_err("Invalid device type\n");
break;
@@ -1333,6 +1357,8 @@ void pld_release_pm_sem(struct device *dev)
break;
case PLD_BUS_TYPE_SDIO:
break;
+ case PLD_BUS_TYPE_USB:
+ break;
default:
pr_err("Invalid device type\n");
break;
diff --git a/core/pld/src/pld_usb.c b/core/pld/src/pld_usb.c
new file mode 100644
index 000000000000..76ac2fab46a8
--- /dev/null
+++ b/core/pld/src/pld_usb.c
@@ -0,0 +1,211 @@
+/*
+ * Copyright (c) 2016 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 "pld_common.h"
+#include "pld_internal.h"
+
+#include <linux/atomic.h>
+#include <linux/usb.h>
+#include <linux/slab.h>
+#include <linux/platform_device.h>
+#include <linux/err.h>
+#include <linux/list.h>
+
+
+#define VENDOR_ATHR 0x0CF3
+static struct usb_device_id pld_usb_id_table[] = {
+ {USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ATHR, 0x9378, 0xFF, 0xFF, 0xFF)},
+ {} /* Terminating entry */
+};
+
+atomic_t pld_usb_reg_done;
+
+/**
+ * pld_usb_probe() - pld_usb_probe
+ * @interface: pointer to usb_interface structure
+ * @id: pointer to usb_device_id obtained from the enumerated device
+
+ * Return: int 0 on success and errno on failure.
+ */
+static int pld_usb_probe(struct usb_interface *interface,
+ const struct usb_device_id *id)
+{
+ struct usb_device *pdev = interface_to_usbdev(interface);
+ struct pld_context *pld_context;
+ int ret = 0;
+
+ pld_context = pld_get_global_context();
+ if (!pld_context) {
+ ret = -ENODEV;
+ goto out;
+ }
+
+ ret = pld_add_dev(pld_context, &pdev->dev, PLD_BUS_TYPE_USB);
+ if (ret)
+ goto out;
+
+ ret = pld_context->ops->probe(&pdev->dev,
+ PLD_BUS_TYPE_USB, interface, (void *)id);
+ if (ret != 0) {
+ pr_err("%s, probe returned %d", __func__, ret);
+ atomic_set(&pld_usb_reg_done, false);
+ } else {
+ atomic_set(&pld_usb_reg_done, true);
+ }
+
+out:
+ return ret;
+}
+
+/**
+ * pld_usb_remove() - Remove function for USB device
+ * @interface: pointer to usb_interface for the usb device being removed
+ *
+ * Return: void
+ */
+static void pld_usb_remove(struct usb_interface *interface)
+{
+ struct usb_device *pdev = interface_to_usbdev(interface);
+ struct pld_context *pld_context;
+
+ pld_context = pld_get_global_context();
+
+ if (!pld_context)
+ return;
+
+ if (atomic_read(&pld_usb_reg_done) != true) {
+ pr_info("%s: already de-registered!\n", __func__);
+ return;
+ }
+
+ pld_context->ops->remove(&pdev->dev, PLD_BUS_TYPE_USB);
+
+ pld_del_dev(pld_context, &pdev->dev);
+
+ atomic_set(&pld_usb_reg_done, false);
+ pr_info("%s: done!\n", __func__);
+}
+
+/**
+ * pld_usb_suspend() - Suspend callback function for power management
+ * @interface: pointer to usb_interface for the usb device
+ * @state: power state
+ *
+ * This function is to suspend the PCIE device when power management is
+ * enabled.
+ *
+ * Return: void
+ */
+static int pld_usb_suspend(struct usb_interface *interface,
+ pm_message_t state)
+{
+ struct usb_device *pdev = interface_to_usbdev(interface);
+ struct pld_context *pld_context;
+
+ pld_context = pld_get_global_context();
+ return pld_context->ops->suspend(&pdev->dev, PLD_BUS_TYPE_USB, state);
+}
+
+/**
+ * pld_usb_resume() - Resume callback function for power management
+ * @interface: pointer to usb_interface for the usb device
+ *
+ * This function is to resume the USB device when power management is
+ * enabled.
+ *
+ * Return: void
+ */
+static int pld_usb_resume(struct usb_interface *interface)
+{
+ struct pld_context *pld_context;
+ struct usb_device *pdev = interface_to_usbdev(interface);
+
+ pld_context = pld_get_global_context();
+ return pld_context->ops->resume(&pdev->dev, PLD_BUS_TYPE_USB);
+}
+
+/**
+ * pld_usb_reset_resume() - pld_usb_reset_resume
+ * @interface: pointer to usb_interface for the usb device
+ *
+ * Return: void
+ */
+static int pld_usb_reset_resume(struct usb_interface *interface)
+{
+ struct pld_context *pld_context;
+ struct usb_device *pdev = interface_to_usbdev(interface);
+
+ pld_context = pld_get_global_context();
+ return pld_context->ops->reset_resume(&pdev->dev, PLD_BUS_TYPE_USB);
+}
+
+struct usb_driver pld_usb_ops = {
+ .name = "pld_usb",
+ .id_table = pld_usb_id_table,
+ .probe = pld_usb_probe,
+ .disconnect = pld_usb_remove,
+#ifdef CONFIG_PM
+ .suspend = pld_usb_suspend,
+ .resume = pld_usb_resume,
+ .reset_resume = pld_usb_reset_resume,
+#endif
+ .supports_autosuspend = true,
+};
+
+/**
+ * pld_usb_register_driver() - registration routine for wlan usb driver
+ *
+ * Return: int negative error code on failure and 0 on success
+ */
+int pld_usb_register_driver(void)
+{
+ int status;
+
+ usb_register(&pld_usb_ops);
+
+ if (atomic_read(&pld_usb_reg_done) == true)
+ status = 0;
+ else
+ status = -1;
+
+ pr_info("%s usb_register %s, status %d\n", __func__,
+ (status == 0) ? "done" : "failed", status);
+
+ return status;
+}
+
+/**
+ * pld_usb_unregister_driver() - de-registration routine for wlan usb driver
+ *
+ * Return: void
+ */
+void pld_usb_unregister_driver(void)
+{
+ struct pld_context *pld_context;
+ pld_context = pld_get_global_context();
+
+ if (atomic_read(&pld_usb_reg_done) == false)
+ return;
+
+ pld_context->ops->remove(NULL, PLD_BUS_TYPE_USB);
+
+ atomic_set(&pld_usb_reg_done, false);
+ usb_deregister(&pld_usb_ops);
+ pr_info("%s usb_deregister done!\n", __func__);
+}
+
diff --git a/core/pld/src/pld_usb.h b/core/pld/src/pld_usb.h
new file mode 100644
index 000000000000..ad44d2a0ea63
--- /dev/null
+++ b/core/pld/src/pld_usb.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016 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 __PLD_USB_H__
+#define __PLD_USB_H__
+
+#include "pld_common.h"
+
+#if !defined(CONFIG_PLD_USB_CNSS)
+static inline int pld_usb_register_driver(void)
+{
+ return 0;
+}
+
+static inline void pld_usb_unregister_driver(void)
+{
+ return;
+}
+
+static inline int pld_usb_get_ce_id(int irq)
+{
+ return 0;
+}
+#else
+int pld_usb_register_driver(void);
+void pld_usb_unregister_driver(void);
+int pld_usb_get_ce_id(int irq);
+#endif
+
+static inline int
+pld_usb_get_fw_files_for_target(struct pld_fw_files *pfw_files,
+ u32 target_type, u32 target_version)
+{
+ pld_get_default_fw_files(pfw_files);
+ return 0;
+}
+
+#endif /*__PLD_USB_H__*/
diff --git a/core/sap/dfs/inc/radar_filters.h b/core/sap/dfs/inc/radar_filters.h
index 5837d06a27d4..0d1b6563ea50 100644
--- a/core/sap/dfs/inc/radar_filters.h
+++ b/core/sap/dfs/inc/radar_filters.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -140,3 +140,56 @@ struct dfs_pulse dfs_etsi_radars[] = {
/* 20-30us, 2000-4000 PRF, 20 pulses */
{20, 30, 2000, 4000, 0, 24, 6, 19, 33, 24, 0, 0, 0, 36}, /* Type 4 */
};
+
+struct dfs_pulse dfs_korea_radars[] = {
+ /* Korea Type 1 */
+ {18, 1, 700, 700, 0, 6, 5, 0, 1, 18, 0, 3, 1, 40},
+
+ /* Korea Type 2 */
+ {10, 1, 1800, 1800, 0, 6, 4, 0, 1, 18, 0, 3, 1, 41},
+
+ /* Korea Type 3 */
+ {70, 1, 330, 330, 0, 6, 20, 0, 2, 18, 0, 3, 1, 42},
+
+ /* Korea Type 4 */
+ {3, 1, 3003, 3003, 1, 7, 2, 0, 1, 18, 0, 0, 1, 43},
+};
+
+struct dfs_pulse dfs_china_radars[] = {
+ /* FCC NEW TYPE 0 */
+ {18, 1, 700, 700, 0, 6, 5, 0, 1, 18, 0, 3, 1, 0},
+ {18, 1, 350, 350, 0, 6, 5, 0, 1, 18, 0, 3, 0, 0},
+
+ /* FCC TYPE 6 */
+ { 9, 1, 3003, 3003, 1, 7, 5, 0, 1, 18, 0, 0, 1, 1},
+
+ /* FCC TYPE 2 */
+ {23, 5, 4347, 6666, 0, 18, 8, 0, 7, 22, 0, 3, 0, 2},
+
+ /* FCC TYPE 3 */
+ {18, 10, 2000, 5000, 0, 23, 6, 6, 13, 22, 0, 3, 0, 5},
+
+ /* FCC TYPE 4 */
+ {16, 15, 2000, 5000, 0, 25, 5, 11, 23, 22, 0, 3, 0, 11},
+
+ /*
+ * FCC NEW TYPE 1
+ * 518us to 938us pulses (min 56 pulses)
+ */
+ {57, 1, 1066, 1930, 0, 6, 20, 0, 1, 22, 0, 3, 0, 21},
+
+ /*
+ * FCC NEW TYPE 1
+ * 938us to 2000 pulses (min 26 pulses)
+ */
+ {27, 1, 500, 1066, 0, 6, 13, 0, 1, 22, 0, 3, 0, 22},
+
+ /*
+ * FCC NEW TYPE 1
+ * 2000 to 3067us pulses (min 17 pulses)
+ */
+ {18, 1, 325, 500, 0, 6, 9, 0, 1, 22, 0, 3, 0, 23},
+
+ /* CN TYPE 1 */
+ {20, 1, 1000, 1000, 0, 6, 5, 0, 1, 18, 0, 3, 1, 24},
+};
diff --git a/core/sap/dfs/src/dfs_init.c b/core/sap/dfs/src/dfs_init.c
index c67f7fcf1b03..512e8ac9cf17 100644
--- a/core/sap/dfs/src/dfs_init.c
+++ b/core/sap/dfs/src/dfs_init.c
@@ -384,53 +384,67 @@ int dfs_init_radar_filters(struct ieee80211com *ic,
dfs_print_filters(ic);
#endif
dfs->dfs_rinfo.rn_numbin5radars = numb5radars;
- if (dfs->dfs_b5radars != NULL)
+ if (dfs->dfs_b5radars != NULL) {
OS_FREE(dfs->dfs_b5radars);
+ dfs->dfs_b5radars = NULL;
+ }
- dfs->dfs_b5radars = (struct dfs_bin5radars *)os_malloc(NULL,
- numb5radars *
- sizeof(struct
- dfs_bin5radars),
- GFP_KERNEL);
- if (dfs->dfs_b5radars == NULL) {
- DFS_DPRINTK(dfs, ATH_DEBUG_DFS,
- "%s: cannot allocate memory for bin5 radars",
- __func__);
- goto bad4;
+ if (dfs->dfs_b5radars_ext_seg != NULL) {
+ OS_FREE(dfs->dfs_b5radars_ext_seg);
+ dfs->dfs_b5radars_ext_seg = NULL;
}
- if (ic->dfs_hw_bd_id != DFS_HWBD_QCA6174) {
- dfs->dfs_b5radars_ext_seg =
- (struct dfs_bin5radars *)os_malloc(NULL, numb5radars *
+ if (numb5radars) {
+ dfs->dfs_b5radars = (struct dfs_bin5radars *)os_malloc(NULL,
+ numb5radars *
+ sizeof(struct dfs_bin5radars),
+ GFP_KERNEL);
+ if (dfs->dfs_b5radars == NULL) {
+ DFS_DPRINTK(dfs, ATH_DEBUG_DFS,
+ "%s: cannot allocate memory for bin5 radars",
+ __func__);
+ goto bad4;
+ }
+
+ if (ic->dfs_hw_bd_id != DFS_HWBD_QCA6174) {
+ dfs->dfs_b5radars_ext_seg =
+ (struct dfs_bin5radars *)os_malloc(NULL,
+ numb5radars *
sizeof(struct dfs_bin5radars),
GFP_KERNEL);
- if (dfs->dfs_b5radars_ext_seg == NULL) {
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
- "%s:Fail allocate memory for ext bin5 radars",
- __func__);
- goto bad4;
+ if (dfs->dfs_b5radars_ext_seg == NULL) {
+ QDF_TRACE(QDF_MODULE_ID_SAP,
+ QDF_TRACE_LEVEL_ERROR,
+ "%s:Fail allocate memory for ext bin5 radars",
+ __func__);
+ goto bad4;
+ }
}
- }
- for (n = 0; n < numb5radars; n++) {
- dfs->dfs_b5radars[n].br_pulse = b5pulses[n];
- dfs->dfs_b5radars[n].br_pulse.b5_timewindow *=
- DFS_BIN5_TIME_WINDOW_UNITS_MULTIPLIER;
- if (dfs->dfs_b5radars[n].br_pulse.b5_rssithresh <
- min_rssithresh)
- min_rssithresh =
+ for (n = 0; n < numb5radars; n++) {
+ dfs->dfs_b5radars[n].br_pulse = b5pulses[n];
+ dfs->dfs_b5radars[n].br_pulse.b5_timewindow *=
+ DFS_BIN5_TIME_WINDOW_UNITS_MULTIPLIER;
+ if (dfs->dfs_b5radars[n].br_pulse.b5_rssithresh <
+ min_rssithresh)
+ min_rssithresh =
dfs->dfs_b5radars[n].br_pulse.b5_rssithresh;
- if (dfs->dfs_b5radars[n].br_pulse.b5_maxdur > max_pulsedur)
- max_pulsedur = dfs->dfs_b5radars[n].br_pulse.b5_maxdur;
- }
- if (ic->dfs_hw_bd_id != DFS_HWBD_QCA6174) {
- for (n = 0; n < numb5radars; n++) {
- dfs->dfs_b5radars_ext_seg[n].br_pulse = b5pulses[n];
+ if (dfs->dfs_b5radars[n].br_pulse.b5_maxdur >
+ max_pulsedur)
+ max_pulsedur =
+ dfs->dfs_b5radars[n].br_pulse.b5_maxdur;
+ }
+
+ if (ic->dfs_hw_bd_id != DFS_HWBD_QCA6174) {
+ for (n = 0; n < numb5radars; n++) {
+ dfs->dfs_b5radars_ext_seg[n].br_pulse =
+ b5pulses[n];
dfs->dfs_b5radars_ext_seg[n].br_pulse.b5_timewindow *=
- DFS_BIN5_TIME_WINDOW_UNITS_MULTIPLIER;
+ DFS_BIN5_TIME_WINDOW_UNITS_MULTIPLIER;
b5_rssithresh =
- dfs->dfs_b5radars_ext_seg[n].br_pulse.b5_rssithresh;
+ dfs->dfs_b5radars_ext_seg[n].br_pulse.b5_rssithresh;
+
if (b5_rssithresh < min_rssithresh)
min_rssithresh = b5_rssithresh;
@@ -439,6 +453,7 @@ int dfs_init_radar_filters(struct ieee80211com *ic,
if (b5_maxdur > max_pulsedur)
max_pulsedur = b5_maxdur;
+ }
}
}
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 07376204d032..97ac929553a6 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -1246,13 +1246,14 @@ bool sap_check_in_avoid_ch_list(ptSapContext sap_ctx, uint8_t channel)
*/
static uint8_t sap_apply_rules(ptSapContext sap_ctx)
{
- uint8_t num_valid_ch, dfs_region, i = 0, ch_id;
+ uint8_t num_valid_ch, i = 0, ch_id;
tAll5GChannelList *sap_all_ch = &sap_ctx->SapAllChnlList;
bool is_ch_nol = false;
bool is_out_of_range = false;
tpAniSirGlobal mac_ctx;
tHalHandle hal = CDS_GET_HAL_CB(sap_ctx->p_cds_gctx);
uint8_t preferred_location;
+ enum dfs_region dfs_region;
if (NULL == hal) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -1745,7 +1746,7 @@ bool sap_acs_channel_check(ptSapContext sapContext, uint8_t channelNumber)
if (!sapContext->acs_cfg->acs_mode)
return false;
- if ((channelNumber >= sapContext->acs_cfg->start_ch) ||
+ if ((channelNumber >= sapContext->acs_cfg->start_ch) &&
(channelNumber <= sapContext->acs_cfg->end_ch)) {
if (!sapContext->acs_cfg->ch_list) {
return false;
@@ -4853,7 +4854,7 @@ int sap_start_dfs_cac_timer(ptSapContext sapContext)
uint32_t cacTimeOut;
tHalHandle hHal = NULL;
tpAniSirGlobal pMac = NULL;
- uint8_t dfs_region;
+ enum dfs_region dfs_region;
if (sapContext == NULL) {
return 0;
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index 7a77d1963aa1..edb3aa27ef2f 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -2871,7 +2871,7 @@ wlansap_set_dfs_restrict_japan_w53(tHalHandle hHal, uint8_t disable_Dfs_W53)
{
tpAniSirGlobal pMac = NULL;
QDF_STATUS status;
- uint8_t dfs_region;
+ enum dfs_region dfs_region;
if (NULL != hHal) {
pMac = PMAC_STRUCT(hHal);
@@ -2955,7 +2955,7 @@ wlansap_set_dfs_preferred_channel_location(tHalHandle hHal,
{
tpAniSirGlobal pMac = NULL;
QDF_STATUS status;
- uint8_t dfs_region;
+ enum dfs_region dfs_region;
if (NULL != hHal) {
pMac = PMAC_STRUCT(hHal);
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index bbef6cad952f..668b3700db8e 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1209,6 +1209,7 @@ typedef struct tagCsrConfigParam {
bool bFastRoamInConIniFeatureEnabled;
uint8_t scanCfgAgingTime;
uint8_t enableTxLdpc;
+ uint8_t enableRxLDPC;
uint8_t isAmsduSupportInAMPDU;
uint8_t nSelect5GHzMargin;
uint8_t isCoalesingInIBSSAllowed;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index c4eb5ea257e6..2dd264655bdc 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -612,6 +612,7 @@ typedef struct tagCsrConfig {
uint8_t htSmps;
bool send_smps_action;
uint8_t txLdpcEnable;
+ uint8_t rxLdpcEnable;
/*
* Enable/Disable heartbeat offload
*/
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index a9e35d20e8c1..04ef192dba05 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -14446,6 +14446,8 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal,
req_msg->verbose_level = start_log.verbose_level;
req_msg->flag = start_log.flag;
req_msg->ring_id = start_log.ring_id;
+ req_msg->ini_triggered = start_log.ini_triggered;
+ req_msg->user_triggered = start_log.user_triggered;
status = sme_acquire_global_lock(&mac->sme);
if (status != QDF_STATUS_SUCCESS) {
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 3a06d55dcf2a..da177d66d690 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -2327,6 +2327,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.send_smps_action =
pParam->send_smps_action;
pMac->roam.configParam.txLdpcEnable = pParam->enableTxLdpc;
+ pMac->roam.configParam.rxLdpcEnable = pParam->enableRxLDPC;
pMac->roam.configParam.ignore_peer_erp_info =
pParam->ignore_peer_erp_info;
pMac->roam.configParam.isAmsduSupportInAMPDU =
@@ -2549,6 +2550,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->cc_switch_mode = cfg_params->cc_switch_mode;
#endif
pParam->enableTxLdpc = cfg_params->txLdpcEnable;
+ pParam->enableRxLDPC = cfg_params->rxLdpcEnable;
pParam->isAmsduSupportInAMPDU = cfg_params->isAmsduSupportInAMPDU;
pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed;
@@ -13577,6 +13579,46 @@ static void csr_add_supported_5Ghz_channels(tpAniSirGlobal mac_ctx,
}
/**
+ * csr_set_ldpc_exception() - to set allow any LDPC exception permitted
+ * @mac_ctx: Pointer to mac context
+ * @session: Pointer to SME/CSR session
+ * @channel: Given channel number where connection will go
+ * @usr_cfg_rx_ldpc: User provided RX LDPC setting
+ *
+ * This API will check if hardware allows LDPC to be enabled for provided
+ * channel and user has enabled the RX LDPC selection
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS csr_set_ldpc_exception(tpAniSirGlobal mac_ctx,
+ tCsrRoamSession *session, uint8_t channel,
+ bool usr_cfg_rx_ldpc)
+{
+ if (!mac_ctx) {
+ sms_log(mac_ctx, LOGE,
+ FL("mac_ctx is NULL"));
+ return QDF_STATUS_E_FAILURE;
+ }
+ if (!session) {
+ sms_log(mac_ctx, LOGE,
+ FL("session is NULL"));
+ return QDF_STATUS_E_FAILURE;
+ }
+ if (usr_cfg_rx_ldpc && wma_is_rx_ldpc_supported_for_channel(channel)) {
+ session->htConfig.ht_rx_ldpc = 1;
+ session->vht_config.ldpc_coding = 1;
+ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
+ "LDPC enable for chnl[%d]", channel);
+ } else {
+ session->htConfig.ht_rx_ldpc = 0;
+ session->vht_config.ldpc_coding = 0;
+ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
+ "LDPC disable for chnl[%d]", channel);
+ }
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
* The communication between HDD and LIM is thru mailbox (MB).
* Both sides will access the data structure "tSirSmeJoinReq".
* The rule is, while the components of "tSirSmeJoinReq" can be accessed in the
@@ -14075,6 +14117,15 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
(&pIes->Country.triplets[0]));
csr_apply_power2_current(pMac);
}
+ /*
+ * If RX LDPC has been disabled for 2.4GHz channels and enabled
+ * for 5Ghz for STA like persona here is how to handle those
+ * cases here (by now channel has been decided).
+ */
+ if (eSIR_INFRASTRUCTURE_MODE == csr_join_req->bsstype)
+ csr_set_ldpc_exception(pMac, pSession,
+ pBssDescription->channelId,
+ pMac->roam.configParam.rxLdpcEnable);
qdf_mem_copy(&csr_join_req->htConfig,
&pSession->htConfig, sizeof(tSirHTConfig));
qdf_mem_copy(&csr_join_req->vht_config, &pSession->vht_config,
@@ -14871,6 +14922,10 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId
qdf_mem_copy(&pMsg->extendedRateSet,
&pParam->extendedRateSet,
sizeof(tSirMacRateSet));
+ if (eSIR_IBSS_MODE == pMsg->bssType)
+ csr_set_ldpc_exception(pMac, pSession,
+ pMsg->channelId,
+ pMac->roam.configParam.rxLdpcEnable);
qdf_mem_copy(&pMsg->vht_config,
&pSession->vht_config,
sizeof(pSession->vht_config));
diff --git a/core/utils/pktlog/include/pktlog_ac.h b/core/utils/pktlog/include/pktlog_ac.h
index 7c72bbc9f23f..9d213e0c76bb 100644
--- a/core/utils/pktlog/include/pktlog_ac.h
+++ b/core/utils/pktlog/include/pktlog_ac.h
@@ -66,10 +66,13 @@ extern void pktlog_release_buf(struct hif_opaque_softc *scn);
ssize_t pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos,
struct ath_pktlog_info *pl_info, bool *read_complete);
int pktlog_send_per_pkt_stats_to_user(void);
+A_STATUS
+wdi_pktlog_unsubscribe(struct ol_txrx_pdev_t *txrx_pdev, uint32_t log_state);
struct ol_pl_arch_dep_funcs {
void (*pktlog_init)(struct hif_opaque_softc *scn);
- int (*pktlog_enable)(struct hif_opaque_softc *scn, int32_t log_state);
+ int (*pktlog_enable)(struct hif_opaque_softc *scn, int32_t log_state,
+ bool ini, uint8_t user);
int (*pktlog_setsize)(struct hif_opaque_softc *scn, int32_t log_state);
int (*pktlog_disable)(struct hif_opaque_softc *scn);
};
@@ -82,6 +85,8 @@ struct ol_pl_os_dep_funcs {
struct ath_pktlog_wmi_params {
WMI_PKTLOG_EVENT pktlog_event;
WMI_CMD_ID cmd_id;
+ bool ini_triggered;
+ uint8_t user_triggered;
};
extern struct ol_pl_arch_dep_funcs ol_pl_funcs;
@@ -93,7 +98,8 @@ struct ol_pktlog_dev_t {
struct ath_pktlog_info *pl_info;
ol_ath_generic_softc_handle scn;
char *name;
- bool tgt_pktlog_enabled;
+ bool tgt_pktlog_alloced;
+ bool is_pktlog_cb_subscribed;
bool mt_pktlog_enabled;
uint32_t htc_err_cnt;
uint8_t htc_endpoint;
@@ -124,7 +130,8 @@ extern struct ol_pktlog_dev_t ol_pl_dev;
void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data);
void pktlog_init(struct hif_opaque_softc *scn);
-int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state);
+int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
+ bool, uint8_t);
int pktlog_setsize(struct hif_opaque_softc *scn, int32_t log_state);
int pktlog_disable(struct hif_opaque_softc *scn);
int pktlogmod_init(void *context);
@@ -153,7 +160,8 @@ static inline void pktlog_init(struct hif_opaque_softc *scn)
{
return;
}
-static int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state)
+static int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
+ bool ini, uint8_t user)
{
return 0;
}
diff --git a/core/utils/pktlog/include/pktlog_ac_i.h b/core/utils/pktlog/include/pktlog_ac_i.h
index 5c4e9d6a9265..78fd0ebd26f3 100644
--- a/core/utils/pktlog/include/pktlog_ac_i.h
+++ b/core/utils/pktlog/include/pktlog_ac_i.h
@@ -67,6 +67,8 @@ A_STATUS process_rx_info(void *pdev, void *data);
A_STATUS process_rx_info_remote(void *pdev, void *data);
A_STATUS process_rate_find(void *pdev, void *data);
A_STATUS process_rate_update(void *pdev, void *data);
+A_STATUS process_sw_event(void *pdev, void *data);
+
#endif /* REMOVE_PKT_LOG */
#endif
diff --git a/core/utils/pktlog/linux_ac.c b/core/utils/pktlog/linux_ac.c
index 4289ab331a0e..b92de81f683d 100644
--- a/core/utils/pktlog/linux_ac.c
+++ b/core/utils/pktlog/linux_ac.c
@@ -231,7 +231,8 @@ qdf_sysctl_decl(ath_sysctl_pktlog_enable, ctl, write, filp, buffer, lenp, ppos)
lenp, ppos);
if (ret == 0)
ret = pl_dev->pl_funcs->pktlog_enable(
- (struct hif_opaque_softc *)scn, enable);
+ (struct hif_opaque_softc *)scn, enable,
+ cds_is_packet_log_enabled(), 0);
else
printk(PKTLOG_TAG "%s:proc_dointvec failed\n",
__func__);
@@ -438,7 +439,7 @@ static int pktlog_attach(struct hif_opaque_softc *scn)
* initialize log info
* might be good to move to pktlog_init
*/
- /* pl_dev->tgt_pktlog_enabled = false; */
+ /* pl_dev->tgt_pktlog_alloced = false; */
pl_info_lnx->proc_entry = NULL;
pl_info_lnx->sysctl_header = NULL;
@@ -491,10 +492,18 @@ static void pktlog_sysctl_unregister(struct ol_pktlog_dev_t *pl_dev)
static void pktlog_detach(struct hif_opaque_softc *scn)
{
- struct ol_pktlog_dev_t *pl_dev = (struct ol_pktlog_dev_t *)
- get_pl_handle(scn);
+ struct ol_txrx_pdev_t *txrx_pdev;
+ struct ol_pktlog_dev_t *pl_dev;
struct ath_pktlog_info *pl_info;
+ txrx_pdev = cds_get_context(QDF_MODULE_ID_TXRX);
+ if (!txrx_pdev) {
+ printk("%s: Invalid txrx_pdev context\n", __func__);
+ ASSERT(0);
+ return;
+ }
+
+ pl_dev = txrx_pdev->pl_dev;
if (!pl_dev) {
printk("%s: Invalid pktlog context\n", __func__);
ASSERT(0);
@@ -506,8 +515,10 @@ static void pktlog_detach(struct hif_opaque_softc *scn)
pktlog_sysctl_unregister(pl_dev);
pktlog_cleanup(pl_info);
- if (pl_info->buf)
+ if (pl_info->buf) {
pktlog_release_buf(scn);
+ pl_dev->tgt_pktlog_alloced = false;
+ }
if (pl_dev) {
kfree(pl_info);
@@ -1034,15 +1045,7 @@ void pktlogmod_exit(void *context)
if (!pl_dev || g_pktlog_pde == NULL)
return;
- /*
- * Disable firmware side pktlog function
- */
- if (pl_dev->tgt_pktlog_enabled) {
- if (pl_dev->pl_funcs->pktlog_enable(scn, 0)) {
- printk("%s: cannot disable pktlog in the target\n",
- __func__);
- }
- }
+
pktlog_detach(scn);
/*
* pdev kill needs to be implemented
diff --git a/core/utils/pktlog/pktlog_ac.c b/core/utils/pktlog/pktlog_ac.c
index 34c3008fa5ce..db6284871bc4 100644
--- a/core/utils/pktlog/pktlog_ac.c
+++ b/core/utils/pktlog/pktlog_ac.c
@@ -53,6 +53,7 @@ wdi_event_subscribe PKTLOG_RX_SUBSCRIBER;
wdi_event_subscribe PKTLOG_RX_REMOTE_SUBSCRIBER;
wdi_event_subscribe PKTLOG_RCFIND_SUBSCRIBER;
wdi_event_subscribe PKTLOG_RCUPDATE_SUBSCRIBER;
+wdi_event_subscribe PKTLOG_SW_EVENT_SUBSCRIBER;
struct ol_pl_arch_dep_funcs ol_pl_funcs = {
.pktlog_init = pktlog_init,
@@ -73,7 +74,8 @@ void ol_pl_sethandle(ol_pktlog_dev_handle *pl_handle,
}
static A_STATUS pktlog_wma_post_msg(WMI_PKTLOG_EVENT event_types,
- WMI_CMD_ID cmd_id)
+ WMI_CMD_ID cmd_id, bool ini_triggered,
+ uint8_t user_triggered)
{
cds_msg_t msg = { 0 };
QDF_STATUS status;
@@ -86,6 +88,8 @@ static A_STATUS pktlog_wma_post_msg(WMI_PKTLOG_EVENT event_types,
param->cmd_id = cmd_id;
param->pktlog_event = event_types;
+ param->ini_triggered = ini_triggered;
+ param->user_triggered = user_triggered;
msg.type = WMA_PKTLOG_ENABLE_REQ;
msg.bodyptr = param;
@@ -101,8 +105,9 @@ static A_STATUS pktlog_wma_post_msg(WMI_PKTLOG_EVENT event_types,
return A_OK;
}
-static inline A_STATUS pktlog_enable_tgt(struct hif_opaque_softc *_scn,
- uint32_t log_state)
+static inline A_STATUS
+pktlog_enable_tgt(struct hif_opaque_softc *_scn, uint32_t log_state,
+ bool ini_triggered, uint8_t user_triggered)
{
uint32_t types = 0;
@@ -118,7 +123,11 @@ static inline A_STATUS pktlog_enable_tgt(struct hif_opaque_softc *_scn,
if (log_state & ATH_PKTLOG_RCUPDATE)
types |= WMI_PKTLOG_EVENT_RCU;
- return pktlog_wma_post_msg(types, WMI_PDEV_PKTLOG_ENABLE_CMDID);
+ if (log_state & ATH_PKTLOG_SW_EVENT)
+ types |= WMI_PKTLOG_EVENT_SW;
+
+ return pktlog_wma_post_msg(types, WMI_PDEV_PKTLOG_ENABLE_CMDID,
+ ini_triggered, user_triggered);
}
static inline A_STATUS
@@ -159,6 +168,14 @@ wdi_pktlog_subscribe(struct ol_txrx_pdev_t *txrx_pdev, int32_t log_state)
return A_ERROR;
}
}
+ if (log_state & ATH_PKTLOG_SW_EVENT) {
+ if (wdi_event_sub(txrx_pdev,
+ &PKTLOG_SW_EVENT_SUBSCRIBER,
+ WDI_EVENT_SW_EVENT)) {
+ return A_ERROR;
+ }
+ }
+
return A_OK;
}
@@ -220,12 +237,23 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data)
}
break;
}
+ case WDI_EVENT_SW_EVENT:
+ {
+ /*
+ * process SW EVENT message
+ */
+ if (process_sw_event(pdev, log_data)) {
+ printk("Unable to process SW_EVENT\n");
+ return;
+ }
+ break;
+ }
default:
break;
}
}
-static inline A_STATUS
+A_STATUS
wdi_pktlog_unsubscribe(struct ol_txrx_pdev_t *txrx_pdev, uint32_t log_state)
{
if (log_state & ATH_PKTLOG_TX) {
@@ -260,6 +288,13 @@ wdi_pktlog_unsubscribe(struct ol_txrx_pdev_t *txrx_pdev, uint32_t log_state)
return A_ERROR;
}
}
+ if (log_state & ATH_PKTLOG_RCUPDATE) {
+ if (wdi_event_unsub(txrx_pdev,
+ &PKTLOG_SW_EVENT_SUBSCRIBER,
+ WDI_EVENT_SW_EVENT)) {
+ return A_ERROR;
+ }
+ }
return A_OK;
}
@@ -278,16 +313,17 @@ int pktlog_disable(struct hif_opaque_softc *scn)
pl_dev = txrx_pdev->pl_dev;
pl_info = pl_dev->pl_info;
- if (pktlog_wma_post_msg(0, WMI_PDEV_PKTLOG_DISABLE_CMDID)) {
+ if (pktlog_wma_post_msg(0, WMI_PDEV_PKTLOG_DISABLE_CMDID, 0, 0)) {
printk("Failed to disable pktlog in target\n");
return -1;
}
- if (wdi_pktlog_unsubscribe(txrx_pdev, pl_info->log_state)) {
+ if (pl_dev->is_pktlog_cb_subscribed &&
+ wdi_pktlog_unsubscribe(txrx_pdev, pl_info->log_state)) {
printk("Cannot unsubscribe pktlog from the WDI\n");
return -1;
}
-
+ pl_dev->is_pktlog_cb_subscribed = false;
return 0;
}
@@ -325,9 +361,11 @@ void pktlog_init(struct hif_opaque_softc *scn)
PKTLOG_RX_REMOTE_SUBSCRIBER.callback = pktlog_callback;
PKTLOG_RCFIND_SUBSCRIBER.callback = pktlog_callback;
PKTLOG_RCUPDATE_SUBSCRIBER.callback = pktlog_callback;
+ PKTLOG_SW_EVENT_SUBSCRIBER.callback = pktlog_callback;
}
-int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state)
+int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
+ bool ini_triggered, uint8_t user_triggered)
{
struct ol_pktlog_dev_t *pl_dev;
struct ath_pktlog_info *pl_info;
@@ -359,7 +397,7 @@ int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state)
if (!pl_info)
return 0;
- if (log_state != 0 && !pl_dev->tgt_pktlog_enabled) {
+ if (!pl_dev->tgt_pktlog_alloced) {
if (pl_info->buf == NULL) {
error = pktlog_alloc_buf(scn);
@@ -387,25 +425,25 @@ int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state)
pl_info->start_time_thruput = os_get_timestamp();
pl_info->start_time_per = pl_info->start_time_thruput;
+ pl_dev->tgt_pktlog_alloced = true;
+ }
+
+ if (log_state != 0) {
/* WDI subscribe */
- if (wdi_pktlog_subscribe(txrx_pdev, log_state)) {
+ if ((!pl_dev->is_pktlog_cb_subscribed) &&
+ wdi_pktlog_subscribe(txrx_pdev, log_state)) {
printk("Unable to subscribe to the WDI %s\n", __func__);
return -1;
}
+ pl_dev->is_pktlog_cb_subscribed = true;
/* WMI command to enable pktlog on the firmware */
- if (pktlog_enable_tgt(scn, log_state)) {
+ if (pktlog_enable_tgt(scn, log_state, ini_triggered,
+ user_triggered)) {
printk("Device cannot be enabled, %s\n", __func__);
return -1;
- } else {
- pl_dev->tgt_pktlog_enabled = true;
}
- } else if (!log_state && pl_dev->tgt_pktlog_enabled) {
+ } else {
pl_dev->pl_funcs->pktlog_disable(scn);
- pl_dev->tgt_pktlog_enabled = false;
- if (wdi_pktlog_unsubscribe(txrx_pdev, pl_info->log_state)) {
- printk("Cannot unsubscribe pktlog from the WDI\n");
- return -1;
- }
}
pl_info->log_state = log_state;
@@ -439,8 +477,17 @@ int pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
return -EINVAL;
}
- if (pl_info->buf != NULL)
+ if (pl_info->buf != NULL) {
+ if (pl_dev->is_pktlog_cb_subscribed &&
+ wdi_pktlog_unsubscribe(pdev_txrx_handle,
+ pl_info->log_state)) {
+ printk("Cannot unsubscribe pktlog from the WDI\n");
+ return -EFAULT;
+ }
pktlog_release_buf(scn);
+ pl_dev->is_pktlog_cb_subscribed = false;
+ pl_dev->tgt_pktlog_alloced = false;
+ }
if (size != 0)
pl_info->buf_size = size;
@@ -485,6 +532,9 @@ void pktlog_process_fw_msg(uint32_t *buff)
else if (log_type == PKTLOG_TYPE_RX_STAT)
wdi_event_handler(WDI_EVENT_RX_DESC,
txrx_pdev, pl_hdr);
+ else if (log_type == PKTLOG_TYPE_SW_EVENT)
+ wdi_event_handler(WDI_EVENT_SW_EVENT,
+ txrx_pdev, pl_hdr);
}
diff --git a/core/utils/pktlog/pktlog_internal.c b/core/utils/pktlog/pktlog_internal.c
index 0519d17e0836..7038b6ff4c3e 100644
--- a/core/utils/pktlog/pktlog_internal.c
+++ b/core/utils/pktlog/pktlog_internal.c
@@ -700,6 +700,70 @@ A_STATUS process_rate_find(void *pdev, void *data)
return A_OK;
}
+A_STATUS process_sw_event(void *pdev, void *data)
+{
+ struct ol_pktlog_dev_t *pl_dev;
+ struct ath_pktlog_hdr pl_hdr;
+ struct ath_pktlog_info *pl_info;
+ size_t log_size;
+
+ /*
+ * Will be uncommented when the rate control find
+ * for pktlog is implemented in the firmware.
+ * Currently derived from the TX PPDU status
+ */
+ struct ath_pktlog_sw_event sw_event;
+ uint32_t *pl_tgt_hdr;
+
+ if (!pdev) {
+ qdf_print("Invalid pdev in %s\n", __func__);
+ return A_ERROR;
+ }
+ if (!data) {
+ qdf_print("Invalid data in %s\n", __func__);
+ return A_ERROR;
+ }
+
+ pl_tgt_hdr = (uint32_t *) data;
+ /*
+ * Makes the short words (16 bits) portable b/w little endian
+ * and big endian
+ */
+ pl_hdr.flags = (*(pl_tgt_hdr + ATH_PKTLOG_HDR_FLAGS_OFFSET) &
+ ATH_PKTLOG_HDR_FLAGS_MASK) >>
+ ATH_PKTLOG_HDR_FLAGS_SHIFT;
+ pl_hdr.missed_cnt = (*(pl_tgt_hdr + ATH_PKTLOG_HDR_MISSED_CNT_OFFSET) &
+ ATH_PKTLOG_HDR_MISSED_CNT_MASK) >>
+ ATH_PKTLOG_HDR_MISSED_CNT_SHIFT;
+#ifdef HELIUMPLUS
+ pl_hdr.log_type = (*(pl_tgt_hdr + ATH_PKTLOG_HDR_LOG_TYPE_OFFSET) &
+ ATH_PKTLOG_HDR_LOG_TYPE_MASK) >>
+ ATH_PKTLOG_HDR_LOG_TYPE_SHIFT;
+ pl_hdr.macId = (*(pl_tgt_hdr + ATH_PKTLOG_HDR_MAC_ID_OFFSET) &
+ ATH_PKTLOG_HDR_MAC_ID_MASK) >>
+ ATH_PKTLOG_HDR_MAC_ID_SHIFT;
+#else
+ pl_hdr.log_type = (*(pl_tgt_hdr + ATH_PKTLOG_HDR_LOG_TYPE_OFFSET) &
+ ATH_PKTLOG_HDR_LOG_TYPE_MASK) >>
+ ATH_PKTLOG_HDR_LOG_TYPE_SHIFT;
+#endif
+
+ pl_hdr.size = (*(pl_tgt_hdr + ATH_PKTLOG_HDR_SIZE_OFFSET) &
+ ATH_PKTLOG_HDR_SIZE_MASK) >> ATH_PKTLOG_HDR_SIZE_SHIFT;
+ pl_hdr.timestamp = *(pl_tgt_hdr + ATH_PKTLOG_HDR_TIMESTAMP_OFFSET);
+ pl_dev = ((struct ol_txrx_pdev_t *)pdev)->pl_dev;
+ pl_info = pl_dev->pl_info;
+ log_size = pl_hdr.size;
+ sw_event.sw_event = (void *)pktlog_getbuf(pl_dev, pl_info,
+ log_size, &pl_hdr);
+
+ qdf_mem_copy(sw_event.sw_event,
+ ((char *)data + sizeof(struct ath_pktlog_hdr)),
+ pl_hdr.size);
+
+ return A_OK;
+}
+
A_STATUS process_rate_update(void *pdev, void *data)
{
struct ol_pktlog_dev_t *pl_dev;
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index 1665af613c16..9fb309ab1a91 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -158,6 +158,8 @@
#define WMA_ICMP_V6_HEADER_OFFSET (6 + 6 + 2 + 6)
/* WMA_ICMP_V6_TYPE_OFFSET = sa(6) + da(6) + eth_type(2) + 40 */
#define WMA_ICMP_V6_TYPE_OFFSET (6 + 6 + 2 + 40)
+/* WMA_IPV4_PROTOCOL = sa(6) + da(6) + eth_type(2) + 9 */
+#define WMA_IPV4_PROTOCOL (6 + 6 + 2 + 9)
#define WMA_ICMP_V6_HEADER_TYPE (0x3A)
#define WMA_ICMP_V6_RA_TYPE (0x86)
#define WMA_ICMP_V6_NS_TYPE (0x87)
@@ -165,6 +167,7 @@
#define WMA_BCAST_MAC_ADDR (0xFF)
#define WMA_MCAST_IPV4_MAC_ADDR (0x01)
#define WMA_MCAST_IPV6_MAC_ADDR (0x33)
+#define WMA_ICMP_PROTOCOL (0x01)
#define WMA_IS_EAPOL_GET_MIN_LEN 14
#define WMA_EAPOL_SUBTYPE_GET_MIN_LEN 21
@@ -240,7 +243,7 @@ enum ds_mode {
#define WMA_NUM_BITS_IN_BYTE 8
#define WMA_AP_WOW_DEFAULT_PTRN_MAX 4
-#define WMA_STA_WOW_DEFAULT_PTRN_MAX 4
+#define WMA_STA_WOW_DEFAULT_PTRN_MAX 5
#define WMA_BSS_STATUS_STARTED 0x1
#define WMA_BSS_STATUS_STOPPED 0x2
@@ -1263,6 +1266,8 @@ struct extended_caps {
* @wow_ipv6_mcast_ra_stats: WoW IPV6 mcast RA packet wake up count
* @wow_ipv6_mcast_ns_stats: WoW IPV6 mcast NS packet wake up count
* @wow_ipv6_mcast_na_stats: WoW IPV6 mcast NA packet wake up count
+ * @wow_icmpv4_count: WoW ipv4 icmp packet wake up count
+ * @wow_icmpv6_count: WoW ipv6 icmp packet wake up count
* @dual_mac_cfg: Dual mac configuration params for scan and fw mode
*
* @max_scan: maximum scan requests than can be queued
@@ -1423,6 +1428,8 @@ typedef struct {
uint32_t wow_ipv6_mcast_ra_stats;
uint32_t wow_ipv6_mcast_ns_stats;
uint32_t wow_ipv6_mcast_na_stats;
+ uint32_t wow_icmpv4_count;
+ uint32_t wow_icmpv6_count;
uint32_t wow_oem_response_wake_up_count;
/* OCB request contexts */
@@ -2112,7 +2119,7 @@ int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
uint32_t len);
int wma_mgmt_tx_bundle_completion_handler(void *handle,
uint8_t *cmpl_event_params, uint32_t len);
-void wma_set_dfs_region(tp_wma_handle wma, uint8_t dfs_region);
+void wma_set_dfs_region(tp_wma_handle wma, enum dfs_region dfs_region);
uint32_t wma_get_vht_ch_width(void);
QDF_STATUS
wma_config_debug_module_cmd(wmi_unified_t wmi_handle, A_UINT32 param,
diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h
index 00b64767a203..69aba4c84d06 100644
--- a/core/wma/inc/wma_api.h
+++ b/core/wma/inc/wma_api.h
@@ -38,6 +38,8 @@
#include "htc_api.h"
#endif
#include "lim_global.h"
+#include "cds_concurrency.h"
+#include "cds_utils.h"
typedef void *WMA_HANDLE;
@@ -71,6 +73,25 @@ typedef enum {
GEN_VDEV_ROAM_SYNCH_DELAY,
} GEN_PARAM;
+/**
+ * struct wma_caps_per_phy - various caps per phy
+ * @ht_2g: entire HT cap for 2G band in terms of 32 bit flag
+ * @ht_5g: entire HT cap for 5G band in terms of 32 bit flag
+ * @vht_2g: entire VHT cap for 2G band in terms of 32 bit flag
+ * @vht_5g: entire VHT cap for 5G band in terms of 32 bit flag
+ * @he_2g: entire HE cap for 2G band in terms of 32 bit flag
+ * @he_5g: entire HE cap for 5G band in terms of 32 bit flag
+ */
+struct wma_caps_per_phy {
+ uint32_t ht_2g;
+ uint32_t ht_5g;
+ uint32_t vht_2g;
+ uint32_t vht_5g;
+ uint32_t he_2g;
+ uint32_t he_5g;
+};
+
+
#define VDEV_CMD 1
#define PDEV_CMD 2
#define GEN_CMD 3
@@ -197,6 +218,9 @@ bool wma_get_prev_agile_dfs_config(void);
bool wma_get_prev_dbs_scan_config(void);
bool wma_get_prev_dbs_plus_agile_scan_config(void);
bool wma_get_prev_single_mac_scan_with_dfs_config(void);
+QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
+ enum hw_mode_dbs_capab hw_mode, enum cds_band_type band);
+bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel);
#define LRO_IPV4_SEED_ARR_SZ 5
#define LRO_IPV6_SEED_ARR_SZ 11
@@ -268,4 +292,5 @@ static inline QDF_STATUS wma_register_ndp_cb(QDF_STATUS (*pe_ndp_event_handler)
bool wma_is_p2p_lo_capable(void);
QDF_STATUS wma_p2p_lo_start(struct sir_p2p_lo_start *params);
QDF_STATUS wma_p2p_lo_stop(u_int32_t vdev_id);
+QDF_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats);
#endif
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index 6ca99ebe73fb..11b6d1d40cdd 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -204,7 +204,7 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
- wmi_roam_offload_tlv_param *
+ roam_offload_param *
roam_offload_params,
tSirRoamOffloadScanReq *roam_req);
#endif
@@ -794,10 +794,15 @@ int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
struct t_bad_peer_txtcl_config *config);
-
+#else
+static inline QDF_STATUS
+wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
+ struct t_bad_peer_txtcl_config *config)
+{
+ return QDF_STATUS_E_FAILURE;
+}
#endif
-
QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
t_thermal_mgmt *pThermalParams);
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index a0ef65830b2b..e1d7c5e79b96 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -1777,13 +1777,6 @@ QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
return wma_set_peer_rate_report_condition(wma, config);
}
-#else
-
-QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
- struct t_bad_peer_txtcl_config *config)
-{
- return QDF_STATUS_E_FAILURE;
-}
#endif /* defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL) */
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 57b9c351c38d..2af766ed6a4a 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -1400,21 +1400,17 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
peer, false);
}
- if (wma->interfaces[resp_event->vdev_id].vdev_up) {
- if (wmi_unified_vdev_down_send(wma->wmi_handle,
+ if (wmi_unified_vdev_down_send(wma->wmi_handle,
resp_event->vdev_id) !=
- QDF_STATUS_SUCCESS) {
- WMA_LOGE("Failed to send vdev down: vdev %d",
- resp_event->vdev_id);
- } else {
- wma->interfaces[resp_event->vdev_id].vdev_up =
- false;
+ QDF_STATUS_SUCCESS) {
+ WMA_LOGE("Failed to send vdev down cmd: vdev %d",
+ resp_event->vdev_id);
+ } else {
+ wma->interfaces[resp_event->vdev_id].vdev_up = false;
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
- if (mac_ctx->sap.sap_channel_avoidance)
- wma_find_mcc_ap(wma,
- resp_event->vdev_id, false);
+ if (mac_ctx->sap.sap_channel_avoidance)
+ wma_find_mcc_ap(wma, resp_event->vdev_id, false);
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- }
}
ol_txrx_vdev_flush(iface->handle);
WMA_LOGD("%s, vdev_id: %d, un-pausing tx_ll_queue for VDEV_STOP rsp",
@@ -2404,21 +2400,16 @@ void wma_vdev_resp_timer(void *data)
peer, false);
}
- if (wma->interfaces[tgt_req->vdev_id].vdev_up) {
- if (wmi_unified_vdev_down_send(wma->wmi_handle,
- tgt_req->vdev_id) !=
- QDF_STATUS_SUCCESS) {
- WMA_LOGE("Failed to send vdev down: vdev %d",
- tgt_req->vdev_id);
- } else {
- wma->interfaces[tgt_req->vdev_id].vdev_up =
- false;
+ if (wmi_unified_vdev_down_send(wma->wmi_handle,
+ tgt_req->vdev_id) != QDF_STATUS_SUCCESS) {
+ WMA_LOGE("Failed to send vdev down cmd: vdev %d",
+ tgt_req->vdev_id);
+ } else {
+ wma->interfaces[tgt_req->vdev_id].vdev_up = false;
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
- if (mac_ctx->sap.sap_channel_avoidance)
- wma_find_mcc_ap(wma, tgt_req->vdev_id,
- false);
+ if (mac_ctx->sap.sap_channel_avoidance)
+ wma_find_mcc_ap(wma, tgt_req->vdev_id, false);
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- }
}
ol_txrx_vdev_flush(iface->handle);
WMA_LOGD("%s, vdev_id: %d, un-pausing tx_ll_queue for WDA_DELETE_BSS_REQ timeout",
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index f2c8a87ad3a2..54c1937bce7c 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -2224,19 +2224,12 @@ QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle,
tp_wma_handle wma_handle = (tp_wma_handle) handle;
int ret;
- /*Check if packet log is enabled in cfg.ini */
- if (!cds_is_packet_log_enabled()) {
- WMA_LOGE("%s:pkt log is not enabled in cfg.ini", __func__);
- return QDF_STATUS_E_FAILURE;
- }
-
ret = wmi_unified_pktlog_wmi_send_cmd(wma_handle->wmi_handle,
- params->pktlog_event,
- params->cmd_id);
+ params->pktlog_event,
+ params->cmd_id, params->user_triggered);
if (ret)
return QDF_STATUS_E_FAILURE;
-
return QDF_STATUS_SUCCESS;
}
#endif /* REMOVE_PKT_LOG */
@@ -2357,6 +2350,8 @@ static const u8 *wma_wow_wake_reason_str(A_INT32 wake_reason)
return "REASSOC_RES_RECV";
case WOW_REASON_ACTION_FRAME_RECV:
return "ACTION_FRAME_RECV";
+ case WOW_REASON_BPF_ALLOW:
+ return "WOW_REASON_BPF_ALLOW";
}
return "unknown";
}
@@ -2369,7 +2364,7 @@ static const u8 *wma_wow_wake_reason_str(A_INT32 wake_reason)
*/
static void wma_wow_wake_up_stats_display(tp_wma_handle wma)
{
- WMA_LOGA("uc %d bc %d v4_mc %d v6_mc %d ra %d ns %d na %d pno_match %d pno_complete %d gscan %d low_rssi %d rssi_breach %d oem %d",
+ WMA_LOGA("uc %d bc %d v4_mc %d v6_mc %d ra %d ns %d na %d pno_match %d pno_complete %d gscan %d low_rssi %d rssi_breach %d icmp %d icmpv6 %d oem %d",
wma->wow_ucast_wake_up_count,
wma->wow_bcast_wake_up_count,
wma->wow_ipv4_mcast_wake_up_count,
@@ -2382,6 +2377,8 @@ static void wma_wow_wake_up_stats_display(tp_wma_handle wma)
wma->wow_gscan_wake_up_count,
wma->wow_low_rssi_wake_up_count,
wma->wow_rssi_breach_wake_up_count,
+ wma->wow_icmpv4_count,
+ wma->wow_icmpv6_count,
wma->wow_oem_response_wake_up_count);
return;
@@ -2396,12 +2393,13 @@ static void wma_wow_wake_up_stats_display(tp_wma_handle wma)
*/
static void wma_wow_ipv6_mcast_stats(tp_wma_handle wma, uint8_t *data)
{
- static const uint8_t ipv6_mcast[] = {0x86, 0xDD};
+ static const uint8_t ipv6_ether_type[] = {0x86, 0xDD};
- if (!memcmp(ipv6_mcast, (data + WMA_ETHER_TYPE_OFFSET),
- sizeof(ipv6_mcast))) {
+ if (!memcmp(ipv6_ether_type, (data + WMA_ETHER_TYPE_OFFSET),
+ sizeof(ipv6_ether_type))) {
if (WMA_ICMP_V6_HEADER_TYPE ==
*(data + WMA_ICMP_V6_HEADER_OFFSET)) {
+ wma->wow_icmpv6_count++;
if (WMA_ICMP_V6_RA_TYPE ==
*(data + WMA_ICMP_V6_TYPE_OFFSET))
wma->wow_ipv6_mcast_ra_stats++;
@@ -2444,8 +2442,17 @@ static void wma_wow_wake_up_stats(tp_wma_handle wma, uint8_t *data,
case WOW_REASON_PATTERN_MATCH_FOUND:
if (WMA_BCAST_MAC_ADDR == *data) {
wma->wow_bcast_wake_up_count++;
+ if (len >= WMA_IPV4_PROTO_GET_MIN_LEN &&
+ qdf_nbuf_data_is_icmp_pkt(data))
+ wma->wow_icmpv4_count++;
+ else if ((len > WMA_ICMP_V6_TYPE_OFFSET) &&
+ qdf_nbuf_data_is_icmpv6_pkt(data))
+ wma->wow_icmpv6_count++;
} else if (WMA_MCAST_IPV4_MAC_ADDR == *data) {
wma->wow_ipv4_mcast_wake_up_count++;
+ if (len >= WMA_IPV4_PROTO_GET_MIN_LEN &&
+ WMA_ICMP_PROTOCOL == *(data + WMA_IPV4_PROTOCOL))
+ wma->wow_icmpv4_count++;
} else if (WMA_MCAST_IPV6_MAC_ADDR == *data) {
wma->wow_ipv6_mcast_wake_up_count++;
if (len > WMA_ICMP_V6_TYPE_OFFSET)
@@ -2454,11 +2461,24 @@ static void wma_wow_wake_up_stats(tp_wma_handle wma, uint8_t *data,
WMA_LOGA("ICMP_V6 data len %d", len);
} else {
wma->wow_ucast_wake_up_count++;
+ if (qdf_nbuf_data_is_ipv4_mcast_pkt(data))
+ wma->wow_ipv4_mcast_wake_up_count++;
+ else if (qdf_nbuf_data_is_ipv6_mcast_pkt(data))
+ wma->wow_ipv6_mcast_wake_up_count++;
+
+ if (len >= WMA_IPV4_PROTO_GET_MIN_LEN &&
+ qdf_nbuf_data_is_icmp_pkt(data))
+ wma->wow_icmpv4_count++;
+ else if (len > WMA_ICMP_V6_TYPE_OFFSET &&
+ qdf_nbuf_data_is_icmpv6_pkt(data))
+ wma->wow_icmpv6_count++;
}
break;
case WOW_REASON_RA_MATCH:
+ wma->wow_icmpv6_count++;
wma->wow_ipv6_mcast_ra_stats++;
+ wma->wow_ipv6_mcast_wake_up_count++;
break;
case WOW_REASON_NLOD:
@@ -2941,7 +2961,7 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
default:
end:
WMA_LOGE("wow_buf_pkt_len: %u", buf_len);
- WMA_LOGE("Invalid Packet Type or Smaller WOW packet buffer than expected");
+ WMA_LOGE("Unknown Packet or Insufficient packet buffer");
break;
}
}
@@ -5630,10 +5650,9 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
pAddPeriodicTxPtrnParams)
{
tp_wma_handle wma_handle = (tp_wma_handle) handle;
- struct periodic_tx_pattern params;
+ struct periodic_tx_pattern *params_ptr;
uint8_t vdev_id;
-
- qdf_mem_set(&params, sizeof(struct periodic_tx_pattern), 0);
+ QDF_STATUS status;
if (!wma_handle || !wma_handle->wmi_handle) {
WMA_LOGE("%s: WMA is closed, can not issue fw add pattern cmd",
@@ -5641,6 +5660,15 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
return QDF_STATUS_E_INVAL;
}
+ params_ptr = qdf_mem_malloc(sizeof(*params_ptr));
+
+ if (!params_ptr) {
+ WMA_LOGE(
+ "%s: unable to allocate memory for periodic_tx_pattern",
+ __func__);
+ return QDF_STATUS_E_NOMEM;
+ }
+
if (!wma_find_vdev_by_addr(wma_handle,
pAddPeriodicTxPtrnParams->mac_address.bytes,
&vdev_id)) {
@@ -5649,17 +5677,22 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
return QDF_STATUS_E_INVAL;
}
- params.ucPtrnId = pAddPeriodicTxPtrnParams->ucPtrnId;
- params.ucPtrnSize = pAddPeriodicTxPtrnParams->ucPtrnSize;
- params.usPtrnIntervalMs = pAddPeriodicTxPtrnParams->usPtrnIntervalMs;
- qdf_mem_copy(&params.mac_address,
+ params_ptr->ucPtrnId = pAddPeriodicTxPtrnParams->ucPtrnId;
+ params_ptr->ucPtrnSize = pAddPeriodicTxPtrnParams->ucPtrnSize;
+ params_ptr->usPtrnIntervalMs =
+ pAddPeriodicTxPtrnParams->usPtrnIntervalMs;
+ qdf_mem_copy(&params_ptr->mac_address,
&pAddPeriodicTxPtrnParams->mac_address,
sizeof(struct qdf_mac_addr));
- qdf_mem_copy(params.ucPattern, pAddPeriodicTxPtrnParams->ucPattern,
- params.ucPtrnSize);
+ qdf_mem_copy(params_ptr->ucPattern,
+ pAddPeriodicTxPtrnParams->ucPattern,
+ params_ptr->ucPtrnSize);
+
+ status = wmi_unified_process_add_periodic_tx_ptrn_cmd(
+ wma_handle->wmi_handle, params_ptr, vdev_id);
- return wmi_unified_process_add_periodic_tx_ptrn_cmd(
- wma_handle->wmi_handle, &params, vdev_id);
+ qdf_mem_free(params_ptr);
+ return status;
}
/**
@@ -7041,6 +7074,22 @@ void wma_dfs_configure(struct ieee80211com *ic)
rinfo.b5pulses = dfs_jpn_bin5pulses;
rinfo.numb5radars = QDF_ARRAY_SIZE(dfs_jpn_bin5pulses);
break;
+ case DFS_CN_REGION:
+ WMA_LOGI("%s: DFS-CN domain", __func__);
+ rinfo.dfsdomain = DFS_CN_REGION;
+ rinfo.dfs_radars = dfs_china_radars;
+ rinfo.numradars = QDF_ARRAY_SIZE(dfs_china_radars);
+ rinfo.b5pulses = NULL;
+ rinfo.numb5radars = 0;
+ break;
+ case DFS_KR_REGION:
+ WMA_LOGI("%s: DFS-KR domain", __func__);
+ rinfo.dfsdomain = DFS_KR_REGION;
+ rinfo.dfs_radars = dfs_korea_radars;
+ rinfo.numradars = QDF_ARRAY_SIZE(dfs_korea_radars);
+ rinfo.b5pulses = NULL;
+ rinfo.numb5radars = 0;
+ break;
default:
WMA_LOGI("%s: DFS-UNINT domain", __func__);
rinfo.dfsdomain = DFS_UNINIT_REGION;
@@ -7199,10 +7248,11 @@ struct dfs_ieee80211_channel *wma_dfs_configure_channel(
*
* Return: none
*/
-void wma_set_dfs_region(tp_wma_handle wma, uint8_t dfs_region)
+void wma_set_dfs_region(tp_wma_handle wma, enum dfs_region dfs_region)
{
- /* dfs information is passed */
- if (dfs_region > DFS_MKK_REGION || dfs_region == DFS_UNINIT_REGION)
+ if (dfs_region >= DFS_UNDEF_REGION ||
+ dfs_region == DFS_UNINIT_REGION)
+
/* assign DFS_FCC_REGION as default region*/
wma->dfs_ic->current_dfs_regdomain = DFS_FCC_REGION;
else
@@ -7888,3 +7938,48 @@ int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf,
return 0;
}
+
+/**
+ * wma_get_wakelock_stats() - Collects wake lock stats
+ * @wake_lock_stats: wakelock structure to be filled
+ *
+ * This function collects wake lock stats
+ *
+ * Return: VOS_STATUS_SUCCESS on success, error number otherwise
+ */
+QDF_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats)
+{
+ tp_wma_handle wma_handle;
+
+ wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
+
+ if (!wake_lock_stats) {
+ WMA_LOGE("%s: invalid pointer", __func__);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ if (!wma_handle) {
+ WMA_LOGE("%s: WMA context is invalid!", __func__);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ wake_lock_stats->wow_ucast_wake_up_count =
+ wma_handle->wow_ucast_wake_up_count;
+ wake_lock_stats->wow_bcast_wake_up_count =
+ wma_handle->wow_bcast_wake_up_count;
+ wake_lock_stats->wow_ipv4_mcast_wake_up_count =
+ wma_handle->wow_ipv4_mcast_wake_up_count;
+ wake_lock_stats->wow_ipv6_mcast_wake_up_count =
+ wma_handle->wow_ipv6_mcast_wake_up_count;
+ wake_lock_stats->wow_ipv6_mcast_ra_stats =
+ wma_handle->wow_ipv6_mcast_ra_stats;
+ wake_lock_stats->wow_ipv6_mcast_ns_stats =
+ wma_handle->wow_ipv6_mcast_ns_stats;
+ wake_lock_stats->wow_ipv6_mcast_na_stats =
+ wma_handle->wow_ipv6_mcast_na_stats;
+ wake_lock_stats->wow_icmpv4_count = wma_handle->wow_icmpv4_count;
+ wake_lock_stats->wow_icmpv6_count =
+ wma_handle->wow_icmpv6_count;
+
+ return QDF_STATUS_SUCCESS;
+}
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index 6e1695f4313f..19628077f81a 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -3319,6 +3319,12 @@ static void wma_update_fw_config(tp_wma_handle wma_handle,
wma_handle->max_frag_entry);
wma_handle->max_frag_entry =
tgt_cap->wlan_resource_config.max_frag_entries;
+
+ /* Update no. of maxWoWFilters depending on BPF service */
+ if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
+ WMI_SERVICE_BPF_OFFLOAD))
+ tgt_cap->wlan_resource_config.num_wow_filters =
+ WMA_STA_WOW_DEFAULT_PTRN_MAX;
}
/**
@@ -4457,6 +4463,149 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
}
/**
+ * wma_get_phyid_for_given_band() - to get phyid for band
+ *
+ * @wma_handle: Pointer to wma handle
+ * @map: Pointer to map which is derived from hw mode & has mapping between
+ * hw mode and available PHYs for that hw mode.
+ * @band: enum value of for 2G or 5G band
+ * @phyid: Pointer to phyid which needs to be filled
+ *
+ * This API looks in to the map to find out which particular phy supports
+ * provided band and return the idx (also called phyid) of that phy. Caller
+ * use this phyid to fetch various caps of that phy
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS wma_get_phyid_for_given_band(
+ t_wma_handle * wma_handle,
+ struct hw_mode_idx_to_mac_cap_idx *map,
+ enum cds_band_type band, uint8_t *phyid)
+{
+ uint8_t idx, i;
+ WMI_MAC_PHY_CAPABILITIES *cap;
+
+ if (!wma_handle) {
+ WMA_LOGE("Invalid wma handle");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ if (!map) {
+ WMA_LOGE("Invalid given map");
+ return QDF_STATUS_E_FAILURE;
+ }
+ idx = map->mac_cap_idx;
+ *phyid = idx;
+
+ for (i = 0; i < map->num_of_macs; i++) {
+ cap = &wma_handle->phy_caps.each_phy_cap_per_hwmode[idx + i];
+ if ((band == CDS_BAND_2GHZ) &&
+ (WLAN_2G_CAPABILITY == cap->supported_bands)) {
+ *phyid = idx + i;
+ WMA_LOGI("Select 2G capable phyid[%d]", *phyid);
+ return QDF_STATUS_SUCCESS;
+ } else if ((band == CDS_BAND_5GHZ) &&
+ (WLAN_5G_CAPABILITY == cap->supported_bands)) {
+ *phyid = idx + i;
+ WMA_LOGI("Select 5G capable phyid[%d]", *phyid);
+ return QDF_STATUS_SUCCESS;
+ }
+ }
+ WMA_LOGI("Using default single hw mode phyid[%d]", *phyid);
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * wma_get_caps_for_phyidx_hwmode() - to fetch caps for given hw mode and band
+ * @caps_per_phy: Pointer to capabilities structure which needs to be filled
+ * @hw_mode: Provided hardware mode
+ * @band: Provide band i.e. 2G or 5G
+ *
+ * This API finds cap which suitable for provided hw mode and band. If user
+ * is provides some invalid hw mode then it will automatically falls back to
+ * default hw mode
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
+ enum hw_mode_dbs_capab hw_mode, enum cds_band_type band)
+{
+ t_wma_handle *wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
+ struct hw_mode_idx_to_mac_cap_idx *map;
+ WMI_MAC_PHY_CAPABILITIES *phy_cap;
+ uint8_t phyid, our_hw_mode = hw_mode;
+
+ if (!wma_handle) {
+ WMA_LOGE("Invalid wma handle");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ if (0 == wma_handle->phy_caps.num_hw_modes.num_hw_modes) {
+ WMA_LOGE("Invalid number of hw modes");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ if (!wma_is_dbs_enable())
+ our_hw_mode = HW_MODE_DBS_NONE;
+
+ if (!caps_per_phy) {
+ WMA_LOGE("Invalid caps pointer");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ map = &wma_handle->phy_caps.hw_mode_to_mac_cap_map[our_hw_mode];
+
+ if (QDF_STATUS_SUCCESS !=
+ wma_get_phyid_for_given_band(wma_handle, map, band, &phyid)) {
+ WMA_LOGE("Invalid phyid");
+ return QDF_STATUS_E_FAILURE;
+ }
+ phy_cap = &wma_handle->phy_caps.each_phy_cap_per_hwmode[phyid];
+
+ caps_per_phy->ht_2g = phy_cap->ht_cap_info_2G;
+ caps_per_phy->ht_5g = phy_cap->ht_cap_info_5G;
+ caps_per_phy->vht_2g = phy_cap->vht_cap_info_2G;
+ caps_per_phy->vht_5g = phy_cap->vht_cap_info_5G;
+ caps_per_phy->he_2g = phy_cap->he_cap_info_2G;
+ caps_per_phy->he_5g = phy_cap->he_cap_info_5G;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * wma_is_rx_ldpc_supported_for_channel() - to find out if ldpc is supported
+ *
+ * @channel: Channel number for which it needs to check if rx ldpc is enabled
+ *
+ * This API takes channel number as argument and takes default hw mode as DBS
+ * to check if rx LDPC support is enabled for that channel or no
+ */
+bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel)
+{
+ struct wma_caps_per_phy caps_per_phy = {0};
+ enum cds_band_type band;
+ bool status;
+
+ if (!CDS_IS_CHANNEL_24GHZ(channel))
+ band = CDS_BAND_5GHZ;
+ else
+ band = CDS_BAND_2GHZ;
+
+ if (QDF_STATUS_SUCCESS != wma_get_caps_for_phyidx_hwmode(
+ &caps_per_phy,
+ HW_MODE_DBS, band)) {
+ return false;
+ }
+ if (CDS_IS_CHANNEL_24GHZ(channel))
+ status = (!!(caps_per_phy.ht_2g & WMI_HT_CAP_RX_LDPC));
+ else
+ status = (!!(caps_per_phy.ht_5g & WMI_HT_CAP_RX_LDPC));
+
+ return status;
+}
+
+
+/**
* wma_print_populate_soc_caps() - Prints all the caps populated per hw mode
* @wma_handle: pointer to wma_handle
*
@@ -5180,13 +5329,16 @@ void wma_set_wifi_start_packet_stats(void *wma_handle,
}
log_state = ATH_PKTLOG_ANI | ATH_PKTLOG_RCUPDATE | ATH_PKTLOG_RCFIND |
- ATH_PKTLOG_RX | ATH_PKTLOG_TX | ATH_PKTLOG_TEXT;
+ ATH_PKTLOG_RX | ATH_PKTLOG_TX |
+ ATH_PKTLOG_TEXT | ATH_PKTLOG_SW_EVENT;
if (start_log->verbose_level == WLAN_LOG_LEVEL_ACTIVE) {
- pktlog_enable(scn, log_state);
+ pktlog_enable(scn, log_state, start_log->ini_triggered,
+ start_log->user_triggered);
WMA_LOGI("%s: Enabling per packet stats", __func__);
} else {
- pktlog_enable(scn, 0);
+ pktlog_enable(scn, 0, start_log->ini_triggered,
+ start_log->user_triggered);
WMA_LOGI("%s: Disabling per packet stats", __func__);
}
}
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index aa868152d1f5..6b21e356ef1d 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -637,7 +637,7 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
int i;
struct scan_chan_list_params scan_ch_param = {0};
- wmi_channel *tchan_info;
+ wmi_channel_param *tchan_info;
scan_ch_param.chan_info = qdf_mem_malloc(sizeof(wmi_channel) *
chan_list->numChan);
@@ -2319,7 +2319,7 @@ cleanup_label:
* Return: QDF status
*/
QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
- wmi_roam_offload_tlv_param *
+ roam_offload_param *
roam_offload_params,
tSirRoamOffloadScanReq *roam_req)
{
@@ -5085,8 +5085,9 @@ QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
tSirExtScanSetSigChangeReqParams *
psigchange)
{
- struct extscan_set_sig_changereq_params params = {0};
int i = 0;
+ QDF_STATUS status;
+ struct extscan_set_sig_changereq_params *params_ptr;
if (!wma || !wma->wmi_handle) {
WMA_LOGE("%s: WMA is closed,can not issue extscan cmd",
@@ -5094,21 +5095,34 @@ QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
return QDF_STATUS_E_INVAL;
}
- params.request_id = psigchange->requestId;
- params.session_id = psigchange->sessionId;
- params.rssi_sample_size = psigchange->rssiSampleSize;
- params.lostap_sample_size = psigchange->lostApSampleSize;
- params.min_breaching = psigchange->minBreaching;
- params.num_ap = psigchange->numAp;
+ params_ptr = qdf_mem_malloc(sizeof(*params_ptr));
+
+ if (!params_ptr) {
+ WMA_LOGE(
+ "%s: unable to allocate memory for extscan_set_sig_changereq_params",
+ __func__);
+ return QDF_STATUS_E_NOMEM;
+ }
+
+ params_ptr->request_id = psigchange->requestId;
+ params_ptr->session_id = psigchange->sessionId;
+ params_ptr->rssi_sample_size = psigchange->rssiSampleSize;
+ params_ptr->lostap_sample_size = psigchange->lostApSampleSize;
+ params_ptr->min_breaching = psigchange->minBreaching;
+ params_ptr->num_ap = psigchange->numAp;
for (i = 0; i < WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS; i++) {
- qdf_mem_copy(&params.ap[i].bssid, &psigchange->ap[i].bssid,
+ qdf_mem_copy(&params_ptr->ap[i].bssid,
+ &psigchange->ap[i].bssid,
sizeof(struct qdf_mac_addr));
- params.ap[i].high = psigchange->ap[i].high;
- params.ap[i].low = psigchange->ap[i].low;
+ params_ptr->ap[i].high = psigchange->ap[i].high;
+ params_ptr->ap[i].low = psigchange->ap[i].low;
}
- return wmi_unified_extscan_start_change_monitor_cmd(wma->wmi_handle,
- &params);
+ status = wmi_unified_extscan_start_change_monitor_cmd
+ (wma->wmi_handle,
+ params_ptr);
+ qdf_mem_free(params_ptr);
+ return status;
}
/**
diff --git a/target/inc/htt.h b/target/inc/htt.h
index d9a081e63668..b942429d74ec 100644
--- a/target/inc/htt.h
+++ b/target/inc/htt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -3146,7 +3146,7 @@ struct htt_rx_in_ord_paddr_ind_hdr_t {
ext_tid:5,
offload:1,
frag:1,
- reserved_0:1,
+ pktlog:1,
peer_id:16;
A_UINT32 /* word 1 */
@@ -3204,6 +3204,8 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t {
#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_S 13
#define HTT_RX_IN_ORD_PADDR_IND_FRAG_M 0x00004000
#define HTT_RX_IN_ORD_PADDR_IND_FRAG_S 14
+#define HTT_RX_IN_ORD_PADDR_IND_PKTLOG_M 0x00008000
+#define HTT_RX_IN_ORD_PADDR_IND_PKTLOG_S 15
#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_M 0xffff0000
#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S 16
#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M 0x000000ff
@@ -3334,6 +3336,10 @@ do { \
#define HTT_RX_IN_ORD_PADDR_IND_FRAG_GET(word) \
(((word) & HTT_RX_IN_ORD_PADDR_IND_FRAG_M) >> \
HTT_RX_IN_ORD_PADDR_IND_FRAG_S)
+#define HTT_RX_IN_ORD_PADDR_IND_PKTLOG_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_PKTLOG_M) >> \
+ HTT_RX_IN_ORD_PADDR_IND_PKTLOG_S)
+
/* definitions used within target -> host rx indication message */
diff --git a/target/inc/wlan_tgt_def_config_hl.h b/target/inc/wlan_tgt_def_config_hl.h
index 92e81061493c..11f54cafadbb 100644
--- a/target/inc/wlan_tgt_def_config_hl.h
+++ b/target/inc/wlan_tgt_def_config_hl.h
@@ -45,7 +45,7 @@
/* # of WDS entries to support.
*/
-#define CFG_TGT_WDS_ENTRIES 0
+#define CFG_TGT_WDS_ENTRIES 2
/* MAC DMA burst size. 0: 128B - default, 1: 256B, 2: 64B
*/
diff --git a/target/inc/wmi_tlv_defs.h b/target/inc/wmi_tlv_defs.h
index 532d9123de0d..161ef820087e 100644
--- a/target/inc/wmi_tlv_defs.h
+++ b/target/inc/wmi_tlv_defs.h
@@ -730,6 +730,9 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_peer_antdiv_info,
WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param,
WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_mnt_filter_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_get_chip_power_stats_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_pdev_chip_power_stats_event_fixed_param,
} WMITLV_TAG_ID;
/*
@@ -1028,6 +1031,8 @@ typedef enum {
OP(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID) \
OP(WMI_PEER_ANTDIV_INFO_REQ_CMDID) \
OP(WMI_PDEV_GET_ANTDIV_STATUS_CMDID) \
+ OP(WMI_MNT_FILTER_CMDID) \
+ OP(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID) \
/* add new CMD_LIST elements above this line */
/*
@@ -1184,6 +1189,7 @@ typedef enum {
OP(WMI_SERVICE_AVAILABLE_EVENTID) \
OP(WMI_PEER_ANTDIV_INFO_EVENTID) \
OP(WMI_PDEV_ANTDIV_STATUS_EVENTID) \
+ OP(WMI_PDEV_CHIP_POWER_STATS_EVENTID) \
/* add new EVT_LIST elements above this line */
/* TLV definitions of WMI commands */
@@ -2955,6 +2961,15 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param, wmi_peer_reorder_queue_remove_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
+/* Filter in monitor mode paramters Cmd */
+#define WMITLV_TABLE_WMI_MNT_FILTER_CMDID(id, op, buf, len) \
+ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_mnt_filter_cmd_fixed_param, wmi_mnt_filter_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_MNT_FILTER_CMDID);
+
+/* WLAN GET Chip power Stats*/
+#define WMITLV_TABLE_WMI_PDEV_GET_CHIP_POWER_STATS_CMDID(id, op, buf, len) \
+ 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);
/************************** TLV definitions of WMI events *******************************/
@@ -3775,6 +3790,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CHANNEL_HOPPING_EVENTID);
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param, wmi_ani_cck_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_ANI_CCK_LEVEL_EVENTID);
+#define WMITLV_TABLE_WMI_PDEV_CHIP_POWER_STATS_EVENTID(id, op, buf, len) \
+ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pdev_chip_power_stats_event_fixed_param, wmi_pdev_chip_power_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ 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_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);
diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h
index c91ad3e25c17..bd4356ad1fda 100644
--- a/target/inc/wmi_unified.h
+++ b/target/inc/wmi_unified.h
@@ -235,6 +235,7 @@ typedef enum {
WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
WMI_GRP_NAN_DATA, /* 0x37 */
WMI_GRP_PROTOTYPE, /* 0x38 */
+ WMI_GRP_MONITOR, /* 0x39 */
} WMI_GRP_ID;
#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
@@ -351,6 +352,8 @@ typedef enum {
WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
/* Get current ANT's per chain's RSSI info */
WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
+ /** WMI command for getting Chip Power Stats */
+ WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
/* VDEV (virtual device) specific commands */
/** vdev create */
@@ -991,6 +994,10 @@ typedef enum {
WMI_BPF_GET_VDEV_STATS_CMDID,
WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
+
+ /** WMI commands related to monitor mode. */
+ WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
+
/**
* Nan Data commands
* NDI - NAN Data Interface
@@ -1073,6 +1080,8 @@ typedef enum {
WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
/** Report ANT DIV feature's status */
WMI_PDEV_ANTDIV_STATUS_EVENTID,
+ /** Chip level Power stats */
+ WMI_PDEV_CHIP_POWER_STATS_EVENTID,
/* VDEV specific events */
/** VDEV started event in response to VDEV_START request */
@@ -4155,6 +4164,7 @@ typedef enum {
WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
/* 0x10 used by deprecated DBG_PRINT */
WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
+ WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
} WMI_PKTLOG_EVENT;
typedef enum {
@@ -8386,6 +8396,21 @@ typedef struct {
A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */
} wmi_p2p_lo_stopped_event_fixed_param;
+typedef enum {
+ WMI_MNT_FILTER_CONFIG_MANAGER,
+ WMI_MNT_FILTER_CONFIG_CONTROL,
+ WMI_MNT_FILTER_CONFIG_DATA,
+ WMI_MNT_FILTER_CONFIG_ALL,
+ WMI_MNT_FILTER_CONFIG_UNKNOWN,
+} WMI_MNT_FILTER_CONFIG_TYPE;
+
+typedef struct {
+ A_UINT32 tlv_header;
+ A_UINT32 vdev_id;
+ A_UINT32 clear_or_set;
+ A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
+} wmi_mnt_filter_cmd_fixed_param;
+
typedef struct {
A_UINT32 time32; /* upper 32 bits of time stamp */
A_UINT32 time0; /* lower 32 bits of time stamp */
@@ -11859,6 +11884,8 @@ typedef struct {
A_UINT32 max_ndp_sessions;
/** Max number of peer's per ndi */
A_UINT32 max_peers_per_ndi;
+ /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
+ A_UINT32 nan_data_supported_bands;
} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
@@ -14472,6 +14499,15 @@ typedef struct {
*/
} wmi_soc_set_pcl_cmd_fixed_param;
+/* Values for channel_weight */
+typedef enum {
+ WMI_PCL_WEIGHT_DISALLOW = 0,
+ WMI_PCL_WEIGHT_LOW = 1,
+ WMI_PCL_WEIGHT_MEDIUM = 2,
+ WMI_PCL_WEIGHT_HIGH = 3,
+ WMI_PCL_WEIGHT_VERY_HIGH = 4,
+} wmi_pcl_chan_weight;
+
typedef struct {
/* TLV tag and len; tag equals
* WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
@@ -15978,6 +16014,17 @@ typedef struct {
} wmi_pdev_get_tpc_cmd_fixed_param;
typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals
+ WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
+ /**
+ * pdev_id for identifying the MAC See macros
+ * starting with WMI_PDEV_ID_ for values.
+ */
+ A_UINT32 pdev_id;
+} wmi_pdev_get_chip_power_stats_cmd_fixed_param;
+
+
+typedef struct {
/*
* TLV tag and len; tag equals
* WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
@@ -16044,6 +16091,56 @@ typedef struct {
A_UINT32 cck_level;
} wmi_ani_cck_event_fixed_param;
+typedef enum wmi_power_debug_reg_fmt_type {
+ /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
+ * SOC_SYSTEM_SLEEP
+ * WLAN_SYSTEM_SLEEP
+ * RTC_SYNC_FORCE_WAKE
+ * MAC_DMA_ISR
+ * MAC_DMA_TXRX_ISR
+ * MAC_DMA_ISR_S1
+ * MAC_DMA_ISR_S2
+ * MAC_DMA_ISR_S3
+ * MAC_DMA_ISR_S4
+ * MAC_DMA_ISR_S5
+ * MAC_DMA_ISR_S6
+ * MAC_DMA_ISR_S7
+ */
+ WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
+ WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
+} WMI_POWER_DEBUG_REG_FMT_TYPE;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals
+ WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
+ /*
+ * maximum range is 35 hours, due to conversion from internal
+ * 0.03215 ms units to ms
+ */
+ A_UINT32 cumulative_sleep_time_ms;
+ /*
+ * maximum range is 35 hours, due to conversion from internal
+ * 0.03215 ms units to ms
+ */
+ A_UINT32 cumulative_total_on_time_ms;
+ /* count of number of times chip enterred deep sleep */
+ A_UINT32 deep_sleep_enter_counter;
+ /* Last Timestamp when Chip went to deep sleep */
+ A_UINT32 last_deep_sleep_enter_tstamp_ms;
+ /*
+ * WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers
+ * being dumped as part of the event
+ */
+ A_UINT32 debug_register_fmt;
+ /* number of debug registers being sent to host */
+ A_UINT32 num_debug_register;
+ /*
+ * Following this structure is the TLV:
+ * A_UINT32 debug_registers[num_debug_registers];
+ */
+} wmi_pdev_chip_power_stats_event_fixed_param;
+
+
typedef struct {
/*
* TLV tag and len; tag equals
diff --git a/target/inc/wmi_version.h b/target/inc/wmi_version.h
index 7144897209ea..8796b708260d 100644
--- a/target/inc/wmi_version.h
+++ b/target/inc/wmi_version.h
@@ -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_ 280
+#define __WMI_REVISION_ 285
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work
diff --git a/uapi/linux/pktlog_ac_fmt.h b/uapi/linux/pktlog_ac_fmt.h
index 27cd5497f882..c8782fd03f82 100644
--- a/uapi/linux/pktlog_ac_fmt.h
+++ b/uapi/linux/pktlog_ac_fmt.h
@@ -123,6 +123,8 @@ enum {
#define ATH_PKTLOG_TEXT 0x000000020
#define ATH_PKTLOG_PHYERR 0x000000040
#define ATH_PKTLOG_PROMISC 0x000000080
+#define ATH_PKTLOG_SW_EVENT 0x000000100
+
/* Types of packet log events */
#define PKTLOG_TYPE_TX_CTRL 1
@@ -133,7 +135,9 @@ enum {
#define PKTLOG_TYPE_RC_FIND 6
#define PKTLOG_TYPE_RC_UPDATE 7
#define PKTLOG_TYPE_TX_VIRT_ADDR 8
-#define PKTLOG_TYPE_MAX 9
+#define PKTLOG_TYPE_SMART_ANTENNA 9
+#define PKTLOG_TYPE_SW_EVENT 10
+#define PKTLOG_TYPE_MAX 11
#define PKTLOG_MAX_TXCTL_WORDS 57 /* +2 words for bitmap */
#define PKTLOG_MAX_TXSTATUS_WORDS 32
@@ -225,6 +229,11 @@ struct ath_pktlog_rc_find {
void *rcFind;
} __ATTRIB_PACK;
+struct ath_pktlog_sw_event {
+ struct ath_pktlog_hdr pl_hdr;
+ void *sw_event;
+} __ATTRIB_PACK;
+
struct ath_pktlog_rc_update {
struct ath_pktlog_hdr pl_hdr;
void *txRateCtrl; /* rate control state proper */