Commit Graph

64 Commits

Author SHA1 Message Date
Vignesh Viswanathan
2f7701a13e qcacld-3.0: Add separate FTM Coldboot Calibration Mode
Add separate Coldboot calibration mode (10) for Coldboot Calibration
done during FTM Mode in PLD.

Change-Id: I7e4bb5209d87613bb49a0a958d8e691c73fdcfe1
CRs-Fixed: 2499766
2019-07-30 20:21:05 -07:00
Mohit Khanna
6dbf9c8301 qcacld-3.0: Add BW level PLD_BUS_WIDTH_VERY_HIGH
Add additional bandwidth level for "very high" bandwidth. As per the
default configuration if the total number of tx/rx packets exceeds
bus_bw_very_high_threshold, the bus bandwidth requirement is designated
as PLD_BUS_WIDTH_VERY_HIGH and PLD API is called with this value.

Default value of 7000 is chosen for bus_bw_very_high_threshold, which
amounts to 820Mbps of throughput considering a 1500 byte packet and
100ms bandwidth timer interval.

Change-Id: I3bd904429a02ec4935ba12da7c2cfd37eec738ed
CRs-Fixed: 2489362
2019-07-18 09:16:10 -07:00
Mahesh Kumar Kalikot Veetil
64a886965f qcacld-3.0: Add idle state to bus bw logic
Bus bandwidth logic uses PLD_BUS_WIDTH_NONE to vote if the packet
threshold is less than bus_bw_low_threshold. The same vote is used for
system suspend too. Add a new state for bus bandwidth logic to vote for
idle state.

Change-Id: I62ca6fff84a01083001db360f56344a05fb955db
CRs-Fixed: 2484003
2019-07-09 17:26:32 -07:00
Vevek Venkatesan
4a03124774 qcacld-3.0: change prototype of pld_wlan_enable
Change the function prototype of pld_wlan_enable, to use local
version string.

Change-Id: Ic4c46b609afc8f9510a5c4cbf5e708e28c82d066
2019-07-02 08:39:06 -07:00
Sandeep Singh
75d4b7d4cd qcacld-3.0: Add api to get smmu domain
Add api to get smmu domain from platform driver.

Change-Id: I71efe1a770c8c73f17ffe574555aa9c3b3595819
2019-06-08 06:29:14 -07:00
Yue Ma
0631a756fb qcacld-3.0: Add PLD API to check DRV connection
Add PLD API in order to check if DRV (Direct Resource Vote) subsystem
is connected or not.

Change-Id: I3b600b0760e27c7111320088034c555aee4ff773
CRs-fixed: 2452039
2019-05-16 05:57:13 -07:00
Yue Ma
b4ebd87f7b qcacld-3.0: Add WLAN device version to SOC info API
Populate WLAN device version related info along with other SOC info
in pld_get_soc_info() API.

Change-Id: Ie0e862c6755d10fbc80b11fbf39d004fafcfd9af
CRs-fixed: 2437413
2019-05-16 02:28:23 -07:00
Rajeev Kumar
473f9afe2a qcacld-3.0: Serialize psoc idle shutdown and restart via PLD
Serialize psoc interface inactivity idle shutdown and restart via PLD
such that platfrom driver can serialize psoc idle shutdown and restart
to driver unload and SSR events to avoid any race conditions.

Change-Id: Ibac40158ad5b94468b09c53eaf7f3d9a3cb8badf
CRs-Fixed: 2430868
2019-05-13 03:31:17 -07:00
Vevek Venkatesan
789b6b32c7 qcacld-3.0: add IPA cleanup during PD Restart
Currently there is no way to find out PD Restart indication,
so platform driver has added an API to differentiate PD Restart
from SSR. Using this API in shutdown notify handler, sending
message to IPA to do required cleanup.

Change-Id: I9d07c6fc573b6db1c7d0c1b7c99f325e22fe81cd
CRs-Fixed: 2436036
2019-04-26 01:50:28 -07:00
Rajeev Kumar
e01118e85f qcacld-3.0: Define PLD APIs for idle shutdown and restart
Define PLD APIs for idle shutdown and restart such that platform
driver can serialize PSOC idle shutdown and restart with driver
load/unload and SSR shutdown/reinit.

