Commit Graph

114 Commits

Author SHA1 Message Date
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
Frank Liu
d462d9c62b qcacld-3.0: Add support for IPA SMMU on CNSS
For now IPA SMMU can only work on ICNSS platform.
Add support for IPA SMMU feature on CNSS platform.

CRs-Fixed: 2286287
Change-Id: I6515d6ec764659f1aeefa50d9fd0b120c47b36bf
2019-02-19 03:03:45 -08:00
Dustin Brown
8513e84f6f qcacld-3.0: Zero-initialize soc info
pld_snoc_get_soc_info() stack allocates a icnss_soc_info struct before
populating its contents via a call to icnss_get_soc_info(). However,
icnss_get_soc_info() may not populate all of the fields of the struct.
Zero-initialize the struct before passing it to icnss_get_soc_info() to
avoid using any uninitialized values.

Change-Id: I859a880c9fb8483b66e17ded2857634ab878977a
CRs-Fixed: 2396653
2019-02-15 13:10:05 -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
Ajit Pal Singh
5e618aa8c4 qcacld-3.0: Add support to save and get interface device
A bus can have multiple sub interfaces or pipes.
USB bus for example has endpoints grouped into interfaces.
WLAN uses one of these interfaces.
Each interface has its own "struct device". Add support to save
and retrieve this "struct device".
Also pass interface dev to pld_usb_wlan_enable() as CNSS expects
interface device.

Change-Id: I5800bde107157c35efed848a23b95696bd7f793a
CRs-Fixed: 2371440
2019-01-14 12:58:51 -08:00
Yu Ouyang
781f1b56c9 qcacld-3.0: correct return value for pld_pcie_get_user_msi_assignment
Without CNSS module, function pld_pcie_get_user_msi_assignment return zero
even no msi config. For caller function pld_get_user_msi_assignment, zero
means TRUE. It will result to panic when deinit sequence called in
function hif_ce_srng_msi_free_irq. Return correcly value to avoid panic.

Change-Id: Id4480ef1db5357943162472963c4e78d7bfe64b8
CRs-Fixed: 2373130
2019-01-02 03:52:58 -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
Hardik Kantilal Patel
239c7a268d qcacld-3.0: remove redundant snoc pld APIs
The snoc wlan platform driver supports snoc API with
the device pointer in all upstream kernel, So remove
the redundant snoc APIs from the pld layer.

CRs-Fixed: 2173110
Change-Id: Iee8bce586569e135da81f9a465a9e7df8b042af4
2018-10-31 13:21:15 -07:00
Arunk Khandavalli
f9957c0fcf qcacld-3.0: Add fiwmare down case in the pld pcie uevent
When the firmware crashes platform driver notifies the driver
through CNSS_FW_DOWN. Since firmware down support is not
present for the PCI bus, The driver flags for target ready
and recovery flags are not getting set resulting in the commands
sent to firmware.

Add the firmware down support for the pci bus.

Change-Id: I20db3698602ea273038a3f024b4e5f61639f6d74
CRs-Fixed: 2338570
2018-10-29 13:49:33 -07: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
Yue Ma
9c0e4800ea qcacld-3.0: Add PLD support to check if FW is down for PCIe bus
Support to check if FW is down or not for PCIe bus in PLD layer.

Change-Id: Ic09607016c430a1c4ec6c30f9b29b1ab52b4c885
CRs-fixed: 2268026
2018-10-26 16:42:24 -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
46dc5cd3b1 qcacld-3.0: Fix return value for pld_is_fw_down
Fix return value for pld_is_fw_down. Always return 0 for
unsupported bus type.

CRs-Fixed: 2319880
Change-Id: I64de028c7dd0c6a411b2d5b5f5e03bdfebed03cc
2018-09-24 17:16:08 -07:00
Qun Zhang
4a83a46fab qcacld-3.0: update changes for fully supporting MULTI_IF_NAME
Currently, driver don't fully support MULTI_IF_NAME when two wlan
cards are supported by using two drivers:
1. if two wlan cards are all PCIe, driver can't distinguish
two PCIe cards firmware path.
2. When create hdd sysfs file upper folder, it will repeatly create the
same folder if not use MULTI_IF_NAME to distinguish them. It's not
necessary to distinguish the sub-folder once upper folder is different.

