نمودار کامیت

75 کامیت‌ها

مولف SHA1 پیام تاریخ
Jeff Johnson
4042de592d qcacmn: Fix QDF documentation
The kernel-doc script identified a large number of documentation
issues in the QDF. A series of patches has already fixed many of the
issues, so fix most of the remaining ones.

Note that the QDF IPA abstraction still has issues, but it is under
rework, so not trying to clean it up until after the rework is
complete.

Change-Id: I10c33e341cb6b46e0f8ada99069616d450c07189
CRs-Fixed: 3406197
2023-02-18 13:33:23 -08:00
Madhavan Ganesan
a30c47e6cc qcacmn: Add qdf parser API of type uint8_t and uint16_t
Add QDF INI parser API of type uint8_t and uint16_t

Change-Id: I0716df7986f00c60ead852f368d06d37dba7db80
CRs-Fixed: 3389847
2023-01-31 13:18:05 -08:00
David Oladunjoye
bee501dcb7 qcacmn: Return error when unpermitted character is parsed in ini
Currently, when an unpermitted character is added to ini, driver
flags as an unknown config item and continues parsing. This could
be an issue. Change is to return error when invalid character is
parsed in ini.

Change-Id: I0249d187f0e05a31dd256d5de56798a575903e5b
CRs-Fixed: 3354669
2023-01-17 05:30:11 -08:00
Vishal Miskin
39042cfc1a qcacmn: Add support to parse a string into int32 array
Currently there is no api to parse a string to int32 array.

Write an api to parse a string to int32 array.

Change-Id: I2982a1bfeff94288a1bd76d8f4d87ea2eac934b2
CRs-Fixed: 3304318
2022-10-22 10:00:20 -07:00
Rajesh Chauhan
38b4da1cc9 qcacmn: add a new macro __qdf_alloc_size
In kernel 5.16, __alloc_size is defined in linux/compiler_types.h
file. So instead of calling this macro, define and use new macro
__qdf_alloc_size.

Change-Id: Ie1930bf2aaf0cb6bc079bc66aba9eeba92ec8c12
CRs-Fixed: 3295139
2022-10-05 19:33:35 -07:00
David Oladunjoye
a163a49f31 qcacmn: qdf: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: Ib87c694224af8e1331d813b64e02dc4ec0c176d8
CRs-Fixed: 3218237
2022-07-07 00:52:15 -07:00
Surya Prakash Raajen
edf9fd0441 qcacmn: Add support for section parsing in ini
Add support for section parsing in ini, such that we could
read specific section of the file and update the ini values
instead of redundant values or updating the same in the
scripts based on the config

Change-Id: Ibdb08a04d709746c04c3e7c47ee3bb4a7ce85346
CRs-Fixed: 3107545
2022-02-16 10:26:33 -08:00
Jingxiang Ge
2ed71bd979 qcacmn: Fix compliation error when disable CONFIG_LEAK_DETECTION
Fix error when disable CONFIG_LEAK_DETECTION.

Change-Id: I16d85b596ef64ad45e9fb0bb594b0a3287554e8f
CRs-Fixed: 3080460
2021-11-24 22:58:30 -08:00
Ashish Kumar Dhanotiya
c96d5d2592 qcacmn: Add support to parse multiple ini names
Currently driver supports only one name for an ini parameter,
there is no aliasing support for ini names.

With this change add support for  multiple ini names for the
same ini parameter.

Change-Id: Ib16a258975f5c3d152fa1dfbbdb6b3e6cc222784
CRs-Fixed: 3007156
2021-08-09 22:25:25 -07:00
Debasis Das
1ae342f91a qcacmn: Fix potential NULL pointer access in qdf_ini_parse()
In qdf_ini_parse(), verify that section_cb pointer is valid
to prevent invalid memory access.

Change-Id: Ie3d2e513e2aabf0bd5f9702578074cb1191991c1
2021-07-21 03:05:41 -07:00
Adwait Nayak
c2c89243d8 qcacmn: Parse and update qdf module params
Read the file wifi_module_param.ini, in which wifi module params
are present and compare these module params with qdf module params
in qdf module init function.

If any of the module params belongs to qdf module is present,
then that particular module param is updted during qdf module init.