Change-Id: I4e772343fbccb099b9af104ac978dcdb650a567a
CRs-Fixed: 2431405
2019-04-12 00:36:30 -07:00
Yuanyuan Liu
3ab5531e6d qcacld-3.0: Collect ramdump before kernel panic
FW dumps is not getting collected during kernel panic handler.
Hence move ramdump collection before kernel panic.

CRs-Fixed: 2362637
Change-Id: Id9f1dfefe1560affff6c4ecfca1b8fdba3eb0928
2019-03-18 23:55:43 -07:00
Anurag Chouhan
ca8bc1663c qcacld-3.0: Add API to block/Unblock modem shutdown
Add API to Block/Unblock modem shutdown.

CRs-Fixed: 2393336
Change-Id: Ia1e455a8d52bb79451c26b9a527b902397f19508
2019-02-22 13:39:20 -08:00
Nirav Shah
a6c6dc9f75 qcacld-3.0: Changes to support rri_over_ddr support for Genoa
Changes to support rri_over_ddr support for Genoa.

Change-Id: I1b98e6ec765b8b9da7f0a2f8b21f410c44fa90c2
CRs-Fixed: 2357344
2019-01-30 00:02:55 -08:00
Ashish Kumar Dhanotiya
7a11e273df qcacld-3.0: Enable MAC provisioning from ini
Currently MAC addresses are generated by driver only.
MAC addresses are queried from platform driver or wlan_mac.bin.
If platform driver gives  mac addresses, driver uses it, else it
will use wlan_mac.bin to update MAC addresses. If wlan_mac.bin also
don't have MAC addresses then random MAC addresses are generated
using the HW address or using device serial number.

Add an ini support to enable MAC provisioning. If MAC provisioning
is enabled, ensure that platform driver provides atleast 2 provisioned
MAC addresses. Query the derived addresses also from platform driver.
Generate the remaining random MAC addresses.

Change-Id: Ib943f9de70a78ba5d5e87d81c76b20341893f8e9
CRs-Fixed: 2153836
2018-12-14 05:34:46 -08:00
Yu Ouyang
58648a57f3 qcacld-3.0: fix wlan driver reload issue without CNSS module
Currently, driver without CNSS module can't be unloaded when firmware
crashed. Without CNSS module, driver should set recovery in progress
flag to false when fw dump finished or failed. Driver should add ramdump
memory address and length too.

Change-Id: I672c50bd90ada7ff47ddff64ff3b313a75faff13
CRs-Fixed: 2343124
2018-11-23 02:00:06 -08:00
Dustin Brown
8f05f65391 qcacld-3.0: Remove PLD_RECOVERY handling
The platform driver uevent handling in WLAN handles both the firmware-
down and "recovery" events. However, the recovery event on snoc
platforms is actually the firmware-crashed event. Recovery _is_ a valid
uevent for pcie platforms, but I20db3698602ea273038a3f024b4e5f61639f6d74
is adding support for the firmware down event.

Additionally, there is no good reason to handle both events, and the
various handling logics are spread across both events with little rhyme
or reason. Remove handling of the "recovery" platform uevent, and move all
associated logic to the firmware-down uevent handling.

Change-Id: I36b6f607438c930dff1936f372af80be311dfe49
CRs-Fixed: 2339357
2018-11-08 13:39:26 -08:00
Yue Ma
fb3b78d7d2 qcacld-3.0: Add force wake APIs support in PLD
As part of PCIe power management for new WLAN devices, it requires
asserting WAKE register before accessing any MMIO registers outside
first 4K range. Add the APIs support in PLD for WLAN host driver.

Change-Id: I307cc6688fca58a52a6eaf3982d675c7a85a6965
CRs-fixed: 2326459
2018-10-26 16:42:28 -07:00
jitiphil
0e3b592aed qcacld-3.0: Handle FW rejuvenate scenario
Upon driver reinitialize after a FW rejuvenate,
data packets are not going through IPA path.

Check for FW rejuvenate scenario during driver
recovery and send appropriate message to IPA
driver.