Change-Id: I511de46eec98e736d4e97d5c94ab22592d33f347
CRs-Fixed: 2311137
2018-09-20 22:24:21 -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
Ajit Pal Singh
594d400d3d qcacld-3.0: Add shutdown/reinit support for PLD_CNSS_USB
Populate shutdown/reinit callback functions for PLD_CNSS_USB

Change-Id: If0ad6ca69a85778574d874d9a9b9f0df6146e89b
CRs-Fixed: 2279206
2018-07-19 08:32:41 -07:00
Ajit Pal Singh
8914da4621 qcacld-3.0: Unregister usb if probe fails
Unregister with usb stack if probe fails.
Not doing so was causing a kernel panic the next time
WLAN device was enumerated.

Change-Id: Ieeeca485774b41156f5587feaa4f7482746f6650
CRs-Fixed: 2263482
2018-07-12 22:26:59 -07:00
Ajit Pal Singh
44273d6464 qcacld-3.0: Call cnss_wlan_enable() for QCN7605 USB
Call cnss_wlan_enable() for QCN7605 USB.

Change-Id: I566e934ee43db0b95dad799cac6731695f62992e
CRs-Fixed: 2269602
2018-07-11 14:28:45 -07:00
Ajit Pal Singh
6c6e81c714 qcacld-3.0: Add support for CNSS USB
Adds support in pld_usb.c for registering with CNSS driver.
pld_usb can now register directly with Linux USB stack or with
CNSS driver.
For QCN7605, registration is to be done with CNSS.

Change-Id: Ibf7e51679e1848bcd8e1acfa43c457f42ff40c0b
CRs-Fixed: 2269602
2018-07-11 14:28:41 -07:00
Frank Liu
0e7ac56180 qcacld-3.0: Update soc info by structure member
Update pld soc info by structure member to decouple between pld soc info
with platform soc info.

Change-Id: I0e62d4784d7bccfb2f08d3678e1c78e6baaa9ca9
CRs-Fixed: 2268191
2018-06-29 07:12:34 -07:00
Nirav Shah
74be384d1c qcacld-3.0: Fix compilation error to enable genoa pcie
Fix compilation error while enabling QCA_WIFI_3_0_ADRASTEA
and CONFIG_CNSS2 flag for Genoa.

Change-Id: Ic44da39377f722c19edcd291d1b35fac1fee9462
CRs-Fixed: 2267927
2018-06-27 02:11:24 -07:00
Kai Liu
e6d9450e79 qcacld-3.0: Check if sdio device is valid before start wifi
When loading sdio driver, need make sure sdio device is recognized,
break driver loading if no device.

Change-Id: I4d47575d793b58970012e4e47cc63b0c197f565d
CRs-Fixed: 2245495
2018-06-07 21:08:36 -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
Nirav Shah
fb79af826c qcacld-3.0: Do not compile pld_pcie file for non-pci case
Do not compile pld_pcie file for non-pci
attach.

Change-Id: Ic32074960137e055f991de134a9720e2b81a642c
CRs-Fixed: 2213301
2018-04-18 18:38:46 -07:00
lihual
8b9daf255c qcacld-3.0: Init local variable cnss_info before using it
Initialize cnss_info in pld_pcie_get_soc_info()
before using it.

CRs-Fixed: 2205420
Change-Id: I4b34fc64ca50c031faa79fd1e272bae24cc0f766
2018-04-09 21:33:47 -07:00
Manikandan Mohan
04459b9cf8 qcacld-3.0: Fix errors of multi driver compilation
Qcacld supports multiple driver modules instance generation with
different file names and Kbuild options. Fix driver load time and
compilation errors on this feature.

Change-Id: Ib405e6c475bace31933a28dc64082f2b6c046da9
CRs-fixed: 2197749
2018-03-14 15:53:05 -07:00
Nirav Shah
eb017befbd qcacld-3.0: Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I2de81794cd16521097ffa6956a18b4b0fe981d36
CRs-Fixed: 2196757
2018-02-28 05:29:39 -08: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
b8b2946e3b qcacld-3.0: Remove unused PLD PCIe APIs
These APIs are replaced by the ones with device pointer.

