Peer and vdev leaked during SSR, Helium/Rome SSR is different.
Helium:
FW assert will indicate to CNSS driver, then PLD_FW_DOWN
is sent, in wlan_hdd_pld_uevent, target ready is cleared and
RECOVERING is set, so wma_force_objmgr_vdev_peer_cleanup can be
called, no such issue.
Rome:
FW assert will indicate to wlan driver directly, in
ol_target_failure, only RECOVERING is set, target ready isn't
cleared, wma_force_objmgr_vdev_peer_cleanup can't be called,
so peer and vdev leaked.
Change-Id: I6ecf6cc439f931d8da67972c543376b2148982af
CRs-Fixed: 2403501
There are a few consumers of the legacy OS_* APIs. Directly use
appropriate QDF APIs instead.
Change-Id: Ibe46172200119c6d293acb301baf796276c5949c
CRs-Fixed: 2403793
EOK is a legacy definition and frequently misused. Remove references to
it from BMI.
Change-Id: I38455eca00a6c1f3ffe25635019677708e312f92
CRs-Fixed: 2404901
The header file ol_if_athvar.h is strange in that it is a qcacld-3.0
file that is included by files in the qca-wifi-host-cmn project. That
model does not conform to the software architecture so there is a plan
to correctly refactor the file. As a preliminary step remove all
include directives that are not actually required by the files that
include this header file.
Change-Id: Ifbb38adba434aa19fade4838e30d39884b6e4615
CRs-Fixed: 2366965
Currently ol_if_athvar.h defines the following:
- struct ol_version
- enum ol_ath_tx_ecodes
- struct ol_ath_stats
None of these are used, so remove them. This leaves behind just a set
of #include directives.
Change-Id: Ie8c2ee1fa1b3c34f37430633c28987651e60434b
CRs-Fixed: 2366964
Header file i_bmi.h utilizes several QDF data structures, but it does
not explicitly include the header files which define them. This must
mean that the data structures are being included as a side-effect of
including an unrelated header file.
In an upcoming change the header file ol_if_athvar.h is being
refactored, and that change somehow interferes with the side-effect
that causes the QDF header files to be included by i_bmi.h. So rather
than rely upon the side-effect, explicitly include the necessary
header files.
Change-Id: Icf7d7e4babb14faa41b2ac18c6181a206da9b858
CRs-Fixed: 2366963
In i_bmi.h the hif_reg_based_get_target_info() conditional
compilation references SNOC but this is not a macro defined
by the driver. Replace this with the correct macro, HIF_SNOC.
Change-Id: I52969426c58c078b3dd558e825e2a9fb68394536
CRs-Fixed: 2366958
Change I2c217891d0ca4b503e7388b3ebe2f787e8325af5 ("qcacld-3.0: Add
firmware download support for sdio bus (Part 5 - HIF SDIO)") added a
prototype for ol_get_fw_files() but did not add an implementation.
Since nothing uses this prototype, remove it.
Change-Id: Ie3b9aee767e14acc425ca7c365d10cbb73682fb5
CRs-Fixed: 2366957
The definitions in file ol_ctrl_addba_api.h are unused, so remove the
file and remove the #include directive in the one place it appears.
Change-Id: I9056791b1a21dc8c8e113db2d49468e3abafab34
CRs-Fixed: 2364105
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
As part of WIN BMI modularization, hif_bmi_register_callbacks
are removed from if_pci.c in qcacmn project. As a result,
MCL needs to invoke hif_bmi_register_callbacks in qcacld project.
Fix is to call bus agnostic hif_register_bmi_callbacks method
in bmi_download_firmware.
Change-Id: I72febb02150cf9c672bea4949c53f1b87fa69cdf
CRs-Fixed: 2332266
When downloading a corrupted firmware file that has chunk length in
header which doesn't match the contents, buffer over-read may occur.
To fix it, before downloading the data, ensure the length is equal or
smaller than the left size of the firmware file.
Change-Id: I4e0c6c4423f94f26a8c4573b5d234296890f4ecf
CRs-Fixed: 2314182
Logging macros already print function name by default,
there is no need to print the function name again as part of the log.
Hence, remove the function name or
wherever required use '"%s...", __func__'
Change-Id: Ib6dc6cc03ef148146b1c626271d5ac3b7345c4bb
CRs-Fixed: 2312593
Remaining may be greater than its original value when
(remaining & 0x3)!=0, then OOB occurs when memcpy.To address
this, align the remaining after doing memcpy.
Change-Id: I3e39a791a76a272e82beb6561375e26ca84ec0f4
CRs-Fixed: 2259721
Do not tie up names with mailbox.
This results from SDIO HIF refactoring.
See qcacmn: I12bdf8b07350411093ba35071411525a8333cf93
Change-Id: I99184fbfc95a601f09dba5891098c35d5aa794c5
CRs-Fixed: 2252448
Address the following issues in the core/bmi folder:
CHECK: 'Defintions' may be misspelled - perhaps 'Definitions'?
CHECK: 'initilization' may be misspelled - perhaps 'initialization'?
Change-Id: I649b42e30e10e51c2c734d909a8c9ab2811b9421
CRs-Fixed: 2241939
This reverts Change-Id: I2a4980b6cd4b689da07c34f2acdfaafbbb0715bb.
This change set driver unload state before unload work is scheduled,
which causes async between platform driver and wlan host driver.
Change-Id: Ieaf1cf0a257f69bf8958085c48d9020f1b5ec610
CRs-Fixed: 2124953
Fw assert and unloading can occur at same moment, there is no need
to recover if wlan unloading is ongoing, so skip notifying SSR framework
in such case.
Change-Id: I2176d1505e8e358f4436277e4d0b706923596f27
CRs-Fixed: 2087634
Add ini param 'gtsf_ptp_options' to control
PTP options, it's a bitmap:
bit0 - PTP_OPT_RX(0x1)
set this bit to enable RX time stamping
bit1 - PTP_OPT_TX(0x2)
set this bit to enable TX time stamping
bit2 - PTP_OPT_RAW(0x4)
set this bit to use raw time as timestamp
bit3 - TSF_DBG_FS(0x8)
set this bit to add device attriubte 'tsf' for iface
The default value of gtsf_ptp_options is 0xf
Propagated from qcacld-2.0.
Change-Id: Ie53d503bdd2e85790502583a238ee138f4bcf6c6
CRs-Fixed: 2079466
qcacld-2.0 to qcacld-3.0 propagation
The board data file is selected based on the board id returned
by executing otp binary.
Based on the chip id and the board id, select the appropriate
board data file and download.
The board data file selection is as follows:
Mission mode: bdwlan<chip_id>.b<board_id>
Factory mode: utfbd<chip_id>.b<board_id>
If the auto board data files are not present in the filesystem,
then download the default board data file i.e bdwlan<chip_id>.bin
Change-Id: I26c3eb377513d2c4439eddc4e5dc75eba66c78f4
CRs-Fixed: 805800
qcacld-2.0 to qcacld-3.0 propagation
Cleanup target dump code and add support to dump IRAM region
for different platforms. Update the Target Memory Region for
different platforms.
Change-Id: Ie29fb62e0f1bc279311f77400e8be490ccf987a4
CRs-Fixed: 2088394
In function ol_configure_target cap is used uninitialized when call
pld_get_platform_cap fail, although pld_get_bus_type and
hif_get_bus_type return same bus type, so actually it has no issue here,
but it look not clear here, init it explicitly.
Change-Id: I001956521c62c14b3537b399bbca1791b274a4c7
CRs-Fixed: 2115553
Currently cds_alloc_context() & cds_free_context() take a CDS context
parameter. However CDS already maintains its own context, hence this
parameter introduces an unnecessary coupling, so remove it.
Change-Id: I4501a0fea7acc7b4a764b0d425da386922b93bcb
CRs-Fixed: 2109265
When FW support SDIO_REDUCE_TX_COMPL_FW_ACK feature, WLAN host can
enable tx_free_at_download feature to increase efficiency further.
CRs-Fixed: 2078825
Change-Id: I542e51254ca5c0a6c51f7479e0cc1cdb12a077fa
qcacld-2.0 to qcacld-3.0 propagation
Currently for SDIO implementation, tx comp indication is
suppressed and tx_desc is freed when htt download is done.
This leads to invalid tx_desc being referenced when pktlog
indication handler wants to collect TX-ed tx_desc information.
Fix consists of two parts:
1. When pktlog is enabled in ini, enable tx comp indication
handler just like PCIe and USB. tx_desc is still valid when
pktlog indication comes.
2. Check vdev pointer embedded in tx_desc structure. vdev
pointer is set when tx_desc is allocated and set to NULL when
tx_desc is freed. This guards against invalid tx_desc_id
from firmware.
Note that performance drops should be expected when
pktlog is enabled on HL platforms.
Change-Id: Iba9b8323b4a6e2ae17e36768bda3511f52236a2c
CRs-Fixed: 2034996
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
Get tx/rx tsf time for each msdu, and then
time stamp the msdu with the corresponding
host time.
Change-Id: I7af80318b60c28d53e95fbe545e82da4191544b6
CRs-Fixed: 2057693
Gcc 6 introduces some stricter checking for indentation,
causing warnings of misleading-indentation, which are
treated as build errors when drivers are compiled.
Fix all the identation warnings under qcacld-3.0.
Change-Id: Ie197761cfe4334ab14d593adebc56375372ba37c
CRs-Fixed: 2058158
Add below changes to support SSR within SSR,
1.Add new driver state, CDS_DRIVER_STATE_BAD, which will be set
on re-init failure and reset on re-init success and if this
state is set, don't allow any north-bound calls.
2.Don't de-register wiphy/netdev on re-init failure.
3.BUG_ON if re-init or probe fails successively for two times.
4.During driver unload, don't wait for SSR to be completed.
Change-Id: Id05a3e4b592664c9b56c7dd83b965b973f1d5ca5
CRs-Fixed: 2037628
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
Currently in function ol_copy_ramdump dynamically allocated memory
is not freed before return in error condition. In this change free
memory before return.
Change-Id: Ie75d69a1716c3598e0123064a6ee522076748f7d
CRs-Fixed: 2044460
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
qcacld-2.0 to qcacld-3.0 propagation
If data was NULL in fw_entry, fw_entry should be released before return.
Otherwise there will be resource leakage.
Change-Id: I0a72f6bd74f349baf1028aed1f9988b188cda1b6
CRs-fixed: 1111115
qcacld-2.0 to qcacld-3.0 propagation
Crash happens when driver continues to access target register in
ol_target_failure when driver is unloading.
If rmmod happens firstly, do nothing in ol_target_failure in ssr.
If ssr happens firstly, wait for ssr finish in rmmod.
Change-Id: I2a4980b6cd4b689da07c34f2acdfaafbbb0715bb
CRs-Fixed: 2025585
In sdio interface chip, both sdio_data2 and uart_tx pin will use GPIO6.
It is set by fw rom code, which will cause sdio CRC error when there is
sdio transaction. Override uart tx pin to avoid side effect to sdio pin.
Change-Id: Icd268e607c51238dcea7e8e3a55dceb96d5b1c1a
CRs-Fixed: 2019742
Replace policy manager header file include as part of policy manager
moving to host common.
Change-Id: Ie1f9d6675cc373c3325c9e76514f48299932cdda
CRs-Fixed: 2009818
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