Change-Id: I8c1d7ba78227684cd5653a5927aa4d4c2ce5d354
Crs-Fixed: 2287293
2018-10-04 08:13:09 -07:00
Yuanyuan Liu
e470977e9f qcacld-3.0: Call icnss API to check if WLAN FW is down
If modem crashed during wlan driver unloading, icnss driver
will call driver uevent callback to set FW down status in
driver side when it receives BEFORE_SHUTDOWN notification.
If wlan driver is de-initialized just before the callback
is called, kernel will panic as driver's context is freed.
This can be avoid by not setting FW status in host driver.
Instead, icnss driver provides an API to host driver to
check FW status and host driver calls this API before any timeout
assert or accessing HW registers.

CRs-Fixed: 2161431
Change-Id: I8331367dd41dd0cedfa65c63f1bb3ffcb535e1c9
2018-09-19 19:32:46 -07:00
Jeff Johnson
5e58340074 qcacld-3.0: pld: Fix misspelling of 'bandwidth'
Address the following issue in the core/pld folder:
CHECK: 'bandwith' may be misspelled - perhaps 'bandwidth'?

Change-Id: Ic397c156ff7ba32cec590083098474af16569ea7
CRs-Fixed: 2241943
2018-05-16 18:01:49 -07:00
Jeff Johnson
56e4e36ee8 qcacld-3.0: pld: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Idd9e17b79c5de9206153f3c32965b519665b6a3e
CRs-Fixed: 2229655
2018-04-24 14:48:41 -07:00
Yuanyuan Liu
057fc4cf80 qcacld-3.0: Set target ready only after hif_enable
Target register is safe to access only after FW ack the wlan
enable request, which is done in hif_enable. Hence set FW ready
state after that.

Change-Id: Ieeb7dd3e1a2400c7b2568869ac27cf7f745c20d5
CRs-Fixed: 2167736
2018-01-24 17:33:51 -08:00
Yue Ma
5ff417c273 qcacld-3.0: Remove deprecated PLD APIs
These APIs are used with legacy platform driver for PCIe bus based
targets which are no longer needed for new platform driver.

Change-Id: I6e01ea632e902f2c0a3a7cde07c85dfa835b84d3
CRs-fixed: 2134245
2017-10-31 17:38:51 -07:00
Govind Singh
e793db4b07 qcacld-3.0: Add cold boot calibration enum in pld driver mode
Add support for cold boot calibration driver mode in pld
layer.

CRs-Fixed: 2117666
Change-Id: If1db00262ab6068681b01734eb1edbdae967e4db
2017-10-24 04:51:53 -07:00
Govind Singh
a1f6dacf0c qcacld-3.0: Add fw ready uevent to update driver state
FW ready state guarantees the completion of 2nd stage power on
reset sequence of wcn3990 target.

Add fw ready uevent to update driver state, which is required
to check if target registers are accessible or not, while
recovery is in progress.

Change-Id: I78d56644d4d4ac3a0371be625a2debed8ac7cebf
CRs-Fixed: 2058451
2017-10-24 00:49:41 -07:00
bings
582830a20e qcacld-3.0: Enable preAlloc support for SKB buffers
Enable support to use SKB Buffers allocated during bootup for
low memory targets.

CRs-Fixed: 2106466
Change-Id: Ia55c38767804c5915b9d29d3c61bff236d12cacd
2017-09-18 07:55:49 -07:00
Liangwei Dong
95d6c373bb qcacld-3.0: skip FW dump for SDIO SSR
Skip FW memory dump in SSR case for HL SDIO solution.
HL SDIO uses the diag read API to read by 4 bytes,
which is too slow to meet SSR time requirement.

Change-Id: Iacde90ab0ec84f29f3744bf4497ec8fd8517600a
CRs-Fixed: 2071329
2017-07-27 16:59:09 -07:00
Yuanyuan Liu
321ac91edb qcacld-3.0: Use cnss_utils APIs
Use cnss_utils APIs to set/get wlan info as these APIs are platform
independent.