Change-Id: Ic13409af5814dec65ac071236af780159624c147
CRs-fixed: 2151189
2017-12-01 13:39:58 -08:00
Yue Ma
85761e64ca qcacld-3.0: Add device pointer in PLD PCIe APIs
Add device pointer in all PLD PCIe APIs in order to support
numerous WLAN devices.

Change-Id: Id9b2fb14ef3de715f6127ac2301d7ad87d493c14
CRs-fixed: 2134245
2017-10-31 17:38:53 -07: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
Sarada Prasanna Garnayak
f04667af34 qcacld-3.0: add device pointer in pld snoc API
Add device pointer in all pld snoc API to support
for numerous WLAN module.

Change-Id: Id6c3d559ebc67d40536a60ab78d468fb5f0fbf03
2017-10-26 07:27:52 -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
wadesong
bf7087941f qcacld-3.0: Enable SDIO based WLAN self-recovery
WLAN self-recovery based on SDIO bus is currently missing in
CLD3.x, resulting in crash injection to TF card taking no
effect during some special case.

Add the recovery feature back to CLD3.x based on the same
logics in CLD2.0

Change-Id: I719b77ac9679a0449863a94b47ad22233bc9b574
CRs-fixed: 2103969
2017-09-29 05:40:09 -07:00
Yue Ma
096189d513 qcacld-3.0: Properly handle uevent for PCIe devices
When uevent is introduced for integrated devices, it breaks
the PLD handling for PCIe devices. Hence correct it by using
proper enum.

Change-Id: Iacb5037932065f1822c1408d74f8aa3824ff0e71
CRs-fixed: 2114385
2017-09-22 18:39:18 -07:00
Jeff Johnson
359e679fb1 qcacld-3.0: pld: Replace instances of unadorned %p
Replace instances of unadorned %p in core/pld.

Change-Id: I949474a148429d14587864e6fa3ce5c71d2ceb92
CRs-Fixed: 2100997
2017-09-20 06:21:55 -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
Dustin Brown
100201ecca qcacld-3.0: Avoid recovery trigger while recovering
Currently, cds_trigger_recovery is unconditional. Instead, avoid
triggering recovery if recovery is already in progress.

Change-Id: I5c77048701930591e0e520e07275e6f8631108a0
CRs-Fixed: 2070845
2017-08-30 10:43:49 -07:00
Yuanyuan Liu
b46a861f7c qcacld-3.0: Remove unused APIs for PLD
Remove unused APIs from PLD. These APIs are already replaced by
WLAN common utility APIs.

CRs-Fixed: 2093939
Change-Id: I187826e7433e93361e1e4d42c081cc2f31b661b3
2017-08-30 10:41:58 -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
Yue Ma
63d360abdc qcacld-3.0: Add support for host initiated recovery for QCA6290
Add the interface that host driver can trigger FW assert and do
recovery for QCA6290.

Change-Id: I03a9c374fd2ddc5cc46b9b0a98ce05bcf80a53ec
CRs-fixed: 2068035
2017-07-10 21:46:05 -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
Will Huang
bdd28711e5 qcacld-3.0: Correct NULL check when access function pointer
In function pld_pcie_uevent, pld_context->ops->uevent NULL check logic
is wrong so correct it.

Change-Id: I1bf9d8c8f5318b476761a458f5475107007dfa01
CRs-Fixed: 2058248
2017-06-29 05:40:05 -07:00
bings
75be2d0a45 qcacld-3.0: Fix crash caused by sdio ramdump allocation
For TF sdio chip with platform driver, ramdump is
configured in platform driver. Driver can get the
virtual memory, but it can't call ioremap again.

If there is a platform driver, ramdump should be
allocated in platform driver, and if there is no
platform driver, ramdump should be allocated in
driver.

CRs-Fixed: 2066529
Change-Id: Ia2a32a4895f354e365522a30bbfac949ccb7a391
2017-06-27 01:40:21 -07:00
Yu Wang
c407bf733a qcacld-3.0: enable FW dump for SDIO
When FW assert happen, it won't do FW dump
if the bus type is SDIO.

Enable FW dump for SDIO target

Change-Id: I24655ca74003c915d9eda1106aad7cf87856947e
CRs-Fixed: 2010613
2017-06-09 15:36:37 -07:00