Commit Graph

463 Commits

Author SHA1 Message Date
Edayilliam Jayadev
7a1d8072a3 qcacmn: Reject aSpectral start scan request if aDFS is enabled
Reject Agile Spectral start scan request from user
space if Agile DFS is running on one of the pdev.

CRs-Fixed: 2517517
Change-Id: If648c53946d1bca1de07a335db67f204de41ba5f
2019-09-23 06:04:20 -07:00
Edayilliam Jayadev
b75b9850cf qcacmn: Check Agile span overlaps with operating band
Check whether Agile span overlaps with the current
operating span. This check is done at the time of
start scan and Spectral parameter setting.

CRs-Fixed: 2521554
Change-Id: I9f28ca0a02bd5abf6acdff89301a0c9343e34887
2019-09-23 06:04:05 -07:00
Wu Gao
b63edc6a49 qcacmn: Fix compilation issue about dbr_get_pdev_and_srng_id
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
2019-09-23 06:03:56 -07:00
Wu Gao
fe2a6185ad qcacmn: Support multiple srng per module in DBR
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
2019-09-17 16:30:21 -07:00
Debasis Das
285561b9ab qcacmn: Support dma_ring_caps info processing
EXT2 event carries the dma_ring_caps info.Necessary
support to process the same is being provided.

Change-Id: Id8ef1840470b272db00fa5e8f98d1fe9dc273a7e
2019-09-17 12:12:43 -07:00
Wu Gao
d45d248743 qcacmn: Register to direct buffer rx with QCA6390
Register spectral to direct buffer rx with QCA6390.

Change-Id: Ib07fc36faf6ba4cc5aff9203d70aef732bb703e3
CRs-Fixed: 2497826
2019-09-16 00:38:24 -07:00
Edayilliam Jayadev
499d29e713 qcacmn: Add API to get center frequency of sec80 seg
Add helper API to get the center frequency of secondary 80 MHz
segment. Make this API available to Spectral target if layer
via rxops.

CRs-Fixed: 2523690
Change-Id: If1cad90d9b27d1461e802b921aecda07031b1e0b
2019-09-11 18:40:28 -07:00
Jianmin Zhu
ce7b04766e qcacmn: Don't set vdev packet type when vdev up
Vdev decap/encap type has been set when vdev create, don't need
set again when vdev up.

Vdev mlme mgmt.generic.rx_decap_type isn't initialized, can't be
used to set vdev decap type.

Add tgt_vdev_mgr_set_tx_rx_decap_type to set vdev tx/rx cap/decap
type by wlan_util_vdev_mlme_set_param.

Change-Id: If487a890eafd0e4e5e6cda31c22d459e342770de
CRs-Fixed: 2516997
2019-09-06 23:40:50 -07:00
Krishna Rao
851c69d5bb qcacmn: Rename and use macros for operations on sscan summary
Rename some of the functions and structures related to Gen3 Spectral
summary report to clarify which type of Spectral report they operate
on. Use macros instead of hard coded values to specify size and
position of some fields while extracting them from Gen3 Spectral
summary report.

CRs-Fixed: 2518700
Change-Id: I9d646b60bc5314b408b39a7a118162af8d8fc7b2
2019-09-06 10:19:30 -07:00
Sourav Mohapatra
6561456601 qcacmn: Add support in host to receive ext2 ready event
Currently the host gets service_ready_event and service_ready_ext_event
during the init sequence as a part of handshake with firmware. As the
size of the service_ready_ext_event exceeds on adding further
parameters, new event is created.

Add support for WMI_SERVICE_READY_EXT2_EVENT to be processed after
WMI_SERVICE_READY_EXT_EVENT based on the service bit
WMI_SERVICE_EXT2_MSG.

Also add support to extract the reg db/bdf version information that
comes inside the ext2 event.

Change-Id: If0b57af362e7eb653f9189b912ec1dd3efb0f731
CRs-Fixed: 2501132
2019-09-04 11:31:00 -07:00
Naga
f01c83d57e qcacmn: Avoid host panic on vdev request timeout
Avoid host panic on vdev request timeout when target
assert is triggered and trigger target assert using
RECOVERY_SIM_ASSERT, else host panic is not allowing
target dump in lithium case.

