Commit Graph

11 Commits

Author SHA1 Message Date
phadiman
65eb1b106f qcacmn: Add sanity checks
Add sanity checks for peer and
dbr_pdev_obj->dbr_mod_param structure

Change-Id: I9412be7b96df2ea62d5f0ec7d709fb45eb3849ce
2018-06-14 23:54:14 -07:00
Akshay Kosigi
dbbf2c45da qcacmn: Replace ucfg prefix with lmac
Replace functions with ucfg as prefix in init_deinit_ucfg file with lmac as
prefix

Change-Id: I90d77dd5ddae4854ea68eeb67dc1b4fc356c2fe3
CRs-Fixed: 2182449
2018-05-11 22:40:16 -07:00
Akshay Kosigi
2a216edab0 qcacmn: Replace void pointers with appropriate/common structure types
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
2018-05-11 22:40:13 -07:00
Sathish Kumar
77f3c438f0 qcacmn: Fix memory leaks in direct buffer receive(DBR) module
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
2018-04-27 05:26:39 -07:00
Edayilliam Jayadev
3d32949b42 qcacmn: Extract meta data from dbr event
Extract meta data from the dbr wmi event.

CRs-Fixed: 2219818
Change-Id: Ib19588775060e75017e9777206132a0efeec6223
2018-04-25 23:49:01 -07:00
Edayilliam Jayadev
269c3deaac qcacmn: Fix for direct dma + ftm mode
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
2018-03-30 02:46:49 -07:00
phadiman
a2f544f294 qcacmn: Fix incorrect return type & variable access
Initialize the unintialized variables, fix return
types and fix typo errors (access map_status instead
of status)

CRs Fixed: 2200034

Change-Id: I02c5f989f1c41da07eabd165c3f45a44007b928d
2018-03-12 05:15:23 -07:00
Sathish Kumar
6b55904827 qcacmn: Fix issues in direct buffer rx module
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
2018-03-04 16:50:54 -08:00
Srinivas Pitla
d8781f1693 qcacmn: Define psoc/pdev target_if structures
Define psoc/pdev target_if structure and implement
alloc/free of these structures

Change-Id: Ie741d0de77c48caa843d4f2b33220a987366ba9b
CRs-Fixed: 2177109
2018-02-03 15:10:51 -08:00
Sathish Kumar
7607184303 qcacmn: Clean up direct buf rx framework
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
2018-01-11 04:43:42 -08:00
Sathish Kumar
c34484f2a2 qcacmn: Direct Buffer Rx framework to facilitate DMA between tgt & host
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
2017-12-21 15:26:13 -08:00