Commit Graph

180 Commits

Author SHA1 Message Date
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
Rakshith Suresh Patkar
5cfc631920 qcacmn: Log pkt_stats to logger thread for sw_event
pktlog log types were received as individual log types
like PKTLOG_TYPE_TX_CTRL, PKTLOG_TYPE_RC_FIND, etc.
As per the current implementation, FW sends an
aggregated log type as PKTLOG_TYPE_SW_EVENT.
This aggregated log type event is not logged to
userspace.

Log sw_event pkt_stats to logger thread in
process_sw_event.

Change-Id: I5b12ecce25af6395a10eb7c7452a7eeb042d7c0a
CRs-Fixed: 2396980
2019-02-18 10:40:05 -08:00
Chaitanya Kiran Godavarthi
6df18d4da8 qcacmn: Remove service ready callback for smartlog enable
Remove service ready callback for smartlog enable.

Change-Id: I1d2807b0ec59b4f38bb8e2ac5365f3b57cf37437
2019-02-17 08:41:20 -08:00
Madhvapathi Sriram
1197bf79b8 qcacmn: Remove error log for qdf_mem_malloc in utils/ftm files
qdf layer already has the error trace

Change-Id: Ida43aeeeea8004ab47015214565ae3fd8a78b903
CRs-Fixed: 2376434
2019-02-11 02:29:55 -08:00
Jianmin Zhu
860380d062 qcacmn: Remove CONFIG_MCL in pktlog
Since WIN are not using this code at the moment, just remove
CONFIG_MCL directly.

Change-Id: Iff35f533f4f32a6d8b22aea5f890ec4d935fc88c
CRs-Fixed: 2388751
2019-02-06 14:39:22 -08:00
Abhinav Kumar
a151be66dd qcacmn: Add diag events for debugging
Currently there are no diag events to inform user space about
algo num, Tx Seq num and status code of auth req.

Add such diag events which can be useful in automation.

Change-Id: I0fb698b62a114c867113a89aa67f9778b80de118
CRs-Fixed: 2331702
2019-02-05 11:09:48 -08:00
Jingxiang Ge
eb26aa78ae qcacmn: Clean CONFIG_MCL for log_to_console/assert_on_excessive_logging
The aim is to remove CONFIG_MCL or CONFIG_WIN from
cmn component.

This change takes care log_to_console and
assert_on_excessive_logging.

Change-Id: I365f5156a2825a11c279b931b9191cf5c470e943
CRs-Fixed: 2359042
2019-02-01 05:54:38 -08:00
Paul Zhang
884782c9c8 qcacmn: Clean CONFIG_MCL for host_diag_log_set_*
The aim is to remove CONFIG_MCL or CONFIG_WIN from
cmn component.

This change takes care host_diag_log_set_code and
host_diag_log_set_length.

CRs-Fixed: 2371125
Change-Id: Ic04037202d79f87003a47ac2d698bc4e7752ee12
2019-01-16 00:12:08 -08:00
Lin Bai
00e8c948c8 qcacmn: Implement converged packetdump API
Packetdump invokes legacy data path API directly without
considering underlying HW:
1. ol_register_packetdump_callback
2. ol_deregister_packetdump_callback
Global pointer pdev_txrx_ctx will be casted to struct ol_txrx_pdev_t
always even Lithium (use struct dp_pdev) underlying, and overwrite
struct dp_pdev unexpected.

Wrap with cdp API to avoid.

Change-Id: I5c8847ddc51548e8854ba600bec99ce5200dd817
CRs-Fixed: 2366344
2019-01-03 02:30:21 -08:00
Paul Zhang
976c92285c qcacmn: Remove the CONFIG_MCL
Cleaning up cmn code by getting rid of CONFIG_MCL
in file utils/fwlog/dbglog_host.h.

Change-Id: I01cc1805ef2a2d57935216da79a4294a89be1411
CRs-Fixed: 2359889
2018-12-24 20:24:29 -08:00
Venkata Sharath Chandra Manchala
96e3633874 qcacmn: Pktlog Enhancements
1. Reduce the log level for every buffer received
   from firmware
2. Set the default pktlog buffer size to 10MB.

Change-Id: Iad8827084579592fcfa69056dcfc9d57095151e7
CRs-Fixed: 2364380
2018-12-15 08:43:26 -08:00
jitiphil
7c265d301e qcacmn: Packet stat collection failure
Change made I7fd67b02c3b7cb4f1bfe7c6f4641f6d881e25abd
to fix possible NULL dereference of pkt_stats_dump
caused pkt stats collection to fail as pkt_stats_dump
is NULL from cds_pkt_stats_to_logger_thread.

Move NULL check for pkt_stats_dump to just before
it is dereferenced

Change-Id: I0f4c9d58f0d4d17d6c26bfbbd79f6447dd52230b
CRs-Fixed: 2358139
2018-12-02 11:55:21 -08:00
Pavankumar Nandeshwar
ad5e0bd66f qcacmn: Change fwlogs API for smartlogs
Add function pointers for calling smartlogs init and deinit.