Change-Id: I32c2de358ec8839ad7a522c31dd359436ba16d08
CRs-Fixed: 2515401
2019-09-04 11:30:54 -07:00
Jianmin Zhu
eb1cc95361 qcacmn: Set target if vdev start resp handler as public
Set target if vdev start resp handle as public to be registered
when wma open.
Remove wma_remove_vdev_req in ocb, don't use wma vdev cmd queue
and timer.

Change-Id: I2cd48ddd700ed1cde34231c22c02e0e54d4df5e3
CRs-Fixed: 2516536
2019-08-30 02:27:59 -07:00
Tushnim Bhattacharyya
33087cb402 qcacmn: Include wmi.h on the correct header files
Include wmi.h in wmi files.

Change-Id: I0584e58c5ae64e8ed93d024aa7943a9cdcdb07c8
CRs-Fixed: 2514753
2019-08-29 22:11:16 -07:00
Edayilliam Jayadev
78285d3861 qcacmn: Get WMI handle from pdev instead of psoc
Get WMI handle from pdev instead of psoc.

CRs-Fixed: 2510822
Change-Id: If6f191403b7f3245b3f26969d195ab4ec8793fc4
2019-08-29 22:11:04 -07:00
Edayilliam Jayadev
f2ae8b7e11 qcacmn: Add Spectral parameter properties
For each parameter for each mode add a flag which
indicates whether that parameter is supported.
Similarly one more flag which indicates whether a
parameter needs to have same value for all the modes.

CRs-Fixed: 2500514
Change-Id: I37099bb622d7d6ccf823f78f6d119b9abf78ec21
2019-08-29 12:51:40 -07:00
Edayilliam Jayadev
9217a212bb qcacmn: Add error handling in the Spectral control path
Add an attribute which describes the error code
in the response to set config, start scan and stop
scan.

CRs-Fixed: 2500481
Change-Id: I491cd6e061d2d08ceb4d9af2a7de5223e229c280
2019-08-29 12:51:37 -07:00
Shashikala Prabhu
ec527358c2 qcacmn: Fix issues in qdf aligned memory alloc function
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
2019-08-26 00:26:56 -07:00
Vignesh Viswanathan
3e31e2babd qcacmn: Add support for checksum from FW for pktlog
If the FW sends a pktlog checksum in the FW ready event, store that in
pl_dev and use it as buf_hdr.version in the pktlog buffer header.

Also, use a new magic value to identify the checksum in the
buf_hdr.version field.

If the FW does not send the checksum, then the existing magic number
and standard version number would be maintained.

Change-Id: Ib08c093a9b54495a2c5b7e0e163207f2b1eb4ce2
CRs-Fixed: 2508828
2019-08-22 02:53:10 -07:00
Abhishek Ambure
47e709a62b qcacmn: Move vdev resp timer to scheduler context for MCL
For MCL, vdev manager resp timer callback should be called in scheduler
context. Hence vdev manager response timer callback code is refactored.

To handle vdev response timer, MCL specific change is to post message to
scheduler thread and handle timer callback in scheduler thread. This MCL
specific change is protected using "SERIALIZE_VDEV_RESP_TIMER" macro.

Change-Id: I4c5a24cd4c8afba92e407fc229a9d2c295cecb57
CRs-Fixed: 2507577
2019-08-16 10:48:43 -07:00
Shiva Krishna Pittala
71bc664165 qcacmn: Add a callback to the FW assert function in Spectral module
As Spectral module is loaded before qca_ol module and the FW assert
function is compiled in qca_ol module, FW assert function will be an
unknown symbol when used inside Spectral module.
To fix this, register a callback to the FW assert function and
use that callback in Spectral module.

Change-Id: I6ca18b151e86b93de9988bc6026894617f2168a2
CRs-Fixed: 2507522
2019-08-14 14:30:26 -07:00
Ashish Kumar Dhanotiya
0cf77a56ea qcacmn: Process All the pdev stats events
There are 2 issues in the driver:
1. Currently host incorrectly fills the pdev id value as 0
   in stats request, If host sends the pdev id as 0 for
   stats request then FW sends the stats for all the pdevs.
