Graf commitů

93 Commity

Autor SHA1 Zpráva Datum
Asutosh Mohapatra
de1e7e7e12 qcacmn: Enhance hang reason code mappings
Currently many host hang reason codes are not mapped to corresponding
userspace codes as a result these hang reason code will be invalid
for userspace and also QDF_REASON_UNSPECIFIED is used in some places
in host.

To add mappings for host hang codes to corresponding to userspace
hang codes and also add new hang codes.

Change-Id: Idb21ccb4a34c9c94872798404912bdb743e9270b
CRs-Fixed: 3381229
2023-02-10 12:21:38 -08:00
Mohammed Ahmed
cef49bdf89 qcacmn: add SSR host log collection API usage
Current code does not use the SSR host log collection API.
Fix this by adding SSR host log collection API usage.

Change-Id: I9dfb0bd7054986760a711d0752f37f4327c706b2
CRs-Fixed: 3339933
2023-01-19 20:44:09 -08:00
Jingxiang Ge
7d007034fb qcacmn: Add debug timestamp for wlan_logging_thread
Add more log for wlan_logging_thread to monitor
thread start/exit.
and also add memory barrier wmb to make sure exit
flag/shutdown_comp have been set done.

Change-Id: I6549f344f50bdd9df3a29c4ab724ea67213670de
CRs-Fixed: 3320274
2022-11-22 07:49:45 -08:00
Jeff Johnson
cfe8cda786 qcacmn: Use renamed QDF suppressed logging APIs
Several QDF suppressed logging APIs were originally named with a
misspelling of "suppressed." New correctly-spelled functions are
available, so call those instead.

Change-Id: I4fcd506b39cedd6f094f93ee900cf9ce8be759c1
CRs-Fixed: 3313686
2022-10-25 20:10:38 -07:00
Jeff Johnson
b26f2f678c qcacmn: utils: Fix misspellings
Fix misspellings in utils/...

Change-Id: I092dfff26e16e7c660e6652a652268256d1d1517
CRs-Fixed: 3304703
2022-10-12 13:19:26 -07:00
Rajesh Chauhan
c85603d008 qcacmn: replace complete_and_exit with kthread_complete_and_exit
In kernel 5.17, complete_and_exit is replaced with
kthread_complete_and_exit. So if kernel version is >= 5.17,
then use kthread_complete_and_exit.

Change-Id: I4e9a98373197eba4931a8dafe77040448ffb40eb
CRs-Fixed: 3297481
2022-10-05 17:51:25 -07:00
Vinod Kumar Myadam
b721690039 qcacmn: Add flag CONNECTIVITY_PKTLOG
Add new flag CONNECTIVITY_PKTLOG to make independent of
FEATURE_PKTLOG and REMOVE_PKT_LOG for packet logging.

This is because 32 tx/rx pkt logging is connection related
and this feature is independent of pkt log feature. Here
driver will send first 32 tx/rx pkts consisting of mgmt
and data pkts to userspace which can be used for debugging

Change-Id: I006a040546c9709f46e76dcd8630da8569c691c6
CRs-Fixed: 3222971
2022-06-27 12:17:21 -07:00
Amit Mehta
6e1dde7e43 qcacmn: Add QDF packet type enum
Add new QDF enum for packet type and make
changes to pass status and type to packetlog callback APIs as QDF type

Change-Id: I423839e42b316ce43feaae34e297d3d8f0dee7ba
CRs-Fixed: 3224881
2022-06-23 07:04:02 -07:00
Liangwei Dong
a5503f36a3 qcacmn: Add DEBUG_CONN_RSO log history
Add new DEBUG_CONN_RSO enum to record RSO state changing.

Change-Id: Ie46ab5d4b32d8b5632aa3c3eaed96d00afda22b3
CRs-Fixed: 3097076
2021-12-27 01:03:55 -08:00
Yue Ma
6c387e6f24 qcacmn: Include panic_notifier.h to access panic_notifier_list
From 5.14 kernel, panic_notifier_list is moved from kernel.h to
panic_notifier.h, hence explicitly include the header file in
order to access panic_notifier_list.

