Commit Graph

206 Commits

Author SHA1 Message Date
Venkata Sharath Chandra Manchala
1affbbad46 qcacmn: Move pktlog API to platform specific file
Move process_sw_event API to pktlog_wifi2.c file as
it is only applicable to legacy product line.

Change-Id: I8eee102ea2eb70c0ffcec4ac20dfdf6ef48bca5b
CRs-Fixed: 2585613
2020-01-17 13:42:45 -08:00
Venkata Sharath Chandra Manchala
95d127a876 qcacmn: Move pktlog rate event handlers to specific files
Move pktlog_rate_find API to pktlog_wifi2.c as they are
only needed for legacy product lines.

Change-Id: I2a232e283cf5bf151ce84ba77f4359f25b60a5ac
CRs-Fixed: 2585613
2020-01-17 13:42:32 -08:00
Venkata Sharath Chandra Manchala
1896d2e534 qcacmn: Move process_rx_info API to platform specific file
Move process_rx_info to pktlog_wifi2.c file as it
is only applicable to legacy products.

Change-Id: I2a758c26ac560459f22fbb691863bf1fea17cf65
CRs-Fixed: 2585613
2020-01-17 13:42:19 -08:00
Venkata Sharath Chandra Manchala
41538b57b3 qcacmn: Move pktlog API's to specific files
Move process_tx_info from pktlog_internal.c to pktlog_wifi2.c
as they are only needed for legacy product line.

Change-Id: I53b90deaf86aa2bb6533b9957879e7860d91b352
CRs-Fixed: 2585613
2020-01-17 13:42:05 -08:00
Venkata Sharath Chandra Manchala
1140065e4c qcacmn: Move pktlog API's to specific files
Move pktlog hardware dependent API's from pktlog_internal.c
to pktlog_wifi3.c as they are hardware dependent.

Change-Id: I421b3116a35e735a51c82839005bbc2d4cb138d7
CRs-Fixed: 2585613
2020-01-17 13:41:54 -08:00
Yeshwanth Sriram Guntuka
cbd99a4af5 qcacmn: Add diag log structure for data pkt info
Add the diag log structure for protocol data packet
info to be sent as diag log to user-space.

Change-Id: I604a8e4d4355c39e66cd1b6b877aecb7f658b316
CRs-Fixed: 2595797
2020-01-13 15:18:53 -08:00
Pragaspathi Thilagaraj
412c1e6a88 qcacmn: Add diag log support for connection/roaming/11kv debugging
Add data structures to support diag log payloads. Define
new diag logs with the log id defined at the global diag
logs definition.
Below new diag logs are introduced:
LOG_WLAN_AUTH_ASSOC_TX_RX_INFO_C
LOG_WLAN_ROAM_TRIGGER_INFO_C
LOG_WLAN_ROAM_SCAN_INFO_C
LOG_WLAN_ROAM_RESULT_INFO_C
LOG_WLAN_RRM_TX_RX_INFO_C

Change-Id: I08b8ce156b405e555bc9c981b46ee8924bc76364
CRs-Fixed: 2595648
2020-01-06 01:14:32 -08:00
Hangtian Zhu
7788a89ccd qcacmn: Fix compile issues when some features are disabled
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2584839
2019-12-18 23:55:00 -08:00
Alok Kumar
a316b315d8 qcacmn: Protect pktlog under mutex to avoid possible race conditions
Protect pktlog funcitonality under given mutex to avoid possible
race condition between pktlog_release/pktlog_open and pktlogmod_exit.
Also call pktlogmod_exit before calling wdi_event_detach to avoid
accessing freed memory in pktlog release.

Change-Id: I5ca4b304d0f4dc1af289daa167958d5b773d9a6e
CRs-Fixed: 2578623
2019-12-09 23:04:45 -08:00
hqu
71bd0b5f06 qcacmn: Convert SME code legacy channel ID usage
Add op_freq for structure host_log_ibss_pkt_type and
host_event_wlan_connection_stats.

Change-Id: Ic676ac586220489301258f3027527e2df75ba3e1
CRs-Fixed: 2554199
2019-11-25 13:43:45 -08:00
Rakesh Pillai
d295d1e81d qcacmn: cdp: Convergence of cdp_misc_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles, if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles, if
it has been deleted.

