Clear console log boot up error prints by removing unnecessary
prints, modifying prints to appropriate info or debug and
by fixing the errors
Change-Id: Ica3f126280399eef59b894236849e2079a62565f
CRs-Fixed: 2597026
In dynamic HW mode switch feature, DBR pdev object of primary device
needs to be re-assigned after HW mode change. Store the DBR objects
in psoc for all devs and then use the mapped pdev to retrieve the
corresponding DBR object.
Change-Id: Ie56bdf9d430a5a3ca7e4e9a872018257d032c908
CRs-Fixed: 2589447
For each DBR ring, add debugfs entry to dump at real-time the ring
parameters like head, tail index, the timestamps at which a buffer is
received and replenished. Issues that are specific to tail index
movement from the target can be identified with this debugfs entry.
CRs-Fixed: 2466514
Change-Id: Iafbc61726264464212cb783a1cce46e16b8a48ff
Improper/incomplete DMA by the target affects the functionality of modules
that are using DBR framework. Add debug infrastructure to poison DBR
buffers with a given poison value before handing buffers over to
the target. Buffer owner modules can explicitly check for the poison
value in order to detect the improper DMA.
All modules that use DBR framework can use this debug infrastructure.
Change-Id: Ib3923c13202990e0f1198645b680c44a20736167
CRs-Fixed: 2466518
Add debug infrastructure to track the movement of head and tail pointers
of the DBR ring along with the time at which each buffer is received and
replenished. All modules that use DBR framework can use this
infrastructure. Issues that are specific to tail index movement from
the target can be identified with this debug infrastructure.
CRs-Fixed: 2439460
Change-Id: I6b486a73cf6a3174dfa297f8fb370fd298b46b67
In function target_if_direct_buf_rx_register_events(), the
API direct_buf_rx_info() is used to record log, but the
format is wrong. Fix the log format.
Change-Id: I81bc128e110570d96ca95dfbe773121272eb2588
CRs-Fixed: 2547235
Exceeded 500 logs per second in target_if_get_dbr_data().
Move the info level logs to debug level in direct buf rx as
heavy logging is triggering an assert.
Change-Id: I725bd50f83dc65f4e5378c4a882829a0ad1b7893
CRs-Fixed: 2534298
There is compilation issue about dbr_get_pdev_and_srng_id on hasting
platform, fix it in this change.
Change-Id: Icd5612c31341e6a5f71c65f1ec10533c164798c3
CRs-Fixed: 2530729
It required to support multiple srng per module in direct buffer rx
component.So extend the array "dbr_mod_param" in dbr pdev object and
let it to support two more srngs per module.
Change-Id: Ia2c649dacc3787cdc13b06f0b22c1c175fb451cc
CRs-Fixed: 2523365
EXT2 event carries the dma_ring_caps info.Necessary
support to process the same is being provided.
Change-Id: Id8ef1840470b272db00fa5e8f98d1fe9dc273a7e
1. Alloc size should be passed as input and output parameter since we need
to pass the exact alloc_size while freeing the memory.
2. use qdf_align() to calculate the aligned physical address.
3. In DBR component, pass correct arguments to qdf_aligned_malloc() to fix
the compilation errors.
Alloc size should be passed as input and output parameter since we need
to pass the exact alloc_size while freeing the DMA memory.
Change-Id: I83051b8aa54bbf3bb663902d8f17f2c3c55e57bf
CRs-Fixed: 2462441
Frequent log in direct buffer rx component will cause platform assert,
so lower the log level. Get wmi handler by psoc since since pdev
creation is in progress and it doesn't have related information yet.
Change-Id: Iaaf5a43642f9b6dfaf07ddd3f158abd346903a87
CRs-Fixed: 2495249
The function target_if_direct_buf_rx_rsp_event_handler() handles
the WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID event from target.
This function calls extract_dbr_buf_release_fixed_tlv() to copy
the module id, pdev id number of buffer release entry and number
of meta data release entries. The value of module id is used to
index the array dbr_mod_param to get the value of mod_param.
So if the module id value greater than dbr_pdev_obj->num_modules
could result in possible OOB.
Validate mod_id received in the fixed param of the event
WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID against
dbr_pdev_obj->num_modules.
Change-Id: I1c2c0a2a9c98d8b787496aba7a7c4f8fd781de16
CRs-Fixed: 2428798
CFR requires to configure the number of DBRs that can be packed
in a single DBR event. Currently, this is fixed value.
Make this configurable at the time of registration.
CRs-Fixed: 2415489
Change-Id: Ifcd606641f986a5345f8ccb361c3f45db07fdc37
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within target_if replace any such comparisons with
logical operations performed on the pointer itself.
Change-Id: I436bb3ec12d331df2260507b6a9afbab84a8a54f
CRs-Fixed: 2418256
CFR needs to correlate data received from direct dma ring and WMI event
for tx completion. These two events can come in any order. To facilitate
correlation CFR module has to hold on to the buffer until both events
are received and then replenish buffer back to direct dma ring. To
facilitate this requirement direct rx buf module is modified to change
callback return to bool to indicate whether buffer can be replenished
immediatley or not. Also add API to indiciate buffer release/replenish
later.
Change-Id: I848c0e7cf0118156fff7cf37ac9027cdf8e2e416
CRs-Fixed: 2403395
Add Unregister API to de-register and free resources in direct buf
module. Existing logic of freeing all resources as part of pdev destroy
does not take care of soc_start and soc_stop scenarios. Add this API to
enable modules to de-register as part of soc_stop and register during
start.
CRs-Fixed: 2385313
Change-Id: Ibe6f6bc5f4bd2acc5a9fe71eee09c151853073bc
In target_if_dbr_fill_ring(), min_buf_align (8 bytes) was added to
min_buf_size before allocating the memory for dbr_buf_pool. This leads to
extra 1MB allocation.
To avoid this extra allocation, call qdf_aligned_malloc() to allocate
aligned memory for direct rx buffers.
Change-Id: I72f7c616c7a699437b081de7149a4a67a3ad30c4
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed : 2336697
Increase the number of repsonses per dbr event to 2 to
support Spectral scan in 160MHz mode
Change-Id: I47ee933b06d94a9a02f7d448b631dfdb99e297c4
CRs-Fixed: 2297498
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.
Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.
Featurize WMI APIs and TLVs that are specific to WIN
- Air Time Fareness (ATF)
- Direct Buffer Rx (DBR)
- Smart Antenna (SMART_ANT)
- Generic WIN specific WMI (AP)
Change-Id: I7b27c8993da04c9e9651a9682de370daaa40d187
CRs-Fixed: 2320273
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.
Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
Map all enter/exit log macros to enter/exit QDF TRACE macro
to provide option to compile out enter/exit logs if required
Change-Id: I913ef0fb2486fde6b2ec4dfe8465884ca4d66ce4
CRs-Fixed: 2274857
target_if_dbr_replenish_ring should check the mapped physical address for
agreed byte boundary alignment. Fix the logic in the check.
Change-Id: I05058ae69df8a2ee2caf9ce1295c0a2e9026511c
CRs-Fixed: 2283230
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.
Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
1. Add support upto 2048 buffers in the ring
2. Add API to print current ring status per module per pdev
3. Start module ID numbering from 0
Change-Id: I7954007c6c486877ffb2ab91724885af2fbaab8c
CRs-Fixed: 2263968
Replace functions with ucfg as prefix in init_deinit_ucfg file with lmac as
prefix
Change-Id: I90d77dd5ddae4854ea68eeb67dc1b4fc356c2fe3
CRs-Fixed: 2182449
Void pointer usage may lead to memory corruption due to
wrong pointer is typecasted. Hence define structure for all, and modules
internally typecasting based on their type
Change-Id: I6271ed8aa3f94254fd85f41962f23ea36895154e
CRs-Fixed: 2182452
Module param capabilities stored per module per pdev and overall
target dbr ring capabilities allocated and stored during service ready
are not freed during detach.
Fix above mentioned memory leaks through below changes
1. Free module param capabilities allocated per pdev during ring deinit
2. Free DBR ring capabilities allocated during service ready event
as part of target psoc info free.
3. Free DBR entries allocated per event received from target
Change-Id: I93d5126063d3fa0094e15d57a75f03cf63b3c494
CRs-Fixed: 2228428
This change fixes the null pointer dereference issues
observed when running spectral scan using direct dma
framework with ftm mode.
CRs-Fixed: 2214269
Change-Id: I06514b38b519da7eb972ff713feab97e7d5a9c29
1. Populate number of capabilities after extracting service ready ext param
2. Deinit ring during pdev destroy only if ring is configured
3. Do not allocate module param if no capability is shared for
the pdev by target
Change-Id: Ie92b7fc882ba8b7755fea150c724459264a0ea79
CRs-Fixed: 2192671
Define psoc/pdev target_if structure and implement
alloc/free of these structures
Change-Id: Ie741d0de77c48caa843d4f2b33220a987366ba9b
CRs-Fixed: 2177109
Direct buffer rx framework is cleaned up to have the following
changes -
1. Init and deinit during target interface open and close to avoid
multiple inits and deinits in case of multi-SOC chipsets
2. Register WMI events required for the framework through PSOC
enable and disable
3. Rename API that attaches hal soc and osdev objects to psoc object
4. Module ID numbering starts from 0. Modify usage to adhere to it
5. Add API to get LMAC IF tx ops from psoc
Change-Id: Ieceeb6c0e1a89c32f23b9c252e74671cd5c4a69b
CRs-Fixed: 2167614
Direct Buffer Receive provides the driver with a mechanism by which
target can transfer information directly into host memory via DMA.
In the Direct DMA mechanism, target will transfer information directly
into host memory via DMA. Host will allocate DMA target buffers and
place their addresses in one or more rings (circular buffers) to be
read by the target. Host will determine the features that will be
utilizing the Direct DMA service through the service bitmap obtained
from the target through service available event. Host will also
determine the Direct DMA capabilities such as the minimum number of
pointers, minimum buffer size and minimum alignment for the DMA
buffers through a separate TLV part of the extended service ready
event.
Host with the help of service and the DMA capabilities received,
will initialize and configure the ring of DMA buffers to be shared
with the target. Once the rings are initialized, host will send a
WMI command to inform the target of their locations. Target responds
to the host with an acknowledgment event for the shared configuration.
When the host requests for the data captured, target will read the
destination addresses from the rings configured and use the addresses
to perform DMA transfer. When a single or multiple DMA transfers are
complete, target will notify the host via a WMI event. This WMI event
will include information on the number of DMA transfers completed, and
the associated addresses of the buffer that was used to transfer the
data. When the host has finished processing the contents of the DMA
buffer, it will replenish the ring and place the buffer back on the
appropriate ring to make it re-usable.
Change-Id: I7542036636e62701839ef36beafb463909001853
CRs-Fixed: 2127045