Some structures are used uninitialized, which may
result in unexpected behavior.
Initialize these structures before using them.
CRs-Fixed: 2494231
Change-Id: I89c7c8ec9defe1db14b9c8cdc3632f5d0051e626
Signed-off-by: Yu Wang <yyuwang@codeaurora.org>
If board ID is larger than 0xFF (e.g. 0xABCD), the proper BDF file
name format should be updated to bdwlanAB.bCD or bdwlanAB.eCD based
on corresponding BDF types.
Add snapshot of data file name format change from msm-4.14
commit 48129d773e327f7131116bb8bb8d7b91cc235e90.
Change-Id: Ib076d16d2faeb5ee1e9006e215a9ed4d279c35e9
Signed-off-by: Nirav Shah <nnshah@codeaurora.org>
Return failure in bus register if bus_type do not
match between cnss and wlan driver.
Change-Id: I9c322e4f6eca3220f1de18a6031715381ba495d7
Signed-off-by: Nirav Shah <nnshah@codeaurora.org>
Interface change to expose idle restart/shutdown APIs for WLAN
driver. This patch is to provide API interface to ease compilation
issues among various branches of kernel and WLAN driver. The actual
implementation will be in a separate patch.
Change-Id: I7f4a0079c32875c362d36c9f794d55609f924198
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Interface change to expose PCIe DRV connection status to WLAN
driver so that it is able to suspend/resume based on the status.
Change-Id: If8f706b0eb38f209a5e322b112beb9a95babdcad
Signed-off-by: Yue Ma <yuem@codeaurora.org>
For USB devices, irrecoverable scenarios in firmware
can lead to USB bus disconnect. In USB disconnect, the
interface and dev structures passed by USB sub system
are freed and are no longer valid. The current
implementation is PCIe specific and assumes dev struct
being present and valid always. The clean way to handle
this for HL(USB/SDIO) is to call pld_usb_remove in
disconnect and pld_usb_probe in re-connect after a recovery
Change-Id: I3fc9a5a2fc7bb53439b0410e61f381aa94e18634
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Add an API to force collect ramdump in platform driver. This API will be
called from WLAN driver to collect ramdump before calling kernel panic.
CRs-Fixed: 2351811
Change-Id: Ic88769beec4f7f8303fc2c0803012789e02c9f4f
Signed-off-by: Guisen Yang <guiseny@codeaurora.org>
cnss_usb_data structure member plat_priv remains uninitialized till
the function invoke of cnss_usb_probe. This leads to the access of
uninitialized pointer plat_priv if CLD gets loaded prior to
firmware download completion. Hence initialize the plat_priv
in cnss_usb_data structure during cnss_usb_init.
Change-Id: Ic471eacf22b112aaffe61458e22c7a9102470467
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
For triggering cold boot via fs_ready, the device ID
and bus type of QCN7605 USB was added in fs_ready and
cold boot cal start and done handlers.
Change-Id: I28801207c7833af18a09819cd9ab07ede556ac87
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
New PID has been introduced for Version 2.0 of QCN7605
USB composite device. PID should be updated in cnss2
driver to support this device.
Change-Id: I12b944b15021f317b24a34b0801a4d600133eee3
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
In insmod and rmmod handling, cnss2 should power up and power
down WLAN as part of register and unregister.
Change-Id: I5c588e7db0748363ffbfec9ee4ec26ebdb85e3aa
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
There may be a issue if save PCIe config space with bus master
enabled. During resume, since the bit will be restored first,
device will think master is ready and then trigger MSI for some
events, but actually MSI config has not been restored yet which
will mask the MSI. To avoid this, clear the bus master bit before
save config space and the bit will be enabled at a later time.
Change-Id: I75b993dda602ab94da37e108f07dd0f996e1a071
Signed-off-by: Nirav Shah <nnshah@codeaurora.org>
For qcn7605 USB, firmware download and error
recovery are handled by entities in userspace.
cnss needs to provide access vdd-wlan-en to
the kickstart userspace via sysfs
Change-Id: I53da7f2f7ebb2ec55f98fc328a550181dccb5a18
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Add support for bdf filename with the prefix suitable for
binary format.
Change-Id: I24cc19b24ab084a754ba28eb8b2fa459189990d9
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
In QCN7605, HL(USB and SDIO) transports are supported.
Cold boot calibration data upload and download is handled
in kernel space itself. New logic was decided for upload
and download. This logic is implemented in cnss2.
Change-Id: I19fcd643a2fc656e98b5375de16229cc3217dd45
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
During usb suspend/resume call from USB SS, if driver
ops is not present cnss should return success. presently
it is returning -EINVAL if driver_ops is NULL.
Change-Id: I43a268489107bdad1945b4a842bb9ab3abe1b4ea
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
For USB transport, ce config request should not be
sent. In cnss_wlan_enable, skip ce config if bus type
is USB.
Change-Id: Icf7c2a7c01c4b93a0856442f8a78d733a9858183
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
For QCN7605 device ID, the collected dump
segments are not dumped to /dev/ramdump_QCN7605.
Device ID of QCN7605 needs to be added to the
ramdump path.
Change-Id: Ib3931f13f99f9c219f4a0e64b5bc92fb2f0b3902
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Add cal duration in host capability request as host needs to support
best effort cold calibration.
Change-Id: I2bb162da4db2c72efb7866b665cff2cb5a4863a5
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Add new cnss usb API to check to check whether the target
is up or down. Remove invoking pld_remove callback function
in usb disconnect.
Change-Id: I0e873737a27f9941db1dae54636ef55ba4d05288
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
As genoa supports bdf file only in bin format, add support for the same.
Change-Id: I55db0480a259379c4ee2dac76f587d3fdf497090
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
Clean up cnss during a USB disconnect scenario
and call driver_ops remove if wlan driver is
registered with CNSS.
Change-Id: I72e6e42609724c9c5e0e07f381d2455d2631cc22
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
For error conditions,this api returns negative value.
currently the return type is unsigned int, this should
be changed to integer type.
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Change-Id: Ifaeea4d76f5d2c2e8f0f67eab97df50dae09462c
rmmod of wlan triggers cnss_wlan_unregister. wlan driver_ops
remove should be called for QCN7605 standalone and
composite devices to finish the rmmod path.
Change-Id: I0047eb65b68b7e81b9b9c9fd79825a0d3f27c640
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
QCN7605 supports cold boot cal data upload/download
over QMI for HL transports. QMI structures are updated
to support this.
Change-Id: Ic91f856ced8d30ab31cb305396ec476c6ca55f40
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
For QCN7605 composite usb ,the WLAN interface number is 2.
update this number to register CNSS as driver for WLAN
I/F.
Change-Id: I8dd97d18bf57e4268f194f846ad7c2e7b77afe50
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Changes in state machine and boot flow to support usb bus
based behaviour. Handler functions added to support USB
boot flow.
Change-Id: I51c4751c8d8669a8b54ae692ae3ec1bb32d1e7be
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
Add qmi updates to pass the msi config for copy engine and
host memory information for CE to update the read index.
Change-Id: I8861659e54cfb25ae64a23a3f02f1e0fce6d372d
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
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 support in CNSS driver and expose the APIs
for WLAN host driver.
Change-Id: I69688c229121c12575dde4938961d60bc067751f
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Add genoa pcie specific qmi and power up/down handling.
Change-Id: I08e640f775de5436071b457225a8b61f13574d01
CRs-fixed: 2272303
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
CNSS_DEV_ERR_NOTIFY should not be cleared before collecting firmware
dump as device is still in asserted state. Clear it after collecting
firmware dump.
Change-Id: Ic57c65d8ffa1806a0af83e653d6573f19ab1e705
Signed-off-by: Yue Ma <yuem@codeaurora.org>
API provision for WLAN host driver to check if WLAN PCIe device
is down.
Change-Id: I91efcd781af67c72b787c89e6b619c4cc49da34b
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Flag CNSS_DRIVER_UNLOADING is set when unregister wlan started, but it's
cleared in cnss_shutdown, which is also used in other call flow. Clear this
flag after unregister finished.
Change-Id: I0b5d63e5570c2604ff66d7852d7c7ca1c008a475
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
To add support for PCIe WLAN IPA uc SMMU feature, prvoide related
platform api for wlan driver to get the smmu map handle and do the
mapping.
Change-Id: I672b1a48879ada65b3ddb3f16c4bd787dc1b70a6
Signed-off-by: Frank Liu <qiliu@codeaurora.org>