Converged misc_ops
- tx_non_std
- get_opmode
- get_tx_ack_stats
- set_ibss_vdev_heart_beat_timer
- hl_tdls_flag_reset
- set_wisa_mode
- txrx_post_data_stall_event
- update_mac_id
- pkt_log_init
- pkt_log_con_service
- get_num_rx_contexts
- set_wmm_param
- flush_rx_frames
- bad_peer_txctl_set_setting
- bad_peer_txctl_update_threshold
- txrx_data_stall_cb_register
- txrx_data_stall_cb_deregister
- vdev_set_driver_del_ack_enable
- get_intra_bss_fwd_pkts_count
- mark_first_wakeup_packet
- register_pktdump_cb
- unregister_pktdump_cb
- pdev_reset_driver_del_ack
- runtime_suspend
- runtime_resume

CRs-Fixed: 2539811
Change-Id: I3080df033d6411d7078a322224b914bda2fddc0e
2019-11-21 06:12:31 -08:00
Yeshwanth Sriram Guntuka
e854c377d6 qcacmn: Use GFP_ATOMIC flag for skb alloc for diag data
Diag event processing is stuck due to skb allocation failure.
SKb allocation is done using flag GFP_KERNEL which results
in the kworker thread to sleep and results in wmi workqueue
timer to expire.

Fix is to use GFP_ATOMIC flag for skb allocation for
diag data.

Change-Id: Ifa715df89ae06b17d4dc1506ea4f3c4e2af31f33
CRs-Fixed: 2559679
2019-11-16 23:59:11 -08:00
Ashish Kumar Dhanotiya
84ac2013af qcacmn: Add queue.h file
Currently MCL and WIN both have there separate queue.h
files with the same declarations and definitions.
As part of cleanup create single queue.h in common
code and update the usage of existing queue.h to this
newly added queue.h.

Change-Id: Ie381c3553d6361cf7f8c97f14a91ed24e332b51a
CRs-fixed: 2505617
2019-11-05 02:12:54 -08:00
Vivek
0c4e20ff82 qcacmn: Replace printk with qdf_nofl_info
Replace printk with qdf_nofl_info in qdf folder.
So if we wish to change from printing on console
to other location, based on a logging daemon, we
can do that by only changing at the implementation
of QDF print API's

Change-Id: I6db67cee416ebbe0f2c51b2d4dbf2b3a335e972a
CRs-Fixed: 2442689
2019-10-29 04:07:12 -07:00
Venkata Sharath Chandra Manchala
113ba25d75 qcacmn: Add QCA_WIFI_QCA6490 support for pktlog
Enable pktlog processing for QCA6490 based
chipsets.

Change-Id: I23939a284921211fcb869ce8473212014216cf74
CRs-Fixed: 2522133
2019-10-17 15:12:38 -07:00
Venkata Sharath Chandra Manchala
6f852506bf qcacmn: Use PKTLOG_TYPE_RX_STATBUF macro
Use macro PKTLOG_TYPE_RX_STATBUF for indicating
received Rx Full pktlog messages.

Change-Id: Ia7e69bc385fd7b1367c191f657ace8327388cf03
CRs-Fixed: 2529520
2019-10-09 19:10:57 -07:00
Linux Build Service Account
340a69cc06 Merge "qcacmn: Initialize __log_window_end_ticks variable explicitly" 2019-10-08 00:38:54 -07:00
Himanshu Batra
7ee0677954 qcacmn: Replace linux print APIs with qdf print APIs
Replace linux print APIs with equivalent level qdf print APIs.

Change-Id: If0a4a5326de87c9f023e8f4de996a4734ed6cda2
CRs-Fixed: 2530137
2019-09-29 23:15:37 -07:00
Li Feng
510e4e2de7 qcacmn: Initialize __log_window_end_ticks variable explicitly
The __log_window_end_ticks variable is implicitly initialized as
zero, which may lead to the disfunction of qdf_system_time_after
when assert_on_excessive_logging is first called with big number
jiffies. Then __log_window_count number increase until hit the
threshold, and trigger the panic.

Now initialize __log_window_end_ticks variable explicitly when
__log_window_count is initial zero in the first call of
assert_on_excessive_logging.

