In qdf_mem_malloc() and qdf_mem_malloc_atomic(), pass function
name and line number, and log the same in case of failure, this
approach helps to remove error logs in caller function there by
reducing text segment.
Change-Id: Ia4586b112c6dd64aca5b397b43bb17499a0e6e30
CRs-Fixed: 2281983
Assign DMA address correctly to all scatterlist elements of scatter
gather table in qdf_mem_shared_mem_alloc() func.
Change-Id: I07988d0bc35e3e0fcf7b9f6df02a9e56a0e8b083
CRS-Fixed: 2110715
As WIN has multiple modules and QDF is the last one to be unloaded,
QDF is crashing when it tried to print the file name of an nbuf
allocated by other modules. To fix this, copy the file name in the
QDF nbuf tracker, rather than using the pointer to file name,
to avoid access to the invalid pointer.
CRs-Fixed: 2258770
Change-Id: I27ee76e58b0f5a976840783cfeba451784de85dd
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.
Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
Add QDF APIs for DMA buffer allocation and sharing with SMMU
Stage 1 translation support. When SMMU Stage 1 is enabled,
DMA APIs return IO virtual address(IOVA) instead of physical
address. This IOVA needs to be mapped to physical address by
external module before accessing these buffers.
Change-Id: I88e938d8ebe1f32fdea79e3c3aa8a3638ddfd2b8
CRS-Fixed: 2072953
In order to migrate existing qdf_str_* APIs to qdf_str.h from
qdf_mem.h, qdf_mem.h included qdf_str.h. Now that consumers are
including qdf_str.h directly, remove this include.
Change-Id: I6b0ee3a4a2ad17db922b8e19087c1d730ad9b419
CRs-Fixed: 2196132
A set of files for string abstractions has recently been added to QDF.
Move any existing qdf_str_* APIs from qdf_mem to qdf_str.
Change-Id: I6e1e5d1edcdfae2af83a6497ebd872fba981cdec
CRs-Fixed: 2196098
strcmp() is regularly used to compare two strings for equality. However,
reading source code using strcmp in this manner can be prone to errors
because the return values are not obvious from the function's name. In
the best case, this leads to referring to the strcmp documentation more
often than one would like. In the worst case, this leads to difficult to
spot bugs. Add a thin wrapper for this use case to make intentions
abundantly clear to future readers. This wrapper is effectively sugar
for 'strcmp(left, right) == 0'.
For example:
if (!strcmp(left, right))
/* reads: if not string compare: left, right */
Becomes:
if (qdf_str_eq(left, right))
/* reads: if string equal: left, right */
Change-Id: Iabcb7c7e9f37dcb6cf1bdf5d7cc6c69ea926ba5c
CRs-Fixed: 2194508
Currently, the detected memory leaks would not dump
the caller of the function which is leaking the memory.
Add an extra parameter to the table to store the caller
address and print the function during an assert.
Change-Id: I6dc31b55fd4e78dc69df9eb6166ebb63086891c1
CRs-Fixed: 2177486
Add debug support to detect memory leaks and corruption
in DMA memory operations.
Change-Id: I1478973828ddc147367c4a579c97c3840c106f44
CRs-Fixed: 2155603
When memory debugging is enabled, qdf_mem_malloc and qdf_mem_free do a
number of memory corruption checks. Extract these checks into their own
functions to allow other memory allocation/free logic to leverage the
same logic.
Change-Id: I07802093119c90b3d8c40a50d5b4bb152cb8243f
CRs-Fixed: 2136659
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
Add platform CACHE_LINE_SZ so that it can be used to roundup the data
structures.
Change-Id: Iec45f5747956d0797411f76c2fec1368a13e7d6d
CRs-Fixed: 2046852
Add memory allocation statistics for perf builds where MEMORY_DEBUG is
not enabled. Part of this effort, re-structure some of the QDF memory
APIs. Memory stats shows real size allocated.
Change-Id: I1e8fe0f4080ea186b8bfa0ce0438b4a06dde5a66
CRs-Fixed: 2045476
Use normal allocation instead of alloc_consistent for REO descriptors to
allow freeing from interrupt context.
Also fixed an issue in ba_window_size setting in REO queues.
Change-Id: I91b06e04c0343eb7fe8580d8655c6bc5e33cfe06
Remove qdf print from QDF_TRACE
Change physical address type to qdf_dma_addr_t
Add qdf API to get min of two numbers
Change-Id: Ie4e0a98d603e56e1bdaf3b8b7c099c7dad5b1bac
CRs-Fixed: 2016072
Comment in the api specifies that qdf_mem_cmp api
return bool value which is not correct.
Replace bool to int to reflect the correct return
type of a qdf_mem_cmp api.
Change-Id: Iff83fbf588a072dcda8b0aaef3c6743e572b1ac5
CRs-Fixed: 1066946
Do following cleanup on fastpath code changes:
1) Do not reap off Tx HIF buffers in Rx handling, instead handle
reaping in Tx fastpath itself.
2) In ce_per_engine_service_fast check for more Rx packets after
packet processing.
3) Make stub functions as static inline for non-fastpath enabled case.
Change-Id: If07c4344a424ce13b94128bf28931a24255b661a
CRs-Fixed: 987182
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