CRs-Fixed: 2071683
Change-Id: Ia35a648a1d4dff308b830bce3b4e9992de2a2834
2017-07-10 11:42:08 -07:00
Sameer Thalappil
ac5d26eb5e qcacld-3.0: Add support for host initiated recovery
If platform has a mechanism to initiate target assert, trigger
that interface to force assert target. Certain integrated platforms
(where WLAN runs on it's own PD) provides a mechanism to initiate PDR
from host. That interface can be triggered when WLAN host detect
timeout scenarios.

CRs-Fixed: 1110243
Change-Id: I6a9408f47ca4245380dbf4177363c3c461ff948d
2017-07-05 17:51:06 -07:00
Anurag Chouhan
1ddb9b3e47 qcacld-3.0: Add uevent to update status & data
Update uevent status to hdd, based on the uevent received
from the platform driver

Change-Id: I1ac0fa61efa8b7f4f9d5e4e6abfcf969dbc1c592
CRs-fixed: 2027958
2017-05-26 00:30:22 -07:00
Manikandan Mohan
8cf506171b qcacld-3.0: Fix kernel module check patch warnings in PLD files
Fix kernel module check patch warnings in PLD files

Change-Id: Ic0473118a4799cc74eaa8684257013f8f38a746a
CRs-fixed: 2030824
2017-05-02 13:29:39 -07:00
Yu Wang
66e4ff2fe1 qcacld-3.0: Update prefix for multi-interface with chip name
1. The paths for driver to get ini and fw files
   are incorrect for QCA SDIO chip on Dual-WiFi
   platforms, with wrong prefix or no prefix.
   Correct prefix for ini file, from '<mod_name>'
   to '<chip_name>/'; add prefix '<chip_name>/'
   for fw files.

2. For QCA9377, there is a special cnss API for getting
   fw names, it's cnss_get_qca9377_fw_files().
   Use the right cnss API to get fw files for QCA9377

Change-Id: Ia7616153b6823e9550703e649c7fc21ab306ca07
CRs-Fixed: 2008217
2017-03-02 19:58:56 -08:00
Yuanyuan Liu
7a97b8f838 qcacld-3.0: Add support for setting fw log mode for msm8998
Add support for setting fw log mode for msm8998. Change the log mode
from bool type to tristate to support multiple log modes.

CRs-Fixed: 1115611
Change-Id: I6aef023d1e3cb1b68f1520f800af094f6f6decdb
2017-02-02 12:43:36 -08:00
Yuanyuan Liu
10fc3d328d qcacld-3.0: Switch to new recovery APIs
Swith to new recovery APIs with dev instance and recovery reason.
As recovery could have different mode and be target specific.

Change-Id: I26a1a2a0d23a687a5babcaf4ba4e5c6e788fedac
2017-01-23 14:36:08 -08:00
Yuanyuan Liu
06a342ffdb qcacld-3.0: Implement update_status driver callback
Implement update_status driver callback, which will be called
when platform driver wants to update wlan driver status.

CRs-Fixed: 1111424
Change-Id: I0c4a20119e383d00e2dbd395159351572b956566
2017-01-23 11:21:00 -08:00
Yue Ma
502a28fa0f qcacld-3.0: Add shadow register version 2 structures in PLD
These version 2 shadow registers are filled by HIF and sent to firmware
through QMI for QCA6290 chipset.

Change-Id: I92edb4140f707a933dacbe982eb4da167841b501
CRs-fixed: 1107457
2017-01-12 18:43:39 -08:00
Yuanyuan Liu
7145eb2383 qcacld-3.0: Add support of getting MAC address from platform driver
Add support of getting WLAN MAC address from ICNSS platform driver.

Change-Id: Ie31d9147e8dc4e11e14a6fdf93200122acbb4000
CRs-Fixed: 1096290
2016-12-05 21:51:46 -08:00
Yue Ma
fd418eabf6 qcacld-3.0: Add PLD APIs to get MSI information
These PLD APIs can be called to get PCIe MSI related information
from platform driver.

Change-Id: I2882f5c30d6f932c36af4503ac0bec9229ef35df
CRs-fixed: 1082183
2016-12-05 20:19:28 -08:00
Frank Liu
ab70c840e7 qcacld-3.0: Support IBSS firmware bin(32-clis)
qcacld-2.0 to qcacld-3.0 propagation

Firmware can't support all station feature and 32 ibss clients
in one bin because of the mem limitation. So host supports to
download IBSS firmware bin if con_mode=6.

CRs-Fixed: 962246
Change-Id: I6c3dca17c82fdfd2bdadcee319cc157e6aa2ead9
2016-11-29 02:31:14 -08:00
Yue Ma
e93d52557a qcacld-3.0: Remove obsolete codeswap feature
Codeswap feature is introduced for a WLAN chipset which is already
cancelled. It is no longer used in host driver. Remove the feature
to avoid any confusion for future development.

Change-Id: I70ae291ded2d2e290408e2f5b177e872f1f3d7e8
CRs-fixed: 1082183
2016-11-03 17:54:05 -07:00
Hardik Kantilal Patel
9689e93310 qcacld-3.0: Add PLD API to get QMI support info
Call ICNSS API to get QMI support info and based on this
information later WLAN host driver decide to allocate 1 MB
Memory for MSA region or not.

CRs-Fixed: 1081443
Change-Id: I1ae0f3a0c92ded2df8e8c710be1faab6fde5cc10
2016-11-03 17:54:03 -07:00
Komal Seelam
355b1474f9 qcacld-3.0: Use PLD API to query MAC Address from Platform Driver
Move CNSS API to PLD API to query WLAN MAC Address from Platform Driver

Change-Id: I97724711cdf08824e0a46398284e40b798b4553d
CRs-Fixed: 1063837
2016-10-17 21:58:05 -07:00
Dustin Brown
d53d1a85c6 qcacld-3.0: Cleanup code related to unit-test framework
A previous unit-test framework change contained some outstanding clean
code issues. Address the issues to ensure cleaner code is maintained.

Change-Id: I889d4e12a7c00b5fc6cb409bc077466019442456
CRs-Fixed: 1073756
2016-10-10 13:00:59 -07:00
Rajeev Kumar
9bb2e85aff qcacld-3.0: Power offload unit test framework enhancements
Recently host power offload suspend/resume has switched to 3
stage process. Enhance power offload unit test framework accordingly,
and improve error handling.

Change-Id: I8cc1e955fbaca631ee7fd76b0c907d1e68c836bf
CRs-Fixed: 1072423
2016-10-07 08:32:05 -07:00
Yuanyuan Liu
f97e822df4 qcacld-3.0: Use PLD API to get SOC serial number
Socinfo API is not a standard system API. Hence, use PLD API to get
SOC serial number instead of calling socinfo API directly to enhance
driver portability.

Change-Id: I1d673d2f3b0066f4e05f2f465abc8a6cad7a1f8f
CRs-Fixed: 1069480
2016-09-26 15:04:21 -07:00
Yuanyuan Liu
16a556259b qcacld-3.0: Clean up PLD source files and remove unused function
Clean up PLD source file by moving one-line function calls to
header file and make it static inline. Also, remove unused function.

Change-Id: Ibaa7357db4ac305f0bab9d8ad2f7dfe9351fda7d
CRs-Fixed: 1070075
2016-09-23 03:20:19 -07:00
Yuanyuan Liu
137755f159 qcacld-3.0: Provide PLD APIs for SMMU operations
Proivde PLD wrapper APIs for getting SMMU mapping
context and mapping SMMU to a specific physical address.

Change-Id: I3feb61b26c839547e4d050f62963e64f5ca062a7
CRs-Fixed: 1057714
2016-09-21 17:08:03 -07:00
Yuanyuan Liu
5ef6bfef5b qcacld-3.0: Add PLD ATHDIAG read/write support
Add PLD wrapper for platform athdiag read/write.
HIF will call these two functions when a athdiag read/write
triggered from user space.

CRs-Fixed: 1061837
Change-Id: Ie34c634beaf1cd91e24eca1b7ce5b6444a60393e
2016-09-21 17:07:57 -07:00
Yuanyuan Liu
22896aa193 qcacld-3.0: Register suspend_noirq/resume_noirq to kernel
Register suspend_noirq/resume_noirq callbacks to kernel. It will
make sure no wake up is pending from FW and if initial wake up is
received then failing it should trigger resume.

Change-Id: Ie553dfc1401c2c6934961773bc98a24626a9cd34
CRs-Fixed: 1060669
2016-09-15 16:51:41 -07:00
qcabuildsw
bad0e26422 Revert "qcacld-3.0: Register suspend_noirq/resume_noirq to kernel"
This reverts Change-Id: I3d3de3789a7d560ed171294fa9a1ebe6389746a7
WLAN driver is blocked from promotion as the dependent kernel
change is not merged yet. PM suspend_noirq/resume_noirq are
not available after reverting.

CRs-Fixed: 1060669
Change-Id: I2b1300bbb19d2e4975bb86a82a892501b993827b
2016-09-11 15:44:44 -07:00