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
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
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
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
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
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
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
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
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
netbuf in send_packetdump is never checked for null before
dereferencing it for len netbuf->len.
Change-Id: I51aa0fb9c52e04c33291791ef47def703754222d
CRs-Fixed: 2404844
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
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
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
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
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
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
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
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
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
Add timer to flush out log buffers periodically. Add command to set the
time period value.
Change-Id: I8e796a9bc7caac2661d00852420dd5fa66f5bca5
CRs-Fixed: 2296362
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
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
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.
Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
Log reason code while flushing logging events to precisely know
the reason of failure.
Change-Id: Ibe26563780f165e85490c54c2b4f83d959a3587f
CRs-Fixed: 2235276
Remove redundant message length check.
Truncate message immediately if its length is over MAX_LOGMSG_LENGTH,
so that can remove min check between true length and max available length.
Change-Id: I7e6c61021316a727e04dbb9671947b6413c27af3
CRs-fixed: 2229210
Multicast logging is MCL specific feature which controls sending
of host and fw netlink DIAG events to user space. This feature
should not control console logging from wlan_log_to_user because
it can lead to all debug logs getting logged on console until
CFG INI for multicast logging is parsed during initialization and
this can lead to watchdog bark beacuse of excessive logging during
WiFi driver initialization. Hence remove multicast logging check
from wlan_log_to_user API to avoid logging all debug logs on console
during WiFi driver initialization sequence.
Change-Id: I2a29928757f683a72345436a57de1ee8d02f53b3
CRs-Fixed: 2217749
At some point WLAN_MACADDR_LEN was added to the driver, despite
QDF_MAC_ADDR_SIZE already serving the same purpose. There are cases
where these two macros are implicitly assumed to be the same value.
This is a classic single-source-of-truth violation, and only serves to
confuse developers. Deprecate WLAN_MACADDR_LEN and use
QDF_MAC_ADDR_SIZE instead.
Change-Id: I4e941d5e17d161a5810e693c89b95ae08f83c6b0
CRs-Fixed: 2179728
Add a circular buffer to hold roaming related debug log information
for peer and vdev operations in the driver. Purpose is to dump
this information after host or target crash. 256 entries will go
back much deeper into history than dmesg or wlan driver logs found
in crashScope. Information is dumped out as error messages from
crash detection points as necessary.
The support routines help to store the debug logs and dump them,
typically after peer related timeout or assert.
wlan_roam_next_debug_log_index () - Utility routine to compute next index
wlan_roam_debug_log() - Adds a log entry
wlan_roam_debug_string() - Returns debug log type string
wlan_roam_debug_dump() - Dump all wlan roam debug log records
Add new QDF module ID QDF_MODULE_ID_ROAM_DEBUG.
CRs-Fixed: 1116078
Change-Id: If2077f560405ec0414d08ef4ece0fb0d2db2ccc7
Event indicating to the user space that the driver has detected an
internal failure. The driver is expected to recover from such a failure
automatically, e.g., by resetting the device.
This event carries the information indicating the reason that triggered
this detection.
Change-Id: Ia13e6f102e5e18ec4864ed258728369d51a77ff4
CRs-fixed: 2120886
wlan_logging_sock_svc has a reference to the vos_ctx. Since this is
obsolete, remove the reference.
Change-Id: I1256aa8a1220859911eceec8048a57856e64299a
CRs-Fixed: 2102456
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_adapter_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.
Change-Id: Ia5177a671f3657a23e88ec1a47c6ed0ac569934a
CRs-Fixed: 2100985
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_context_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.
Change-Id: I3dfe59ac92a374639faa6774a6538c5d970d3f1d
CRs-Fixed: 2100797
To aid in debugging memory leaks, and improve the robustness of log
recovery from crash dumps, statically allocate pglog_msg in the global
scope. This allows logs to be inspected even in cases where a crash
came late in the unload process. It also improves log recovery
robustness by removing the possibility of using a NULL pointer offset
under certain memory corruptions scenarios.
Change-Id: I077198e358570661c2f3adf2704f2c48f4b2f6f8
CRs-Fixed: 2078548
cds_trigger_recovery no longer takes any arguments. Update calls to
cds_trigger_recovery accordingly.
Change-Id: I2d2f36c73baa2133496559bd8213aec8091e51b5
CRs-Fixed: 2073933
For fatal events , driver sends EVENT_WLAN_LOG_COMPLETE
to userspace. But there can be multiple events for each
ring id like connectivity, driver , frimware, wakelock etc.
Cnss diag has to trigger copy of pkt log to /sdcard only for
one bug report, so send ring id in log complete event so
that it can trigger copy for driver ring id.
Change-Id: I3b06bed52509e58ac4d79698c95ba5eb1baa3bb3
CRs-Fixed: 2053770