Commit Graph

463 Commits

Author SHA1 Message Date
Srinivas Pitla
f6b4bc8f02 qcacmn: Use new APIs to get dp handles
SON and DP modules use new APIs to get dp handles,

Change-Id: I1639b946f1660fcaa21b76688909451dcc0f94cc
CRs-Fixed: 2177109
2018-02-03 15:11:10 -08:00
Srinivas Pitla
cc75651c34 qcacmn: Converge initial HOST FW handshake
Implement service ready, ext service ready
ready event handler, init command preparation
and other required APIs

Change-Id: Iaf707227c1e94bb492dd86bd2d0916a1cf875498
CRs-Fixed: 2177109
2018-02-03 15:11:07 -08:00
Srinivas Pitla
9af4f65f61 qcacmn: Spectral changes for target_if
Use new structures to get target_type and revision

Change-Id: Ic7cb70711b9c747159440638877a6d8c7bd46d92
CRs-Fixed: 2177109
2018-02-03 15:11:05 -08:00
Srinivas Pitla
ee54aea6d8 qcacmn: Add target_if changes to DFS
Use target_if APIs to get dfs offload capability

Change-Id: Ic23770b0407e33e4b031bbbc4a8224663ac57e32
CRs-Fixed: 2177109
2018-02-03 15:11:02 -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
Shiva Krishna Pittala
e37387598e qcacmn: Fix the coding convention issues in Spectral simulation
Current target_if Spectral simulation layer code is not following
coding convention rules in some places.

Change-Id: I0bf0f0514b65e17ddce9fb803c647448ee4b5b3a
CRs-Fixed: 2151555
2018-02-02 14:48:12 -08:00
Shiva Krishna Pittala
318d20fc69 qcacmn: Fix the coding convention issues in Spectral target_if layer
Current target_if spectral layer code is not following coding
convention rules in some places.

Change-Id: I1c0e78c6cdbe97db657c341d74582567a29a86b0
CRs-Fixed: 2151555
2018-02-02 14:48:09 -08:00
Shashikala Prabhu
8136b58f56 qcacmn: Fix radar detection failure for DA and PO
DFS capability was not set properly for Partial-offload(PO) and
Direct-Attach(DA) radio. Thus radar detection failed.

Change-Id: I5493d7195a57f160792a411653c05bbf220d3561
CRs-Fixed: 2160418
2018-02-01 04:16:49 -08:00
bings
b004c6d432 qcacmn: Refine DFS object allocation for MCL
Currently DFS object can only be allocated if radio supports 5G.

Rome supports 5G and saves its wireless_mode in hal_reg_cap of
psoc->service_param because Rome FW does not support wmi event
wmi_service_ready_ext_event_id.

Check wireless_modes based on different DFS_SUPPORT.

Change-Id: I0120dde4fcf47bd71f6da512fae64dd62f5f46c8
CRs-Fixed: 2179925
2018-01-30 17:43:32 -08:00
bings
0344d1c399 qcacmn: Restore WMI_DFS_RADAR_EVENTID for Rome FW
Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and
spectral scan phy errors; but Rome FW still uses WMI_PHYERR_EVENTID
and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors.

Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW
requirement.

Change-Id: I7a5c4f723bedfdeb477ac36ac1290809ca06fb13
CRs-Fixed: 2160418
2018-01-27 00:10:26 -08:00
Sourav Mohapatra
06490bebac qcacmn: Converge on wmi service/ext service is enable
Converge on wmi service/ext service is enable

Change-Id: Ib246befa72cce927bee157394cd22c7d1562d341
CRs-Fixed: 2152751
2018-01-24 13:19:48 -08:00
Sandeep Puligilla
f484c2b0da qcacmn: update logic to get wmi_handle from pdev
Update the target if interface api to get the wmi
handle.

Change-Id: Ifb31f6fc11ac3e86d003342ef8e4d4af29a0b170
CRs-Fixed: 2168264
2018-01-22 12:08:17 -08:00
Subrat Mishra
bf12587bd1 qcacmn: Support for SWFDA Event & FD Frame tx
Add new WMI EVENT, SW FILS Discovery Alert Event, to get
firmware trigger to transmit FILS Discovery Frames.
Add WMI command to send FD frame buffer to firwmare.
Add WMI command to set FD period interval in mili seconds.