CRs-Fixed: 2008290
Change-Id: I4734e490394a24f5a39eb50f3ac386ad99834cb3
2018-11-19 11:05:49 -08:00
Manjunathappa Prakash
c6e684b128 qcacmn: pkt_log: Use qdf_spin_lock APIs debug infrastructure
Use QDF spin_lock APIs so that we can make use the debug infra.
This will help to identify catch issue related to unbalanced lock
operations or unexpectedely long locks.

Change-Id: I318bcb90340d98813f19862fda14e6ada30bbed6
CRs-Fixed: 2349308
2018-11-16 13:34:38 -08:00
Alok Kumar
db0d42384f qcacmn: Add vendor event to update TCP parameters
Currently, TCP params are configured through cnss-daemon.

Add vendor event to configure TCP params through Wi-Fi HAL.

Change-Id: Ifb81b810f0fb830515fb4558d016778083323b5a
CRs-Fixed: 2348945
2018-11-14 01:10:55 -08:00
Venkata Sharath Chandra Manchala
0ce469e330 qcacmn: Add pktlog handler to process rate events
Add dp_msg_pktlog_handler to handle
rate events from the firmware.

Change-Id: I24776caa3b78ec38d94421f243ec72d81ee3102d
CRs-Fixed: 2340639
2018-11-11 09:27:32 -08:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
Dustin Brown
aaa97751a6 qcacmn: Add excessive logging detection
One of the most common stability issues encountered by the stability
team is watchdog bite due to excessive logging. Add a feature to track
logging to dmesg using a tumbling window and counter, and panic if the
configured maximum number of logs for that window is exceeded.

Change-Id: If83c6dfccb9d191b02a3a7166b065c0a0704f969
CRs-Fixed: 2338385
2018-10-25 12:33:04 -07:00
Pratik Gandhi
8af026a2ca qcacmn: Abstract BMI and add export symbols for ko separation
Abstract BMI callback from common module and move it to specific component.
Add Export symbols to support modularization in WIN. (BMI)

CRs-Fixed: 2324081
Change-Id: I1ec463d41d238ce81254ecc1f0bb1dc545e1248e
2018-10-18 06:32:45 -07:00
Dustin Brown
02818ec2e5 qcacmn: Log to console per log level
Currently, every message which is logged to console is logged at the
same level. Instead, log each message using an appropriate pr_* API
based on the log level of the message being logged.

Change-Id: I0638f3ab155576ed87d663a4b060d16969cf816c
CRs-Fixed: 2327148
2018-10-05 00:27:49 -07:00
Rajeev Kumar
b7dcab9948 qcacmn: Use pr_info for wlan driver console logging
Use pr_info for wlan driver console logging such that its
backward compatible with qcacld-3.1 and by default info log
levels are not logged on console unless kernel's printk current
console log level is changed to print info logs as well on console.

Change-Id: I33ca583743a9b77253390abcece6c8067f38c35d
CRs-Fixed: 2326304
2018-10-02 22:28:45 -07:00
Dustin Brown
e60cba22e1 qcacmn: Remove radio index from logs
As part of the effort to reduce the volume of logs produced by wlan,
remove the radio index from the base information which gets logged with
every message. The module name, which is also logged with every message,
is the preferred way to keep track of which wlan module is logging.

Change-Id: Ib13f12c55fb9a90ac61661d2a13e44913997804e
CRs-Fixed: 2318008
2018-09-21 22:40:33 -07:00
Adil Saeed Musthafa
12205b544b qcacmn: Add timer to flush out log buffers periodically
Add timer to flush out log buffers periodically. Add command to set the
time period value.

Change-Id: I8e796a9bc7caac2661d00852420dd5fa66f5bca5
CRs-Fixed: 2296362
2018-09-21 20:50:55 -07:00
Paul Zhang
f7fb463692 qcacmn: Stability feature enhancement
Stability feature enhancement to log below highlighted QTIMER
tick into Hexadecimal(currently its logged in decimal) such
that it can easily compare WLAN log QTIMER with WMI and HTC
credit log in crash-scope.

Change-Id: I0e0db3cbe90519248be98678e692cc89a87fcd2f
CRs-Fixed: 2315210
2018-09-21 03:53:38 -07:00
gaurank kathpalia
85e55d12d6 qcacmn: Add src, and dst id support in PKTLOG(WMA)
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I166f4c943b9a21749c53ed19101b0ed0defd8491
CRs-Fixed: 2306013
2018-09-17 06:09:52 -07:00
Qiwei Cai
5d4acd79ad qcacmn: Featurize BUILD_DIAG_VERSION
Featurize BUILD_DIAG_VERSION to compile out to save memory.

Change-Id: I4d221387003770e5344069dc4cf1f72b7ce9e0ad
CRs-Fixed: 2301492
2018-09-11 08:44:18 -07:00
Manjunathappa Prakash
d0fc0ea364 qcacmn: Add more debug_ids and reduce the dump log level
Add more debug IDs to narrow down further funciton who is holding peer
reference. Reduce the peer debug dump log level to avoid side effects of
console logging.

Change-Id: I9820c72bcde8a0c2b0e779cf322e1133ef8a43e6
CRs-Fixed: 2303069
2018-09-01 01:42:42 -07:00