Change-Id: I76ef876f6c7be3cdffd93b6050a190438d60bf39
2021-04-27 16:13:11 -07:00
Rajeev Kumar
034e1c4507 qcacmn: Add INI file parse success and failure logs
Some times INI file is empty or wrongly formatted on device
and WiFi ON fails because of it and hence add a log message
to indicate INI file parse success or failure.

Change-Id: I2337fc4ffb4a443ac191f584e283fdc9699a4e04
CRs-Fixed: 2931228
2021-04-26 20:37:14 -07:00
Vevek Venkatesan
da069e5990 qcacmn: add qdf wrapper API for is_driver_state_module_stop
Add qdf wrapper API support for is_driver_state_module_stop.

Change-Id: I6965b4049aebcbe9ec612cf3d70398eb269450e4
CRs-Fixed: 2912016
2021-04-01 20:34:10 -07:00
Bapiraju Alla
e9dd7d1d40 qcacmn: Update error if failed to read at least one INI parameter
INI parameters parsing can fail because of fail to read INI file or
failed to parse at least one parameter. In some scenarios, driver should
assert if parsing is failed for atleast one INI parameter.

To differentiate these two failures, return different error status
values.

Change-Id: I187d2b2e8f55af47a14561302d8b62e84de7da5a
CRs-Fixed: 2878966
2021-02-19 13:45:01 -08:00
Karthik Kantamneni
3c3d944246 qcacmn: Enhance error signature in qdf_check_state_before_panic
Improve error signature in qdf_check_state_before_panic API.

Change-Id: I5774c07e9359b711f0863c40072962b802318f2f
CRs-Fixed: 2879026
2021-02-18 07:47:05 -08:00
Will Huang
c761e3e208 qcacmn: Remove QDF_BUG of qdf_spin_is_locked
spin_is_locked() provided by kernel has statement that we should not
rely heavily on the return value, it only tells that the spinlock is
seen to be locked, not that it is locked on your CPU.
Further, on CONFIG_SMP=n builds with CONFIG_DEBUG_SPINLOCK=n, the
return value is always 0.

So we should not use QDF_BUG to test/assert its return value, only be
used for debugging purpose.

Change-Id: I76765f567abf333ab6fa0d7c7c73f7c263e18495
CRs-Fixed: 2846186
2021-01-15 06:07:37 -08:00
Arun Kumar Khandavalli
69c17ec173 qcacmn: add new api to get the bus reg dump
Add new wrapper to get the bus specific register information via
the bus driver.

Change-Id: I544b23c8f6654e9215fb4f03203d6754c766dada
CRs-Fixed: 2833251
2020-12-08 11:16:28 -08:00
Arun Kumar Khandavalli
0cb4658b79 qcacmn: add new qdf wrapper to update reason code
Whenever driver does a recovery because of the bus failure the
reason for the recovery is not known until the reason code is
read in the hif layer. So, update the recovery reason if there
is a bus id read failure in the hif.

Change-Id: I5ed6adc92ef2a94a031f682e5ffd17af9ac6893d
CRs-Fixed: 2833247
2020-12-08 11:16:25 -08:00
Aditya Kodukula
e6cf256348 qcacmn: Add a check to ensure validity of ini file
The function qdf_ini_parse returns QDF_STATUS as SUCCESS even if no
fields are read from the ini file. Because of this even if the
ini file is corrupted and no values are read from it the function
still returns SUCCESS.

So, to avoid that and ensure that the ini file is not corrupted,
add a variable ini_read_count to count the number of fields read
from the ini file and return SUCCESS only if its value is not zero.

Change-Id: I5ec9a9cdc9780b6c9487f6ac64b411b81328d75c
CRs-Fixed: 2804937
2020-11-26 22:45:45 -08:00
Madhvapathi Sriram
e55a45596f qcacmn: Add support to parse a string into uint32 array
Currently there is no api to parse a string to uint32 array.

Write an api to parse a string to uint32 array.

Change-Id: I54ab4ba1009f6efeb535df1ad43c56e1c3e56d2b
CRs-Fixed: 2758878
2020-08-25 05:41:29 -07:00
Pragaspathi Thilagaraj
bc2f1d2a72 qcacmn: Add support for connection manager rso mode command
Add changes to support new definition of
send_roam_scan_offload_mode_cmd() in connection manager.