Change-Id: I8cb6279ec4431b9236bd32c548228a0dc6598664
CRs-Fixed: 2118098
2018-01-19 17:26:23 -08:00
akosigi
fffcebf2e9 qcacmn: Converge FTM feature
Support for FTM to make it common between WIN and MCL.

Change-Id: I4a65ca6d73d83e71f6a04405b5c41cdddb0a3c71
CRs-fixed: 2148283
2018-01-16 18:29:53 -08:00
Soumya Bhat
108f090a00 qcacmn: Greenap componentization follow up patch
Greenap APIs and calls

Change-Id: I1242db788155f68dd91b72b94a48f78869eb835f
CRs-Fixed: 2142183
2018-01-15 04:26:43 -08:00
Himanshu Agarwal
b3c81ac057 qcacmn: Green AP UMAC componentization
Add APIs, structures for Green AP component.

Change-Id: I4a39470104c89c20eec5440b7ae251a764151fd5
CRs-Fixed: 2166428
2018-01-12 12:20:17 -08:00
Varun Reddy Yeturu
0b8b57e632 qcacmn: Fix potential NULL dereference in P2P
1) Check for validity of ps_config before dereferencing.
2) Check for validity of lo_start before dereferencing.
3) Initialize tmp_p2p_ie before using it.

Change-Id: I4cd5bcb025e63d727e5535921a4e4121d618ee36
CRs-Fixed: 2160760
2018-01-12 01:53:50 -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
Naveen Rawat
68805125fd qcacmn: Avoid WMI TLV structures in NAN target_if
Refactor NAN target_if to make it wmi-type agnostic. Specifically
do not access wmi structures in NAN target_if. All the access to
wmi structures should happen in tlv and non-tlv specific wmi files.

Change-Id: I944b678fc501723d7cd26c9b21c4cc6ddb7fda4e
CRs-Fixed: 2159876
2018-01-09 06:12:48 -08:00
Pratik Gandhi
034cb7cb60 qcacmn: Define Host based TARGET_TYPE
fwhdr_abstrct: Use Host based TARGET_TYPE instead of firmware
defined TARGET_TYPE. It will abstract dependency on bmi_msg.h.

Change-Id: I76d744db27df730a3a91a243adfc07fc17d77487
CRs-Fixed: 2140921
2018-01-03 20:09:46 -08:00
Ryan Hsu
a2c32d4a58 qcacmn: Add target if interface to get wmi_handle from pdev
Adding the target_if interface to get the wmi_handle from pdev,
the condidional flag is added due to different implemention of treating
the tgt_if_handle.

CRs-fixed: 2161374
Change-Id: Ia5206199afd5d41774928793d78e6648f03c181b
2017-12-28 13:24:44 -08:00
Varun Reddy Yeturu
a7ef89abb1 qcacmn: Ensure legacy_callback is not NULL before calling
Check legacy_callback function pointer is non NULL before
calling the function

Change-Id: I4953b87486214f704eaf357e663f0fbc310fb965
CRs-Fixed: 2160759
2017-12-28 03:38:31 -08:00
Shashikala Prabhu
153b2881cf qcacmn: Do not allocate DFS object for 2GHz radio
DFS is applicable only for 5GHz radio. Therefore, do not
allocate DFS object for 2GHz  radio.

Change-Id: I5e8aec0c876e7862890fae689950bfbb4eae5255
CRs-Fixed: 2153493
2017-12-22 23:24:41 -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
Sathish Kumar
26190a142e qcacmn: Add support for direct buffer rx module
Direct Buffer Receive provides the driver with a mechanism by which
target can transfer information directly into host memory via DMA.

Add following support for direct buffer rx module -

1. Add UMAC component ID for direct buffer rx module to be utilized
   for object manager APIs
2. Add support for populating DMA capabilities shared by target in
   object manager maintained extended service ready event.
3. Add support for Tx Ops for direct buffer rx module.

Change-Id: I2fa60e8572cbcc0d1fa7830e7e94b6e486bdcc78
CRs-Fixed: 2158297
2017-12-21 15:26:10 -08:00
Sandeep Puligilla
4fe1d4b0ee qcacmn: Fix spectral scan compilation errors
Fix spectral scan component compilation errors
on MCL build system.

Change-Id: I903431fba923859e796e0786354608cac2841b0c
CRs-Fixed: 2160819
2017-12-21 01:39:17 -08:00
Soumya Bhat
f4cb93c5e7 qcacmn: Green AP framework
Add APIs for green AP convergence framework.

