Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Qiwei Cai
59ec405e49 qcacmn: Allocate roam debug buffer dynamically
Allocate memory for global_wlan_roam_debug_table dynamically.

Change-Id: I73a7654cbe75c288aae58e50c6d2072dc6a1e2fe
CRs-Fixed: 2275994
2018-07-13 02:58:39 -07:00
Qiwei Cai
1c8f4f7be2 qcacmn: Featurize wlan roam debug
Featurize wlan roam debug log to compile out in mission mode.

Change-Id: Ic3dcdc6ab541093f16fcc8b9118120aa1f9b972f
CRs-Fixed: 2241297
2018-06-20 00:43:28 -07:00
Nirav Shah
79ec3e999b qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.

Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
2018-06-15 21:31:16 -07:00
Nirav Shah
c9b0931950 qcacmn: Featurize packet log
Featurize packet log.

Change-Id: Ica7d658ef65486ae77e24a11cef50291a5e82563
CRs-Fixed: 2245424
2018-06-09 02:28:11 -07:00
Jeff Johnson
5f255001d9 qcacmn: utils: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0bb870b4c83129d2466aeb4741d27783de888008
CRs-Fixed: 2230684
2018-05-18 02:17:50 -07:00
Nirav Shah
b432e7c080 qcacmn: [QDF] Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I50353d069e3b2edfb73c5421b73e18273bc243af
CRs-Fixed: 2181012
2018-02-27 21:17:15 -08:00
Deepak Dhamdhere
7e0b8ba31a qcacmn: Create roam debug log infrastructure
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
2017-10-31 17:39:09 -07:00
Dustin Brown
9a489c42be qcacmn: Statically allocate wlan logging buffer
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
2017-09-02 00:17:40 -07:00
Agrawal Ashish
42a1dc0596 qcacmn: Trigger copy of pktlogs to SD Card on basis of ring ID
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
2017-08-10 06:12:51 -07:00
Srinivas Girigowda
17720241d4 qcacmn: Replace wlanLoggingFEToConsole to wlanLoggingToConsole
Currently the config ini "wlanLoggingFEToConsole" specifically talks
about enabling the logs to kmsg for FATAL and ERROR logs.

This cfg.ini item should not be specific to any log level, instead
it should just depict whether logging to console should be enabled
or not.  Hence change wlanLoggingFEToConsole to wlanLoggingToConsole.

Change-Id: I54e340ed58891175b53ac2d0137d15a2baea1c9f
CRs-Fixed: 2017427
2017-04-11 11:04:27 -07:00
Srinivas Girigowda
60644c29e6 qcacmn: Add core\utils directory and files to qcacmn
As a part of UMAC convergence, move the core\utils logging to qcacmn.

CRs-Fixed: 1109855
Change-Id: I499a392f74f3e52e99df4d03e4a27bce6cf5be7c
2017-02-17 22:13:07 -08:00