Change-Id: Iea10907756ea785b0b0de72d01375f50ac3dbd6a
CRs-Fixed: 2758318
2020-08-23 17:37:51 -07:00
Wu Gao
7f96401451 qcacmn: Add QDF API for DRV support
Add QDF API to check platform capability if DRV is supported or not.
Then component enables wow support based on it.

Change-Id: I9045b1982acfc4ed4cdce724b48430cb20e03274
CRs-Fixed: 2722639
2020-07-02 18:23:36 -07:00
Arun Kumar Khandavalli
2bfa222e36 qcacmn: Add the hang event infrastructure
As part of the new requirement to understand the reason for the
wifi hang the data need to be collected from the required modules
which will help in root-causing the reason for the hang.

Add the infrastructure so that the required modules can register for
this hang event notifier chain.

Change-Id: I32f1365eec1ad7d6e19be95e8faf9a980d054b76
CRs-Fixed: 2648304
2020-03-31 11:39:01 -07:00
Arun Kumar Khandavalli
cf6efc2a39 qcacmn: Add the notifier chain infrastructure
Notifier chains are simple function list executed when an event
occurs. In qdf block and atomic notifier chains are defined.
Blocking notifier chains can be used to invoke a list of functions
based on event in a process context wherein atomic notifier chain
can be used in an interrupt context.

Change-Id: I9020b9f19915e084b017932fb6d0bfad792d745c
CRs-Fixed: 2648224
2020-03-31 11:38:44 -07:00
Sourav Mohapatra
1f21eadadf qcacmn: Extend qdf_trigger_self_recovery to include psoc granularity
To undergo self recovery, the driver uses qdf_trigger_self_recovery to
initiate the sequence. Currently, this framework is valid for only a
single psoc driver.

Extend this framework to include support for multiple psoc driver by
providing the psoc on which the recovery has to be undertaken.

Change-Id: I782b505c03819223a914dabe7673b369aa175b7c
CRs-Fixed: 2617707
2020-03-27 10:19:41 -07:00
Srinivas Dasari
04e3179b45 qcacmn: Add NAN and TDLS cases for qdf_opmode_str
Add cases for NAN and TDLS in qdf_opmode_str to return the mode
in string format.

Change-Id: Ibdc22a337005d56485e5ee3b392f4d5d0089304a
CRs-Fixed: 2648590
2020-03-25 19:11:14 -07:00
Nirav Shah
9ae1975ec5 qcacmn: Fix "maybe-uninitialized" compilation error
Initialize to fix "maybe-uninitialized" compilation
error for specific compilers.

Change-Id: Ibb049891ef5847d1beda94470a6e75ebba145ef4
CRs-Fixed: 2634848
2020-03-05 01:40:12 -08:00
Alan Chen
4e1154ac78 qcacmn: Define QDF API to check if driver unload is in progress
Define a QDF API to check if driver unload is in progress such that
driver unload can be checked from CMN components.

Change-Id: I397b0b6252ed8fd9558f04802cf55fdc61a39d83
CRs-Fixed: 2605656
2020-01-21 15:37:35 -08:00
Nisha Menon
4d77312b6d qcacmn: Check if FW or host in recovery before invoking assert
Force wake request is sent before register write. If this req
fails check if FW is down or host is in recovery before
asserting.

Change-Id: I6d31b1f95b68ae4e462f59ed32ed933de55cacae
CRs-Fixed: 2601364
2020-01-17 07:28:13 -08:00
Manikandan Mohan
9b1b93cfcd qcacmn: Add support for WMI over QMI
Add support for WMI over QMI to reduce power consumption for
periodic stats report.

Change-Id: Ic57b2bd18be803c97ffeea2e0073751d31e02202
CRs-fixed: 2521835
2019-09-19 18:56:11 -07:00
Ashish Kumar Dhanotiya
e2ff8ee254 qcacmn: Add support to parse a string into uint16 array
Currently there is no api to parse a string to uint16 array.

Write an api to parse a string to uint16 array.

Change-Id: Idbde9d70c64bc131813f5789c0453c9b3736228b
CRs-Fixed: 2478267
2019-07-03 08:56:13 -07:00
Rajeev Kumar
e386d8bcbc qcacmn: Add QDF API for DRV feature support
Add QDF API to check if DRV is connected or not such that
proper decision can be taken during wow enable request.

