summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkash Patel <akashp@codeaurora.org>2015-04-27 12:46:54 -0700
committerAkash Patel <akashp@codeaurora.org>2015-04-27 12:47:45 -0700
commit9b2f443006c558ec7ba36251718c4935eae8ff2d (patch)
treea50c5840af543dfa135ffab288785c98f9f4c246
parent891a955f2487a23eddd92bcfd0201685f7e791a0 (diff)
parent5067879a8fa285221f891fd941f9ab1add05da5c (diff)
Release 4.0.10.85 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master' into HEAD * origin/caf/caf-wlan/master: Cafstaging Release 4.0.10.85 qcacld-2.0: extscan debug logs cleanup qcacld-2.0: Set extscan_in_progress based on fw event status qcacld2.0 - refactor the NL80211_REGDOM_SET_BY_DRIVER case qcacld: Add handling of HTT_TX_COMPL_IND_STAT_PEER_DEL for HL qcacld: Pull in HTT changes upto version 3.18 qcacld: Report current MCS if maxRate is less than current rate qcacld-2.0: fix IBSS connection issue on LMR build qcacld: Support logging of per packet statistics from the driver qcacld: Add support to start/stop specific logging features qcacld: Avoid posting of nl messages when nl service is not initialized qcacld: Re-initialize the packet log buffer on logging restart Change-Id: I7260b110854c293e16d1a1eb70973739b9c1aaf2
-rwxr-xr-x[-rw-r--r--]CORE/CLD_TXRX/HTT/htt.h689
-rw-r--r--CORE/CLD_TXRX/HTT/htt_t2h.c2
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_desc.c6
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_send.c25
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx_types.h2
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg80211.h20
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c543
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c1
-rw-r--r--CORE/MAC/inc/aniGlobal.h50
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirApi.h16
-rw-r--r--CORE/MAC/src/include/sirParams.h3
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_htt_api.h9
-rw-r--r--CORE/SERVICES/COMMON/pktlog_ac_fmt.h12
-rw-r--r--CORE/SERVICES/WMA/wma.c311
-rw-r--r--CORE/SERVICES/WMA/wma.h8
-rw-r--r--CORE/SME/inc/sme_Api.h3
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c64
-rw-r--r--CORE/SVC/inc/wlan_logging_sock_svc.h3
-rw-r--r--CORE/SVC/src/logging/wlan_logging_sock_svc.c59
-rw-r--r--CORE/SVC/src/nlink/wlan_nlink_srv.c1
-rw-r--r--CORE/UTILS/PKTLOG/include/pktlog_ac.h34
-rw-r--r--CORE/UTILS/PKTLOG/linux_ac.c249
-rw-r--r--CORE/UTILS/PKTLOG/pktlog_ac.c22
-rw-r--r--CORE/UTILS/PKTLOG/pktlog_internal.c31
-rw-r--r--CORE/VOSS/inc/log_codes.h6
-rw-r--r--CORE/VOSS/inc/vos_api.h6
-rw-r--r--CORE/VOSS/inc/vos_diag_core_log.h19
-rw-r--r--CORE/VOSS/src/vos_api.c121
-rw-r--r--CORE/VOSS/src/vos_diag.c15
-rw-r--r--CORE/VOSS/src/vos_lock.c12
-rw-r--r--CORE/VOSS/src/vos_nvitem.c30
-rw-r--r--CORE/VOSS/src/vos_sched.h5
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h1
34 files changed, 1854 insertions, 528 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt.h b/CORE/CLD_TXRX/HTT/htt.h
index 79ea8ac7de46..d2f399d7f5af 100644..100755
--- a/CORE/CLD_TXRX/HTT/htt.h
+++ b/CORE/CLD_TXRX/HTT/htt.h
@@ -106,9 +106,18 @@
* - Change a reserved bit in the HTT tx MSDU descriptor to an
* "extension" bit, to specify whether a HTT tx MSDU extension
* descriptor is present.
+ * 3.15 Add HW rx desc info to per-MSDU info elems in RX_IN_ORD_PADDR_IND msg.
+ * (This allows the host to obtain key information about the MSDU
+ * from a memory location already in the cache, rather than taking a
+ * cache miss for each MSDU by reading the HW rx descs.)
+ * 3.16 Add htt_pkt_type_eth2 and define pkt_subtype flags to indicate
+ * whether a copy-engine classification result is appended to TX_FRM.
+ * 3.17 Add a version of the WDI_IPA_CFG message; add RX_RING2 to WDI_IPA_CFG
+ * 3.18 Add a PEER_DEL tx completion indication status, for HL cleanup of
+ * tx frames in the target after the peer has already been deleted.
*/
#define HTT_CURRENT_VERSION_MAJOR 3
-#define HTT_CURRENT_VERSION_MINOR 14
+#define HTT_CURRENT_VERSION_MINOR 17
#define HTT_NUM_TX_FRAG_DESC 1024
@@ -560,9 +569,33 @@ PREPACK struct htt_tx_msdu_desc ## _paddr_bits_ ## _t \
* FIX THIS: ADD COMPLETE SPECS FOR THIS FIELDS VALUE, e.g. \
* pkt_type | pkt_subtype \
* ============================================================== \
- * 802.3 | n/a \
+ * 802.3 | bit 0:3 - Reserved \
+ * | bit 4: 0x0 - Copy-Engine Classification Results \
+ * | not appended to the HTT message \
+ * | 0x1 - Copy-Engine Classification Results \
+ * | appended to the HTT message in the \
+ * | format: \
+ * | [HTT tx desc, frame header, \
+ * | CE classification results] \
+ * | The CE classification results begin \
+ * | at the next 4-byte boundary after \
+ * | the frame header. \
* ------------+------------------------------------------------- \
- * native WiFi | n/a \
+ * Eth2 | bit 0:3 - Reserved \
+ * | bit 4: 0x0 - Copy-Engine Classification Results \
+ * | not appended to the HTT message \
+ * | 0x1 - Copy-Engine Classification Results \
+ * | appended to the HTT message. \
+ * | See the above specification of the \
+ * | CE classification results location. \
+ * ------------+------------------------------------------------- \
+ * native WiFi | bit 0:3 - Reserved \
+ * | bit 4: 0x0 - Copy-Engine Classification Results \
+ * | not appended to the HTT message \
+ * | 0x1 - Copy-Engine Classification Results \
+ * | appended to the HTT message. \
+ * | See the above specification of the \
+ * | CE classification results location. \
* ------------+------------------------------------------------- \
* mgmt | 0x0 - 802.11 MAC header absent \
* | 0x1 - 802.11 MAC header present \
@@ -577,7 +610,12 @@ PREPACK struct htt_tx_msdu_desc ## _paddr_bits_ ## _t \
* | 0x1 - don't perform tx classification; \
* | insert the frame into the "misc" \
* | tx queue \
- * | bit 4: reserved \
+ * | bit 4: 0x0 - Copy-Engine Classification Results \
+ * | not appended to the HTT message \
+ * | 0x1 - Copy-Engine Classification Results \
+ * | appended to the HTT message. \
+ * | See the above specification of the \
+ * | CE classification results location. \
*/ \
pkt_subtype: 5, \
\
@@ -2137,25 +2175,74 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
* The HTT WDI_IPA config message is created/sent by host at driver
* init time. It contains information about data structures used on
* WDI_IPA TX and RX path.
+ * TX CE ring is used for pushing packet metadata from IPA uC
+ * to WLAN FW
+ * TX Completion ring is used for generating TX completions from
+ * WLAN FW to IPA uC
+ * RX Indication ring is used for indicating RX packets from FW
+ * to IPA uC
+ * RX Ring2 is used as either completion ring or as second
+ * indication ring. when Ring2 is used as completion ring, IPA uC
+ * puts completed RX packet meta data to Ring2. when Ring2 is used
+ * as second indication ring, RX packets for LTE-WLAN aggregation are
+ * indicated in Ring2, other RX packets (e.g. hotspot related) are
+ * indicated in RX Indication ring. Please see WDI_IPA specification
+ * for more details.
* |31 24|23 16|15 8|7 0|
* |----------------+----------------+----------------+----------------|
* | tx pkt pool size | Rsvd | msg_type |
* |-------------------------------------------------------------------|
- * | tx comp ring base |
+ * | tx comp ring base (bits 31:0) |
+#if HTT_PADDR64
+ * | tx comp ring base (bits 63:32) |
+#endif
* |-------------------------------------------------------------------|
* | tx comp ring size |
* |-------------------------------------------------------------------|
- * | tx comp WR_IDX physical address |
+ * | tx comp WR_IDX physical address (bits 31:0) |
+#if HTT_PADDR64
+ * | tx comp WR_IDX physical address (bits 63:32) |
+#endif
* |-------------------------------------------------------------------|
- * | tx CE WR_IDX physical address |
+ * | tx CE WR_IDX physical address (bits 31:0) |
+#if HTT_PADDR64
+ * | tx CE WR_IDX physical address (bits 63:32) |
+#endif
* |-------------------------------------------------------------------|
- * | rx indication ring base |
+ * | rx indication ring base (bits 31:0) |
+#if HTT_PADDR64
+ * | rx indication ring base (bits 63:32) |
+#endif
* |-------------------------------------------------------------------|
* | rx indication ring size |
* |-------------------------------------------------------------------|
- * | rx ind RD_IDX physical address |
+ * | rx ind RD_IDX physical address (bits 31:0) |
+#if HTT_PADDR64
+ * | rx ind RD_IDX physical address (bits 63:32) |
+#endif
+ * |-------------------------------------------------------------------|
+ * | rx ind WR_IDX physical address (bits 31:0) |
+#if HTT_PADDR64
+ * | rx ind WR_IDX physical address (bits 63:32) |
+#endif
+ * |-------------------------------------------------------------------|
+ * |-------------------------------------------------------------------|
+ * | rx ring2 base (bits 31:0) |
+#if HTT_PADDR64
+ * | rx ring2 base (bits 63:32) |
+#endif
+ * |-------------------------------------------------------------------|
+ * | rx ring2 size |
+ * |-------------------------------------------------------------------|
+ * | rx ring2 RD_IDX physical address (bits 31:0) |
+#if HTT_PADDR64
+ * | rx ring2 RD_IDX physical address (bits 63:32) |
+#endif
* |-------------------------------------------------------------------|
- * | rx ind WR_IDX physical address |
+ * | rx ring2 WR_IDX physical address (bits 31:0) |
+#if HTT_PADDR64
+ * | rx ring2 WR_IDX physical address (bits 63:32) |
+#endif
* |-------------------------------------------------------------------|
*
* Header fields:
@@ -2168,38 +2255,150 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
* Bits 15:0
* Purpose: Total number of TX packet buffer pool allocated by Host for
* WDI_IPA TX path
- * - TX_COMP_RING_BASE_ADDR
- * Bits 31:0
- * Purpose: TX Completion Ring base address in DDR
- * - TX_COMP_RING_SIZE
- * Bits 31:0
- * Purpose: TX Completion Ring size (must be power of 2)
- * - TX_COMP_WR_IDX_ADDR
- * Bits 31:0
- * Purpose: IPA doorbell register address OR DDR address where WIFI FW
- * updates the Write Index for WDI_IPA TX completion ring
- * - TX_CE_WR_IDX_ADDR
- * Bits 31:0
- * Purpose: DDR address where IPA uC
- * updates the WR Index for TX CE ring
- * (needed for fusion platforms)
- * - RX_IND_RING_BASE_ADDR
- * Bits 31:0
- * Purpose: RX Indication Ring base address in DDR
- * - RX_IND_RING_SIZE
- * Bits 31:0
- * Purpose: RX Indication Ring size
- * - RX_IND_RD_IDX_ADDR
- * Bits 31:0
- * Purpose: DDR address where IPA uC updates the Read Index for WDI_IPA
- * RX indication ring
- * - RX_IND_WR_IDX_ADDR
- * Bits 31:0
- * Purpose: IPA doorbell register address OR DDR address where WIFI FW
- * updates the Write Index for WDI_IPA RX indication ring
+ * For systems using 32-bit format for bus addresses:
+ * - TX_COMP_RING_BASE_ADDR
+ * Bits 31:0
+ * Purpose: TX Completion Ring base address in DDR
+ * - TX_COMP_RING_SIZE
+ * Bits 31:0
+ * Purpose: TX Completion Ring size (must be power of 2)
+ * - TX_COMP_WR_IDX_ADDR
+ * Bits 31:0
+ * Purpose: IPA doorbell register address OR DDR address where WIFI FW
+ * updates the Write Index for WDI_IPA TX completion ring
+ * - TX_CE_WR_IDX_ADDR
+ * Bits 31:0
+ * Purpose: DDR address where IPA uC
+ * updates the WR Index for TX CE ring
+ * (needed for fusion platforms)
+ * - RX_IND_RING_BASE_ADDR
+ * Bits 31:0
+ * Purpose: RX Indication Ring base address in DDR
+ * - RX_IND_RING_SIZE
+ * Bits 31:0
+ * Purpose: RX Indication Ring size
+ * - RX_IND_RD_IDX_ADDR
+ * Bits 31:0
+ * Purpose: DDR address where IPA uC updates the Read Index for WDI_IPA
+ * RX indication ring
+ * - RX_IND_WR_IDX_ADDR
+ * Bits 31:0
+ * Purpose: IPA doorbell register address OR DDR address where WIFI FW
+ * updates the Write Index for WDI_IPA RX indication ring
+ * - RX_RING2_BASE_ADDR
+ * Bits 31:0
+ * Purpose: Second RX Ring(Indication or completion)base address in DDR
+ * - RX_RING2_SIZE
+ * Bits 31:0
+ * Purpose: Second RX Ring size (must be >= RX_IND_RING_SIZE)
+ * - RX_RING2_RD_IDX_ADDR
+ * Bits 31:0
+ * Purpose: If Second RX ring is Indication ring, DDR address where
+ * IPA uC updates the Read Index for Ring2.
+ * If Second RX ring is completion ring, this is NOT used
+ * - RX_RING2_WR_IDX_ADDR
+ * Bits 31:0
+ * Purpose: If Second RX ring is Indication ring, DDR address where
+ * WIFI FW updates the Write Index for WDI_IPA RX ring2
+ * If second RX ring is completion ring, DDR address where
+ * IPA uC updates the Write Index for Ring 2.
+ * For systems using 64-bit format for bus addresses:
+ * - TX_COMP_RING_BASE_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of TX Completion Ring base physical address in DDR
+ * - TX_COMP_RING_BASE_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of TX Completion Ring base physical address in DDR
+ * - TX_COMP_RING_SIZE
+ * Bits 31:0
+ * Purpose: TX Completion Ring size (must be power of 2)
+ * - TX_COMP_WR_IDX_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of IPA doorbell register address OR
+ * Lower 4 bytes of DDR address where WIFI FW
+ * updates the Write Index for WDI_IPA TX completion ring
+ * - TX_COMP_WR_IDX_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of IPA doorbell register address OR
+ * Higher 4 bytes of DDR address where WIFI FW
+ * updates the Write Index for WDI_IPA TX completion ring
+ * - TX_CE_WR_IDX_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of DDR address where IPA uC
+ * updates the WR Index for TX CE ring
+ * (needed for fusion platforms)
+ * - TX_CE_WR_IDX_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of DDR address where IPA uC
+ * updates the WR Index for TX CE ring
+ * (needed for fusion platforms)
+ * - RX_IND_RING_BASE_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of RX Indication Ring base address in DDR
+ * - RX_IND_RING_BASE_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of RX Indication Ring base address in DDR
+ * - RX_IND_RING_SIZE
+ * Bits 31:0
+ * Purpose: RX Indication Ring size
+ * - RX_IND_RD_IDX_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of DDR address where IPA uC updates the Read Index
+ * for WDI_IPA RX indication ring
+ * - RX_IND_RD_IDX_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of DDR address where IPA uC updates the Read Index
+ * for WDI_IPA RX indication ring
+ * - RX_IND_WR_IDX_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of IPA doorbell register address OR
+ * Lower 4 bytes of DDR address where WIFI FW
+ * updates the Write Index for WDI_IPA RX indication ring
+ * - RX_IND_WR_IDX_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of IPA doorbell register address OR
+ * Higher 4 bytes of DDR address where WIFI FW
+ * updates the Write Index for WDI_IPA RX indication ring
+ * - RX_RING2_BASE_ADDR_LO
+ * Bits 31:0
+ * Purpose: Lower 4 bytes of Second RX Ring(Indication OR completion)base address in DDR
+ * - RX_RING2_BASE_ADDR_HI
+ * Bits 31:0
+ * Purpose: Higher 4 bytes of Second RX Ring(Indication OR completion)base address in DDR
+ * - RX_RING2_SIZE
+ * Bits 31:0
+ * Purpose: Second RX Ring size (must be >= RX_IND_RING_SIZE)
+ * - RX_RING2_RD_IDX_ADDR_LO
+ * Bits 31:0
+ * Purpose: If Second RX ring is Indication ring, lower 4 bytes of
+ * DDR address where IPA uC updates the Read Index for Ring2.
+ * If Second RX ring is completion ring, this is NOT used
+ * - RX_RING2_RD_IDX_ADDR_HI
+ * Bits 31:0
+ * Purpose: If Second RX ring is Indication ring, higher 4 bytes of
+ * DDR address where IPA uC updates the Read Index for Ring2.
+ * If Second RX ring is completion ring, this is NOT used
+ * - RX_RING2_WR_IDX_ADDR_LO
+ * Bits 31:0
+ * Purpose: If Second RX ring is Indication ring, lower 4 bytes of
+ * DDR address where WIFI FW updates the Write Index
+ * for WDI_IPA RX ring2
+ * If second RX ring is completion ring, lower 4 bytes of
+ * DDR address where IPA uC updates the Write Index for Ring 2.
+ * - RX_RING2_WR_IDX_ADDR_HI
+ * Bits 31:0
+ * Purpose: If Second RX ring is Indication ring, higher 4 bytes of
+ * DDR address where WIFI FW updates the Write Index
+ * for WDI_IPA RX ring2
+ * If second RX ring is completion ring, higher 4 bytes of
+ * DDR address where IPA uC updates the Write Index for Ring 2.
*/
-#define HTT_WDI_IPA_CFG_SZ 36 /* bytes */
+#if HTT_PADDR64
+#define HTT_WDI_IPA_CFG_SZ 88 /* bytes */
+#else
+#define HTT_WDI_IPA_CFG_SZ 52 /* bytes */
+#endif
#define HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_M 0xffff0000
#define HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_S 16
@@ -2207,27 +2406,93 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_M 0xffffffff
#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_S 0
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_S 0
+
#define HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_M 0xffffffff
#define HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_S 0
#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_M 0xffffffff
#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_S 0
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_S 0
+
#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_M 0xffffffff
#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_S 0
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_S 0
+
#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_M 0xffffffff
#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_S 0
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_S 0
+
#define HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_M 0xffffffff
#define HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_S 0
#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_M 0xffffffff
#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_S 0
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_S 0
+
#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_M 0xffffffff
#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_S 0
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_SIZE_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_SIZE_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_S 0
+
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_M 0xffffffff
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_S 0
+
#define HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_M) >> HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_S)
#define HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_SET(_var, _val) \
@@ -2236,6 +2501,7 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_S)); \
} while (0)
+/* for systems using 32-bit format for bus addr */
#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_M) >> HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_S)
#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_SET(_var, _val) \
@@ -2244,6 +2510,24 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_S)); \
} while (0)
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_M) >> HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_M) >> HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_S)); \
+ } while (0)
+
#define HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_M) >> HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_S)
#define HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_SET(_var, _val) \
@@ -2252,6 +2536,7 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_S)); \
} while (0)
+/* for systems using 32-bit format for bus addr */
#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_M) >> HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_S)
#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_SET(_var, _val) \
@@ -2260,6 +2545,26 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_S)); \
} while (0)
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_M) >> HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_M) >> HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_S)); \
+ } while (0)
+
+
+/* for systems using 32-bit format for bus addr */
#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_M) >> HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_S)
#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_SET(_var, _val) \
@@ -2268,6 +2573,25 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_S)); \
} while (0)
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_M) >> HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_M) >> HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_S)); \
+ } while (0)
+
+/* for systems using 32-bit format for bus addr */
#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_M) >> HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_S)
#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_SET(_var, _val) \
@@ -2276,6 +2600,24 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_S)); \
} while (0)
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_M) >> HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_M) >> HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_S)); \
+ } while (0)
+
#define HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_M) >> HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_S)
#define HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_SET(_var, _val) \
@@ -2284,6 +2626,7 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RING_SIZE_S)); \
} while (0)
+/* for systems using 32-bit format for bus addr */
#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_M) >> HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_S)
#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_SET(_var, _val) \
@@ -2292,6 +2635,25 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_S)); \
} while (0)
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_M) >> HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_M) >> HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_S)); \
+ } while (0)
+
+/* for systems using 32-bit format for bus addr */
#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_GET(_var) \
(((_var) & HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_M) >> HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_S)
#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_SET(_var, _val) \
@@ -2300,30 +2662,174 @@ PREPACK struct htt_tx_msdu_desc_ext_t {
((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_S)); \
} while (0)
-PREPACK struct htt_wdi_ipa_cfg_t
-{
- /* DWORD 0: flags and meta-data */
- A_UINT32
- msg_type: 8, /* HTT_H2T_MSG_TYPE_WDI_IPA_CFG */
- reserved: 8,
- tx_pkt_pool_size: 16;
- /* DWORD 1 */
- A_UINT32 tx_comp_ring_base_addr;
- /* DWORD 2 */
- A_UINT32 tx_comp_ring_size;
- /* DWORD 3 */
- A_UINT32 tx_comp_wr_idx_addr;
- /* DWORD 4*/
- A_UINT32 tx_ce_wr_idx_addr;
- /* DWORD 5 */
- A_UINT32 rx_ind_ring_base_addr;
- /* DWORD 6 */
- A_UINT32 rx_ind_ring_size;
- /* DWORD 7 */
- A_UINT32 rx_ind_rd_idx_addr;
- /* DWORD 8 */
- A_UINT32 rx_ind_wr_idx_addr;
-} POSTPACK;
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_M) >> HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_M) >> HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_S)); \
+ } while (0)
+
+/* for systems using 32-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_M) >> HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_M) >> HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_M) >> HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_S)); \
+ } while (0)
+
+#define HTT_WDI_IPA_CFG_RX_RING2_SIZE_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_SIZE_M) >> HTT_WDI_IPA_CFG_RX_RING2_SIZE_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_SIZE_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_SIZE, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_SIZE_S)); \
+ } while (0)
+
+/* for systems using 32-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_M) >> HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_M) >> HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_M) >> HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_S)); \
+ } while (0)
+
+/* for systems using 32-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_M) >> HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_M) >> HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_S)); \
+ } while (0)
+
+/* for systems using 64-bit format for bus addr */
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_GET(_var) \
+ (((_var) & HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_M) >> HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_S)
+#define HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_S)); \
+ } while (0)
+
+/*
+ * TEMPLATE_HTT_WDI_IPA_CONFIG_T:
+ * This macro defines a htt_wdi_ipa_configXXX_t in which any physical
+ * addresses are stored in a XXX-bit field.
+ * This macro is used to define both htt_wdi_ipa_config32_t and
+ * htt_wdi_ipa_config64_t structs.
+ */
+#define TEMPLATE_HTT_WDI_IPA_CONFIG_T(_paddr_bits_, \
+ _paddr__tx_comp_ring_base_addr_, \
+ _paddr__tx_comp_wr_idx_addr_, \
+ _paddr__tx_ce_wr_idx_addr_, \
+ _paddr__rx_ind_ring_base_addr_, \
+ _paddr__rx_ind_rd_idx_addr_, \
+ _paddr__rx_ind_wr_idx_addr_, \
+ _paddr__rx_ring2_base_addr_,\
+ _paddr__rx_ring2_rd_idx_addr_,\
+ _paddr__rx_ring2_wr_idx_addr_) \
+PREPACK struct htt_wdi_ipa_cfg ## _paddr_bits_ ## _t \
+{ \
+ /* DWORD 0: flags and meta-data */ \
+ A_UINT32 \
+ msg_type: 8, /* HTT_H2T_MSG_TYPE_WDI_IPA_CFG */ \
+ reserved: 8, \
+ tx_pkt_pool_size: 16;\
+ /* DWORD 1 */\
+ _paddr__tx_comp_ring_base_addr_;\
+ /* DWORD 2 (or 3)*/\
+ A_UINT32 tx_comp_ring_size;\
+ /* DWORD 3 (or 4)*/\
+ _paddr__tx_comp_wr_idx_addr_;\
+ /* DWORD 4 (or 6)*/\
+ _paddr__tx_ce_wr_idx_addr_;\
+ /* DWORD 5 (or 8)*/\
+ _paddr__rx_ind_ring_base_addr_;\
+ /* DWORD 6 (or 10)*/\
+ A_UINT32 rx_ind_ring_size;\
+ /* DWORD 7 (or 11)*/\
+ _paddr__rx_ind_rd_idx_addr_;\
+ /* DWORD 8 (or 13)*/\
+ _paddr__rx_ind_wr_idx_addr_;\
+ /* DWORD 9 (or 15)*/\
+ _paddr__rx_ring2_base_addr_;\
+ /* DWORD 10 (or 17) */\
+ A_UINT32 rx_ring2_size;\
+ /* DWORD 11 (or 18) */\
+ _paddr__rx_ring2_rd_idx_addr_;\
+ /* DWORD 12 (or 20) */\
+ _paddr__rx_ring2_wr_idx_addr_;\
+} POSTPACK
+
+/* define a htt_wdi_ipa_config32_t type */
+TEMPLATE_HTT_WDI_IPA_CONFIG_T(32, HTT_VAR_PADDR32(tx_comp_ring_base_addr), HTT_VAR_PADDR32(tx_comp_wr_idx_addr), HTT_VAR_PADDR32(tx_ce_wr_idx_addr), HTT_VAR_PADDR32(rx_ind_ring_base_addr), HTT_VAR_PADDR32(rx_ind_rd_idx_addr),HTT_VAR_PADDR32(rx_ind_wr_idx_addr), HTT_VAR_PADDR32(rx_ring2_base_addr), HTT_VAR_PADDR32(rx_ring2_rd_idx_addr), HTT_VAR_PADDR32(rx_ring2_wr_idx_addr));
+
+/* define a htt_wdi_ipa_config64_t type */
+TEMPLATE_HTT_WDI_IPA_CONFIG_T(64, HTT_VAR_PADDR64_LE(tx_comp_ring_base_addr), HTT_VAR_PADDR64_LE(tx_comp_wr_idx_addr), HTT_VAR_PADDR64_LE(tx_ce_wr_idx_addr), HTT_VAR_PADDR64_LE(rx_ind_ring_base_addr), HTT_VAR_PADDR64_LE(rx_ind_rd_idx_addr), HTT_VAR_PADDR64_LE(rx_ind_wr_idx_addr), HTT_VAR_PADDR64_LE(rx_ring2_base_addr), HTT_VAR_PADDR64_LE(rx_ring2_rd_idx_addr), HTT_VAR_PADDR64_LE(rx_ring2_wr_idx_addr));
+
+#if HTT_PADDR64
+ #define htt_wdi_ipa_cfg_t htt_wdi_ipa_cfg64_t
+#else
+ #define htt_wdi_ipa_cfg_t htt_wdi_ipa_cfg32_t
+#endif
enum htt_wdi_ipa_op_code {
HTT_WDI_IPA_OPCODE_TX_SUSPEND = 0,
@@ -2519,17 +3025,30 @@ enum htt_t2h_msg_type {
* | MSDU 0 bus address (bits 63:32) |
#endif
* |--------------------------------------------------------------------------|
- * | Reserved | MSDU 0 FW Desc | MSDU 0 Length |
+ * | MSDU info | MSDU 0 FW Desc | MSDU 0 Length |
* |--------------------------------------------------------------------------|
* | MSDU 1 bus address (bits 31:0) |
#if HTT_PADDR64
* | MSDU 1 bus address (bits 63:32) |
#endif
* |--------------------------------------------------------------------------|
- * | Reserved | MSDU 1 FW Desc | MSDU 1 Length |
+ * | MSDU info | MSDU 1 FW Desc | MSDU 1 Length |
* |--------------------------------------------------------------------------|
*/
+
+/** @brief - MSDU info byte for TCP_CHECKSUM_OFFLOAD use
+ *
+ * @details
+ * bits
+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+ * |-----+----+-------+--------+--------+---------+---------+-----------|
+ * | reserved | is IP | is UDP | is TCP | is IPv6 |IP chksum| TCP/UDP |
+ * | | frag | | | | fail |chksum fail|
+ * |-----+----+-------+--------+--------+---------+---------+-----------|
+ * (see fw_rx_msdu_info def in wal_rx_desc.h)
+ */
+
struct htt_rx_in_ord_paddr_ind_hdr_t
{
A_UINT32 /* word 0 */
@@ -2552,7 +3071,7 @@ struct htt_rx_in_ord_paddr_ind_msdu32_t
A_UINT32
length: 16,
fw_desc: 8,
- reserved_1:8;
+ msdu_info:8;
};
struct htt_rx_in_ord_paddr_ind_msdu64_t
{
@@ -2561,7 +3080,7 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t
A_UINT32
length: 16,
fw_desc: 8,
- reserved_1:8;
+ msdu_info:8;
};
#if HTT_PADDR64
#define htt_rx_in_ord_paddr_ind_msdu_t htt_rx_in_ord_paddr_ind_msdu64_t
@@ -2601,10 +3120,12 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t
/* for systems using 32-bit format for bus addresses */
#define HTT_RX_IN_ORD_PADDR_IND_PADDR_M 0xffffffff
#define HTT_RX_IN_ORD_PADDR_IND_PADDR_S 0
-#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M 0x00ff0000
-#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S 16
#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M 0x0000ffff
#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S 0
+#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M 0x00ff0000
+#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S 16
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_M 0xff000000
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_S 24
#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_SET(word, value) \
@@ -2664,6 +3185,14 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t
#define HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(word) \
(((word) & HTT_RX_IN_ORD_PADDR_IND_PADDR_M) >> HTT_RX_IN_ORD_PADDR_IND_PADDR_S)
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S)
+
#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_SET(word, value) \
do { \
HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_FW_DESC, value); \
@@ -2672,13 +3201,13 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t
#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(word) \
(((word) & HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M) >> HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S)
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S; \
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_S; \
} while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S)
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_S)
#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_SET(word, value) \
do { \
@@ -4574,6 +5103,14 @@ PREPACK struct htt_txq_group {
#define HTT_TX_COMPL_IND_STAT_DISCARD 1
#define HTT_TX_COMPL_IND_STAT_NO_ACK 2
#define HTT_TX_COMPL_IND_STAT_POSTPONE 3
+/*
+ * The PEER_DEL tx completion status is used for HL cases
+ * where the peer the frame is for has been deleted.
+ * The host has already discarded its copy of the frame, but
+ * it still needs the tx completion to restore its credit.
+ */
+#define HTT_TX_COMPL_IND_STAT_PEER_DEL 4
+
#define HTT_TX_COMPL_IND_APPEND_SET_MORE_RETRY(f) ((f) |= 0x1)
#define HTT_TX_COMPL_IND_APPEND_CLR_MORE_RETRY(f) ((f) &= (~0x1))
diff --git a/CORE/CLD_TXRX/HTT/htt_t2h.c b/CORE/CLD_TXRX/HTT/htt_t2h.c
index 5c25b8a14688..b0ac85ea4653 100644
--- a/CORE/CLD_TXRX/HTT/htt_t2h.c
+++ b/CORE/CLD_TXRX/HTT/htt_t2h.c
@@ -302,7 +302,7 @@ htt_t2h_lp_msg_handler(void *context, adf_nbuf_t htt_t2h_msg )
}
}
OL_TX_DESC_UPDATE_GROUP_CREDIT(
- pdev->txrx_pdev, compl_msg->desc_id, 1, 0);
+ pdev->txrx_pdev, compl_msg->desc_id, 1, 0, compl_msg->status);
ol_tx_single_completion_handler(
pdev->txrx_pdev, compl_msg->status, compl_msg->desc_id);
HTT_TX_SCHED(pdev);
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_desc.c b/CORE/CLD_TXRX/TXRX/ol_tx_desc.c
index 710732a4b6f2..c24f476f8484 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_desc.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_desc.c
@@ -96,8 +96,10 @@ ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev)
if (!tx_desc) {
return NULL;
}
-#if defined(CONFIG_PER_VDEV_TX_DESC_POOL)
+#if defined(CONFIG_HL_SUPPORT)
tx_desc->vdev = vdev;
+#endif
+#if defined(CONFIG_PER_VDEV_TX_DESC_POOL)
adf_os_atomic_inc(&vdev->tx_desc_count);
#endif
@@ -152,6 +154,8 @@ ol_tx_desc_free(struct ol_txrx_pdev_t *pdev, struct ol_tx_desc_t *tx_desc)
}
#endif /* QCA_LL_TX_FLOW_CT */
adf_os_atomic_dec(&tx_desc->vdev->tx_desc_count);
+#endif
+#if defined(CONFIG_HL_SUPPORT)
tx_desc->vdev = NULL;
#endif
adf_os_spin_unlock_bh(&pdev->tx_mutex);
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_send.c b/CORE/CLD_TXRX/TXRX/ol_tx_send.c
index df8ae0cac1d3..6b5f37c96d26 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_send.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_send.c
@@ -549,7 +549,7 @@ ol_tx_completion_handler(
netbuf = tx_desc->netbuf;
if (pdev->cfg.is_high_latency) {
- OL_TX_DESC_UPDATE_GROUP_CREDIT(pdev, tx_desc_id, 1, 0);
+ OL_TX_DESC_UPDATE_GROUP_CREDIT(pdev, tx_desc_id, 1, 0, status);
}
adf_nbuf_trace_update(netbuf, trace_str);
@@ -603,14 +603,31 @@ ol_tx_completion_handler(
#ifdef FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL
void
ol_tx_desc_update_group_credit(ol_txrx_pdev_handle pdev, u_int16_t tx_desc_id,
- int credit, u_int8_t absolute)
+ int credit, u_int8_t absolute, enum htt_tx_status status)
{
+ uint8_t i, is_member;
+ uint16_t vdev_id_mask;
struct ol_tx_desc_t *tx_desc;
struct ol_tx_frms_queue_t *txq;
union ol_tx_desc_list_elem_t *td_array = pdev->tx_desc.array;
+
tx_desc = &td_array[tx_desc_id].tx_desc;
- txq = (struct ol_tx_frms_queue_t *)(tx_desc->txq);
- ol_tx_txq_group_credit_update(pdev, txq, credit, absolute);
+ if (status != htt_tx_status_peer_del) {
+ txq = (struct ol_tx_frms_queue_t *)(tx_desc->txq);
+ ol_tx_txq_group_credit_update(pdev, txq, credit, absolute);
+ } else {
+ for (i = 0; i < OL_TX_MAX_TXQ_GROUPS; i++) {
+ vdev_id_mask =
+ OL_TXQ_GROUP_VDEV_ID_MASK_GET(pdev->txq_grps[i].membership);
+ is_member = OL_TXQ_GROUP_VDEV_ID_BIT_MASK_GET(vdev_id_mask,
+ tx_desc->vdev->vdev_id);
+ if (is_member) {
+ ol_txrx_update_group_credit(&pdev->txq_grps[i],
+ credit, absolute);
+ break;
+ }
+ }
+ }
OL_TX_UPDATE_GROUP_CREDIT_STATS(pdev);
}
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx_types.h b/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
index 92a4df661fb3..f4689f29257f 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
@@ -152,7 +152,7 @@ struct ol_tx_desc_t {
/* used by tx encap, to restore the os buf start offset after tx complete*/
u_int8_t orig_l2_hdr_bytes;
#endif
-#if defined(CONFIG_PER_VDEV_TX_DESC_POOL)
+#if defined(CONFIG_HL_SUPPORT)
struct ol_txrx_vdev_t* vdev;
#endif
void *txq;
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
index f55459cc97f6..0c844adcf05a 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -1390,6 +1390,26 @@ enum qca_wlan_vendor_config {
QCA_WLAN_VENDOR_ATTR_CONFIG_LAST - 1
};
+/**
+ * enum qca_wlan_vendor_attr_wifi_logger_start - Enum for wifi logger starting
+ * @QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_INVALID: Invalid attribute
+ * @QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_RING_ID: Ring ID
+ * @QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_VERBOSE_LEVEL: Verbose level
+ * @QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS: Flag
+ * @QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_AFTER_LAST: Last value
+ * @QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX: Max value
+ */
+enum qca_wlan_vendor_attr_wifi_logger_start {
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_RING_ID = 1,
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_VERBOSE_LEVEL = 2,
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS = 3,
+ /* keep last */
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX =
+ QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_AFTER_LAST - 1,
+};
+
struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_db( hdd_adapter_t *pAdapter,
tCsrRoamInfo *pRoamInfo
);
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 3140a4c9f924..51f687a68429 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -2068,10 +2068,10 @@ static int wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
pReqMsg->requestId = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id (%d)"), pReqMsg->requestId);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id %d"), pReqMsg->requestId);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Session Id (%d)"), pReqMsg->sessionId);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Session Id %d"), pReqMsg->sessionId);
spin_lock(&hdd_context_lock);
context = &pHddCtx->ext_scan_context;
@@ -2171,7 +2171,7 @@ static int wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
pReqMsg->requestId = nla_get_u32(tb[PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id (%u) Session Id (%d)"),
+ hddLog(LOG1, FL("Req Id %u Session Id %d"),
pReqMsg->requestId, pReqMsg->sessionId);
/* Parse and fetch flush parameter */
@@ -2180,7 +2180,7 @@ static int wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
goto fail;
}
pReqMsg->flush = nla_get_u8(tb[PARAM_FLUSH]);
- hddLog(LOG1, FL("Flush (%d)"), pReqMsg->flush);
+ hddLog(LOG1, FL("Flush %d"), pReqMsg->flush);
spin_lock(&hdd_context_lock);
context = &pHddCtx->ext_scan_context;
@@ -2240,8 +2240,7 @@ static int wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
uint32_t request_id;
eHalStatus status;
tANI_U8 i;
- int rem;
- int retval;
+ int rem, retval;
unsigned long rc;
ENTER();
@@ -2255,28 +2254,28 @@ static int wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
pReqMsg = vos_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("vos_mem_malloc failed"));
+ hddLog(LOGE, FL("vos_mem_malloc failed"));
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr request id failed"));
+ hddLog(LOGE, FL("attr request id failed"));
goto fail;
}
pReqMsg->requestId = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id (%d)"), pReqMsg->requestId);
+ hddLog(LOG1, FL("Req Id %d"), pReqMsg->requestId);
/* Parse and fetch number of APs */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_NUM_AP]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr number of AP failed"));
+ hddLog(LOGE, FL("attr number of AP failed"));
goto fail;
}
pReqMsg->numAp = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_NUM_AP]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Number of AP (%d)"), pReqMsg->numAp);
+ hddLog(LOG1, FL("Number of AP %d"), pReqMsg->numAp);
/* Parse and fetch lost ap sample size */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_LOST_AP_SAMPLE_SIZE]) {
@@ -2286,10 +2285,10 @@ static int wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
pReqMsg->lost_ap_sample_size = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_LOST_AP_SAMPLE_SIZE]);
- hddLog(LOG1, FL("Lost ap sample size (%d)"), pReqMsg->lost_ap_sample_size);
+ hddLog(LOG1, FL("Lost ap sample size %d"), pReqMsg->lost_ap_sample_size);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Session Id (%d)"), pReqMsg->sessionId);
+ hddLog(LOG1, FL("Session Id %d"), pReqMsg->sessionId);
i = 0;
nla_for_each_nested(apTh,
@@ -2297,39 +2296,38 @@ static int wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
if (nla_parse(tb2, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(apTh), nla_len(apTh),
wlan_hdd_extscan_config_policy)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla_parse failed"));
+ hddLog(LOGE, FL("nla_parse failed"));
goto fail;
}
/* Parse and fetch MAC address */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr mac address failed"));
+ hddLog(LOGE, FL("attr mac address failed"));
goto fail;
}
nla_memcpy(pReqMsg->ap[i].bssid,
tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID],
sizeof(tSirMacAddr));
- hddLog(VOS_TRACE_LEVEL_INFO, MAC_ADDRESS_STR,
+ hddLog(LOG1, MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pReqMsg->ap[i].bssid));
/* Parse and fetch low RSSI */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr low RSSI failed"));
+ hddLog(LOGE, FL("attr low RSSI failed"));
goto fail;
}
pReqMsg->ap[i].low = nla_get_s32(
tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("RSSI low (%d)"), pReqMsg->ap[i].low);
+ hddLog(LOG1, FL("RSSI low %d"), pReqMsg->ap[i].low);
/* Parse and fetch high RSSI */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr high RSSI failed"));
+ hddLog(LOGE, FL("attr high RSSI failed"));
goto fail;
}
pReqMsg->ap[i].high = nla_get_s32(
tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("RSSI High (%d)"),
- pReqMsg->ap[i].high);
+ hddLog(LOG1, FL("RSSI High %d"), pReqMsg->ap[i].high);
i++;
}
@@ -2419,9 +2417,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
char ssid_string[SIR_MAC_MAX_SSID_LENGTH + 1];
int ssid_len;
eHalStatus status;
- int i;
- int rem;
- int retval;
+ int i, rem, retval;
unsigned long rc;
ENTER();
@@ -2446,7 +2442,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
}
request->request_id = nla_get_u32(tb[PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Request Id (%d)"), request->request_id);
+ hddLog(LOG1, FL("Request Id %d"), request->request_id);
/* Parse and fetch lost SSID sample size */
if (!tb[PARAMS_LOST_SSID_SAMPLE_SIZE]) {
@@ -2455,7 +2451,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
}
request->lost_ssid_sample_size =
nla_get_u32(tb[PARAMS_LOST_SSID_SAMPLE_SIZE]);
- hddLog(LOG1, FL("Lost SSID Sample Size (%d)"),
+ hddLog(LOG1, FL("Lost SSID Sample Size %d"),
request->lost_ssid_sample_size);
/* Parse and fetch number of hotlist SSID */
@@ -2464,7 +2460,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
goto fail;
}
request->ssid_count = nla_get_u32(tb[PARAMS_NUM_SSID]);
- hddLog(LOG1, FL("Number of SSID (%d)"), request->ssid_count);
+ hddLog(LOG1, FL("Number of SSID %d"), request->ssid_count);
request->session_id = adapter->sessionId;
hddLog(LOG1, FL("Session Id (%d)"), request->session_id);
@@ -2504,7 +2500,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
goto fail;
}
request->ssids[i].band = nla_get_u8(tb2[PARAM_BAND]);
- hddLog(LOG1, FL("band (%d)"), request->ssids[i].band);
+ hddLog(LOG1, FL("band %d"), request->ssids[i].band);
/* Parse and fetch low RSSI */
if (!tb2[PARAM_RSSI_LOW]) {
@@ -2512,7 +2508,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
goto fail;
}
request->ssids[i].rssi_low = nla_get_s32(tb2[PARAM_RSSI_LOW]);
- hddLog(LOG1, FL("RSSI low (%d)"), request->ssids[i].rssi_low);
+ hddLog(LOG1, FL("RSSI low %d"), request->ssids[i].rssi_low);
/* Parse and fetch high RSSI */
if (!tb2[PARAM_RSSI_HIGH]) {
@@ -2520,7 +2516,7 @@ wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
goto fail;
}
request->ssids[i].rssi_high = nla_get_u32(tb2[PARAM_RSSI_HIGH]);
- hddLog(LOG1, FL("RSSI high (%d)"), request->ssids[i].rssi_high);
+ hddLog(LOG1, FL("RSSI high %d"), request->ssids[i].rssi_high);
i++;
}
@@ -2601,70 +2597,67 @@ static int wlan_hdd_cfg80211_extscan_set_significant_change(
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid ATTR"));
+ hddLog(LOGE, FL("Invalid ATTR"));
return -EINVAL;
}
pReqMsg = vos_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("vos_mem_malloc failed"));
+ hddLog(LOGE, FL("vos_mem_malloc failed"));
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr request id failed"));
+ hddLog(LOGE, FL("attr request id failed"));
goto fail;
}
pReqMsg->requestId = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id (%d)"), pReqMsg->requestId);
+ hddLog(LOG1, FL("Req Id %d"), pReqMsg->requestId);
/* Parse and fetch RSSI sample size */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_RSSI_SAMPLE_SIZE])
{
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr RSSI sample size failed"));
+ hddLog(LOGE, FL("attr RSSI sample size failed"));
goto fail;
}
pReqMsg->rssiSampleSize = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_RSSI_SAMPLE_SIZE]);
- hddLog(VOS_TRACE_LEVEL_INFO,
- FL("RSSI sample size (%u)"), pReqMsg->rssiSampleSize);
+ hddLog(LOG1, FL("RSSI sample size %u"), pReqMsg->rssiSampleSize);
/* Parse and fetch lost AP sample size */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_LOST_AP_SAMPLE_SIZE])
{
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr lost AP sample size failed"));
+ hddLog(LOGE, FL("attr lost AP sample size failed"));
goto fail;
}
pReqMsg->lostApSampleSize = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_LOST_AP_SAMPLE_SIZE]);
- hddLog(VOS_TRACE_LEVEL_INFO,
- FL("Lost AP sample size (%u)"), pReqMsg->lostApSampleSize);
+ hddLog(LOG1, FL("Lost AP sample size %u"), pReqMsg->lostApSampleSize);
/* Parse and fetch AP min breaching */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_MIN_BREACHING])
{
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr AP min breaching"));
+ hddLog(LOGE, FL("attr AP min breaching"));
goto fail;
}
pReqMsg->minBreaching = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_MIN_BREACHING]);
- hddLog(VOS_TRACE_LEVEL_INFO,
- FL("AP min breaching (%u)"), pReqMsg->minBreaching);
+ hddLog(LOG1, FL("AP min breaching %u"), pReqMsg->minBreaching);
/* Parse and fetch number of APs */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_NUM_AP]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr number of AP failed"));
+ hddLog(LOGE, FL("attr number of AP failed"));
goto fail;
}
pReqMsg->numAp = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_NUM_AP]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Number of AP (%d)"), pReqMsg->numAp);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Session Id (%d)"), pReqMsg->sessionId);
+ hddLog(LOG1, FL("Number of AP %d Session Id %d"), pReqMsg->numAp,
+ pReqMsg->sessionId);
i = 0;
nla_for_each_nested(apTh,
@@ -2673,39 +2666,38 @@ static int wlan_hdd_cfg80211_extscan_set_significant_change(
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(apTh), nla_len(apTh),
wlan_hdd_extscan_config_policy)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla_parse failed"));
+ hddLog(LOGE, FL("nla_parse failed"));
goto fail;
}
/* Parse and fetch MAC address */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr mac address failed"));
+ hddLog(LOGE, FL("attr mac address failed"));
goto fail;
}
nla_memcpy(pReqMsg->ap[i].bssid,
tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID],
sizeof(tSirMacAddr));
- hddLog(VOS_TRACE_LEVEL_INFO, MAC_ADDRESS_STR,
+ hddLog(LOG1, MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pReqMsg->ap[i].bssid));
/* Parse and fetch low RSSI */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr low RSSI failed"));
+ hddLog(LOGE, FL("attr low RSSI failed"));
goto fail;
}
pReqMsg->ap[i].low = nla_get_s32(
tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("RSSI low (%d)"), pReqMsg->ap[i].low);
+ hddLog(LOG1, FL("RSSI low %d"), pReqMsg->ap[i].low);
/* Parse and fetch high RSSI */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr high RSSI failed"));
+ hddLog(LOGE, FL("attr high RSSI failed"));
goto fail;
}
pReqMsg->ap[i].high = nla_get_s32(
tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]);
- hddLog(VOS_TRACE_LEVEL_INFO,
- FL("RSSI High (%d)"), pReqMsg->ap[i].high);
+ hddLog(LOG1, FL("RSSI High %d"), pReqMsg->ap[i].high);
i++;
}
@@ -2765,27 +2757,27 @@ static int wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid ATTR"));
+ hddLog(LOGE, FL("Invalid ATTR"));
return -EINVAL;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr request id failed"));
+ hddLog(LOGE, FL("attr request id failed"));
return -EINVAL;
}
requestId = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id (%d)"), requestId);
+ hddLog(LOG1, FL("Req Id %d"), requestId);
/* Parse and fetch wifi band */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_WIFI_BAND]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr wifi band failed"));
+ hddLog(LOGE, FL("attr wifi band failed"));
return -EINVAL;
}
wifiBand = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_WIFI_BAND]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Wifi band (%d)"), wifiBand);
+ hddLog(LOG1, FL("Wifi band %d"), wifiBand);
/* Parse and fetch max channels */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_MAX_CHANNELS]) {
@@ -2794,21 +2786,21 @@ static int wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
}
maxChannels = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_MAX_CHANNELS]);
- hddLog(LOG1, FL("Max channels (%d)"), maxChannels);
+ hddLog(LOG1, FL("Max channels %d"), maxChannels);
status = sme_GetValidChannelsByBand((tHalHandle)(pHddCtx->hHal),
wifiBand, ChannelList,
&numChannels);
if (eHAL_STATUS_SUCCESS != status) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
+ hddLog(LOGE,
FL("sme_GetValidChannelsByBand failed (err=%d)"), status);
return -EINVAL;
}
numChannels = VOS_MIN(numChannels, maxChannels);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Number of channels (%d)"), numChannels);
+ hddLog(LOG1, FL("Number of channels %d"), numChannels);
for (i = 0; i < numChannels; i++)
- hddLog(VOS_TRACE_LEVEL_INFO, "Channel: %u ", ChannelList[i]);
+ hddLog(LOG1, "Channel: %u ", ChannelList[i]);
reply_skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(u32) +
sizeof(u32) * numChannels +
@@ -2820,15 +2812,14 @@ static int wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
numChannels) ||
nla_put(reply_skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_CHANNELS,
sizeof(u32) * numChannels, ChannelList)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla put fail"));
+ hddLog(LOGE, FL("nla put fail"));
kfree_skb(reply_skb);
return -EINVAL;
}
return cfg80211_vendor_cmd_reply(reply_skb);
}
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("valid channels: buffer alloc fail"));
+ hddLog(LOGE, FL("valid channels: buffer alloc fail"));
return -EINVAL;
}
@@ -2865,7 +2856,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
pReqMsg->buckets[bktIndex].bucket = nla_get_u8(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_INDEX]);
- hddLog(LOG1, FL("Bucket spec Index (%d)"),
+ hddLog(LOG1, FL("Bucket spec Index %d"),
pReqMsg->buckets[bktIndex].bucket);
/* Parse and fetch wifi band */
@@ -2875,7 +2866,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
pReqMsg->buckets[bktIndex].band = nla_get_u8(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_BAND]);
- hddLog(LOG1, FL("Wifi band (%d)"),
+ hddLog(LOG1, FL("Wifi band %d"),
pReqMsg->buckets[bktIndex].band);
/* Parse and fetch period */
@@ -2885,7 +2876,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
pReqMsg->buckets[bktIndex].period = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_PERIOD]);
- hddLog(LOG1, FL("period (%d)"),
+ hddLog(LOG1, FL("period %d"),
pReqMsg->buckets[bktIndex].period);
/* Parse and fetch report events */
@@ -2897,7 +2888,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
pReqMsg->buckets[bktIndex].reportEvents = nla_get_u8(
bucket[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_REPORT_EVENTS]);
- hddLog(LOG1, FL("report events (%d)"),
+ hddLog(LOG1, FL("report events %d"),
pReqMsg->buckets[bktIndex].reportEvents);
/* Parse and fetch max period */
@@ -2907,7 +2898,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
pReqMsg->buckets[bktIndex].max_period = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_MAX_PERIOD]);
- hddLog(LOG1, FL("max period (%u)"),
+ hddLog(LOG1, FL("max period %u"),
pReqMsg->buckets[bktIndex].max_period);
/* Parse and fetch exponent */
@@ -2917,7 +2908,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
pReqMsg->buckets[bktIndex].exponent = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_EXPONENT]);
- hddLog(LOG1, FL("exponent (%u)"),
+ hddLog(LOG1, FL("exponent %u"),
pReqMsg->buckets[bktIndex].exponent);
/* Parse and fetch step count */
@@ -2927,13 +2918,14 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
pReqMsg->buckets[bktIndex].step_count = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_STEP_COUNT]);
- hddLog(LOG1, FL("Step count (%u)"),
+ hddLog(LOG1, FL("Step count %u"),
pReqMsg->buckets[bktIndex].step_count);
- /* Framework shall pass the channel list if the input WiFi band is
- * WIFI_BAND_UNSPECIFIED.
+ /* Framework shall pass the channel list if the input WiFi band
+ * is WIFI_BAND_UNSPECIFIED.
* If the input WiFi band is specified (any value other than
- * WIFI_BAND_UNSPECIFIED) then driver populates the channel list */
+ * WIFI_BAND_UNSPECIFIED) then driver populates the channel list
+ */
if (pReqMsg->buckets[bktIndex].band != WIFI_BAND_UNSPECIFIED) {
numChannels = 0;
hddLog(LOG1, "WiFi band is specified, driver to fill channel list");
@@ -2949,7 +2941,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
pReqMsg->buckets[bktIndex].numChannels =
VOS_MIN(numChannels, WLAN_EXTSCAN_MAX_CHANNELS);
- hddLog(LOG1, FL("Num channels (%d)"),
+ hddLog(LOG1, FL("Num channels %d"),
pReqMsg->buckets[bktIndex].numChannels);
for (j = 0; j < pReqMsg->buckets[bktIndex].numChannels;
@@ -2974,7 +2966,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
hddLog(LOG1,
- "Channel(%u) Passive(%u) Dwell time(%u ms) Class(%u)",
+ "Channel %u Passive %u Dwell time %u ms Class %u",
pReqMsg->buckets[bktIndex].channels[j].channel,
pReqMsg->buckets[bktIndex].channels[j].passive,
pReqMsg->buckets[bktIndex].channels[j].dwellTimeMs,
@@ -2993,7 +2985,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
pReqMsg->buckets[bktIndex].numChannels =
nla_get_u32(bucket[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_NUM_CHANNEL_SPECS]);
- hddLog(LOG1, FL("num channels (%d)"),
+ hddLog(LOG1, FL("num channels %d"),
pReqMsg->buckets[bktIndex].numChannels);
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC]) {
@@ -3021,7 +3013,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
pReqMsg->buckets[bktIndex].channels[j].channel =
nla_get_u32(channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_CHANNEL]);
- hddLog(LOG1, FL("channel (%u)"),
+ hddLog(LOG1, FL("channel %u"),
pReqMsg->buckets[bktIndex].channels[j].channel);
/* Parse and fetch dwell time */
@@ -3039,8 +3031,9 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
EXTSCAN_ACTIVE_MAX_CHANNEL_TIME_MIN ||
pReqMsg->buckets[bktIndex].channels[j].dwellTimeMs >
EXTSCAN_ACTIVE_MAX_CHANNEL_TIME_MAX) {
- hddLog(LOG1, FL("WiFi band is unspecified, dwellTime:%d"),
- pReqMsg->buckets[bktIndex].channels[j].dwellTimeMs);
+ hddLog(LOG1,
+ FL("WiFi band is unspecified, dwellTime:%d"),
+ pReqMsg->buckets[bktIndex].channels[j].dwellTimeMs);
if (CSR_IS_CHANNEL_DFS(
vos_freq_to_chan(
@@ -3066,7 +3059,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
pReqMsg->buckets[bktIndex].channels[j].passive =
nla_get_u8(channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_PASSIVE]);
- hddLog(LOG1, FL("Chnl spec passive (%u)"),
+ hddLog(LOG1, FL("Chnl spec passive %u"),
pReqMsg->buckets[bktIndex].channels[j].passive);
/* Override scan type if required */
@@ -3150,9 +3143,8 @@ static int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
pReqMsg->requestId = nla_get_u32(tb[PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id (%d) Session Id (%d)"),
- pReqMsg->requestId,
- pReqMsg->sessionId);
+ hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ pReqMsg->requestId, pReqMsg->sessionId);
/* Parse and fetch base period */
if (!tb[PARAM_BASE_PERIOD]) {
@@ -3160,7 +3152,7 @@ static int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
goto fail;
}
pReqMsg->basePeriod = nla_get_u32(tb[PARAM_BASE_PERIOD]);
- hddLog(LOG1, FL("Base Period (%d)"), pReqMsg->basePeriod);
+ hddLog(LOG1, FL("Base Period %d"), pReqMsg->basePeriod);
/* Parse and fetch max AP per scan */
if (!tb[PARAM_MAX_AP_PER_SCAN]) {
@@ -3168,7 +3160,7 @@ static int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
goto fail;
}
pReqMsg->maxAPperScan = nla_get_u32(tb[PARAM_MAX_AP_PER_SCAN]);
- hddLog(LOG1, FL("Max AP per Scan (%d)"), pReqMsg->maxAPperScan);
+ hddLog(LOG1, FL("Max AP per Scan %d"), pReqMsg->maxAPperScan);
/* Parse and fetch report threshold percent */
if (!tb[PARAM_RPT_THRHLD_PERCENT]) {
@@ -3177,7 +3169,7 @@ static int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
}
pReqMsg->report_threshold_percent = nla_get_u8(
tb[PARAM_RPT_THRHLD_PERCENT]);
- hddLog(LOG1, FL("Report Threshold percent(%d)"),
+ hddLog(LOG1, FL("Report Threshold percent %d"),
pReqMsg->report_threshold_percent);
/* Parse and fetch report threshold num scans */
@@ -3187,7 +3179,7 @@ static int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
}
pReqMsg->report_threshold_num_scans = nla_get_u8(
tb[PARAM_RPT_THRHLD_NUM_SCANS]);
- hddLog(LOG1, FL("Report Threshold num scans(%d)"),
+ hddLog(LOG1, FL("Report Threshold num scans %d"),
pReqMsg->report_threshold_num_scans);
/* Parse and fetch number of buckets */
@@ -3201,7 +3193,7 @@ static int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
"Setting numBuckets to %u"), WLAN_EXTSCAN_MAX_BUCKETS);
pReqMsg->numBuckets = WLAN_EXTSCAN_MAX_BUCKETS;
}
- hddLog(LOG1, FL("Number of Buckets (%d)"),
+ hddLog(LOG1, FL("Number of Buckets %d"),
pReqMsg->numBuckets);
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC]) {
hddLog(LOGE, FL("attr bucket spec failed"));
@@ -3314,9 +3306,8 @@ static int wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
pReqMsg->requestId = nla_get_u32(tb[PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id (%d) Session Id (%d)"),
- pReqMsg->requestId,
- pReqMsg->sessionId);
+ hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ pReqMsg->requestId, pReqMsg->sessionId);
context = &pHddCtx->ext_scan_context;
spin_lock(&hdd_context_lock);
@@ -3382,28 +3373,28 @@ static int wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid ATTR"));
+ hddLog(LOGE, FL("Invalid ATTR"));
return -EINVAL;
}
pReqMsg = vos_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("vos_mem_malloc failed"));
+ hddLog(LOGE, FL("vos_mem_malloc failed"));
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr request id failed"));
+ hddLog(LOGE, FL("attr request id failed"));
goto fail;
}
pReqMsg->requestId = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id (%d)"), pReqMsg->requestId);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Session Id (%d)"), pReqMsg->sessionId);
+ hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ pReqMsg->requestId, pReqMsg->sessionId);
context = &pHddCtx->ext_scan_context;
spin_lock(&hdd_context_lock);
@@ -3496,10 +3487,9 @@ wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
}
request->request_id = nla_get_u32(tb[PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Request Id (%d)"), request->request_id);
-
request->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Session Id (%d)"), request->session_id);
+ hddLog(LOG1, FL("Request Id %d Session Id %d"), request->request_id,
+ request->session_id);
request->lost_ssid_sample_size = 0;
request->ssid_count = 0;
@@ -3571,28 +3561,28 @@ static int wlan_hdd_cfg80211_extscan_reset_significant_change(
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid ATTR"));
+ hddLog(LOGE, FL("Invalid ATTR"));
return -EINVAL;
}
pReqMsg = vos_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("vos_mem_malloc failed"));
+ hddLog(LOGE, FL("vos_mem_malloc failed"));
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr request id failed"));
+ hddLog(LOGE, FL("attr request id failed"));
goto fail;
}
pReqMsg->requestId = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Req Id (%d)"), pReqMsg->requestId);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Session Id (%d)"), pReqMsg->sessionId);
+ hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ pReqMsg->requestId, pReqMsg->sessionId);
context = &pHddCtx->ext_scan_context;
spin_lock(&hdd_context_lock);
@@ -3674,10 +3664,10 @@ static int hdd_extscan_epno_fill_network_list(
ssid_len--;
req_msg->networks[index].ssid.length = ssid_len;
- hddLog(LOG1, FL("network ssid length (%d)"), ssid_len);
+ hddLog(LOG1, FL("network ssid length %d"), ssid_len);
ssid = nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_SSID]);
vos_mem_copy(req_msg->networks[index].ssid.ssId, ssid, ssid_len);
- hddLog(LOG1, FL("Ssid (%.*s)"),
+ hddLog(LOG1, FL("Ssid: %.*s"),
req_msg->networks[index].ssid.length,
req_msg->networks[index].ssid.ssId);
@@ -3688,7 +3678,7 @@ static int hdd_extscan_epno_fill_network_list(
}
req_msg->networks[index].rssi_threshold = nla_get_s8(
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_RSSI_THRESHOLD]);
- hddLog(LOG1, FL("rssi threshold (%d)"),
+ hddLog(LOG1, FL("rssi threshold %d"),
req_msg->networks[index].rssi_threshold);
/* Parse and fetch epno flags */
@@ -3698,7 +3688,7 @@ static int hdd_extscan_epno_fill_network_list(
}
req_msg->networks[index].flags = nla_get_u8(
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_FLAGS]);
- hddLog(LOG1, FL("flags (%u)"), req_msg->networks[index].flags);
+ hddLog(LOG1, FL("flags %u"), req_msg->networks[index].flags);
/* Parse and fetch auth bit */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_AUTH_BIT]) {
@@ -3707,7 +3697,7 @@ static int hdd_extscan_epno_fill_network_list(
}
req_msg->networks[index].auth_bit_field = nla_get_u8(
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_AUTH_BIT]);
- hddLog(LOG1, FL("auth bit (%u)"),
+ hddLog(LOG1, FL("auth bit %u"),
req_msg->networks[index].auth_bit_field);
index++;
@@ -3757,7 +3747,7 @@ static int wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
}
num_networks = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_NUM_NETWORKS]);
- hddLog(LOG1, FL("num networks (%u)"), num_networks);
+ hddLog(LOG1, FL("num networks %u"), num_networks);
len = sizeof(*req_msg) +
(num_networks * sizeof(struct wifi_epno_network));
@@ -3776,10 +3766,10 @@ static int wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
}
req_msg->request_id = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Req Id (%u)"), req_msg->request_id);
req_msg->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Session Id (%d)"), req_msg->session_id);
+ hddLog(LOG1, FL("Req Id %u Session Id %d"),
+ req_msg->request_id, req_msg->session_id);
if (hdd_extscan_epno_fill_network_list(hdd_ctx, req_msg, tb))
goto fail;
@@ -3838,7 +3828,7 @@ static int hdd_extscan_passpoint_fill_network_list(
}
req_msg->networks[index].id = nla_get_u32(
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ID]);
- hddLog(LOG1, FL("Id (%u)"), req_msg->networks[index].id);
+ hddLog(LOG1, FL("Id %u"), req_msg->networks[index].id);
/* Parse and fetch realm */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]) {
@@ -3848,14 +3838,14 @@ static int hdd_extscan_passpoint_fill_network_list(
len = nla_len(
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]);
if (len < 0 || len > SIR_PASSPOINT_REALM_LEN) {
- hddLog(LOGE, FL("Invalid realm size (%d)"), len);
+ hddLog(LOGE, FL("Invalid realm size %d"), len);
return -EINVAL;
}
vos_mem_copy(req_msg->networks[index].realm,
nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]),
len);
- hddLog(LOG1, FL("realm len(%d)"), len);
- hddLog(LOG1, FL("realm (%s)"), req_msg->networks[index].realm);
+ hddLog(LOG1, FL("realm len %d"), len);
+ hddLog(LOG1, FL("realm: %s"), req_msg->networks[index].realm);
/* Parse and fetch roaming consortium ids */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ROAM_CNSRTM_ID]) {
@@ -3878,7 +3868,7 @@ static int hdd_extscan_passpoint_fill_network_list(
nla_memcpy(&req_msg->networks[index].plmn,
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ROAM_PLMN],
SIR_PASSPOINT_PLMN_LEN);
- hddLog(LOG1, FL("plmn (%02x %02x %02x)"),
+ hddLog(LOG1, FL("plmn %02x:%02x:%02x"),
req_msg->networks[index].plmn[0],
req_msg->networks[index].plmn[1],
req_msg->networks[index].plmn[2]);
@@ -3928,7 +3918,7 @@ static int wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
}
num_networks = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM]);
- hddLog(LOG1, FL("num networks (%u)"), num_networks);
+ hddLog(LOG1, FL("num networks %u"), num_networks);
req_msg = vos_mem_malloc(sizeof(*req_msg) +
(num_networks * sizeof(req_msg->networks[0])));
@@ -3945,10 +3935,10 @@ static int wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
}
req_msg->request_id = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Req Id (%u)"), req_msg->request_id);
req_msg->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Session Id (%d)"), req_msg->session_id);
+ hddLog(LOG1, FL("Req Id %u Session Id %d"), req_msg->request_id,
+ req_msg->session_id);
if (hdd_extscan_passpoint_fill_network_list(hdd_ctx, req_msg, tb))
goto fail;
@@ -4015,7 +4005,7 @@ static int wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy,
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
req_msg->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Req Id (%u) Session Id (%d)"),
+ hddLog(LOG1, FL("Req Id %u Session Id %d"),
req_msg->request_id, req_msg->session_id);
status = sme_reset_passpoint_list(hdd_ctx->hHal, req_msg);
@@ -6986,6 +6976,101 @@ static int wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
return ret_val;
}
+static const struct
+nla_policy
+qca_wlan_vendor_wifi_logger_start_policy
+[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX + 1] = {
+ [QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_RING_ID]
+ = {.type = NLA_U32 },
+ [QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_VERBOSE_LEVEL]
+ = {.type = NLA_U32 },
+ [QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS]
+ = {.type = NLA_U32 },
+};
+
+/**
+ * wlan_hdd_cfg80211_wifi_logger_start() - This function is used to enable
+ * or disable the collection of packet statistics from the firmware
+ * @wiphy: WIPHY structure pointer
+ * @wdev: Wireless device structure pointer
+ * @data: Pointer to the data received
+ * @data_len: Length of the data received
+ *
+ * This function is used to enable or disable the collection of packet
+ * statistics from the firmware
+ *
+ * Return: 0 on success and errno on failure
+ */
+static int wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
+{
+ eHalStatus status;
+ hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
+ struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX + 1];
+ struct sir_wifi_start_log start_log;
+
+ status = wlan_hdd_validate_context(hdd_ctx);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
+ return -EINVAL;
+ }
+
+ if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX,
+ data, data_len,
+ qca_wlan_vendor_wifi_logger_start_policy)) {
+ hddLog(LOGE, FL("Invalid attribute"));
+ return -EINVAL;
+ }
+
+ /* Parse and fetch ring id */
+ if (!tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_RING_ID]) {
+ hddLog(LOGE, FL("attr ATTR failed"));
+ return -EINVAL;
+ }
+ start_log.ring_id = nla_get_u32(
+ tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_RING_ID]);
+ hddLog(LOGE, FL("Ring ID=%d"), start_log.ring_id);
+
+ /* Parse and fetch verbose level */
+ if (!tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_VERBOSE_LEVEL]) {
+ hddLog(LOGE, FL("attr verbose_level failed"));
+ return -EINVAL;
+ }
+ start_log.verbose_level = nla_get_u32(
+ tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_VERBOSE_LEVEL]);
+ hddLog(LOGE, FL("verbose_level=%d"), start_log.verbose_level);
+
+ /* Parse and fetch flag */
+ if (!tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS]) {
+ hddLog(LOGE, FL("attr flag failed"));
+ return -EINVAL;
+ }
+ start_log.flag = nla_get_u32(
+ tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS]);
+ hddLog(LOGE, FL("flag=%d"), start_log.flag);
+
+ vos_set_ring_log_level(start_log.ring_id, start_log.verbose_level);
+
+ if (start_log.ring_id == RING_ID_WAKELOCK) {
+ /* Start/stop wakelock events */
+ if (start_log.verbose_level > WLAN_LOG_LEVEL_OFF)
+ vos_set_wakelock_logging(true);
+ else
+ vos_set_wakelock_logging(false);
+ return 0;
+ }
+
+ status = sme_wifi_start_logger(hdd_ctx->hHal, start_log);
+ if (!HAL_STATUS_SUCCESS(status)) {
+ hddLog(LOGE, FL("sme_wifi_start_logger failed(err=%d)"),
+ status);
+ return -EINVAL;
+ }
+ return 0;
+}
+
const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
{
{
@@ -7360,6 +7445,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.doit = wlan_hdd_cfg80211_get_fw_mem_dump
},
#endif /* WLAN_FEATURE_MEMDUMP */
+ {
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
+ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_START,
+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+ WIPHY_VENDOR_CMD_NEED_NETDEV,
+ .doit = (void *)wlan_hdd_cfg80211_wifi_logger_start
+ },
+
};
@@ -7527,6 +7620,9 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS
| WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
#endif
+
+ wiphy->features |= NL80211_FEATURE_HT_IBSS;
+
#ifdef FEATURE_WLAN_SCAN_PNO
if (pCfg->configPNOScanSupport)
{
@@ -14946,14 +15042,14 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
nss = pAdapter->hdd_stats.ClassA_stat.rx_frag_cnt;
if (eHDD_LINK_SPEED_REPORT_ACTUAL == pCfg->reportMaxLinkSpeed) {
+ /* Get current rate flags if report actual */
rate_flags = pAdapter->hdd_stats.ClassA_stat.promiscuous_rx_frag_cnt;
- if (pAdapter->hdd_stats.ClassA_stat.mcs_index == INVALID_MCS_IDX) {
- rate_flags = eHAL_TX_RATE_LEGACY;
- pAdapter->hdd_stats.ClassA_stat.mcs_index = 0;
- }
}
- else
+
+ if (pAdapter->hdd_stats.ClassA_stat.mcs_index == INVALID_MCS_IDX) {
+ rate_flags = eHAL_TX_RATE_LEGACY;
pAdapter->hdd_stats.ClassA_stat.mcs_index = 0;
+ }
}
#ifdef LINKSPEED_DEBUG_ENABLED
pr_info("RSSI %d, RLMS %u, rate %d, rssi high %d, rssi mid %d, rssi low %d, rate_flags 0x%x, MCS %d\n",
@@ -18417,19 +18513,19 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
}
}
- hddLog(LOG1, FL("nl_buf_len = %u"), nl_buf_len);
+ hddLog(LOG2, FL("nl_buf_len = %u"), nl_buf_len);
skb = cfg80211_vendor_cmd_alloc_reply_skb(pHddCtx->wiphy, nl_buf_len);
if (!skb) {
hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
goto fail;
}
- hddLog(LOG1, "Req Id (%u) Num_scan_ids (%u) More Data (%u)",
+ hddLog(LOG1, "Req Id %u Num_scan_ids %u More Data %u",
data->request_id, data->num_scan_ids, data->more_data);
result = &data->result[0];
for (i = 0; i < data->num_scan_ids; i++) {
- hddLog(LOG1, "[i=%d] scan_id(%u) flags(%u) num_results(%u)",
+ hddLog(LOG1, "[i=%d] scan_id %u flags %u num_results %u",
i, result->scan_id, result->flags, result->num_results);
ap = &result->ap[0];
@@ -18442,16 +18538,16 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
* BSSID was cached.
*/
ap->ts += pHddCtx->wifi_turn_on_time_since_boot;
- hddLog(LOG1, "Timestamp(%llu) "
- "Ssid (%s) "
+ hddLog(LOG1, "Timestamp %llu "
+ "Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "Rssi (%d) "
- "RTT (%u) "
- "RTT_SD (%u) "
- "Beacon Period (%u) "
- "Capability (0x%x) "
- "Ie length (%d)",
+ "Channel %u "
+ "Rssi %d "
+ "RTT %u "
+ "RTT_SD %u "
+ "Beacon Period %u "
+ "Capability 0x%x "
+ "Ie length %d",
ap->ts,
ap->ssid,
MAC_ADDR_ARRAY(ap->bssid),
@@ -18584,19 +18680,19 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
return;
}
- hddLog(LOG1, "Req Id (%u) Num results (%u)",
+ hddLog(LOG1, "Req Id %u Num results %u",
data->requestId, data->numOfAps);
- hddLog(LOG1, "More Data (%u) ap_found (%u)",
+ hddLog(LOG1, "More Data %u ap_found %u",
data->moreData, data->ap_found);
for (i = 0; i < data->numOfAps; i++) {
- hddLog(LOG1, "[index=%d] Timestamp(0x%llX) "
- "Ssid (%s) "
+ hddLog(LOG1, "[i=%d] Timestamp %llu "
+ "Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "Rssi (%d) "
- "RTT (%u) "
- "RTT_SD (%u)",
+ "Channel %u "
+ "Rssi %d "
+ "RTT %u "
+ "RTT_SD %u",
i,
data->ap[i].ts,
data->ap[i].ssid,
@@ -18704,7 +18800,7 @@ wlan_hdd_cfg80211_extscan_generic_rsp
return;
}
- hddLog(LOG1, FL("request %u status %u"),
+ hddLog(LOG1, FL("request %u status %d"),
response->request_id, response->status);
context = &hdd_ctx->ext_scan_context;
@@ -18770,13 +18866,13 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
event->requestId, event->numOfAps, event->moreData);
for (i = 0; i < event->numOfAps; i++) {
- hddLog(LOG1, "[index=%d] Timestamp(0x%llX) "
- "Ssid (%s) "
+ hddLog(LOG1, "[i=%d] Timestamp %llu "
+ "Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "Rssi (%d) "
- "RTT (%u) "
- "RTT_SD (%u)",
+ "Channel %u "
+ "Rssi %d "
+ "RTT %u "
+ "RTT_SD %u",
i,
event->ap[i].ts,
event->ap[i].ssid,
@@ -18876,8 +18972,7 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
ENTER();
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid "
- "or pData(%p) is null"), pData);
+ hddLog(LOGE, FL("HDD context is invalid or pData(%p) is null"), pData);
return;
}
@@ -18888,27 +18983,25 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
GFP_KERNEL);
if (!skb) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("cfg80211_vendor_event_alloc failed"));
+ hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
return;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "Req Id (%u)", pData->requestId);
- hddLog(VOS_TRACE_LEVEL_INFO, "Num results (%u)", pData->numResults);
- hddLog(VOS_TRACE_LEVEL_INFO, "More Data (%u)", pData->moreData);
+ hddLog(LOG1, "Req Id %u Num results %u More Data %u", pData->requestId,
+ pData->numResults, pData->moreData);
ap_info = &pData->ap[0];
for (i = 0; i < pData->numResults; i++) {
- hddLog(VOS_TRACE_LEVEL_INFO, "[index=%d] "
- "Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "numOfRssi (%d)",
- i,
- MAC_ADDR_ARRAY(ap_info->bssid),
- ap_info->channel,
- ap_info->numOfRssi);
+ hddLog(LOG1, "[i=%d] "
+ "Bssid (" MAC_ADDRESS_STR ") "
+ "Channel %u "
+ "numOfRssi %d",
+ i,
+ MAC_ADDR_ARRAY(ap_info->bssid),
+ ap_info->channel,
+ ap_info->numOfRssi);
rssi = &(ap_info)->rssi[0];
for (j = 0; j < ap_info->numOfRssi; j++)
- hddLog(VOS_TRACE_LEVEL_INFO, "Rssi (%d)", *rssi++);
+ hddLog(LOG1, "Rssi %d", *rssi++);
ap_info += ap_info->numOfRssi * sizeof(*rssi);
}
@@ -18918,7 +19011,7 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
pData->numResults)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("put fail"));
+ hddLog(LOGE, FL("put fail"));
goto fail;
}
@@ -19008,17 +19101,17 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
}
pData->ap.channel = vos_chan_to_freq(pData->ap.channel);
- hddLog(LOG1, "Req Id (%u) More Data (%u)",
+ hddLog(LOG1, "Req Id %u More Data %u",
pData->requestId, pData->moreData);
- hddLog(LOG1, "AP Info: Timestamp(0x%llX) Ssid (%s) "
+ hddLog(LOG1, "AP Info: Timestamp %llu Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "Rssi (%d) "
- "RTT (%u) "
- "RTT_SD (%u) "
- "Bcn Period (%d) "
- "Capability (0x%X) "
- "IE Length (%d)",
+ "Channel %u "
+ "Rssi %d "
+ "RTT %u "
+ "RTT_SD %u "
+ "Bcn Period %d "
+ "Capability 0x%X "
+ "IE Length %d",
pData->ap.ts,
pData->ap.ssid,
MAC_ADDR_ARRAY(pData->ap.bssid),
@@ -19029,8 +19122,6 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
pData->ap.beaconPeriod,
pData->ap.capability,
pData->ap.ieLength);
- VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- pData->ap.ieData, pData->ap.ieLength);
if (nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
pData->requestId) ||
@@ -19120,7 +19211,7 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
len += data->ap[i].ieLength;
}
if (len >= EXTSCAN_EVENT_BUF_SIZE) {
- hddLog(LOGE, FL("Frame exceeded NL size limilation, drop it!"));
+ hddLog(LOGE, FL("Frame exceeded NL size limitation, drop it!"));
return;
}
@@ -19135,19 +19226,19 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
return;
}
- hddLog(LOG1, "Req Id (%u) More Data (%u) num_results(%d)",
+ hddLog(LOG1, "Req Id %u More Data %u num_results %d",
data->request_id, data->more_data, data->num_results);
for (i = 0; i < data->num_results; i++) {
data->ap[i].channel = vos_chan_to_freq(data->ap[i].channel);
- hddLog(LOG1, "AP Info: Timestamp(0x%llX) Ssid (%s) "
+ hddLog(LOG1, "AP Info: Timestamp %llu Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "Rssi (%d) "
- "RTT (%u) "
- "RTT_SD (%u) "
- "Bcn Period (%d) "
- "Capability (0x%X) "
- "IE Length (%d)",
+ "Channel %u "
+ "Rssi %d "
+ "RTT %u "
+ "RTT_SD %u "
+ "Bcn Period %d "
+ "Capability 0x%X "
+ "IE Length %d",
data->ap[i].ts,
data->ap[i].ssid,
MAC_ADDR_ARRAY(data->ap[i].bssid),
@@ -19158,9 +19249,6 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
data->ap[i].beaconPeriod,
data->ap[i].capability,
data->ap[i].ieLength);
- VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- data->ap[i].ieData,
- data->ap[i].ieLength);
}
if (nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
@@ -19207,8 +19295,7 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(void *ctx,
ENTER();
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid "
- "or pData(%p) is null"), pData);
+ hddLog(LOGE, FL("HDD context is invalid or pData(%p) is null"), pData);
return;
}
@@ -19219,20 +19306,18 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(void *ctx,
GFP_KERNEL);
if (!skb) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("cfg80211_vendor_event_alloc failed"));
+ hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
return;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "Req Id (%u)", pData->requestId);
- hddLog(VOS_TRACE_LEVEL_INFO, "Num results (%u)",
- pData->numResultsAvailable);
+ hddLog(LOG1, "Req Id %u Num results %u", pData->requestId,
+ pData->numResultsAvailable);
if (nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
pData->requestId) ||
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
pData->numResultsAvailable)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla put fail"));
+ hddLog(LOGE, FL("nla put fail"));
goto nla_put_failure;
}
@@ -19254,8 +19339,7 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
ENTER();
if (wlan_hdd_validate_context(pHddCtx) || !pData) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid "
- "or pData(%p) is null"), pData);
+ hddLog(LOGE, FL("HDD context is invalid or pData(%p) is null"), pData);
return;
}
@@ -19266,13 +19350,11 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
GFP_KERNEL);
if (!skb) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("cfg80211_vendor_event_alloc failed"));
+ hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
return;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "Request Id (%u)", pData->requestId);
- hddLog(VOS_TRACE_LEVEL_INFO, "Scan event type (%u)", pData->scanEventType);
- hddLog(VOS_TRACE_LEVEL_INFO, "Scan event status (%u)", pData->status);
+ hddLog(LOG1, "Request Id %u Scan event type %u Scan event status %u",
+ pData->requestId, pData->scanEventType, pData->status);
if (nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
pData->requestId) ||
@@ -19281,7 +19363,7 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_EVENT_STATUS,
pData->status)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla put fail"));
+ hddLog(LOGE, FL("nla put fail"));
goto nla_put_failure;
}
@@ -19338,18 +19420,18 @@ wlan_hdd_cfg80211_passpoint_match_found(void *ctx,
return;
}
- hddLog(LOG1, "Req Id (%u) Id (%u) ANQP length (%u) num_matches (%u)",
+ hddLog(LOG1, "Req Id %u Id %u ANQP length %u num_matches %u",
data->request_id, data->id, data->anqp_len, num_matches);
for (i = 0; i < num_matches; i++) {
- hddLog(LOG1, "AP Info: Timestamp(0x%llX) Ssid (%s) "
+ hddLog(LOG1, "AP Info: Timestamp %llu Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
- "Channel (%u) "
- "Rssi (%d) "
- "RTT (%u) "
- "RTT_SD (%u) "
- "Bcn Period (%d) "
- "Capability (0x%X) "
- "IE Length (%d)",
+ "Channel %u "
+ "Rssi %d "
+ "RTT %u "
+ "RTT_SD %u "
+ "Bcn Period %d "
+ "Capability 0x%X "
+ "IE Length %d",
data->ap.ts,
data->ap.ssid,
MAC_ADDR_ARRAY(data->ap.bssid),
@@ -19360,12 +19442,6 @@ wlan_hdd_cfg80211_passpoint_match_found(void *ctx,
data->ap.beaconPeriod,
data->ap.capability,
data->ap.ieLength);
- hddLog(LOG1, "Beacon IE hexdump");
- VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- data->ap.ieData, data->ap.ieLength);
- hddLog(LOG1, "ANQP blob hexdump");
- VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- data->anqp, data->anqp_len);
}
if (nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
@@ -19433,19 +19509,17 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const tANI_U16 evType,
hdd_context_t *pHddCtx = (hdd_context_t *)ctx;
if (wlan_hdd_validate_context(pHddCtx)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is invalid"
- "Received event (%d)"), evType);
+ hddLog(LOGE, FL("HDD context is invalid; Received event %d"), evType);
return;
}
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Rcvd Event (%d)"), evType);
+ hddLog(LOG1, FL("Rcvd Event %d"), evType);
switch (evType) {
case eSIR_EXTSCAN_CACHED_RESULTS_RSP:
/* There is no need to send this response to upper layer
Just log the message */
- hddLog(VOS_TRACE_LEVEL_INFO,
- FL("Rcvd eSIR_EXTSCAN_CACHED_RESULTS_RSP"));
+ hddLog(LOG2, FL("Rcvd eSIR_EXTSCAN_CACHED_RESULTS_RSP"));
break;
case eSIR_EXTSCAN_GET_CAPABILITIES_IND:
@@ -19509,8 +19583,7 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const tANI_U16 evType,
break;
default:
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Unknown event type (%u)"), evType);
+ hddLog(LOGE, FL("Unknown event type %u"), evType);
break;
}
}
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 8dd3bc3e7d25..97b3587cbb58 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -11275,6 +11275,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
pHddCtx->wiphy = wiphy;
pHddCtx->isLoadInProgress = TRUE;
pHddCtx->ioctl_scan_mode = eSIR_ACTIVE_SCAN;
+ vos_set_wakelock_logging(false);
vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE);
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index f2353bd6ec04..44b9869da7e7 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -142,6 +142,56 @@ typedef struct sAniSirGlobal *tpAniSirGlobal;
#define HIGH_SEQ_NUM_MASK 0x0FF0
#define HIGH_SEQ_NUM_OFFSET 4
+/**
+ * enum userspace_log_level - Log level at userspace
+ * @LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
+ * @LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log level,
+ * with minimal user impact. this is the default value
+ * @LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
+ * trying to reproduce a problem, wifi performances and power can be impacted
+ * but device should not otherwise be significantly impacted
+ * @LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
+ * actively debug a problem
+ *
+ * Various log levels defined in the userspace for logging applications
+ */
+enum userspace_log_level {
+ LOG_LEVEL_NO_COLLECTION,
+ LOG_LEVEL_NORMAL_COLLECT,
+ LOG_LEVEL_ISSUE_REPRO,
+ LOG_LEVEL_ACTIVE,
+};
+
+/**
+ * enum wifi_driver_log_level - Log level defined in the driver for logging
+ * @WLAN_LOG_LEVEL_OFF: No logging
+ * @WLAN_LOG_LEVEL_NORMAL: Default logging
+ * @WLAN_LOG_LEVEL_REPRO: Normal debug level
+ * @WLAN_LOG_LEVEL_ACTIVE: Active debug level
+ *
+ * Log levels defined for logging by the wifi driver
+ */
+enum wifi_driver_log_level {
+ WLAN_LOG_LEVEL_OFF,
+ WLAN_LOG_LEVEL_NORMAL,
+ WLAN_LOG_LEVEL_REPRO,
+ WLAN_LOG_LEVEL_ACTIVE,
+};
+
+/**
+ * enum wifi_logging_ring_id - Ring id of logging entities
+ * @RING_ID_WAKELOCK: Power events ring id
+ * @RING_ID_CONNECTIVITY: Connectivity event ring id
+ * @RING_ID_PER_PACKET_STATS: Per packet statistic ring id
+ *
+ * This enum has the ring id values of logging rings
+ */
+enum wifi_logging_ring_id {
+ RING_ID_WAKELOCK,
+ RING_ID_CONNECTIVITY,
+ RING_ID_PER_PACKET_STATS,
+};
+
// -------------------------------------------------------------------
// Change channel generic scheme
typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index 51683389fd1a..7dad50c0b4f3 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 10
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 84
+#define QWLAN_VERSION_BUILD 85
-#define QWLAN_VERSIONSTR "4.0.10.84A"
+#define QWLAN_VERSIONSTR "4.0.10.85"
#define AR6320_REV1_VERSION 0x5000000
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 11daad2e2bdd..13f1f3fbb688 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -3995,6 +3995,20 @@ typedef struct
tSirMacAddr bssId;
} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
+/**
+ * struct sir_wifi_start_log - Structure to store the params sent to start/
+ * stop logging
+ * @name: Attribute which indicates the type of logging like per packet
+ * statistics, connectivity etc.
+ * @verbose_level: Verbose level which can be 0,1,2,3
+ * @flag: Flag field for future use
+ */
+struct sir_wifi_start_log {
+ uint32_t ring_id;
+ uint32_t verbose_level;
+ uint32_t flag;
+};
+
/*---------------------------------------------------------------------------
* WDA_GTK_OFFLOAD_GETINFO_REQ
*--------------------------------------------------------------------------*/
@@ -5085,7 +5099,7 @@ typedef struct
*/
struct sir_extscan_generic_response {
uint32_t request_id;
- uint32_t status;
+ int32_t status;
};
typedef struct
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index 785968b5fb20..9607a7ce3e22 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -707,8 +707,9 @@ typedef struct sSirMbMsgP2p
#define SIR_HAL_DCC_GET_STATS_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 324)
#define SIR_HAL_DCC_CLEAR_STATS_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 325)
#define SIR_HAL_DCC_UPDATE_NDL_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 326)
-
#define SIR_HAL_FW_MEM_DUMP_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 327)
+#define SIR_HAL_START_STOP_PACKET_STATS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 328)
+#define SIR_HAL_EXTSCAN_STATUS_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 329)
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
diff --git a/CORE/SERVICES/COMMON/ol_txrx_htt_api.h b/CORE/SERVICES/COMMON/ol_txrx_htt_api.h
index 57b21fe2872e..aed239a1e207 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_htt_api.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_htt_api.h
@@ -131,6 +131,9 @@ enum htt_tx_status {
/* download_fail - the host could not deliver the tx frame to the target */
htt_tx_status_download_fail = HTT_HOST_ONLY_STATUS_CODE_START,
+
+ /* peer_del - tx completion for alreay deleted peer used for HL case */
+ htt_tx_status_peer_del = HTT_TX_COMPL_IND_STAT_PEER_DEL,
};
/**
@@ -182,9 +185,7 @@ void
ol_tx_desc_update_group_credit(
ol_txrx_pdev_handle pdev,
u_int16_t tx_desc_id,
- int credit, u_int8_t absolute);
-
-
+ int credit, u_int8_t absolute, enum htt_tx_status status);
#define OL_TX_DESC_UPDATE_GROUP_CREDIT ol_tx_desc_update_group_credit
#ifdef DEBUG_HL_LOGGING
@@ -207,7 +208,7 @@ ol_tx_clear_group_credit_stats(ol_txrx_pdev_handle pdev);
#endif
#else
-#define OL_TX_DESC_UPDATE_GROUP_CREDIT(pdev, tx_desc_id, credit, absolute) /* no-op */
+#define OL_TX_DESC_UPDATE_GROUP_CREDIT(pdev, tx_desc_id, credit, absolute, status) /* no-op */
#endif
/**
diff --git a/CORE/SERVICES/COMMON/pktlog_ac_fmt.h b/CORE/SERVICES/COMMON/pktlog_ac_fmt.h
index 9f7551c1cb1a..622ce4175120 100644
--- a/CORE/SERVICES/COMMON/pktlog_ac_fmt.h
+++ b/CORE/SERVICES/COMMON/pktlog_ac_fmt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2013, 2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -333,7 +333,15 @@ struct ath_pktlog_bufhdr {
struct ath_pktlog_buf {
struct ath_pktlog_bufhdr bufhdr;
int32_t rd_offset;
- int32_t wr_offset;
+ volatile int32_t wr_offset;
+ /* Whenever this bytes written value croses 4K bytes,
+ * logging will be triggered
+ */
+ int32_t bytes_written;
+ /* Index of the messages sent to userspace */
+ uint32_t msg_index;
+ /* Offset for read */
+ loff_t offset;
char log_data[0];
};
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 6be4593bc86c..bb2839d5aede 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -2625,46 +2625,61 @@ static void wma_fw_stats_ind(tp_wma_handle wma, u_int8_t *buf)
}
#ifdef FEATURE_WLAN_EXTSCAN
-static int wma_extscan_start_stop_event_handler(void *handle,
- u_int8_t *cmd_param_info, u_int32_t len)
+/**
+ * wma_extscan_rsp_handler() - extscan rsp handler
+ * @wma: WMA global handle
+ * @buf: event fixed param buffer
+ *
+ * Return: 0 on success, error number otherwise
+ */
+static int wma_extscan_rsp_handler(tp_wma_handle wma, uint8_t *buf)
{
- tp_wma_handle wma = (tp_wma_handle)handle;
- WMI_EXTSCAN_START_STOP_EVENTID_param_tlvs *param_buf;
wmi_extscan_start_stop_event_fixed_param *event;
struct sir_extscan_generic_response *extscan_ind;
- u_int16_t event_type;
- tpAniSirGlobal pMac = (tpAniSirGlobal)vos_get_context(
+ uint16_t event_type;
+ uint8_t vdev_id;
+ tpAniSirGlobal mac_ctx = (tpAniSirGlobal)vos_get_context(
VOS_MODULE_ID_PE, wma->vos_context);
- if (!pMac) {
- WMA_LOGE("%s: Invalid pMac", __func__);
+ WMA_LOGI("%s: Enter", __func__);
+ if (!mac_ctx) {
+ WMA_LOGE("%s: Invalid mac_ctx", __func__);
return -EINVAL;
}
- if (!pMac->sme.pExtScanIndCb) {
+ if (!mac_ctx->sme.pExtScanIndCb) {
WMA_LOGE("%s: Callback not registered", __func__);
return -EINVAL;
}
- param_buf = (WMI_EXTSCAN_START_STOP_EVENTID_param_tlvs *)
- cmd_param_info;
- if (!param_buf) {
- WMA_LOGE("%s: Invalid extscan event", __func__);
+ if (!buf) {
+ WMA_LOGE("Invalid event buffer");
return -EINVAL;
}
- event = param_buf->fixed_param;
+
+ event = (wmi_extscan_start_stop_event_fixed_param *)buf;
+ vdev_id = event->vdev_id;
extscan_ind = vos_mem_malloc(sizeof(*extscan_ind));
if (!extscan_ind) {
WMA_LOGE("%s: extscan memory allocation failed", __func__);
- return -EINVAL;
+ return -ENOMEM;
}
+
switch (event->command) {
case WMI_EXTSCAN_START_CMDID:
event_type = eSIR_EXTSCAN_START_RSP;
extscan_ind->status = event->status;
extscan_ind->request_id = event->request_id;
+
+ if (!extscan_ind->status)
+ wma->interfaces[vdev_id].extscan_in_progress = true;
+
break;
case WMI_EXTSCAN_STOP_CMDID:
event_type = eSIR_EXTSCAN_STOP_RSP;
extscan_ind->status = event->status;
extscan_ind->request_id = event->request_id;
+
+ if (!extscan_ind->status)
+ wma->interfaces[vdev_id].extscan_in_progress = false;
+
break;
case WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID:
extscan_ind->status = event->status;
@@ -2705,20 +2720,72 @@ static int wma_extscan_start_stop_event_handler(void *handle,
}
break;
default:
- WMA_LOGE("%s: Unknown event(%d) from target",
- __func__, event->status);
+ WMA_LOGE("%s: Unknown event %d from target vdev_id %u",
+ __func__, event->status, vdev_id);
vos_mem_free(extscan_ind);
return -EINVAL;
}
- pMac->sme.pExtScanIndCb(pMac->hHdd,
+ mac_ctx->sme.pExtScanIndCb(mac_ctx->hHdd,
event_type, extscan_ind);
- WMA_LOGD("%s: sending event to umac for requestid %x"
- "with status %d", __func__,
+ WMA_LOGD("%s: sending event to umac for requestid %u with status %d",
+ __func__,
extscan_ind->request_id, extscan_ind->status);
vos_mem_free(extscan_ind);
return 0;
}
+/**
+ * wma_extscan_start_stop_event_handler() - extscan event handler
+ * @handle: WMA global handle
+ * @cmd_param_info: command event data
+ * @len: Length of @cmd_param_info
+ *
+ * Return: 0 on success, error number otherwise
+ */
+static int wma_extscan_start_stop_event_handler(void *handle,
+ uint8_t *cmd_param_info, uint32_t len)
+{
+ WMI_EXTSCAN_START_STOP_EVENTID_param_tlvs *param_buf;
+ wmi_extscan_start_stop_event_fixed_param *event;
+ u_int8_t *buf;
+ int buf_len = sizeof(*event);
+ vos_msg_t vos_msg = {0};
+
+ WMA_LOGI("%s: Enter", __func__);
+ param_buf = (WMI_EXTSCAN_START_STOP_EVENTID_param_tlvs *)
+ cmd_param_info;
+ if (!param_buf) {
+ WMA_LOGE("%s: Invalid extscan event", __func__);
+ return -EINVAL;
+ }
+
+ event = param_buf->fixed_param;
+ buf = vos_mem_malloc(buf_len);
+ if (!buf) {
+ WMA_LOGE("%s: extscan memory allocation failed", __func__);
+ return -ENOMEM;
+ }
+
+ vos_mem_zero(buf, buf_len);
+ vos_mem_copy(buf, (u_int8_t *)event, buf_len);
+
+ vos_msg.type = WDA_EXTSCAN_STATUS_IND;
+ vos_msg.bodyptr = buf;
+ vos_msg.bodyval = 0;
+
+ if (VOS_STATUS_SUCCESS !=
+ vos_mq_post_message(VOS_MQ_ID_WDA, &vos_msg)) {
+ WMA_LOGP("%s: Failed to post WDA_EXTSCAN_STATUS_IND msg",
+ __func__);
+ vos_mem_free(buf);
+ return -EINVAL;
+ }
+ WMA_LOGI("WDA_EXTSCAN_STATUS_IND posted");
+
+ return 0;
+}
+
+
static int wma_extscan_operations_event_handler(void *handle,
u_int8_t *cmd_param_info, u_int32_t len)
{
@@ -2745,8 +2812,7 @@ static int wma_extscan_operations_event_handler(void *handle,
oprn_event = param_buf->fixed_param;
oprn_ind = vos_mem_malloc(sizeof(*oprn_ind));
if (!oprn_ind) {
- WMA_LOGE("%s: extscan memory allocation failed",
- __func__);
+ WMA_LOGE("%s: extscan memory allocation failed", __func__);
vos_mem_free(oprn_ind);
return -EINVAL;
}
@@ -2771,7 +2837,7 @@ static int wma_extscan_operations_event_handler(void *handle,
__func__);
goto exit_handler;
default:
- WMA_LOGE("%s: Unknown event(%d) from target",
+ WMA_LOGE("%s: Unknown event %d from target",
__func__, oprn_event->event);
vos_mem_free(oprn_ind);
return -EINVAL;
@@ -2780,8 +2846,7 @@ static int wma_extscan_operations_event_handler(void *handle,
eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND,
oprn_ind);
exit_handler:
- WMA_LOGD("%s: sending scan progress event to hdd",
- __func__);
+ WMA_LOGD("%s: sending scan progress event to hdd", __func__);
vos_mem_free(oprn_ind);
return 0;
}
@@ -2812,8 +2877,7 @@ static int wma_extscan_table_usage_event_handler (void *handle,
event = param_buf->fixed_param;
tbl_usg_ind = vos_mem_malloc(sizeof(*tbl_usg_ind));
if (!tbl_usg_ind) {
- WMA_LOGE("%s: table usage allocation failed",
- __func__);
+ WMA_LOGE("%s: table usage allocation failed", __func__);
return -EINVAL;
}
tbl_usg_ind->requestId = event->request_id;
@@ -2822,8 +2886,7 @@ static int wma_extscan_table_usage_event_handler (void *handle,
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
tbl_usg_ind);
- WMA_LOGD("%s: sending scan_res available event to hdd",
- __func__);
+ WMA_LOGD("%s: sending scan_res available event to hdd", __func__);
vos_mem_free(tbl_usg_ind);
return 0;
}
@@ -2964,8 +3027,7 @@ static int wma_extscan_hotlist_match_event_handler(void *handle,
dest_hotlist = vos_mem_malloc(sizeof(*dest_hotlist) +
sizeof(*dest_ap) * numap);
if (!dest_hotlist) {
- WMA_LOGE("%s: Allocation failed for hotlist buffer",
- __func__);
+ WMA_LOGE("%s: Allocation failed for hotlist buffer", __func__);
return -EINVAL;
}
dest_ap = &dest_hotlist->ap[0];
@@ -2977,7 +3039,7 @@ static int wma_extscan_hotlist_match_event_handler(void *handle,
else
dest_hotlist->moreData = 0;
- WMA_LOGD("%s: Hotlist match: requestId: 0x%x,"
+ WMA_LOGD("%s: Hotlist match: requestId: %u,"
"numOfAps: %d", __func__,
dest_hotlist->requestId, dest_hotlist->numOfAps);
@@ -3174,51 +3236,6 @@ static int wma_group_num_bss_to_scan_id(const u_int8_t *cmd_param_info,
return 0;
}
-/** wma_extscan_print_scan_id_group_results() - print scan id cached results
- * @cached_result: cached result.
- *
- * This debug utility function prints the cached result.
- *
- * Return: 0 on success; error number otherwise
- */
-
-static int wma_extscan_print_scan_id_group_results(
- struct extscan_cached_scan_results *cached_result)
-{
- struct extscan_cached_scan_results *t_cached_result;
- struct extscan_cached_scan_result *t_scan_id_grp;
- tSirWifiScanResult *ap;
- int i, j;
-
- t_cached_result = cached_result;
- t_scan_id_grp = &t_cached_result->result[0];
-
- WMA_LOGD("Request id (%d)", t_cached_result->request_id);
- WMA_LOGD("More data (%d)", t_cached_result->more_data);
- WMA_LOGD("Num_scan_ids (%d)", t_cached_result->num_scan_ids);
- WMA_LOGD("%s: num_scan_ids:%d", __func__,
- t_cached_result->num_scan_ids);
-
- t_scan_id_grp = &t_cached_result->result[0];
- for (i = 0; i < t_cached_result->num_scan_ids; i++) {
- WMA_LOGD("Scan id (%d)", t_scan_id_grp->scan_id);
- WMA_LOGD("Flags (%d)", t_scan_id_grp->flags);
- WMA_LOGD("Num results (%d)", t_scan_id_grp->num_results);
-
- ap = &t_scan_id_grp->ap[0];
- for (j = 0; j < t_scan_id_grp->num_results; j++) {
- WMA_LOGD("timestamp (%llu)", ap->ts);
- WMA_LOGD("ssid (%s)", ap->ssid);
- WMA_LOGD("rtt (%u)", ap->rtt);
- WMA_LOGD("Channel (%u)", ap->channel);
- WMA_LOGD("Beacon period (%u)", ap->beaconPeriod);
- ap++;
- }
- t_scan_id_grp++;
- }
- return 0;
-}
-
static int wma_extscan_cached_results_event_handler(void *handle,
u_int8_t *cmd_param_info, u_int32_t len)
{
@@ -3232,10 +3249,6 @@ static int wma_extscan_cached_results_event_handler(void *handle,
wmi_extscan_rssi_info *src_rssi;
int numap, i, moredata, scan_ids_cnt;
int buf_len;
- wmi_extscan_wlan_descriptor *src_hotlist1;
- wmi_extscan_rssi_info *src_rssi1;
- char bssid1[6];
- char ssid1[33];
tpAniSirGlobal pMac = (tpAniSirGlobal )vos_get_context(
VOS_MODULE_ID_PE, wma->vos_context);
@@ -3258,7 +3271,9 @@ static int wma_extscan_cached_results_event_handler(void *handle,
src_hotlist = param_buf->bssid_list;
src_rssi = param_buf->rssi_list;
numap = event->num_entries_in_page;
- WMA_LOGD("nummap (%d)\n", numap);
+ WMA_LOGI("Total_entries %u first_entry_index %u", event->total_entries,
+ event->first_entry_index);
+ WMA_LOGI("num_entries_in_page %d", numap);
if (!src_hotlist || !src_rssi || !numap) {
WMA_LOGE("%s: Cached results empty, send 0 results", __func__);
goto noresults;
@@ -3270,54 +3285,9 @@ static int wma_extscan_cached_results_event_handler(void *handle,
else
moredata = 0;
- src_hotlist1 = src_hotlist;
- src_rssi1 = src_rssi;
- /* Just print fw data */
- WMA_LOGD("request id (%d)\n", event->request_id);
- WMA_LOGD("more data (%d)\n", moredata);
- WMA_LOGD("requestor_id (%u)\n", event->requestor_id);
- WMA_LOGD("vdev_id (%u)\n", event->vdev_id);
- WMA_LOGD("extscan_request_id (%u)\n", event->extscan_request_id);
- WMA_LOGD("extscan_requestor_id (%u)\n", event->extscan_requestor_id);
- WMA_LOGD("extscan_vdev_id (%u)\n", event->extscan_vdev_id);
- WMA_LOGD("table id(%u)\n", event->table_id);
- WMA_LOGD("current_tstamp(%u)\n", event->current_tstamp);
- WMA_LOGD("total_entries(%u)\n", event->total_entries);
- WMA_LOGD("first_entry_index (%u)\n", event->first_entry_index);
- WMA_LOGD("num_entries_in_page(%u)\n", event->num_entries_in_page);
-
- WMA_LOGE("bssid list \n");
- for (i = 0; i < numap; i++) {
- WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist1->bssid, bssid1);
- vos_mem_set (ssid1, 33, '\0');
- vos_mem_copy(ssid1, src_hotlist1->ssid.ssid, src_hotlist1->ssid.ssid_len);
- WMA_LOGD("bssid %02x:%02x:%02x:%02x:%02x:%02x\n", bssid1[0], bssid1[1], bssid1[2], bssid1[3], bssid1[4], bssid1[5]);
- WMA_LOGD("ssid (%s)\n", ssid1);
- WMA_LOGD("channel (%u)\n", src_hotlist1->channel);
- WMA_LOGD("capability (%u)\n", src_hotlist1->capabilities);
- WMA_LOGD("beacon interval (%u)\n", src_hotlist1->beacon_interval);
- WMA_LOGD("tstamp (%u)\n", src_hotlist1->tstamp);
- WMA_LOGD("flags (%d)\n", src_hotlist1->flags);
- WMA_LOGD("rtt (%u)\n", src_hotlist1->rtt);
- WMA_LOGD("rtt_sd (%u)\n", src_hotlist1->rtt_sd);
- WMA_LOGD("number_rssi_samples (%u)\n", src_hotlist1->number_rssi_samples);
- WMA_LOGD("ie length (%u)\n", src_hotlist1->ie_length);
- src_hotlist1++;
- }
-
- WMA_LOGE("rssi list \n");
- for (i = 0; i < numap; i++) {
- WMA_LOGD("rssi (%d)\n", src_rssi1->rssi);
- WMA_LOGD("tstamp (%u)\n", src_rssi1->tstamp);
- WMA_LOGD("scan id (%d)\n", src_rssi1->scan_cycle_id);
- WMA_LOGD("flags (%d)\n", src_rssi1->flags);
- src_rssi1++;
- }
-
dest_cachelist = vos_mem_malloc(sizeof(*dest_cachelist));
if (!dest_cachelist) {
- WMA_LOGE("%s: Allocation failed for cached "
- "results event", __func__);
+ WMA_LOGE("%s: vos_mem_malloc failed", __func__);
return -ENOMEM;
}
vos_mem_zero(dest_cachelist, sizeof(*dest_cachelist));
@@ -3325,13 +3295,13 @@ static int wma_extscan_cached_results_event_handler(void *handle,
dest_cachelist->more_data = moredata;
scan_ids_cnt = wma_extscan_find_unique_scan_ids(cmd_param_info);
- WMA_LOGD("%s: scan_ids_cnt %d", __func__, scan_ids_cnt);
+ WMA_LOGI("scan_ids_cnt %d", scan_ids_cnt);
dest_cachelist->num_scan_ids = scan_ids_cnt;
buf_len = sizeof(*dest_result) * scan_ids_cnt;
dest_cachelist->result = vos_mem_malloc(buf_len);
if (!dest_cachelist->result) {
- WMA_LOGE("%s: Allocation failed for scanid grouping", __func__);
+ WMA_LOGE("%s: vos_mem_malloc failed", __func__);
vos_mem_free(dest_cachelist);
return -ENOMEM;
}
@@ -3339,12 +3309,11 @@ static int wma_extscan_cached_results_event_handler(void *handle,
dest_result = dest_cachelist->result;
wma_fill_num_results_per_scan_id(cmd_param_info, dest_result);
wma_group_num_bss_to_scan_id(cmd_param_info, dest_cachelist);
- wma_extscan_print_scan_id_group_results(dest_cachelist);
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_CACHED_RESULTS_IND,
dest_cachelist);
- WMA_LOGD("%s: sending cached results event", __func__);
+ WMA_LOGI("%s: sending cached results event", __func__);
dest_result = dest_cachelist->result;
for (i = 0; i < dest_cachelist->num_scan_ids; i++) {
@@ -3363,7 +3332,7 @@ noresults:
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_CACHED_RESULTS_IND,
&empty_cachelist);
- WMA_LOGD("%s: sending cached results event", __func__);
+ WMA_LOGI("%s: sending cached results event", __func__);
return 0;
}
@@ -3405,25 +3374,23 @@ static int wma_extscan_change_results_event_handler(void *handle,
numap = event->num_entries_in_page;
if (!src_chglist || !numap) {
- WMA_LOGE("%s: changed monitor results AP's"
- "list invalid", __func__);
+ WMA_LOGE("%s: Results invalid", __func__);
return -EINVAL;
}
for (i = 0; i < numap; i++) {
rssi_num += src_chglist->num_rssi_samples;
}
if (event->first_entry_index +
- event->num_entries_in_page < event->total_entries) {
+ event->num_entries_in_page < event->total_entries)
moredata = 1;
- } else {
+ else
moredata = 0;
- }
+
dest_chglist = vos_mem_malloc(sizeof(*dest_chglist) +
sizeof(*dest_ap) * numap +
sizeof(tANI_S32) * rssi_num);
if (!dest_chglist) {
- WMA_LOGE("%s: Allocation failed for change monitor",
- __func__);
+ WMA_LOGE("%s: vos_mem_malloc failed", __func__);
return -EINVAL;
}
dest_ap = &dest_chglist->ap[0];
@@ -3498,15 +3465,14 @@ static int wma_passpoint_match_event_handler(void *handle,
dest_match = vos_mem_malloc(sizeof(*dest_match) +
event->ie_length + event->anqp_length);
if (!dest_match) {
- WMA_LOGE("%s: Allocation failed for passpoint match buffer",
- __func__);
+ WMA_LOGE("%s: vos_mem_malloc failed", __func__);
return -EINVAL;
}
dest_ap = &dest_match->ap;
dest_match->request_id = 0;
dest_match->id = event->id;
dest_match->anqp_len = event->anqp_length;
- WMA_LOGD("%s: passpoint match: id: (%u) anqp length(%u)", __func__,
+ WMA_LOGI("%s: passpoint match: id: %u anqp length %u", __func__,
dest_match->id, dest_match->anqp_len);
dest_ap->channel = event->channel_mhz;
@@ -3588,8 +3554,7 @@ wma_extscan_hotlist_ssid_match_event_handler(void *handle,
dest_hotlist = vos_mem_malloc(sizeof(*dest_hotlist) +
sizeof(*dest_ap) * numap);
if (!dest_hotlist) {
- WMA_LOGE("%s: Allocation failed for hotlist buffer",
- __func__);
+ WMA_LOGE("%s: Allocation failed for hotlist buffer", __func__);
return -EINVAL;
}
@@ -3603,7 +3568,7 @@ wma_extscan_hotlist_ssid_match_event_handler(void *handle,
else
dest_hotlist->moreData = 0;
- WMA_LOGD("%s: Hotlist match: requestId: 0x%x,numOfAps: %d", __func__,
+ WMA_LOGD("%s: Hotlist match: requestId: %u, numOfAps: %d", __func__,
dest_hotlist->requestId, dest_hotlist->numOfAps);
for (j = 0; j < numap; j++) {
@@ -22878,7 +22843,6 @@ VOS_STATUS wma_start_extscan(tp_wma_handle wma,
return VOS_STATUS_E_FAILURE;
}
- wma->interfaces[pstart->sessionId].extscan_in_progress = true;
WMA_LOGD("Extscan start request sent successfully for vdev %d",
pstart->sessionId);
@@ -22927,7 +22891,6 @@ VOS_STATUS wma_stop_extscan(tp_wma_handle wma,
return VOS_STATUS_E_FAILURE;
}
- wma->interfaces[pstopcmd->sessionId].extscan_in_progress = false;
WMA_LOGD("Extscan stop request sent successfully for vdev %d",
pstopcmd->sessionId);
@@ -24664,6 +24627,49 @@ static VOS_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
}
#endif /* WLAN_FEATURE_MEMDUMP */
+#if !defined(REMOVE_PKT_LOG)
+/**
+ * wma_set_wifi_start_logger() - Send the WMA commands to start/stop logging
+ * @wma_handle: WMA handle
+ * @start_log: Struture containing the start wifi logger params
+ *
+ * This function is used to send the WMA commands to start/stop logging
+ *
+ * Return: None
+ *
+ */
+void wma_set_wifi_start_logger(void *wma_handle,
+ struct sir_wifi_start_log *start_log)
+{
+ void *vos_context;
+ struct ol_softc *scn;
+ uint32_t log_state;
+
+ if (!start_log) {
+ WMA_LOGE("%s: start_log pointer is NULL", __func__);
+ return;
+ }
+ if (!wma_handle) {
+ WMA_LOGE("%s: Invalid wma handle", __func__);
+ return;
+ }
+
+ vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
+ scn = vos_get_context(VOS_MODULE_ID_HIF, vos_context);
+
+ log_state = ATH_PKTLOG_ANI | ATH_PKTLOG_RCUPDATE | ATH_PKTLOG_RCFIND |
+ ATH_PKTLOG_RX | ATH_PKTLOG_TX | ATH_PKTLOG_TEXT;
+
+ if (start_log->verbose_level == WLAN_LOG_LEVEL_ACTIVE) {
+ pktlog_enable(scn, log_state);
+ WMA_LOGI("%s: Enabling per packet stats", __func__);
+ } else {
+ pktlog_enable(scn, 0);
+ WMA_LOGI("%s: Disabling per packet stats", __func__);
+ }
+}
+#endif
+
/*
* function : wma_mc_process_msg
* Description :
@@ -25219,6 +25225,10 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
wma_reset_passpoint_network_list(wma_handle,
(struct wifi_passpoint_req *)msg->bodyptr);
break;
+ case WDA_EXTSCAN_STATUS_IND:
+ wma_extscan_rsp_handler(wma_handle, msg->bodyptr);
+ vos_mem_free(msg->bodyptr);
+ break;
#endif
case WDA_SET_SCAN_MAC_OUI_REQ:
wma_scan_probe_setoui(wma_handle, msg->bodyptr);
@@ -25418,6 +25428,11 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
(struct fw_dump_req*)msg->bodyptr);
vos_mem_free(msg->bodyptr);
break;
+ case SIR_HAL_START_STOP_PACKET_STATS:
+ wma_set_wifi_start_logger(wma_handle,
+ (struct sir_wifi_start_log *)msg->bodyptr);
+ vos_mem_free(msg->bodyptr);
+ break;
default:
WMA_LOGD("unknow msg type %x", msg->type);
/* Do Nothing? MSG Body should be freed at here */
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index 8eca27dfe391..e7d62c05b776 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -1593,4 +1593,12 @@ VOS_STATUS wma_vdev_start(tp_wma_handle wma, struct wma_vdev_start_req *req,
void wma_remove_vdev_req(tp_wma_handle wma, u_int8_t vdev_id, u_int8_t type);
+#ifdef REMOVE_PKT_LOG
+static inline void wma_set_wifi_start_logger(void *wma_handle,
+ struct sir_wifi_start_log *start_log)
+{
+ return;
+}
+#endif
+
#endif
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 5370b1a979c6..0e7dc9c9359e 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -4279,4 +4279,7 @@ eHalStatus sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
uint32_t notify_id,
int32_t val);
+eHalStatus sme_wifi_start_logger(tHalHandle hal,
+ struct sir_wifi_start_log start_log);
+
#endif //#if !defined( __SME_API_H )
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 61c511f88510..e3d4daa3ae81 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -16363,3 +16363,67 @@ eHalStatus sme_set_tsfcb
}
return status;
}
+
+/*
+ * sme_wifi_start_logger() - This function send the command to WMA
+ * to either start/stop logging
+ * @hal: HAL context
+ * @start_log: Structure containing the wifi start logger params
+ *
+ * This function send the command to WMA to either start/stop logging
+ *
+ * Return: eHAL_STATUS_SUCCESS on successful posting
+ */
+eHalStatus sme_wifi_start_logger(tHalHandle hal,
+ struct sir_wifi_start_log start_log)
+{
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ tpAniSirGlobal mac = PMAC_STRUCT(hal);
+ vos_msg_t vos_message;
+ struct sir_wifi_start_log *req_msg;
+ uint32_t len;
+
+ if (start_log.ring_id == RING_ID_PER_PACKET_STATS) {
+ len = sizeof(*req_msg);
+ req_msg = vos_mem_malloc(len);
+ if (!req_msg) {
+ smsLog(mac, LOGE, FL("vos_mem_malloc failed"));
+ return eHAL_STATUS_FAILED_ALLOC;
+ }
+
+ vos_mem_zero(req_msg, len);
+
+ req_msg->verbose_level = start_log.verbose_level;
+ req_msg->flag = start_log.flag;
+ req_msg->ring_id = start_log.ring_id;
+
+ status = sme_AcquireGlobalLock(&mac->sme);
+ if (status != eHAL_STATUS_SUCCESS) {
+ smsLog(mac, LOGE,
+ FL("sme_AcquireGlobalLock failed!(status=%d)"),
+ status);
+ vos_mem_free(req_msg);
+ return status;
+ }
+
+ /* Serialize the req through MC thread */
+ vos_message.bodyptr = req_msg;
+ vos_message.type = SIR_HAL_START_STOP_PACKET_STATS;
+ vos_status = vos_mq_post_message(VOS_MQ_ID_WDA, &vos_message);
+ if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
+ smsLog(mac, LOGE,
+ FL("vos_mq_post_message failed!(err=%d)"),
+ vos_status);
+ vos_mem_free(req_msg);
+ status = eHAL_STATUS_FAILURE;
+ }
+ sme_ReleaseGlobalLock(&mac->sme);
+ } else if (start_log.ring_id == RING_ID_CONNECTIVITY) {
+ /* Start/stop connectivity events */
+ /* No handling for now */
+ } else {
+ smsLog(mac, LOGE, FL("Invalid parameter"));
+ }
+ return status;
+}
diff --git a/CORE/SVC/inc/wlan_logging_sock_svc.h b/CORE/SVC/inc/wlan_logging_sock_svc.h
index 71b2386d3374..205d7ac0b2af 100644
--- a/CORE/SVC/inc/wlan_logging_sock_svc.h
+++ b/CORE/SVC/inc/wlan_logging_sock_svc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -44,5 +44,6 @@ int wlan_logging_sock_deinit_svc(void);
int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf);
int wlan_logging_sock_deactivate_svc(void);
int wlan_log_to_user(VOS_TRACE_LEVEL log_level, char *to_be_sent, int length);
+void wlan_logging_set_per_pkt_stats(void);
#endif /* WLAN_LOGGING_SOCK_SVC_H */
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index 323f70e8eff7..45a9ef7bf745 100644
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -41,6 +41,7 @@
#include <vos_trace.h>
#include <kthread.h>
#include <adf_os_time.h>
+#include "pktlog_ac.h"
#define LOGGING_TRACE(level, args...) \
VOS_TRACE(VOS_MODULE_ID_HDD, level, ## args)
@@ -51,6 +52,9 @@
#define ANI_NL_MSG_READY_IND_TYPE 90
#define MAX_LOGMSG_LENGTH 4096
+#define HOST_LOG_DRIVER_MSG 0x001
+#define HOST_LOG_PER_PKT_STATS 0x002
+
struct log_msg {
struct list_head node;
unsigned int radio;
@@ -88,6 +92,10 @@ struct wlan_logging {
/* current logbuf to which the log will be filled to */
struct log_msg *pcur_node;
bool is_buffer_free;
+ /* Event flag used for wakeup and post indication*/
+ unsigned long eventFlag;
+ /* Indicates logger thread is activated */
+ bool is_active;
};
static struct wlan_logging gwlan_logging;
@@ -308,8 +316,10 @@ int wlan_log_to_user(VOS_TRACE_LEVEL log_level, char *to_be_sent, int length)
/* If there is logger app registered wakeup the logging
* thread
*/
- if (gapp_pid != INVALID_PID)
+ if (gapp_pid != INVALID_PID) {
+ set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
wake_up_interruptible(&gwlan_logging.wait_queue);
+ }
}
if ((gapp_pid != INVALID_PID)
@@ -429,6 +439,9 @@ static int wlan_logging_thread(void *Arg)
ret_wait_status = wait_event_interruptible(
gwlan_logging.wait_queue,
(!list_empty(&gwlan_logging.filled_list)
+ || test_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag)
+ || test_bit(HOST_LOG_PER_PKT_STATS,
+ &gwlan_logging.eventFlag)
|| gwlan_logging.exit));
if (ret_wait_status == -ERESTARTSYS) {
@@ -442,9 +455,20 @@ static int wlan_logging_thread(void *Arg)
break;
}
- ret = send_filled_buffers_to_user();
- if (-ENOMEM == ret) {
- msleep(200);
+ if (test_and_clear_bit(HOST_LOG_DRIVER_MSG,
+ &gwlan_logging.eventFlag)) {
+ ret = send_filled_buffers_to_user();
+ if (-ENOMEM == ret) {
+ msleep(200);
+ }
+ }
+
+ if (test_and_clear_bit(HOST_LOG_PER_PKT_STATS,
+ &gwlan_logging.eventFlag)) {
+ ret = pktlog_send_per_pkt_stats_to_user();
+ if (-ENOMEM == ret) {
+ msleep(200);
+ }
}
}
@@ -486,6 +510,7 @@ static int wlan_logging_proc_sock_rx_msg(struct sk_buff *skb)
wlan_queue_logmsg_for_app();
}
spin_unlock_bh(&gwlan_logging.spin_lock);
+ set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
wake_up_interruptible(&gwlan_logging.wait_queue);
} else {
/* This is to set the default levels (WLAN logging
@@ -543,6 +568,8 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
init_waitqueue_head(&gwlan_logging.wait_queue);
gwlan_logging.exit = false;
+ clear_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
+ clear_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag);
init_completion(&gwlan_logging.shutdown_comp);
gwlan_logging.thread = kthread_create(wlan_logging_thread, NULL,
"wlan_logging_thread");
@@ -557,6 +584,7 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
return -ENOMEM;
}
wake_up_process(gwlan_logging.thread);
+ gwlan_logging.is_active = true;
nl_srv_register(ANI_NL_MSG_LOG, wlan_logging_proc_sock_rx_msg);
@@ -577,6 +605,9 @@ int wlan_logging_sock_deactivate_svc(void)
INIT_COMPLETION(gwlan_logging.shutdown_comp);
gwlan_logging.exit = true;
+ gwlan_logging.is_active = false;
+ clear_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
+ clear_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag);
wake_up_interruptible(&gwlan_logging.wait_queue);
wait_for_completion(&gwlan_logging.shutdown_comp);
@@ -606,4 +637,22 @@ int wlan_logging_sock_deinit_svc(void)
return 0;
}
+
+/**
+ * wlan_logging_set_per_pkt_stats() - This function triggers per packet logging
+ *
+ * This function is used to send signal to the logger thread for logging per
+ * packet stats
+ *
+ * Return: None
+ *
+ */
+void wlan_logging_set_per_pkt_stats(void)
+{
+ if (gwlan_logging.is_active == false)
+ return;
+
+ set_bit(HOST_LOG_PER_PKT_STATS, &gwlan_logging.eventFlag);
+ wake_up_interruptible(&gwlan_logging.wait_queue);
+}
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
diff --git a/CORE/SVC/src/nlink/wlan_nlink_srv.c b/CORE/SVC/src/nlink/wlan_nlink_srv.c
index 4bd41e41e0ac..acf1338b02fe 100644
--- a/CORE/SVC/src/nlink/wlan_nlink_srv.c
+++ b/CORE/SVC/src/nlink/wlan_nlink_srv.c
@@ -99,6 +99,7 @@ void nl_srv_exit(void)
#endif /* WLAN_KD_READY_NOTIFIER */
{
netlink_kernel_release(nl_srv_sock);
+ nl_srv_sock = NULL;
}
/*
diff --git a/CORE/UTILS/PKTLOG/include/pktlog_ac.h b/CORE/UTILS/PKTLOG/include/pktlog_ac.h
index 7d3f3c55cb73..dc7f3f6f575b 100644
--- a/CORE/UTILS/PKTLOG/include/pktlog_ac.h
+++ b/CORE/UTILS/PKTLOG/include/pktlog_ac.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2013, 2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -48,6 +48,13 @@
#define PKTLOG_MODE_SYSTEM 1
#define PKTLOG_MODE_ADAPTER 2
+/*
+ * The proc entry starts with magic number and version field which will be
+ * used by post processing scripts. These fields are not needed by applications
+ * that do not use these scripts. This is skipped using the offset value.
+ */
+#define PKTLOG_READ_OFFSET 8
+
/* Opaque softc */
struct ol_ath_generic_softc_t;
typedef struct ol_ath_generic_softc_t* ol_ath_generic_softc_handle;
@@ -55,6 +62,10 @@ extern void pktlog_disable_adapter_logging(struct ol_softc *scn);
extern int pktlog_alloc_buf(struct ol_softc *scn);
extern void pktlog_release_buf(struct ol_softc *scn);
+ssize_t pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos,
+ struct ath_pktlog_info *pl_info);
+int pktlog_send_per_pkt_stats_to_user(void);
+
struct ol_pl_arch_dep_funcs {
void (*pktlog_init) (struct ol_softc *scn);
int (*pktlog_enable) (struct ol_softc *scn,
@@ -123,8 +134,29 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data);
} \
} while (0)
+void pktlog_init(struct ol_softc *scn);
+int pktlog_enable(struct ol_softc *scn, int32_t log_state);
+int pktlog_setsize(struct ol_softc *scn, int32_t log_state);
+int pktlog_disable(struct ol_softc *scn);
+
#else /* REMOVE_PKT_LOG */
#define ol_pktlog_attach(_scn) ({ (void)_scn; })
#define ol_pktlog_detach(_scn) ({ (void)_scn; })
+static inline void pktlog_init(struct ol_softc *scn)
+{
+ return;
+}
+static int pktlog_enable(struct ol_softc *scn, int32_t log_state)
+{
+ return 0;
+}
+static int pktlog_setsize(struct ol_softc *scn, int32_t log_state)
+{
+ return 0;
+}
+static int pktlog_disable(struct ol_softc *scn)
+{
+ return 0;
+}
#endif /* REMOVE_PKT_LOG */
#endif /* _PKTLOG_AC_H_ */
diff --git a/CORE/UTILS/PKTLOG/linux_ac.c b/CORE/UTILS/PKTLOG/linux_ac.c
index ae321a177c85..8e148f16aff5 100644
--- a/CORE/UTILS/PKTLOG/linux_ac.c
+++ b/CORE/UTILS/PKTLOG/linux_ac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -43,6 +43,8 @@
#include <pktlog_ac_i.h>
#include <pktlog_ac_fmt.h>
#include <pktlog_ac.h>
+#include "i_vos_diag_core_log.h"
+#include "vos_diag_core_log.h"
#define PKTLOG_TAG "ATH_PKTLOG"
#define PKTLOG_DEVNAME_SIZE 32
@@ -568,6 +570,251 @@ static int pktlog_release(struct inode *i, struct file *f)
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
+/**
+ * pktlog_send_per_pkt_stats_to_user() - This function is used to send the per
+ * packet statistics to the user
+ *
+ * This function is used to send the per packet statistics to the user
+ *
+ * Return: Success if the message is posted to user
+ *
+ */
+int pktlog_send_per_pkt_stats_to_user(void)
+{
+ ssize_t ret_val;
+ struct vos_log_pktlog_info *pktlog = NULL;
+ void *vos = vos_get_global_context(VOS_MODULE_ID_HIF, NULL);
+ ol_txrx_pdev_handle txrx_pdev =
+ vos_get_context(VOS_MODULE_ID_TXRX, vos);
+ struct ath_pktlog_info *pl_info;
+
+ if (!txrx_pdev) {
+ printk(PKTLOG_TAG "%s: Invalid TxRx handle \n", __func__);
+ return -EINVAL;
+ }
+
+ pl_info = txrx_pdev->pl_dev->pl_info;
+
+ if (!pl_info || !pl_info->buf) {
+ printk(PKTLOG_TAG "%s: Shouldnt happen. pl_info is invalid \n",
+ __func__);
+ return -EINVAL;
+ }
+
+ if (pl_info->buf->rd_offset == -1) {
+ return -EINVAL;
+ }
+
+ do {
+ pktlog = (struct vos_log_pktlog_info *)
+ vos_mem_malloc(sizeof(struct vos_log_pktlog_info) +
+ VOS_LOG_PKT_LOG_SIZE);
+ if (!pktlog) {
+ printk(PKTLOG_TAG "%s: Memory allocation failed \n", __func__);
+ return -ENOMEM;
+ }
+
+ vos_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE);
+ vos_log_set_code(pktlog, LOG_WLAN_PKT_LOG_INFO_C);
+
+ pktlog->buf_len = 0;
+
+ /*
+ * @ret_val: ret_val gives the actual data read from the buffer.
+ * When there is no more data to read, this value will be zero
+ * @offset: offset in the ring buffer. Initially it is zero and
+ * is incremented during every read based on number of bytes
+ * read
+ */
+ ret_val = pktlog_read_proc_entry(pktlog->buf,
+ VOS_LOG_PKT_LOG_SIZE,
+ &pl_info->buf->offset,
+ pl_info);
+ if (ret_val) {
+ int index = 0;
+ struct ath_pktlog_hdr *temp;
+ while (1) {
+ if ((ret_val - index) <
+ sizeof(struct ath_pktlog_hdr)) {
+ /* Partial header */
+ pl_info->buf->offset -= (ret_val - index);
+ ret_val = index;
+ break;
+ }
+ temp = (struct ath_pktlog_hdr *)
+ (pktlog->buf + index);
+ if ((ret_val - index) < (temp->size +
+ sizeof(struct ath_pktlog_hdr))) {
+ /* Partial record payload */
+ pl_info->buf->offset -= (ret_val - index);
+ ret_val = index;
+ break;
+ }
+ index += temp->size +
+ sizeof(struct ath_pktlog_hdr);
+ }
+ }
+
+ /* Data will include message index/seq number and buf length */
+ pktlog->buf_len = ret_val;
+ if (ret_val) {
+ vos_log_set_length(pktlog, ret_val +
+ sizeof(struct vos_log_pktlog_info));
+ pktlog->seq_no = pl_info->buf->msg_index++;
+ WLAN_VOS_DIAG_LOG_REPORT(pktlog);
+ } else {
+ vos_mem_free(pktlog);
+ }
+ } while (ret_val);
+
+ return 0;
+}
+
+/**
+ * pktlog_read_proc_entry() - This function is used to read data from the
+ * proc entry into the readers buffer
+ * @buf: Readers buffer
+ * @nbytes: Number of bytes to read
+ * @ppos: Offset within the drivers buffer
+ * @pl_info: Packet log information pointer
+ *
+ * This function is used to read data from the proc entry into the readers
+ * buffer. Its functionality is similar to 'pktlog_read' which does
+ * copy to user to the user space buffer
+ *
+ * Return: Number of bytes read from the buffer
+ *
+ */
+ssize_t
+pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos,
+ struct ath_pktlog_info *pl_info)
+{
+ size_t bufhdr_size;
+ size_t count = 0, ret_val = 0;
+ int rem_len;
+ int start_offset, end_offset;
+ int fold_offset, ppos_data, cur_rd_offset, cur_wr_offset;
+ struct ath_pktlog_buf *log_buf = pl_info->buf;
+
+ if (log_buf == NULL)
+ return 0;
+
+ if (*ppos == 0 && pl_info->log_state) {
+ pl_info->saved_state = pl_info->log_state;
+ pl_info->log_state = 0;
+ }
+
+ bufhdr_size = sizeof(log_buf->bufhdr);
+
+ /* copy valid log entries from circular buffer into user space */
+ rem_len = nbytes;
+ count = 0;
+
+ if (*ppos < bufhdr_size) {
+ count = MIN((bufhdr_size - *ppos), rem_len);
+ vos_mem_copy(buf, ((char *)&log_buf->bufhdr) + *ppos,
+ count);
+ rem_len -= count;
+ ret_val += count;
+ }
+
+ start_offset = log_buf->rd_offset;
+ cur_wr_offset = log_buf->wr_offset;
+
+ if ((rem_len == 0) || (start_offset < 0))
+ goto rd_done;
+
+ fold_offset = -1;
+ cur_rd_offset = start_offset;
+
+ /* Find the last offset and fold-offset if the buffer is folded */
+ do {
+ struct ath_pktlog_hdr *log_hdr;
+ int log_data_offset;
+
+ log_hdr = (struct ath_pktlog_hdr *) (log_buf->log_data +
+ cur_rd_offset);
+
+ log_data_offset = cur_rd_offset + sizeof(struct ath_pktlog_hdr);
+
+ if ((fold_offset == -1)
+ && ((pl_info->buf_size - log_data_offset)
+ <= log_hdr->size))
+ fold_offset = log_data_offset - 1;
+
+ PKTLOG_MOV_RD_IDX(cur_rd_offset, log_buf, pl_info->buf_size);
+
+ if ((fold_offset == -1) && (cur_rd_offset == 0)
+ && (cur_rd_offset != cur_wr_offset))
+ fold_offset = log_data_offset + log_hdr->size - 1;
+
+ end_offset = log_data_offset + log_hdr->size - 1;
+ } while (cur_rd_offset != cur_wr_offset);
+
+ ppos_data = *ppos + ret_val - bufhdr_size + start_offset;
+
+ if (fold_offset == -1) {
+ if (ppos_data > end_offset)
+ goto rd_done;
+
+ count = MIN(rem_len, (end_offset - ppos_data + 1));
+ vos_mem_copy(buf + ret_val,
+ log_buf->log_data + ppos_data,
+ count);
+ ret_val += count;
+ rem_len -= count;
+ } else {
+ if (ppos_data <= fold_offset) {
+ count = MIN(rem_len, (fold_offset - ppos_data + 1));
+ vos_mem_copy(buf + ret_val,
+ log_buf->log_data + ppos_data,
+ count);
+ ret_val += count;
+ rem_len -= count;
+ }
+
+ if (rem_len == 0)
+ goto rd_done;
+
+ ppos_data =
+ *ppos + ret_val - (bufhdr_size +
+ (fold_offset - start_offset + 1));
+
+ if (ppos_data <= end_offset) {
+ count = MIN(rem_len, (end_offset - ppos_data + 1));
+ vos_mem_copy(buf + ret_val,
+ log_buf->log_data + ppos_data,
+ count);
+ ret_val += count;
+ rem_len -= count;
+ }
+ }
+
+rd_done:
+ if ((ret_val < nbytes) && pl_info->saved_state) {
+ pl_info->log_state = pl_info->saved_state;
+ pl_info->saved_state = 0;
+ }
+ *ppos += ret_val;
+
+ if (ret_val == 0) {
+ PKTLOG_LOCK(pl_info);
+ /* Write pointer might have been updated during the read.
+ * So, if some data is written into, lets not reset the pointers.
+ * We can continue to read from the offset position
+ */
+ if (cur_wr_offset == log_buf->wr_offset) {
+ pl_info->buf->rd_offset = -1;
+ pl_info->buf->wr_offset = 0;
+ pl_info->buf->bytes_written = 0;
+ pl_info->buf->offset = PKTLOG_READ_OFFSET;
+ }
+ PKTLOG_UNLOCK(pl_info);
+ }
+
+ return ret_val;
+}
+
static ssize_t
pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
{
diff --git a/CORE/UTILS/PKTLOG/pktlog_ac.c b/CORE/UTILS/PKTLOG/pktlog_ac.c
index 3ff3ac427b9d..3bc0ae1f4222 100644
--- a/CORE/UTILS/PKTLOG/pktlog_ac.c
+++ b/CORE/UTILS/PKTLOG/pktlog_ac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -32,11 +32,6 @@
#include "vos_api.h"
#include "wlan_qct_wda.h"
-void pktlog_init(struct ol_softc *scn);
-int pktlog_enable(struct ol_softc *scn, int32_t log_state);
-int pktlog_setsize(struct ol_softc *scn, int32_t log_state);
-int pktlog_disable(struct ol_softc *scn);
-
wdi_event_subscribe PKTLOG_TX_SUBSCRIBER;
wdi_event_subscribe PKTLOG_RX_SUBSCRIBER;
wdi_event_subscribe PKTLOG_RX_REMOTE_SUBSCRIBER;
@@ -352,12 +347,17 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state)
ASSERT(0);
return -1;
}
-
- pl_info->buf->bufhdr.version = CUR_PKTLOG_VER;
- pl_info->buf->bufhdr.magic_num = PKTLOG_MAGIC_NUM;
- pl_info->buf->wr_offset = 0;
- pl_info->buf->rd_offset = -1;
}
+
+ pl_info->buf->bufhdr.version = CUR_PKTLOG_VER;
+ pl_info->buf->bufhdr.magic_num = PKTLOG_MAGIC_NUM;
+ pl_info->buf->wr_offset = 0;
+ pl_info->buf->rd_offset = -1;
+ /* These below variables are used by per packet stats*/
+ pl_info->buf->bytes_written = 0;
+ pl_info->buf->msg_index = 1;
+ pl_info->buf->offset = PKTLOG_READ_OFFSET;
+
pl_info->start_time_thruput = OS_GET_TIMESTAMP();
pl_info->start_time_per = pl_info->start_time_thruput;
diff --git a/CORE/UTILS/PKTLOG/pktlog_internal.c b/CORE/UTILS/PKTLOG/pktlog_internal.c
index bc6248de8aca..c22c7f474e7a 100644
--- a/CORE/UTILS/PKTLOG/pktlog_internal.c
+++ b/CORE/UTILS/PKTLOG/pktlog_internal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -34,12 +34,15 @@
#include "htt_internal.h"
#include "pktlog_ac_i.h"
#include "wma_api.h"
+#include "wlan_logging_sock_svc.h"
#define TX_DESC_ID_LOW_MASK 0xffff
#define TX_DESC_ID_LOW_SHIFT 0
#define TX_DESC_ID_HIGH_MASK 0xffff0000
#define TX_DESC_ID_HIGH_SHIFT 16
+#define PER_PACKET_STATS_THRESHOLD 4096
+
void
pktlog_getbuf_intsafe(struct ath_pktlog_arg *plarg)
{
@@ -115,6 +118,31 @@ pktlog_getbuf_intsafe(struct ath_pktlog_arg *plarg)
plarg->buf = log_ptr;
}
+/**
+ * pktlog_check_threshold() - This function checks threshold for triggering
+ * packet stats
+ * @pl_info: Packet log information pointer
+ * @log_size: Size of current packet log information
+ *
+ * This function internally triggers logging of per packet stats when the
+ * incoming data crosses threshold limit
+ *
+ * Return: None
+ *
+ */
+void pktlog_check_threshold(struct ath_pktlog_info *pl_info,
+ size_t log_size)
+{
+ PKTLOG_LOCK(pl_info);
+ pl_info->buf->bytes_written += log_size + sizeof(struct ath_pktlog_hdr);
+
+ if (pl_info->buf->bytes_written >= PER_PACKET_STATS_THRESHOLD) {
+ wlan_logging_set_per_pkt_stats();
+ pl_info->buf->bytes_written = 0;
+ }
+ PKTLOG_UNLOCK(pl_info);
+}
+
char *
pktlog_getbuf(struct ol_pktlog_dev_t *pl_dev,
struct ath_pktlog_info *pl_info,
@@ -143,6 +171,7 @@ pktlog_getbuf(struct ol_pktlog_dev_t *pl_dev,
PKTLOG_UNLOCK(pl_info);
}
+ pktlog_check_threshold(pl_info, log_size);
return plarg.buf;
}
diff --git a/CORE/VOSS/inc/log_codes.h b/CORE/VOSS/inc/log_codes.h
index 8b351db03538..b10d779f0ec0 100644
--- a/CORE/VOSS/inc/log_codes.h
+++ b/CORE/VOSS/inc/log_codes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2009,8 +2009,10 @@ when who what, where, why
#define LOG_TRSP_DATA_STALL_C ((0x801) + LOG_1X_BASE_C)
+#define LOG_WLAN_PKT_LOG_INFO_C ((0x8E0) + LOG_1X_BASE_C)
+
/* The last defined DMSS log code */
-#define LOG_1X_LAST_C ((0x801) + LOG_1X_BASE_C)
+#define LOG_1X_LAST_C ((0x8E0) + LOG_1X_BASE_C)
/* This is only here for old (pre equipment ID update) logging code */
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index e9f283593ccb..b65b37b2fc87 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -336,4 +336,10 @@ void vos_trigger_recovery(void);
#ifdef FEATURE_WLAN_D0WOW
v_VOID_t vos_pm_control(v_BOOL_t vote);
#endif
+
+void vos_set_wakelock_logging(bool value);
+bool vos_is_wakelock_enabled(void);
+void vos_set_ring_log_level(uint32_t ring_id, uint32_t log_level);
+enum wifi_driver_log_level vos_get_ring_log_level(uint32_t ring_id);
+
#endif // if !defined __VOS_API_H
diff --git a/CORE/VOSS/inc/vos_diag_core_log.h b/CORE/VOSS/inc/vos_diag_core_log.h
index af887f34c92d..10ece90b4bc1 100644
--- a/CORE/VOSS/inc/vos_diag_core_log.h
+++ b/CORE/VOSS/inc/vos_diag_core_log.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -64,6 +64,7 @@ extern "C" {
#define VOS_LOG_MAX_NUM_HO_CANDIDATE_APS 20
#define VOS_LOG_MAX_WOW_PTRN_SIZE 128
#define VOS_LOG_MAX_WOW_PTRN_MASK_SIZE 16
+#define VOS_LOG_PKT_LOG_SIZE 2048
/*---------------------------------------------------------------------------
This packet contains the scan results of the recent scan operation
@@ -366,6 +367,22 @@ typedef struct
v_S7_t rssi;
} vos_log_rssi_pkt_type;
+/**
+ * struct vos_log_pktlog_info - Packet log info
+ * @log_hdr: Log header
+ * @buf_len: Length of the buffer that follows
+ * @buf: Buffer containing the packet log info
+ *
+ * Structure containing the packet log information
+ * LOG_WLAN_PKT_LOG_INFO_C 0x18E0
+ */
+struct vos_log_pktlog_info {
+ log_hdr_type log_hdr;
+ uint32_t seq_no;
+ uint32_t buf_len;
+ uint8_t buf[];
+};
+
/*-------------------------------------------------------------------------
Function declarations and documenation
------------------------------------------------------------------------*/
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index dff8b25afe82..3da9a9a83902 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -2396,3 +2396,124 @@ v_VOID_t vos_pm_control(v_BOOL_t vote)
#endif
}
#endif
+
+/**
+ * vos_set_wakelock_logging() - Logging of wakelock enabled/disabled
+ * @value: Boolean value
+ *
+ * This function is used to set the flag which will indicate whether
+ * logging of wakelock is enabled or not
+ *
+ * Return: None
+ */
+void vos_set_wakelock_logging(bool value)
+{
+ VosContextType *vos_context;
+
+ vos_context = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+ if (!vos_context) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "vos context is Invald");
+ return;
+ }
+ vos_context->is_wakelock_log_enabled = value;
+}
+
+/**
+ * vos_is_wakelock_enabled() - Check if logging of wakelock is enabled/disabled
+ * @value: Boolean value
+ *
+ * This function is used to check whether logging of wakelock is enabled or not
+ *
+ * Return: true if logging of wakelock is enabled
+ */
+bool vos_is_wakelock_enabled(void)
+{
+ VosContextType *vos_context;
+
+ vos_context = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+ if (!vos_context) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "vos context is Invald");
+ return false;
+ }
+ return vos_context->is_wakelock_log_enabled;
+}
+
+/**
+ * vos_set_ring_log_level() - Convert HLOS values to driver log levels
+ * @ring_id: ring_id
+ * @log_levelvalue: Log level specificed
+ *
+ * This function sets the log level of a particular ring
+ *
+ * Return: None
+ */
+void vos_set_ring_log_level(uint32_t ring_id, uint32_t log_level)
+{
+ VosContextType *vos_context;
+ uint32_t log_val;
+
+ vos_context = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+ if (!vos_context) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: vos context is Invald", __func__);
+ return;
+ }
+
+ switch (log_level) {
+ case LOG_LEVEL_NO_COLLECTION:
+ log_val = WLAN_LOG_LEVEL_OFF;
+ break;
+ case LOG_LEVEL_NORMAL_COLLECT:
+ log_val = WLAN_LOG_LEVEL_NORMAL;
+ break;
+ case LOG_LEVEL_ISSUE_REPRO:
+ log_val = WLAN_LOG_LEVEL_REPRO;
+ break;
+ case LOG_LEVEL_ACTIVE:
+ default:
+ log_val = WLAN_LOG_LEVEL_ACTIVE;
+ break;
+ }
+
+ if (ring_id == RING_ID_WAKELOCK) {
+ vos_context->wakelock_log_level = log_val;
+ return;
+ } else if (ring_id == RING_ID_CONNECTIVITY) {
+ vos_context->connectivity_log_level = log_val;
+ return;
+ } else if (ring_id == RING_ID_PER_PACKET_STATS) {
+ vos_context->packet_stats_log_level = log_val;
+ return;
+ }
+}
+
+/**
+ * vos_get_ring_log_level() - Get the a ring id's log level
+ * @ring_id: Ring id
+ *
+ * Fetch and return the log level corresponding to a ring id
+ *
+ * Return: Log level corresponding to the ring ID
+ */
+enum wifi_driver_log_level vos_get_ring_log_level(uint32_t ring_id)
+{
+ VosContextType *vos_context;
+
+ vos_context = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+ if (!vos_context) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: vos context is Invald", __func__);
+ return WLAN_LOG_LEVEL_OFF;
+ }
+
+ if (ring_id == RING_ID_WAKELOCK)
+ return vos_context->wakelock_log_level;
+ else if (ring_id == RING_ID_CONNECTIVITY)
+ return vos_context->connectivity_log_level;
+ else if (ring_id == RING_ID_PER_PACKET_STATS)
+ return vos_context->packet_stats_log_level;
+
+ return WLAN_LOG_LEVEL_OFF;
+}
diff --git a/CORE/VOSS/src/vos_diag.c b/CORE/VOSS/src/vos_diag.c
index 0239fc1db3fb..d740c4a1a20f 100644
--- a/CORE/VOSS/src/vos_diag.c
+++ b/CORE/VOSS/src/vos_diag.c
@@ -202,12 +202,13 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr)
*
*/
void vos_log_wlock_diag(uint32_t reason, const char *wake_lock_name,
- uint32_t timeout, uint32_t status)
+ uint32_t timeout, uint32_t status)
{
WLAN_VOS_DIAG_EVENT_DEF(wlan_diag_event,
struct vos_event_wlan_wake_lock);
- if (nl_srv_is_initialized() != 0)
+ if ((nl_srv_is_initialized() != 0) ||
+ (vos_is_wakelock_enabled() == false))
return;
wlan_diag_event.status = status;
@@ -246,9 +247,19 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo
/*Get the global context */
pVosContext = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+ if (!pVosContext) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: vos context is NULL", __func__);
+ return;
+ }
/*Get the Hdd Context */
pHddCtx = ((VosContextType*)(pVosContext))->pHDDContext;
+ if (!pHddCtx) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: hdd context is NULL", __func__);
+ return;
+ }
/* Send the log data to the ptt app only if it is registered with the wlan driver*/
if(pHddCtx->ptt_pid != INVALID_PID)
diff --git a/CORE/VOSS/src/vos_lock.c b/CORE/VOSS/src/vos_lock.c
index b8d6cc748d14..ac0aa71bd339 100644
--- a/CORE/VOSS/src/vos_lock.c
+++ b/CORE/VOSS/src/vos_lock.c
@@ -54,7 +54,8 @@
#ifdef CONFIG_CNSS
#include <net/cnss.h>
#endif
-#include "vos_diag_core_event.h"
+#include "vos_api.h"
+#include "aniGlobal.h"
/*----------------------------------------------------------------------------
* Preprocessor Definitions and Constants
@@ -573,9 +574,14 @@ VOS_STATUS vos_wake_lock_acquire(vos_wake_lock_t *pLock,
VOS_STATUS vos_wake_lock_timeout_acquire(vos_wake_lock_t *pLock, v_U32_t msec,
uint32_t reason)
{
- if (WIFI_POWER_EVENT_WAKELOCK_HOLD_RX != reason) {
+ /* Wakelock for Rx is frequent.
+ * It is reported only during active debug
+ */
+ if (((vos_get_ring_log_level(RING_ID_WAKELOCK) >= WLAN_LOG_LEVEL_ACTIVE)
+ && (WIFI_POWER_EVENT_WAKELOCK_HOLD_RX == reason)) ||
+ (WIFI_POWER_EVENT_WAKELOCK_HOLD_RX != reason)) {
vos_log_wlock_diag(reason, vos_wake_lock_name(pLock), msec,
- WIFI_POWER_EVENT_WAKELOCK_TAKEN);
+ WIFI_POWER_EVENT_WAKELOCK_TAKEN);
}
#if defined CONFIG_CNSS
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index 7f46dc7bd1c6..8dad1864efb5 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -1732,26 +1732,6 @@ int wlan_hdd_linux_reg_notifier(struct wiphy *wiphy,
switch (request->initiator)
{
case NL80211_REGDOM_SET_BY_DRIVER:
-
- if ( VOS_TRUE == init_by_driver)
- {
- isVHT80Allowed = pHddCtx->isVHT80Allowed;
- if (create_linux_regulatory_entry(wiphy, nBandCapability) == 0)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- (" regulatory entry created"));
- }
- if (pHddCtx->isVHT80Allowed != isVHT80Allowed)
- {
- hdd_checkandupdate_phymode( pHddCtx);
- }
- complete(&pHddCtx->linux_reg_req);
- break;
- }
-
- /* we purposely want to fall thru since the processing is same
- as other 2 conditions */
-
case NL80211_REGDOM_SET_BY_CORE:
case NL80211_REGDOM_SET_BY_USER:
@@ -1819,10 +1799,12 @@ int wlan_hdd_linux_reg_notifier(struct wiphy *wiphy,
}
}
- if ((VOS_FALSE == init_by_driver) &&
- (request->initiator != NL80211_REGDOM_SET_BY_CORE))
- init_by_reg_core = VOS_TRUE;
-
+ if (VOS_FALSE == init_by_driver) {
+ if (request->initiator != NL80211_REGDOM_SET_BY_CORE)
+ init_by_reg_core = VOS_TRUE;
+ } else
+ if (request->initiator == NL80211_REGDOM_SET_BY_DRIVER)
+ complete(&pHddCtx->linux_reg_req);
/* send CTL info to firmware */
regdmn_set_regval(&pHddCtx->reg);
diff --git a/CORE/VOSS/src/vos_sched.h b/CORE/VOSS/src/vos_sched.h
index 9208523afbb0..05d660b4758e 100644
--- a/CORE/VOSS/src/vos_sched.h
+++ b/CORE/VOSS/src/vos_sched.h
@@ -411,6 +411,11 @@ typedef struct _VosContextType
/* SSR re-init in progress */
volatile v_U8_t isReInitInProgress;
+ bool is_wakelock_log_enabled;
+ uint32_t wakelock_log_level;
+ uint32_t connectivity_log_level;
+ uint32_t packet_stats_log_level;
+
} VosContextType, *pVosContextType;
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 50e1ac485ef9..72dfb7916d3f 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -968,6 +968,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_SET_PASSPOINT_LIST_REQ SIR_HAL_SET_PASSPOINT_LIST_REQ
#define WDA_RESET_PASSPOINT_LIST_REQ SIR_HAL_RESET_PASSPOINT_LIST_REQ
#define WDA_EXTSCAN_SET_SSID_HOTLIST_REQ SIR_HAL_EXTSCAN_SET_SSID_HOTLIST_REQ
+#define WDA_EXTSCAN_STATUS_IND SIR_HAL_EXTSCAN_STATUS_IND
#endif /* FEATURE_WLAN_EXTSCAN */