2. If host requests pdev stats with pdev id as 0,
   FW can send multiple events for each pdev stats
   if one event buffer is not sufficient to fill the stats
   for all the pdevs. Curent host logic doesn't process
   multiple pdev stats events.

Address above 2 issues with below fixes:
1. Send correct pdev id to FW in the stats command.
2. Add a logic in host to process all the pdev stats events
   received as part of the pdev stats request.

Change-Id: I5b5bfcda2f30fb32749c653c6524ecbd2edc44a4
CRs-Fixed: 2503273
2019-08-13 07:33:27 -07:00
Rajeev Kumar
0391a23ca3 qcacmn: Add pdev_id for stats request command
Currently CP stats component does not fill the proper pdev_id
in the command for the stats request. This causes the value
sent to firmware to be 0 bydeafult. As per the logic in firmware,
if the value is zero then the stats for all the pdevs are sent.
To get only stats for a single pdev, send the pdev_id along with
the vdev_id in the stats request command.

Change-Id: Ic4ecad132c8764196b9f5ed6af76fe4f2778d8d1
CRs-Fixed: 2502459
2019-08-13 07:33:22 -07:00
Abhishek Ambure
c367e06da5 qcacmn: Enable target_if common code for vdev stop
As vdev conversion is done in phases, so vdev stop response
handler for target_if is made global. To process vdev stop
response tlv extraction API is registered to WMI tlv_ops.

Change-Id: Ib00f7339330e69d6103a175611df7b59c01faad0
CRs-Fixed: 2506500
2019-08-12 02:45:19 -07:00
Abhishek Ambure
c76db37021 qcacmn: Clean up CMN_VDEV_MGR_TGT_IF_ENABLE
WIN and MCL both uses common targer_if code for vdev manager.
So legacy code and "CMN_VDEV_MGR_TGT_IF_ENABLE" macro is removed.

Change-Id: I2984ae44f3a7cfa01b8f1455353d09deb4db5759
CRs-Fixed: 2503804
2019-08-11 10:38:20 -07:00
Edayilliam Jayadev
151c4bb3d6 qcacmn: Extend timestamp WAR for agile mode
Target will be sharing the time taken for reset in the
first Spectral report after reset. The reset delay value
is common for all the Spectral modes. Host updates
the timestamp WAR offset variable for all the Spectral modes.

CRs-Fixed: 2504798
Change-Id: If7d47a434054f220b0717f7d8939f9f8922af30f
2019-08-11 02:11:44 -07:00
Nandha Kishore Easwaran
5d3475b985 qcacmn: Initial changes for pine
Add device ID change and target type checks for pine.
Also remove memory war added for Hk emulation.

Change-Id: Idf531a48a03202d4fb241a92a1d671ee2b94cfbd
CRs-fixed: 2453899
2019-08-11 02:11:41 -07:00
Wu Gao
46aa5afbb3 qcacmn: Fix compilation errors for DBR enable
Fix compilation errors for direct buffer rx component enable.

Change-Id: If0913b8357267fa65e61e0c7d197025ff850930b
CRs-Fixed: 2497783
2019-08-09 13:04:45 -07:00
Gyanranjan Hazarika
8e0ae99446 qcacmn: Add target_if changes for dynamic hw-mode config
This feature enables a user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.

Primary target_if changes are:

1. Add structure definition wlan_psoc_host_hal_reg_cap_ext
to parse and store the new extended regulatory capability
info in WMI_MAC_PHY_CAPABILITIES tlv sent in EXT service
ready WMI event
2. Add API target_psoc_get_num_radios_for_mode to retrieve
the number of radios corresponding to a hw-mode
3. Add API target_psoc_get_mac_phy_cap_for_mode to retrieve
the pointer to the mac_phy_cap info of the first radio
corresponding to the input hw-mode.

Change-Id: Ia10f0fd5e50c0ce0cbe99f9281147266aedce4e9
CRs-fixed: 2490212
2019-08-09 11:18:45 -07:00
Naga
004bb25c0b qcacmn: Add support for self recovery in target_if
Add support to trigger self recovery in case
of vdev request timeout, as when host is asserted
fw dumps are not collected