Change-Id: Ic128882d564b5717b6dc749c6fe229a6dbb86c8f
CRs-Fixed: 2457065
2019-05-23 01:52:01 -07:00
Jingxiang Ge
4218f02cef qcacmn: Pass hang reason to qdf_trigger_self_recovery
To identify the reason for recovery, add parameter
"reason" for qdf_trigger_self_recovery.

And revise comment for qdf_hang_reason, replace "CDS"
with "QDF".

Change-Id: I8b388b5e83dbbdf29246c264ada56290f0dd3bfc
CRs-Fixed: 2431282
2019-04-19 01:56:52 -07:00
Rajeev Kumar
ad8457136c qcacmn: Use qdf_tracker for nbuf mapping
qdf_tracker generically implements all of the logic necessary to
implement the qdf_nbuf map tracking. Rather than using the current
custom tracking solution for qdf_nbuf map tracking, use qdf_tracker
instead.

Change-Id: Id33138a9035653b45c66b712bd11e54873266a17
CRs-Fixed: 2425623
2019-04-18 13:26:22 -07:00
Dustin Brown
9c62f7d939 qcacmn: Add qdf_tracker
A common problem in any C code base is the proper management of various
resources, such as memory allocations, timers, works, locks, etc. To
that end, WLAN has added various one-off leak tracking features for
different resources over the years, to great benefit. However, this
approach is tedious, and prone to copy/paste and fix propagation issues,
making maintaining these various tracking features onerous.

Add a generic leak tracking data structure to WLAN for general use,
which implements these tracking logics. This will allow the various
resource tracking features to leverage this shared implementation for
ease of maintenance. Build on the hash table implementation added as
part of I7f5fc0c59ed220bde43044e7013b3c8573f1bf39.

Change-Id: I3247ace583108139dfb699ca077db3bdf5cfeace
CRs-Fixed: 2422958
2019-04-02 15:16:18 -07:00
Dustin Brown
80150e9715 qcacmn: Remove qdf_ssr_protect/unprotect
Remove the unused qdf_ssr_protect/unprotect and related APIs.

Change-Id: I55ce40646584c32816ad38caec4c5cdee896b7fa
CRs-Fixed: 2418459
2019-03-28 04:37:26 -07:00
Dustin Brown
02d3f5423e qcacmn: Refactor qdf platform op start/stop
The original implementation intended to back the qdf_psoc_op_start/stop
callbacks has evolved somewhat since the qdf_psoc_op interface was
added. Refactor this interface to better reflect the evolved
implementation.

Change-Id: Ia18949fc75bdc52313bc81976f79d3a76e9760ec
CRs-Fixed: 2418426
2019-03-21 05:12:06 -07:00
Dustin Brown
8ddef7dd9a qcacmn: Remove qdf_flex_mem_release()
Due to a limitation in the memory leak detection logic when qdf_flex_mem
was written, qdf_flex_mem_release() was necessary to free any
dynamically allocated memory in the qdf_flex_mem_pool during certain
points in the WLAN driver lifecycle. This was done to avoid flagging any
dynamically allocated qdf_flex_mem_segments as false positive leaks
when the memory domains were changed and leak checking was performed.
With the introduction of qdf_talloc(), this workaround is no longer
required. Replace the calls to qdf_mem_malloc/free with qdf_talloc/free,
and remove qdf_flex_mem_release() altogether.

Change-Id: Ia5fd21386b94fc117af5f27853db5d8341601738
CRs-Fixed: 2404955
2019-03-01 11:14:48 -08:00
Arunk Khandavalli
f15ef34107 qcacmn: Add the wrapper for dsc function operations
Add the qdf wrapper functions for the new dsc infrastructure.

Change-Id: I126b14b00b2f7ef77493a2abb7d8ec4f1394b15c
CRs-Fixed: 2364042
2019-01-21 19:21:32 -08:00
Dustin Brown
243d00af0b qcacmn: Adjust min zero compression to 1
The IPv6 address format allows compression of _one_ or more zero hextets
using "::". However, the current implementation accepts _zero_ or more
zero hextets as valid. Adjust the minimum required hextets for a zero
compression to 1 from 0.