Change-Id: Icf546ebea5a19b79602031b4fd92b498db0048c0
CRs-fixed: 3060060
2021-10-25 18:31:21 -07:00
Pragaspathi Thilagaraj
a8d8b663b2 qcacmn: Define QDF API for vzalloc and vfree
Define QDF API for virtual memory allocation and free.
Also add new api to get time of the day in microseconds.

Change-Id: I2921055bbb6b5d2a1105d19448b2a10fa2d6ccc5
CRs-Fixed: 3038180
2021-09-28 21:12:18 -07:00
Pragaspathi Thilagaraj
b001e0e130 qcacmn: Add support to send connectivity logs from logging thread
Add support to send connectivity logs from g_wlan_logging thread.
Add new HOST_LOG_DRIVER_CONNECTIVITY_MSG event flag which wakes up
the gwlan_logging thread when set.
Also register connection manager callbacks to send the logging event.

Check if logging queue is empty whenever the gwlan_logging thread
is woken up and send the logs to userspace if the count doesn't
exceed the allowed threshold.

Change-Id: I3fdb8358f9048a277e2f03894c0e6a17376b0da0
CRs-Fixed: 3029279
2021-09-16 08:28:29 -07:00
Yue Ma
674474c55a qcacmn: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: I698492f175ea140e6854c372f366a63f36de24c9
CRs-fixed: 3022556
2021-08-30 13:38:44 -07:00
Jeevan Kukkalli
0343109e97 qcacmn: Print buffered logs one line at a time
Print buffered wlan logs one line at a time to avoid
log split.

Change-Id: Ie35bdee741e7dab430281bb18aea48325118bf23
CRs-Fixed: 2977844
2021-08-17 01:38:44 -07:00
Ashish Kumar Dhanotiya
fdac28ef95 qcacmn: Add synchronization for flush log completion
Currently there is no synchronization for flush log completion
between fw and userspace. When host driver receives command to
flush logs, it sends the command to fw and releases the control
of the userspace thread, it does not wait for the flush log
completion event from the fw and because of which user space
does not know when the host and fw completes the log flush.

To address above issue add a logic to wait for fw event of
flush log completion before host returns control to userspace.

Change-Id: I04fa0aead146d2b7b8627e4101c6dcd99d3947e9
CRs-Fixed: 2983387
2021-07-12 05:33:17 -07:00
Aditya Kodukula
f94320aa61 qcacmn: Add wlan driver log msgs into the minidump
As part of minidump enhancement feature, incorporate wlan driver
log_msg data structure into the minidump.

Change-Id: Ic68e199c645bf8c8be50e105391b5c6efa90decc
CRs-Fixed: 2946292
2021-06-08 13:18:25 -07:00
Vivek
69a1c93dc2 qcacmn: Rate limit prints to console from logging utility
The prints from the driver are rate limited based on the
configurations provided.

Also the prints which are redirected to user space daemon
and of certain log levels are also printed on the console.

Add a rate limiting version of the API for the prints coming
to console via the logging daemon.

CRs-Fixed: 2853590
Change-Id: I9683172ac0665b46581bad13a1050c6d70d72b5c
2021-01-19 03:52:13 -08:00
Balaganapathy Palanisamy
d939d58b24 qcacmn: Delete logger timer then reset pcur_node
Delete the flush timer then set the pcur_node to NULL
while cleanup to avoid NULL pointer dereference in timer handler.

CRs-Fixed: 2820441
Change-Id: If6edca1343890e0fe962d7b3e3b5b07f379143ef
2021-01-15 01:58:47 -08:00
Liangwei Dong
a7717deced qcacmn: Record station connect/disconnect event
Add connect/disconnect log ring buffer to existing ROAM
debug functionality to record OS IF layer event.

Change-Id: Ifcbcd9a38ead27d60757983a0f56a37ae5d8af81
CRs-Fixed: 2852405
2021-01-13 02:34:45 -08:00
Vivek
3327a6a92b qcacmn: Add support for rate limiting QDF trace prints
The existing QDF implementation does the following
1. The QDF trace either prints to the console
2. The QDF trace message  is directed to the utils,
   which based on log level
	a. redirects to a user space daemon or
	b. redirects to console

There is excessive logging detection in the utils code
before redirecting the prints to  the console.
If the number of prints to console is more than
the configured threshold, we assert in development builds.

Moving the API for excessive logging detection from utils to
QDF trace.

