Commit Graph

86 Commits

Author SHA1 Message Date
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
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
Prashanth Bhatta
bd92f53484 qcacld-3.0: Implement uevent call back for snoc
Platform driver icnss can provide uevent notification like FW
ready & FW crashed. Register the call back for notification and
update driver state for FW crashed indication so that driver
doesn't have to wait for shutdown call back to know FW crashed.

CRs-fixed: 2004309
Change-Id: I48afe8e023107aba8362324e3adabf6d50996b67
2017-05-26 00:30:21 -07:00
Yuanyuan Liu
81982b96cb qcacld-3.0: Add support of sending fw_log_mode to WLAN FW
Add support of sending fw_log_mode to WLAN FW for QCA6290. WLAN FW
will decide whether to push its debug log through DIAG or not based
on this value.

CRs-Fixed: 2046631
Change-Id: I6c4ec8dbd65f8fc034381770bdef7e145b1d2b6a
2017-05-24 03:37:18 -07:00
Yue Ma
6dbbb183a9 qcacld-3.0: Add PLD APIs to support athdiag read/write
Add PLD APIs to support athdiag read/write though QMI messages.

Change-Id: I4887065fa390c7e3374a7297103bd93d3d35c429
CRs-fixed: 2043584
2017-05-18 13:42:32 -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
Yue Ma
52d355c480 qcacld-3.0: Use dev_pm_ops in PLD if there is no CNSS platform driver
Use dev_pm_ops for suspend/resume/suspend_noirq/resume_noirq ops in PLD
if there is no CNSS platform driver when using PCI bus.

Change-Id: Ib656cee2cd48cf15028397084ec8679627bce459
CRs-fixed: 1115528
2017-01-26 14:39:19 -08:00
Yue Ma
e42c8453ee 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 firmware and if initial wake
up is received then failing it should trigger resume.

Change-Id: I1882011cab7365a026827a60c44375f0f1dc6102
2017-01-25 10:06:02 -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
Yue Ma
ea7721163e qcacld-3.0: Remove temporary hacks during bring-up
CNSS2 platform driver is the only driver which will support PCIe
bus based discrete WLAN chipsets.

Change-Id: If2d3aded36d383e2e4b0dc4ec9e6ab9e1023f2a9
CRs-fixed: 1082183
2017-01-10 10:04:21 -08:00
Yue Ma
0804752e83 qcacld-3.0: Enable to use certain platform driver APIs
Currently cnss_wlan_enable() and cnss_wlan_disable() APIs are only
used for a temporary emulation case for PCIe bus. Enable to compile
them for all cases for PCIe bus.

Change-Id: I27b1982f89e045564ed991c8a570ebf6a87bcf33
CRs-fixed: 1082183
2017-01-05 15:43:58 -08:00
Samuel Ahn
c9c48ca408 qcacld-3.0: Add support for multiple instances of the host driver
Propagation from qcacld-2.0 to qcacld-3.0.

If the module name is changed to something other than wlan in
Makefile or Kbuild, then MULTI_IF_NAME is defined to be the module name.
When MULTI_IF_NAME is defined, the names for the config files, log files,
and firmware files are prepended or appended with MULTI_IF_NAME. This
prevents file name collisions allowing multiple instances of this driver
to be loaded with different module names.

Change-Id: Id880c5fe423eb0b2a2c01677d8fa7c4a784c74df
CRs-Fixed: 946520
2016-12-14 14:08:37 -08:00
Hardik Kantilal Patel
5b67bef418 qcacld-3.0: Fix Compilation error due to use of undeclar variable
Use correct variable name in argument while calling cnss_set_fw_debug_mode
cnss platform driver API to avoid compilation error for PCI based target.

Change-Id: I34d30cfd3113d379460124d423d0befa22a6bbd4
CRs-Fixed: 1091285
2016-12-14 14:06: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
cd24386e22 qcacld-3.0: Add API to get SOC information in PLD for PCIe
Add API to call platform driver function in order to get SOC related
information for in PLD for PCIe.

Change-Id: Ieec098575b874e6d15ae45ef6000767ade7d459f
CRs-fixed: 1082183
2016-12-05 20:19:29 -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
e6a7a32b00 qcacld-3.0: Enable to use CNSS2 platform driver
Enable the flags to use CNSS2 platform driver for host driver.

Change-Id: I18996443ab8e7c24fb65b6003cfc368b664b5837
2016-11-16 16:37:49 -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
Jeff Johnson
bbaf4e4f62 qcacld-3.0: Fix -Wmissing-prototypes in PLD
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in core/pld.

Change-Id: Icef77666d1d1ef214491dcf1fcd56741091cec4f
CRs-Fixed: 1078826
2016-10-20 16:04:14 -07:00
Yingying Tang
2fb1438bf3 qcacld-3.0: Add USB VID and PID for QCA9379
Propagate from qcacld-2.0 to qcacld-3.0

Currently there is no QCA9379 device id in USB
device id table. Add USB VID and PID for QCA9379.

Change-Id: I7ae39513ff5fc1f0b36f3c05dc0e783532a8d4a3
CRs-Fixed: 1048598
2016-10-19 17:42:20 -07:00
Mohit Khanna
e7a4357688 qcacld-3.0: Use correct flag to compile USB-PLD file
Currently we are using different flags to enable compilation of pld_usb.c
and one to enable/disable PLD USB stub functions. Use the same flag for
both cases - CONFIG_PLD_USB_CNSS

Change-Id: Icc89405d785f3fc0ebc4a97d234013ac86ebd068
CRs-Fixed: 1076326
2016-10-17 21:58:34 -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