Change-Id: Icd4e676af1296843b0f64957e1d55db9b32f3e55
CRs-Fixed: 2142183
2017-12-20 09:25:08 -08:00
Kiran Venkatappa
303c1f655e qcacmn: Add target_if ops init for offhchan txrx
offchan txrx module should query target to know offchan_data_tid
support. Add target_if ops for offchan module to query this.

Change-Id: I8bca8bbaa5c68eb42daf025235b50a5b512d6911
CRs-Fixed: 2145450
2017-12-04 03:25:30 -08:00
Edayilliam Jayadev
e0c7fbdb93 qcacmn: Callback functions for legacy spectral apis
Use table of function pointers for legacy api calls
instead of calling legacy apis directely

CRs-Fixed: 2146231
Change-Id: Ia5840208d0de5bd4e78c1d27b8ffdc0cf6cbf298
2017-11-30 05:27:58 -08:00
Edayilliam Jayadev
d8c6a467dd qcacmn: Add QCA vendor commands for spectral scan
Add following vendor commands and their handlers.

 1) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START
        Set the spectral parameters and start scan.
 2) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Stop spectral scan.
 3) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG
        Get current values of spectral parameters.
 4) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS
        Get stats for spectral scan debug.
 5) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO
        Get the spectral hardware capability.
 6) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Get the current status of spectral scan.

CRs-Fixed: 2146272
Change-Id: I8e048d6c21e9fb1ed286c19df0edcad46f6e6414
2017-11-30 05:27:57 -08:00
Shiva Krishna Pittala
a3d50e8a85 qcacmn: Removing WIN specific structures from spectral
Removing WIN specific structures 'scn' and 'ic'
from the spectral module in cmn_dev

CRs-Fixed: 2146258
Change-Id: Ie4def4dfb401f4b1a5920277f8fa79acb67dd46b
2017-11-30 05:27:55 -08:00
Shiva Krishna Pittala
de0cb20d07 qcacmn: Moving spectral module to cmn_dev
As part of second phase of Spectral Analysis(SA)
convergence [WIN & MCL], spectral module code is being moved to cmn_dev.
Also includes fixes for checkpatch.

CRs-Fixed: 2146231
Change-Id: I939509193786b0bd2cbd5f1af64d4a94739a2af5
2017-11-30 05:27:54 -08:00
Mukul Sharma
396cef7bcf qcacmn: Converge on wmi event registration / unregistration
Converge on wmi event registration / unregistration method.

Change-Id: If03a38d74a47cc1d900bc5734a7c8f950513efaa
CRs-Fixed: 2148479
2017-11-30 03:40:33 -08:00
Shaakir Mohamed
a1a7e163af qcacmn: Add support for bangradar for hawkeye
Add support for bangradar command to send unit test command
to firmware as a hook to simulate radar injection

Change-Id: Ieaa7eab6d452ab864a10beca1478d0e61d605107
CRs-fixed: 2113724
2017-10-15 15:48:09 -07:00
Jeff Johnson
9d1aa2cc25 qcacmn: target_if: Replace instances of unadorned %p
Replace instances of unadorned %p in target_if.

Change-Id: I1c8a1b98be2d12fcf8e1fadf4a889268dfe37058
CRs-Fixed: 2111274
2017-10-03 16:02:33 -07:00
Shashikala Prabhu
4f8130e8c9 qcacmn: Fix Zero CAC DFS kernel panic
* Moved target type macros to global target_if header file.
* Fixed kernel panic: Channel details were written in  invalid
  memory location.

Change-Id: Ia9134b8dad651e53f57243c45eb93fb86ddd94c5
CRs-Fixed: 2104219
2017-10-03 08:24:05 -07:00
Varun Reddy Yeturu
f56e59833c qcacmn: Configure MAWC NLO parameters from host to firmware
Get the MAWC based NLO parameters from HDD/UMAC and pass them to
firmware via target/if

Change-Id: I76d7c8677ee73f9a3c54b7af4943b74a6b23323d
CRs-Fixed: 2064837
2017-09-18 19:38:22 -07:00
Arif Hussain
e22618a790 qcacmn: Change soc level pdev id as per new definition
soc level pdev id changed from zero to WMI_HOST_PDEV_ID_SOC (0xFF)
change pdev id in wmi_unified_dfs_phyerr_offload_en_cmd call
according to new definition.

