提交图

249 次代码提交

作者 SHA1 备注 提交日期
Rajeev Kumar
37ee80923a qcacmn: Add wakelock reasons for sap and go d3 wow
Add wakelock reasons for sap and go d3 wow feature.

Change-Id: I067cb8fd30cc90d4ec0c8b1a26c0b5bc17db966f
CRs-Fixed: 2986291
2021-07-14 17:53:54 -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
Wu Gao
0971daad9f qcacmn: Add wakelock for enhanced CFR
There is potential risk when starting CFR and resume happens at same
time, so this change adds wake lock for enhanced CFR.

Change-Id: Ifbde12cb73092b7fc4ef517e57051af4ffe7a79f
CRs-Fixed: 2974733
2021-06-28 19:25:58 -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
Lin Bai
c672a940aa qcacmn: Add diag API to report EVENT_WLAN_BRINGUP_STATUS
Implement API to report DIAG event EVENT_WLAN_BRINGUP_STATUS
to user-space.

Change-Id: Id344fc62b511de71da990aa37a2bca710ff8afda
CRs-Fixed: 2922103
2021-05-06 10:44:28 -07:00
Bapiraju Alla
17f12e5b39 qcacmn: Fill peer assoc mlo params in peer assoc request
Fill peer assoc mlo params in peer assoc request command.
Also add definitions to the WMI_SERVICE_11BE.

Change-Id: Ied7959e022ee27f3bd698b84dc801491175f85b3
CRs-Fixed: 2934417
2021-05-05 04:47:01 -07:00
Guisen Yang
7f654edca5 qcacmn: Do not return error if ol_ctx is NULL
For chips that do not use BMI, the epping enable process
will break if the epping_enable() flow is returned when
ol_ctx is NULL. This should not happen because ol_ctx
is only used when BMI is enabled. Whenever ol_ctx is referred
to, it will be checked for NULL before use, so we should
not return error here.

Change-Id: Ia873536a294b79f774193493646519163baf28c4
CRs-Fixed: 2901231
2021-03-24 09:48:08 -07:00
Ananya Gupta
6d07f2a272 qcacmn: Clear g_pktlog_pde after de-init pktlog
When switching from mission mode to FTM or Epping mode,
g_pktlog_pde is not cleared after de-init. When switching
back to mission mode, a warning is produced as the proc
directory is not found.
To fix this, g_pktlog_pde is cleared when pktlog is
de-initialized.

Change-Id: I1b9c9259c220a1981151dcb1e44a5621d7fd8204
CRs-Fixed: 2872045
2021-02-08 10:51:48 -08:00
Debasis Das
77a23e8f71 qcacmn: Use abstraction APIs for kernel APIs
Use non-inline OS-abstraction APIs to avoid direct
usage of kernel API's.

Use non-inline OS-abstraction APIs instead of OS APIs.

Change-Id: Ie4acfedc63a0e0e8ecbe358db711148db92bd8b6
2021-01-22 12:07:41 -08: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
Vinay Gannevaram
860977d0dc qcacmn: Use local skb pointer for reentrant cld80211_msg_allocator
cld80211_oem_rsp_alloc_skb api is used to alloc skb for reply msg.
A static buffer pointer is returned from this reentrant func
which can be called by kworker and scheduler thread at same
time resulting single buffer access by both threads. After
kworker thread freeing this skb, scheduler is further updating
data in this skb resulting in page fault error. Use local
skb pointer to avoid such race conditions

CRs-Fixed: 2822390
Change-Id: I5f807d06c4890b027c86de9187f17fb83b19db5e
2020-12-15 03:36:00 -08:00
Alan Chen
8a27ffb4ad qcacmn: Rate limit error logs from send_diag_netlink_data
Introduce proper logging APIs for diag module and also rate limit error
logs when skb allocation fails in low memory conditions to avoid excessive
logging side effects

Change-Id: Ia41ff7cfd526180825df61a43f1f59163947f257
CRs-Fixed: 2836681
2020-12-11 22:45:11 -08:00
Srinivas Girigowda
f7248d774e qcacmn: Fix possible OOB read in cnss_diag_cmd_handler
The nla_data coming from user space is a variable length data,
but the driver is checking nla_len() against a fixed length struct only.
It is possible that the nla_len() check against fixed length struct
may pass and if the nla_data does not have the payload and it may
result in possible out-of-bound read (slot->payload).

Hence the fix is to, check if nla_len() is atleast more than
the fixed length struct and also account for payload length.

Change-Id: I2e68d55c0411cff55908c1704031e3c070f3316e
CRs-Fixed: 2825763
2020-12-04 02:50:42 -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
Bapiraju Alla
b130521bd3 qcacmn: Process FW diag events in a separate worker thread
Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.

To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.

Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
2020-11-21 00:20:27 -08:00
Lihua Liu
04e2005263 qcacmn: Avoid massive logging when diagLog socket absent
netlink_broadcast() will return -ESRCH when diagLog socket in
userspace is not present, then massive and repetitive error log
shown as below will be print. To address this, don't print
error log if netlink socket is absent.

"Ptt Socket error sending message to the app!!"
"ptt_sock_send_msg_to_app:Failed sending Msg Type [0x5050] to pid"

CRs-Fixed: 2801137
Change-Id: I14858625732c06442561e9a2e76fe2cfb6dabc12
2020-11-10 21:27:10 -08:00
Aditya Kodukula
74b41a6d6a qcacmn: Add WMI command to enable wow mode logging
Add the WMI command WMI_DBGLOG_MOD_WOW_LOG_LEVEL to enable
debug logs while in wow mode.