Change-Id: Ibdf406b04bbdc44d4a28fafa6179c104285c915c
CRs-Fixed: 2362739
2018-12-14 14:26:22 -08:00
Dustin Brown
7c32e412b8 qcacmn: Add qdf_talloc APIs
Add APIs for t(ree) alloc(ated) memory management.

These APIs allocate memory like malloc, but track those allocations via
a parent-child relationship, or tree. If the parent is freed while it
still has children, a panic will be triggered. This effectively gives
you the ability to limit the lifetime of an allocation by ensuring the
child allocation lifetime will be strictly less than the parent
allocation lifetime.

Change-Id: I6308c96061e125b2e5a9c424ec2d2298c1c503ab
CRs-Fixed: 2359469
2018-12-13 16:46:04 -08:00
Dustin Brown
90556671c5 qcacmn: Add qdf_opmode_str()
It is often useful to print the human readable version of an operating
mode in a log message or some other user-facing string. Add a function
for mapping QDF_OPMODE to human readable strings, qdf_opmode_str(), in
QDF such that various consumers do not have to implement it themselves.

Change-Id: I8756fb2ea97b3b8c7af2633b07694ad1e74d6d3e
CRs-Fixed: 2331888
2018-10-17 17:42:29 -07:00
Liangwei Dong
89fdd82b93 qcacmn: Skip chanlist event during recovering
Add new qdf API: qdf_is_recovering and
qdf_register_recovering_state_query_callback.
Client driver will register the state query callback
to common driver to report the recovering state.

Regulatory skip the chanlist update event during SSR
to keep the current regulatory setting.

Change-Id: I58e503cce162a0351d566148c1897a5012889c62
CRs-Fixed: 2321820
2018-10-09 10:54:33 -07:00
Amir Patel
20a0efabb1 qcacmn: Add qdf_platform source file to qdf/Kbuild
Add qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6

Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826
2018-09-24 18:55:20 -07:00
Karthik Kantamneni
4113fb7d13 qcacmn: Add qdf api which converts string to array
Added api which parses given input string to 8-bit unsigned array.

Change-Id: I2d6800f550b37970b9a0d48508a49e6354a94f9a
CRs-Fixed: 2306890
2018-09-06 03:18:36 -07:00
Dustin Brown
ed22a65b66 qcacmn: Add caller/line info to recovery log
To speed up recovery trigger debugging, pass the caller's function name
and line number, such that the group needing to do the initial triage
can be easily identified via the panic message.

Change-Id: I64f62ec30de657deeff037ee99610e716cfc4377
CRs-Fixed: 2298195
2018-08-17 16:13:22 -07:00
Dustin Brown
fe41df9c00 qcacmn: Move panic messages into QDF_DEBUG_PANIC
QDF_DEBUG_PANIC has recently gained a reason parameter. Move instance of
logging followed immediately by QDF_DEBUG_PANIC to single calls.

Change-Id: Ifc00be410621005e8494074ed00b1b7e44cc6a03
CRs-Fixed: 2271769
2018-07-09 15:55:35 -07:00
Ryan Hsu
c84218fed7 qcacmn: Add SSR callbacks
As CDS is not usable by WIN, add callbacks that are
registered in QDF and correct the module dependencies.

Also moves the platform related function to qdf_platform.[c|h]

Change-Id: I3080e9df86770235ff46237b8a2ffb9c2a3c9c2c
CRs-fixed: 2130260
2018-06-20 04:05:54 -07:00
Amar Singhal
aa6deb6c22 Revert "qcacmn: Use the right index while accessing ipv6 array"
This reverts change-Id I38eb1d3be2840bfbb5fdc9c72606ce.
Zero_comp value can be 0 also; so revert the change.

Change-Id: I7ab10c20c74d005009f435d483d39e138687a547
CRs-Fixed: 2233854
2018-06-03 23:39:40 -07:00
Dustin Brown
c7ee85c4a8 qcacmn: Use qdf_flex_mem for scheduler messages
Currently, the scheduler thread keeps a large, pre-allocated array of
messages for use in message posting. The vast majority of the time,
however, the scheduler thread has zero or one messages pending in the
queue. This leads to a huge memory overhead for nominal driver
operation.

Replace the current pre-allocated scheduler message pool with a
hybrid static/dynamic approach.

Change-Id: Ie942bacfef43edf142a9f35ad0309069096cda90
CRs-Fixed: 2204172
2018-05-21 21:48:10 -07:00