Change-Id: I3c55dc8821c4186190515564b00f54f2427d5702
CRs-Fixed: 2090282
2017-08-14 14:58:11 -07:00
Kiran Kumar Lokere
a78b4bfb67 qcacmn: Add support to process channel avoidance event
Add support to process channel avoidance event

Change-Id: I19ce742406a4778ac0f279faf0bf853bc9069eb0
CRs-Fixed: 2080241
2017-08-13 16:56:55 -07:00
Shashikala Prabhu
3519b96e24 qcacmn: Fixed regdb kernel panic
Analysis:
Seen kernel panic when setting the NULL country code in FW.

Solution:
Send an indication to Offload layer if Firmware fails to set
the country code.

Change-Id: Ic01ee170cfca31d840236625c1d1497426eafc68
CRs-Fixed: 2083318
2017-08-08 02:25:47 -07:00
Naveen Rawat
2171e391a8 qcacmn: Enable support for multiple NAN Data Interfaces
Enable support for multiple nan data interfaces. The usespace
may need to create multiple NDIs depending on whether it
requires IP isolation or not.

Change-Id: I4391f2efdc6bdede52a73915531d39dd7798c39d
CRs-Fixed: 2072501
2017-07-25 13:33:53 -07:00
Mukul Sharma
a4b8d35756 qcacmn: Move PMO from CMN to CLD
Move PMO from CMN to CLD.

Change-Id: I0545e7d2c934ff6558694b439b33c1debf0f5e0a
CRs-fixed: 2071526
2017-07-14 17:36:04 -07:00
Abhijit Pradhan
59626eba4b qcacmn: Set country code for full-offload using iwpriv command
For full-offload, send user country code to FW using WMI
command.

Change-Id: I84acbd7ce30aa9a8ce590c8fadea2cb5914240fe
CRs-Fixed: 2053849
2017-07-13 22:02:53 -07:00
Abhijit Pradhan
ca7d77b408 qcacmn: Fill per psoc regulatory info
Move per psoc regulatory info from pdev level function to psoc
level function.

Change-Id: Id06c6fee110ce929925f568db3a3b507214294d5
CRs-Fixed: 2066122
2017-07-12 12:08:42 +05:30
Naveen Rawat
7b62aff6c7 qcacmn: Add Passphrase and Service Name parameter to NDP cmds
Add Passphrase and Service Name to NDP initiator request and NDP
responder request.

Change-Id: I6a189747760a15393fcbac9dc382847fef789ab1
CRs-Fixed: 2072498
2017-07-08 01:45:00 -07:00
Ravi Kumar Bokka
4a517a223e qcacmn: Auto Detect SoC Power Collapse Failure changes
Add host support for detecting SOC power collapse failures in FW and
communicating the same to framework.

Change-Id: Icee39c896802c4d7136e0b8ef442a33feeb4799c
CRs-Fixed: 2016580
2017-06-27 22:13:06 -07:00
Vivek
b02a649f89 qcacmn: Remove vdev/peer locks for trivial APIs
Remove vdev/peer locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: I9972d51dfd1a42bdedbfd0fd4e67af03d030a1f5
CRs-Fixed: 2060880
2017-06-26 23:32:22 -07:00
Vivek
5ec0bd3636 qcacmn: Remove psoc/pdev locks for trivial APIs
Remove psoc/pdev locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: Ib5769c2234c8d57f485c0eef5a4e3c61fa170508
CRs-Fixed: 2060880
2017-06-26 23:32:19 -07:00
Kiran Venkatappa
be23decc06 qcacmn: Initialize mac_phy_count to zero before populating macphy params
mac_phy_count should be initialized to zero before populating machphy
params. Target stop/start framework skips attach/detach which means
mac_phy_count should be initialized explicitly.

Change-Id: I9fe537c3a7e375397982174f6a63599a961ba8d3
CRs-Fixed: 2065321
2017-06-26 15:36:01 -07:00
Dustin Brown
69280df6ee qcacmn: Fix bounds check in populate_mac_phy_capability
In populate_mac_phy_capability, bounds on an array are checked after
writing to the array. This leads to writing to one past the end of the
array under error conditions. Check the bounds of the array before,
rather than after, writing to it in populate_mac_phy_capability.

Change-Id: I34c7415b8fb925bea5a715214e3aa3ac8a4bacc8
CRs-Fixed: 2059155
2017-06-12 17:19:23 -07:00