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
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
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
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
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
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
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
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
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
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
Add qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6
Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826
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
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
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
This reverts change-Id I38eb1d3be2840bfbb5fdc9c72606ce.
Zero_comp value can be 0 also; so revert the change.
Change-Id: I7ab10c20c74d005009f435d483d39e138687a547
CRs-Fixed: 2233854
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
Pre-allocate the reduction_limit number of segments during
flex-mem-pool initialization.
Change-Id: I91581e04b94597ee4314ce8691b37a45066c5273
CRs-Fixed: 2241805
Add the ability to prevent qdf_flex_mem_pool from freeing memory
segments unless there are more than some minimum number in the pool
already.
Change-Id: I20bde2ed629b97924ea71b4f7f46a2c1fc1bab28
CRs-Fixed: 2229511
It often happens that the WLAN driver needs to allocate some pool of
structures to handle bursty operations. The traditional approach is to
statically allocate the maximum number of structures that we want to be
able to handle concurrently. This has the significant down side of
requiring manual tuning for every hardware combination for optimal
behavior, and wasting large amounts of memory during non-burst periods.
Add a new flexible, segmented memory allocator in QDF to help address
such scenarios. A small static buffer segment is used to service the
vast majority of operations, while additional segments are dynamically
allocated as needed to meet demand. Critically, these additional
segments are freed when not in use to reduce memory consumption. The
result is a self-tuning buffer that combines most of the benefits of
pure dynamic allocation with most of the benefits of pure static
allocation.
Change-Id: I5c27ecce72a450826494b5d13d6c9fdebda650a6
CRs-Fixed: 2224534
Zero comp value if changed; would be 1 to 8. When accessing
ipv6 array, the access can go out of bounds if value is 8 since
the bytes array is of size 16 (0 to 15). Fix that.
Change-Id: I38eb1d3be2840bfbb5fdc9c72606ce51e29cb0ce
CRs-Fixed: 2196076
Register fw down legacy callback with QDF such that new UMAC
components can call QDF API to check if fw is down or not.
Change-Id: I8d68cb7625fd75aa90ba09adfe13955c5418b54f
CRs-Fixed: 2202605
Change the signature of QDF FW down callback API to return bool
instead of void. Return type true indicates fw is down and return
type false indicates fw is not down.
Change-Id: I2be6f14e5fbdb7b24ccd604244e1314a8f127291
CRs-Fixed: 2196217
A recent commit changed the return type for qdf_str_len() to size_t from
int32_t. Update call sites for qdf_str_len() to store the return value
as size_t to match.
Change-Id: Ib8bfad2c1fc7de1f6fc601d1be69e734d3a49dcf
CRs-Fixed: 2196858
In order to avoid global state, add a context parameter to
qdf_ini_parse. This parameter will get passed back to consumers via
the existing callbacks.
Change-Id: Icd74a58815701b4603924838bb84c7956058da6b
CRs-Fixed: 2194517
qdf_bool_parse() fails to advance the parsing cursor after consuming
valid characters. Advance the cursor after valid input in
qdf_bool_parse() to avoid failing to parse valid boolean expressions.
Change-Id: I904d5eed638e215e9821e140feb5286fffe37b7b
CRs-Fixed: 2194546
Define QDF API such that legacy module can register fw down
callback and new components can use QDF API to check if fw
is down or not.
Change-Id: I2f5423943f351ee3a0fd84616c904a27702c10e3
CRs-Fixed: 2194451
Perform the following cleanup items for qdf_*_parse() APIs:
1) Many qdf_*_parse APIs use a custom left-trim function called
qdf_skip_whitespace(). Recently, qdf_str_left_trim was added,
so use this function instead.
2) Remove 'const' from 'const char *' parameters. 'const' protects
modification of the pointer, which is already duplicated for the
function call. Since the qdf_*_parse() APIs modify the pointer
parameter anyway, using const is incorrect (and should have failed
compilation).
3) Ensure the public qdf_*_parse APIs are properly exported.
Change-Id: I89725c68cc0d61a66fe95ef02fa2deda110411ac
CRs-Fixed: 2185978
Add an QDF abstraction for reading a file. Also, add the first consumer,
qdf_ini_parse(), as well. This is pure parsing logic, which offloads the
actual content handling to the caller via callback functions.
Change-Id: Idfca74c5543a5b0da7ddd1bdc6e2ad2be59ed36b
CRs-Fixed: 2184463
Add files for QDF string APIs. Existing qdf_str_* APIs will be moved as
part of a future change.
Change-Id: If98d41380b2f7f62bbe5de141b6827e9427944ab
CRs-Fixed: 2184462
Add converged implementations of MAC, IPV4 and IPV6 address parsing to
QDF. This allows for reuse wherever address parsing is done. This also
supports the upcoming configuration component, which will support all
three address types.
Change-Id: I5158e2a40169da979a219363c6d2a25784c5a7e8
CRs-Fixed: 2174072
In order to support memory leak detection during a specific period of
time, add APIs to allow setting the current memory domain. Each
allocation is tracked against the current memory domain at the time of
allocation. Consumers can then check to ensure the memory domain is
empty before each transition to a different domain.
Change-Id: I3a8d18ea0700122a2425eacb6051c6188b9aa5d6
CRs-Fixed: 2113614
In order to support resource leak detection during a specific period of
time, add APIs to allow setting the current debug domain. This allows
for each resource allocation to be tracked against the current debug
domain at the time of allocation. Consumers can then check to ensure
the resources allocated for the current domain are released before
transitioning to a different debug domain.
Change-Id: I1158abbc7e5bd9bd8dc0c47b303386c6229a1b3c
CRs-Fixed: 2144304
A hotplug handler is allocated by calling qdf_cpuhp_register. However,
qdf_cpuhp_unregister does not free the previously allocated memory. Free
the hotplug handler in qdf_cpuhp_unregister.
Change-Id: I1663f5ea29a8630b42be33abd824135b0fbe4845
CRs-Fixed: 2141119
Currently, there are two consumers of the Linux kernel CPU hotplug APIs.
Besides being problematic for not being operating system agnostic,
different versions of the Linux kernel export different CPU hotplug
APIs. In order to consolidate the various abstractions for different
operating systems and API versions, create a CPU hotplug abstraction in
QDF.
Change-Id: Ib17c6e3ed3a87a90a82d909a6c493360cab27855
CRs-Fixed: 2132632
Converge ADF and CDF API's and move them to
QDF folder. MCL/WIN driver use this QDF converged
module for OS abstraction.
Change-Id: I1d0cdfd8730a5c021aaa50b7dc8549d491d760b3
CRs-Fixed: 981187
Initial host-common file folder cleanup and moves
on top of baseline reference of MCL WLAN driver
SU#5.0.0.160.
Move dp, ht comm, hif, wmi and qdf folders one level up
Change-Id: I2120898024b1eafd5d651c48768dbf48bf05995d