Change-Id: I534ada61b114f5b96ecfae1ff27d692ee496edba
CRs-Fixed: 2496796
2019-08-08 12:52:15 -07:00
Wu Gao
c86454bc00 qcacmn: Reduce the log level in direct buffer rx
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
2019-08-08 11:38:03 -07:00
Sumeet Rao
eda56478de qcacmn: Process RX FSE Support service advertised by firmware
A new firmware capability advertising support for flow search engine
in HW has been added. Process the new service for flow tagging.

CRs-Fixed: 2475913
Change-Id: Ie69cfd5733b6d6c02792da59dee4f823a72fb431
2019-08-07 04:58:13 -07:00
Gurumoorthi Gnanasambandhan
80e1ae17a6 qcacmn: Enable/Disable multi group key support
Support to Enable/Disable multi group key and configure
maximum number of group keys.

Change-Id: Ie6ce2a38d0ad04a47f966fc281f35a8af7125447
CRs-Fixed: 2490599
2019-08-06 10:31:49 -07:00
Naga
91449253d8 qcacmn: Add support to simulate fw response from target_if
Add support to simulate fw response and release ref
from target_if request timeout handler for every case
of timeout, but do panic or inject fw crash when
system is not in recovery or fw down or driver unload state.

Change-Id: I5c94df59319a901d9cfd89bd42b96118e9e641bb
CRs-Fixed: 2501920
2019-08-06 02:48:56 -07:00
Krishna Rao
5dd99baa21 qcacmn: Rectify Spectral hexdump output
The Spectral hexdump output would have individual hexadecimal values
on each line due to a transition to the QDF framework carried out in
the past. This is difficult to understand. Rectify the hexdump output
to have sixteen hexadecimal values (and their corresponding ASCII
representation) on each line. As of now, this hexdump functionality
continues to be maintained specific to Spectral in order to allow for
Spectral specific low level annotations to be added as and when
required.

CRs-Fixed: 2502690
Change-Id: I5618e64c37db5b14ede2d91b2f2af5d0a60178c6
2019-08-05 10:55:54 -07:00
Abhishek Ambure
21ff0a53bf qcacmn: Common code changes for VDEV conversion
This change is required by MCL for VDEV conversion. This change
adds target_if all common code.

Change-Id: If43cbbe12c9b4a2bc7fc46ff01f24a2fb6fda09e
CRs-Fixed: 2460791
2019-08-05 07:50:05 -07:00
Krishna Rao
61585b05a2 qcacmn: Add Spectral frequency to read/write logs
Add Spectral frequency to functions which log read and write of
Spectral parameters.

Change-Id: I7c66676df4667d1a7b7b46fcf33e4c10815c4b28
CRs-Fixed: 2502703
2019-08-05 07:50:01 -07:00
Aditya Sathish
7de5d4f264 qcacmn: Add support for RF characterization WMI event
Add support to read the RF characterization WMI event
and parse each individual TLV containing the channel's
center frequency, bandwidth and RF characterization
metric.

Also, remove the support for reading the RF
characterization metrics from the extended
service ready WMI event.

Change-Id: I560583f9304005282c09a27f47c8d5c2778b1645
CRs-Fixed: 2487415
2019-08-02 03:13:52 -07:00
Kiran Venkatappa
2e5d58d46f qcacmn: Send wifi pos WMI commands using pdev's wmi handle
For multi-radio SoCs, wmi handle is maintained per pdev to map to
separate copy engine used for sending WMI commands to taget. Add support
to send wifi position related WMI to send it per pdev.

Change-Id: I300be2bbfd77cb9390fef37b5b02a002284976e0
CRs-Fixed: 2495277
2019-07-29 16:12:15 -07:00
Naga
bf48fb69ac qcacmn: Add support to print vdev req/resp string
Add support to print vdev req/resp string
on target_if timer start conflict and timer
timeout handler

Change-Id: I0116c03089f4ab80623596bb9e8d0268efb0dd87
CRs-Fixed: 2495018
2019-07-29 02:22:54 -07:00
Akshay Kosigi
4002f765f1 qcacmn: Change to remove void pointer usage for HIF handle
Add code to remove void pointer usage for hif_handle
and use opaque pointer hif_opaque_softc and also use
cdp_soc for opaque DP soc handle