The configuration for detection of excessive logging currently
is only for the number of prints per second.
Adding time configuration also to detection of excess logging
to the console.

CRs-Fixed: 2809752
Change-Id: Iecc408fc9b576fa900a6d7ee793639f1dde3110d
2020-12-02 10:45:34 -08:00
Srinivas Girigowda
51ba6fe67c qcacmn: utils: Remove redundant __func__ from the logs
1. The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

2. Instead of adding __func__ to the qdf_nofl_* macros, its better to use
   qdf_* which already takes care of adding __func__.

Change-Id: If5717c811016845b5cffcf3fdc97805f3a1b731b
CRs-Fixed: 2774457
2020-09-15 02:45:54 -07:00
Srinivas Girigowda
8ea15d977b qcacmn: utils: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: I13d35cc81a4a3fdb8c798947845aca4f9e3fa97c
2020-08-23 23:09:54 -07:00
Yu Wang
9db6e532fe qcacmn: start packetdump_timer when registering the function
packetdump_timer is stopped when deregistering the
function, to make align, start it when registering.

CRs-Fixed: 2748669
Change-Id: I9d106f81b04011111c4b01e6b6c50403202e7c6e
2020-08-07 12:57:39 -07:00
Anirban Sirkhell
800a2c6059 qcacmn: Export api to select log levels
This will be used to initialize based on value provided
in ini file.

CRs-Fixed: 2738127

Change-Id: I3d385a7a88a6a5fdd0ff8949ac1a349880e38575
2020-08-03 07:13:45 -07:00
Bapiraju Alla
1f62560b58 qcacmn: Update log to console INI to support per log level
Currently, the INI param wlanLoggingToConsole is used to enable
or disable WLAN logging to console. It will enable/disable console
logs for all log levels i.e. FATAL/ERROR/WARN/INFO. There is no
provision to enable/disable console logs for specific log level.

To address this, change wlanLoggingToConsole INI as bitmap with each
bit representing a log level. Enable/disable console logs based on
this bitmap.

Change-Id: If3172195a2ee86d21c4c03f441a4cc3e2780dd82
CRs-Fixed: 2734707
2020-08-01 11:02:24 -07:00
Jeevan Kukkalli
8bcf1b75d2 qcacmn: Register for panic notification
If wlan logging is enabled then register a notifier block
to kernel's panic notifier chain. Notifier block contains a
callback function to print buffered wlan logs in the event
of kernel panic.

Change-Id: Id8cae651afe45e411e1ddf122c2bc9b5f6688327
CRs-Fixed: 2692163
2020-06-05 02:04:10 -07:00
Alan Chen
a1d5e0c157 qcacmn: Change qtimer time-stamp from decimal to hex
In kernel logs, qtimer currently logs the time-stamps in decimal. Change
time-stamp from decimal to hex in order to order to help correlate
better with other logs in hex qtimer time-stamp.

Change-Id: I46964609645305b1847406841e1b1b641aae9074
CRs-Fixed: 2666868
2020-04-20 10:28:48 -07:00
Alan Chen
87df3e8c2d qcacmn: Remove static from the gwlan_logging struct
The gwlan_logging struct is used by offline tools, so it needs to be
made non-static. Remove the static keyword from gwlan_logging.

Change-Id: I05f47328914c40a2c957ca404b6681ba8507d367
CRs-Fixed: 2663164
2020-04-19 12:38:44 -07:00
sheenam monga
933b129201 qcacmn: Change wlan driver prints from hex to decimal mode
Currently, wlan driver prints id in hex mode and
fw prints in decimal mode. Unnecessary hex to dec conversion
conversion is required while comparing with fw logs.

Fix is to change driver timestamp log from hex to decimal.

Change-Id: I78f9b7fe0ba590c53ea3e90b982691d91b7453e4
CRs-Fixed: 2620935
2020-02-18 08:11:15 -08:00
Sourav Mohapatra
e8a1cf3c70 qcacmn: Reduce unnecessary logs in various QDF modules
Various QDF logs being printed to the driver log are not necessary for
debugging purposes.

Cleanup the logs that are not required.

Change-Id: I9c5685b4d31a741703667943ac458921fa0d480e
CRs-Fixed: 2616210
2020-02-13 11:39:22 -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
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
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
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
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
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
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
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
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
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
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