Change-Id: Ia1902d989964a5e35f590a075a2de64a9f66d5b7
CRs-Fixed: 2810326
2020-11-05 01:20:46 -08:00
aloksing
f1ebce2cec qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS

Change-Id: Ie65a3707aa24213daf97c2bf36310d6471b31733
2020-09-15 18:24:59 -07: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
Wu Gao
fd40e399fb qcacmn: Add WIFI_POWER_EVENT_WAKELOCK_TDLS
Add wow support for TDLS, so add WIFI_POWER_EVENT_WAKELOCK_TDLS.

Change-Id: I0a7e4075f4fadde631559555f45696511757b819
CRs-Fixed: 2716903
2020-07-02 05:55:41 -07:00
Arun Kumar Khandavalli
49f2ec70bc qcacmn: Remove load/unload log in diag reporting
There are multiple places in the driver where the diag events
are reported and if the unload has started these diag events
are logged and dropped if there is storm of diag events because
of some thread message flushing this logging of the message will
cause excessive logging.

Remove the log as driver is unloading and it won't be sending it
userspace logging either.

Change-Id: Ie4c5caf44ad509da213f1bc76ff6ef6dfeecde2d
CRs-Fixed: 2716899
2020-06-27 17:31:14 -07:00
Alan Chen
778b28eb4a qcacmn: Add a new wakelock for idle shutdown
Add a new wakelock for idle shutdown in order to prevent suspend
from occurring during idle shutdown.

Change-Id: Ia0c7422d3a12e7ff27d5acf9f57a81be13e5ef7d
CRs-Fixed: 2706461
2020-06-10 18:13:49 -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
bings
1d5343f48a qcacmn: ndo_tx_timeout support for 5.6+ kernel
New parameter txqueue is added for callback ndo_tx_timeout.
Add support for it under the kernel version compilation flag.

Change-Id: I0234dade56f65d15a4370404e17ff51a8a73ee4e
CRs-Fixed: 2666444
2020-06-01 00:04:14 -07:00
bings
e3fe6fc3c0 qcacmn: proc_create_data support for 5.6+ kernel
One parameter of proc_create_data is changed from struct
file_operations to struct proc_ops.
Add support for it under the kernel version compilation flag.

Change-Id: Ic87222f9c267debef56dcc66fc629854058ffabd
CRs-Fixed: 2666492
2020-06-01 00:04:11 -07:00
Lihua Liu
acb2945a97 qcacmn: Fix compile error when enabling pkt log
Variable "type_specific_data" is defined under macro
PKTLOG_HAS_SPECIFIC_DATA in struct ath_pktlog_hdr, but
used without control of the macro.

Change-Id: I9d46ddc141a0641aa6eaecf712c52e640c48053c
CRs-Fixed: 2665564
2020-04-29 22:27:43 -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
Sourav Mohapatra
b673dae57f qcacmn: Remove unused PTT sock code for non CNSS_GENL
Currently, the code present to take care of the PTT msgs in case of
non-CNSS_GENL is not being used. Thus, cleanup the path for the same.

Change-Id: I310ace0e04448b21e46b0f39efb3c33bce0a4d65
CRs-Fixed: 2559499
2020-04-08 13:44:13 -07:00
Vinay Gannevaram
23a3603951 qcacmn: Add support for NLA type CAP_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CAPS and respond with
NLA type CAP response

CRs-Fixed: 2595140
Change-Id: I5a6aa1fac537ca618404520b81c541a20dafd6fb
2020-03-21 12:35:02 -07:00
Gururaj Pandurangi
2d774f1374 qcacmn: Fix array index overrun in roam scan API
Fix array index overrun by changing index size
WLAN_MAX_ROAM_CANDIDATE_AP from 8 to 9 in a roam
scan API
Also, replace local macro WLAN_MAC_ADDR_SIZE with
global macro QDF_MAC_ADDR_SIZE to avoid issues in
future

Change-Id: Ib546d18e1d85e87064eb5b78c08168db583acf2d
CRs-Fixed: 2621600
2020-02-28 16:32:03 -08: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
Alok Kumar
0265d7917a qcacmn: Add INI support for packet log buffer size
Add INI parameter "PacketLogBufSize" to populate
packet log buffer size.

Change-Id: Ic9b963a88a6f6d884d5fa3a63b4fed6768ba2fc4
CRs-Fixed: 2611409
2020-01-30 23:23:53 -08:00
Alok Kumar
74bbfc8aee qcacmn: Add the utils and cfg changes for Moselle
Add the changes in utils and wlan configuration
layer for supporting the newly added IPCI bus type
for Moselle.

CRs-Fixed: 2597342
Change-Id: I4484d6e774e9f94a322b8dee4ae7ff4460ed2634
2020-01-26 00:53:03 -08:00
Pragaspathi Thilagaraj
fea4e3090f qcacmn: Update diag log codes excluding the offset
Update the diag log codes for below excluding the LOG_1X_BASE_C
offset, as its added explicitly:
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: I7f4918542760b518a9ea5ffa90ca554a5c9c5c8a
CRs-Fixed: 2599120
2020-01-22 04:48:13 -08:00
Vevek Venkatesan
4a07e3949d qcacmn: cdp: Converge cdp_ctrl_ops
Currently cdp ops are given pdev/vdev 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_id/vdev_id which will be used to get the
respective handles, and hence avoiding unwanted
access of the handles if it has been deleted.
Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_get_psoc_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Id089d9b6b4737d700d2436e2081291a3741affb5
CRs-Fixed: 2541658
2020-01-20 17:52:48 -08:00
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