Change-Id: I2896f7704ffb809214c5b08756c4b8673307fd9e
CRs-Fixed: 2487247
2019-07-27 13:43:00 -07:00
Edayilliam Jayadev
8e74a62e72 qcacmn: Change Spectral control path to support Agile mode
Modify Spectral control path APIs to support Agile mode.

CRs-Fixed: 2450620
Change-Id: Id6cf48c1288b157932ab5ce0535293e466a87783
2019-07-27 00:31:31 -07:00
Himanshu Batra
032d352263 qcacmn: Replace void * Host Target Communications handle with abstract type
Replace void * Host Target Communications handle with abstract type handles
provided by Host Target Communications component

Change-Id: I16ca87e4f9716791d340da2fda0a8a640fa2ec34
CRs-Fixed: 2487151
2019-07-25 00:25:49 -07:00
Vevek Venkatesan
ad55b14e32 qcacmn: converge target type defines for both MCL and WIN
Converge definitions of target types for both MCL and WIN.

Change-Id: I501d39ff5989747ddd22b08cb390bb4601c5dd0b
CRs-Fixed: 2484512
2019-07-24 21:43:24 -07:00
Naga
8d8b66b40d qcacmn: Fix bit value to stop target_if timer
Fix bit value to stop target_if timer when
start is attempted for same which is already
in execution.

Change-Id: I0d299719d865d92cd5515de4d0441dd215f0aecf
CRs-Fixed: 2494428
2019-07-24 17:09:58 -07:00
Vignesh Mohan
a1a1945c1c qcacmn: Configure agile preCAC timeout values
Send proper minimum and maximum agile preCAC timeout values to the target
as part of starting agile DFS detector. Add a common agile preCAC
parameter structure with the timeout values, channel and width fields
which are to be sent as part of configuring agile detector.

Change-Id: If5f5b179aa12a6c549cb9a4402aa10e957129d78
CRs-Fixed: 2482929
2019-07-23 13:55:29 -07:00
Abhiram Jogadenu
cede8ed032 qcacmn: Correct the error handling in event registration
wmi_oem_response_event_id is only defined for TLV based
architectures. Current code returns an error if registration to a
particular event fails. But registration failure is not wrong
for legacy architectures, as event is not defined.
So do not check return value for error

Change-Id: Ia54431cee2958b59166394360a3fc961abad85ce
CRs-Fixed: 2492494
2019-07-21 08:28:31 -07:00
Abhishek Ambure
6825cfe7fe qcacmn: Move rsp timer stop logic from tgt to target if
Currently vdev response start timer logic is in
target_if layer and stop timer logic is in tgt
layer which is asymmetry.

So, move stop timer logic from tgt layer to
target_if layer for vdev start, stop and delete.

Change-Id: Ia06e2e6d90cf9c4366d654e016e2eeab8c2a0719
CRs-Fixed: 2442199
2019-07-19 20:40:38 -07:00
gaurank kathpalia
18495feac0 qcacmn: Use proper macro instead of config_mcl
Use proper macro instead of config_mcl to compile
the API target_process_bang_radar_cmd.

Change-Id: I3a2fca998d69f2a29243b9ecd2a290af9602d6c2
CRs-Fixed: 2490649
2019-07-19 02:48:26 -07:00
Himanshu Batra
556930bba9 qcacmn: Replace void * tgt_if_handle with abstract type
Replace void * tgt_if_handle of objmgr psoc/pdev with
abstract type handles provided by target interface

Change-Id: I9e0ae991776daa0c25c4ad7b4e4dc022441318a3
CRs-Fixed: 2482708
2019-07-19 02:48:20 -07:00
Himanshu Batra
0a35a6afb8 qcacmn: Replace void * wmi_hdl with abstract type (6/10)
Replace void * wmi handle with abstract type handles
provided by wmi component

Change-Id: I503438fbaf3bc2d475798bc908a70902d11881af
CRs-Fixed: 2482568
2019-07-18 14:23:04 -07:00