Change-Id: Ic5256af9235bf195b4ae5ee79bfce9ea213ea29b
CRs-Fixed: 2525529
2019-09-23 14:41:18 +08:00
Hangtian Zhu
24dab77dbe qcacmn: Add CONFIG_MULTI_IF_LOG to support multi if log
This is a propagation of qcacld-2.0 commit 98821c7dcf49d ("qcacld-2.0:
Add CONFIG_MULTI_IF_LOG to support multi if log"). Add CONFIG_MULTI_IF_LOG
to support multi if log by assigning the specific netlink protocol
when dual wlan cards are loaded.

Change-Id: I827fbd46893c47ed2d9b123bf753c06b2e115fbb
CRs-Fixed: 2525488
2019-09-20 01:06:29 -07:00
Tiger Yu
720673fd7a qcacmn: Fix the regression issue for pktlog failure with ROME module
The pktlog will fail with ROME module due to the change IDs:
I24776caa3b78ec38d94421f243ec72d81ee3102d
Ifb70ac0993f2402201f88758845f730cf677b1a0

Define new macro PKTLOG_LEGACY for HELIUM/ROME to avoid the ROME PKTLOG
failure.

Change-Id: Ibaa20b7af208a261e0fd8682de45ad8eb4a69212
CRs-Fixed: 2523511
2019-09-15 22:48:36 -07:00
Tiger Yu
f28f88bcdd qcacmn: Add protection for type_specific_data in ath_pktlog_hdr
The member of type_specific_data is not valid for ROME module. Add macro
protection for type_specific_data in the ath_pktlog_hdr to avoid offset
error when getting the msdu id info during  processing pktlog TX info.

Change-Id: Icb8b95cef9a32732116522e4fc3b39067ff36037
CRs-Fixed: 2518400
2019-09-11 01:33:02 -07:00
Venkata Sharath Chandra Manchala
c0980fd21e qcacmn: Add a check to avoid processing invalid pktlog buffers
Avoid further processing of pktlog buffers received from
firmware or Hardware if the size is greater than
MAX_PKTLOG_RECV_BUF_SIZE.

Change-Id: If1dd855137a9b83721f01005fa3367f7924f4ebb
CRs-Fixed: 2493721
2019-09-06 18:18:36 -07:00
Jingxiang Ge
3d3ec24553 qcacmn: Remove CONFIG_MCL for header file in wlan_logging_sock_svc.c
Remove CONFIG_MCL for header file.

Change-Id: Id3d6f86fde15d7afd88504886fc87db02a949a67
CRs-Fixed: 2488036
2019-07-29 11:23:18 -07:00
Venkata Sharath Chandra Manchala
d82dc29fe6 qcacmn: Fix skb overflow in wlan_pkt_stats_to_logger_thread
When wlan logging is turned on in developer options
wlan logging verbosity level is set to active and
pktlog buffer will also be passed to
wlan_pkt_stats_to_logger_thread. In this API we call
skb_put multiple times to copy ath_pktlog_hdr(16 bytes)
and pktlog buffer (2048 bytes) = 2064bytes  which is leading to
skb_over_panic as the skb length is set to 2048 bytes.
Increase the skb size to 2112 bytes which can accommodate
2048 bytes (pktlog buffer size)  + 16 bytes(ath_pktlog_hdr) +
8 bytes (pkt_dump) + 40 bytes (future use)  to avoid overflow.

Change-Id: Ia8bda14f45d2eb77357bf7e46a12c1062d56d8e1
CRs-Fixed: 2489338
2019-07-25 22:09:55 -07:00
Paul Zhang
8cf0c34663 qcacmn: Remove CONFIG_MCL wlan_logging_sock_deinit_svc
This is to remove CONFIG_MCL wlan_logging_sock_deinit_svc.

Change-Id: I4e31bddb0fb2ac25c031dc05eec60e54032322de
CRs-Fixed: 2494078
2019-07-25 02:41:00 -07:00
Alok Kumar
9551ea2d0e qcacmn: Define tx_status enum in wlan_logging_sock_svc.h
Add the tx_status enum in wlan_logging_sock_svc.h so that
enum can be used for MGMT TX status mapping in wma_mgmt.c

Change-Id: I5681e6fcc39704b6be18bc68b1042e0e6b53f590
CRs-Fixed: 2491787
2019-07-20 02:32:43 -07:00
Alan Chen
166fc8d73d qcacmn: Add new reason code for idles restart wakelock
Idle restart needs to prevent system suspend and hence, add new
reason code for idle restart.

Change-Id: I15f7be551f00bd910a61080c087a8f85dd2fe7da
CRs-Fixed: 2490992
2019-07-17 21:27:28 -07:00
Venkata Sharath Chandra Manchala
a28e0144fe qcacmn: Initialize variable before use in process_tx_info
Initialize type specific data in process_tx_info
while processing full tx pktlog messages.

Change-Id: Icbdd20e7e4604f117912e5a4402f7aa5048e671e
CRs-Fixed: 2468471
2019-07-17 16:28:33 -07:00
Abhiram Jogadenu
1c2b583ee2 qcacmn: Componentize and enable conv WIFI POS
Componentize and enable converged WIFI POS

Change-Id: I8e3f745dbb087818c9d411c7a00e1cdb2907d4d3
2019-07-16 17:15:24 -07:00
Uraj Sasan
37b2c4d198 qcacmn: Support live dump feature
Target firmware Assert are at times related to Host Driver
interaction with the firmware. To debug these issues, host
driver dump is mandatory. The feature provides memory dump
of data structures registed with this framework. The dumps
are saved which can later be loaded using gdb and analysed.

Add apis support for the feature.

Change-Id: I41c5126a49a698969f24b17187f78f4b4db7a51e
CRs-Fixed: 2478139
2019-07-16 15:54:03 -07:00
Jingxiang Ge
4cbb2ada5b qcacmn: Remove CONFIG_MCL in wlan_flush_host_logs_for_fatal
This is to remove CONFIG_MCL in wlan_flush_host_logs_for_fatal.
And move condition cds_is_log_report_in_progress to qcacld code.

Change-Id: Ie231e966229789bcd8fa69aef1bc20e9b07a88ae
CRs-Fixed: 2484897
2019-07-10 00:23:19 -07:00
Jingxiang Ge
e575abcaa6 qcacmn: remove CONFIG_MCL in wlan_logging_set_fw_flush_complete
This is to remove CONFIG_MCL in qcacmn code.
This change cleans CONFIG_MCL in wlan_logging_set_fw_flush_complete.

Change-Id: Ia417c90060b20b004b1e5408be654ff392a8113d
CRs-Fixed: 2484838
2019-07-10 00:23:16 -07:00
wadesong
9b220a6ec6 qcacmn: Cleanup CONFIG_MCL for pktlog related code
Replace macro CONFIG_MCL with FEATURE_PKTLOG for
pktlog related code.

Add some macro changes to ensure the following 3
functions' declarations are enclosed by the right
macros:

wlan_deregister_txrx_packetdump
wlan_register_txrx_packetdump
wlan_pkt_stats_to_logger_thread

Change-Id: I900de3be28faee8403923a5e4bd326e69895d998
CRs-Fixed: 2406250
2019-07-08 12:10:09 -07:00
Venkata Sharath Chandra Manchala
ff4d3f79f1 qcacmn: Validate pktlog handle
Add a NULL check to validate pktlog handle
before dereferencing it.

Change-Id: I3ea56b60460c5c2cfae0fff97f0721068156cf4a
CRs-Fixed: 2468506
2019-06-25 13:06:51 -07:00
Ashish Kumar Dhanotiya
bf9d06fab1 qcacmn: Use vzalloc instead of vmalloc
Currently driver is using vmalloc to allocate the memory
inside dbglog_block_read api and this buffer is copied to
userspace buffer which may lead to use of uninitialized
buffer.

To avoid above issue use vzalloc to allocated the buffer
which initializes the memory to zero.

Change-Id: Iebc530b000c908231ef8718e79054801d294dd8f
CRs-Fixed: 2470385
2019-06-19 10:33:09 -07:00
Rajeev Kumar
f13e25e8fb qcacmn: Remove adrastea compile flag from log to user api
Adrastea compile flag is not needed for wlan log to user
time stamp add API because current day of time is expected
to be logged in driver log for all cases.

Change-Id: If04dc54ef35db6d66da9a69a1c7d502873009553
CRs-Fixed: 2444852
2019-05-01 16:21:13 -07:00
Vulupala Shashank Reddy
3027c86227 qcacmn: Remove excessive logging in console for packet logs
The packet logs show in console logs which are redundant.
Change the log level from qdf_print to qdf_debug to avoid
excessive logging.

Change-Id: I2a43a0072bb7f940df007a590013e500ddda5e8a
CRs-Fixed: 2437278
2019-04-29 04:17:46 -07:00
Visweswara Tanuku
5832077a65 qcacmn: In Epping, Pass BMI context to bmi_done and bmi_cleanup
In epping_enable bmi_done is called with null context due to which
bmi finish is incomplete

Pass BMI Context before invoking bmi_done and bmi_cleanup

Change-Id: Ic7f424a03cb92d6d3218b5fa148ea95d6011cfed
CRs-Fixed: 2419720
2019-04-08 10:50:18 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Jeff Johnson
4c5ac90746 qcacmn: utils: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within utils replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Iae6c2f2f0b3041a9397dd13092ea500a8b995fd2
CRs-Fixed: 2418251
2019-03-26 10:30:31 -07:00
Dustin Brown
50eab9871f qcacmn: Migrate qdf_ssr_protect/unprotect
qdf_op_protect/unprotect supersede qdf_ssr_protect/unprotect. Replace
calls to qdf_ssr_protect/unprotect with qdf_op_protect/qdf_op_unprotect.

Change-Id: Iab80e4cbf6b87b37a0d761e7ecea695b840c5e5e
CRs-Fixed: 2418450
2019-03-26 01:24:45 -07:00
Jingxiang Ge
434105d7a5 qcacmn: Get wlan op mode from vdev for pktlog
To avoid using qcacld code in cmn, when getting
wlan op mode, using op mode info from vdev rather
adapter.

Change-Id: Ida5a7aa6c793e955122a4bbf3bf0fa1fa5cbf7a3
CRs-Fixed: 2412317
2019-03-19 21:17:07 -07:00
Yeshwanth Sriram Guntuka
07e2c48abe qcacmn: Add Diag Log support for cold boot cal event
Add Diag log support for logging cold boot calibration
data sent by firmware via cold boot cal wmi event.

Change-Id: I932fd5f87667498b77ee13ca5b3ce08d6001cdf0
CRs-Fixed: 2413451
2019-03-12 18:57:41 -07:00
Harprit Chhabada
b276eea5e7 qcacmn: Fix null pointer dereference in send_packetdump
netbuf in send_packetdump is never checked for null before
dereferencing it for len netbuf->len.

Change-Id: I51aa0fb9c52e04c33291791ef47def703754222d
CRs-Fixed: 2404844
2019-03-06 14:08:36 -08:00
Dustin Brown
3fe77afae9 qcacmn: Remove references to EOK
EOK is a legacy definition and frequently misused. Remove references to
it from qcacmn.

Change-Id: Ic3179ad95beb75edb97e1dda7ac879a65a86a2e4
CRs-Fixed: 2404900
2019-03-01 11:14:45 -08:00
Paul Zhang
9c8c20f6c0 qcacmn: Clean CONFIG_MCL for send_flush_completion_to_user
The aim is to remove CONFIG_MCL or CONFIG_WIN from
cmn component.

This change takes care send_flush_completion_to_user.
Cleaning up cmn code by replacing the CONFIG_MCL
with macro FEATURE_WLAN_DIAG_SUPPORT.

CRs-Fixed: 2397824
Change-Id: I57a82fec17210b49f778a950034ca442d11eb511
2019-02-22 06:56:44 -08:00
Venkata Sharath Chandra Manchala
cad74add80 qcacmn: Add support for full pktlog
1. Enable CE5 and allow it to service
   pktlog messages from the firmware.
2. Register full pktlog callback handlers
   for handling sw_events and full tx pktlog.

Change-Id: Ifb70ac0993f2402201f88758845f730cf677b1a0
CRs-Fixed: 2388906
2019-02-21 23:25:30 -08:00
hangtian
b75e3446b7 qcacmn: Use qdf_mem_zero for zero initialization, utils part
Use qdf_mem_zero for zero initialization, utils part.

Change-Id: I88ba8a279c31fe779ca1bf563cd8882fe644c2c0
CRs-Fixed: 2378005
2019-02-21 01:47:09 -08:00
Nirav Shah
3e6e04bc0c qcacmn: Fix epping mode for QCN7605
Epping mode is currently borken in qcacld-3.2 codebase.
Fix epping mode for QCN7605 for USB and PCIe interface.

Change-Id: I5ae5ff70b77836cdd6c3d002cf98d4949838b624
CRs-Fixed: 2400180
2019-02-21 01:46:35 -08:00