Add support for direct QMP to communicate with AOP. There
are two ways to communicate with AOP: mailbox, and direct
QMP, Based on property set in the device tree use either
direct QMP or mailbox to send messages to AOP.
Change-Id: Iae8302fd2e40181a192a2c9afaebdb807b7cf1c3
CRs-Fixed: 3571108
In current implementation, the error log not record the
return value of setting pci power function, with this return
value we can know the reason of why setting pci power failed.
Change-Id: Icf1fdba16faf539334704ca1f8ce24fecd49aa94
When feature CNSS2_CONDITIONAL_POWEROFF enabled, wlan chip HST and
HSP will not power off in cnss probe. PCI link will not be triggered
to retrain once CNSS2_ENUM_WITH_LOW_SPEED enabled.
So, add API cnss_pci_link_retrain_trigger() to trigger pci link retrain
when HST and HSP not power off.
Change-Id: I2ba44837a03b09b1ef3cd0c23a780b89ff837740
CRs-Fixed: 3491396
Complete power_up event on probe failure to avoid timeout while
waiting for this event during unregister of host driver.
Change-Id: Ie262305ef960ab40cd38b4a695d409eb36fcf0d7
CRs-Fixed: 3565756
Remove CONFIG_CNSS2_DEBUG from GKI config so that debug
config get enabled only for debug builds.
Change-Id: Iebe86b3b3969d7de5d5f65c372f7e6d6aa7aa126
CRs-Fixed: 3565145
PCI link info contains maximum link speed and link width
supported by platform. WLAN FW will use supported link
speed to restrict link speed switch upto maximum
supported speed.
Change-Id: Icdf54c8729192faf4966514b57bd826f86652065
CRs-Fixed: 3535790
After CNSS2 switched to Bazel based compilation, conditional
compilation macros became same as configs and are enabled
directly from defconfig. Fix macro check in the code for
both 'y' or 'm' to enable code based on the that.
Change-Id: I12ca87c851a7b47af0255716ce1b9f59ad2eb70a
CRs-Fixed: 3553530
In some scenarios, during force FW assert,
cnss_pci_pm_runtime_get_sync might not resume bus.
Make sure PCI bus is resume before accessing.
Change-Id: Ic5c17c3385318dbc739358ac7ccdb148aed1052a
CRs-Fixed: 3540601
With VT-d disabled on x86 platform, only one pci irq vector is allocated.
Due to the irq is not freed when suspend, the kernel will migrate irq to
CPU0 if it was affine to other CPU and then allocate a new MSI vector,
which cause the issue about no irq handler for vector once resume since
the driver only configure MSI data once during driver loading.
The fix is to set irq vector affinity to CPU0 before calling request_irq
to avoid the irq migration.
Change-Id: Id366e33113089f50899eb3631db66dcde0999d84
CRs-Fixed: 3550165
Use platform_get_irq api to get irq for wcn6750/wcn6450 target
instead of platform_get_resource as in 6.1 kernel implemetation
of platform_get_resource has changed.
Change-Id: Iaef73896dd0db08df3d29f4377c60b57394f3517
CRs-Fixed: 3536604
Add build type string to file name. "qdss_trace_config_debug_v<n>.cfg"
for debug build and "qdss_trace_config_perf_v<n>.cfg" for perf build.
Change-Id: I349a6524c7040d88d69ac329604ade9b9ba07318
CRs-Fixed: 3548322
Provide platform name in host_cap message if
property platform-name-required specified in DTS.
Current platform name is same as device's model name.
Change-id: I8d427602bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3540641
Send QMI message with TME-L patch information to WLAN FW, to
download TME-L patch.
Change-Id: Ieae07c0f761ada45ffcb990b1412654b9c6862b1
CRs-Fixed: 3521187
To be in line with upstream changes on bazel, create separate defconfig
files for each module instead.
Change-Id: Ic2c24f8d8c207b51a0a5b4b9d1088601bc91765c
CRs-Fixed: 3539620
Use platform_get_irq api to get irq for adrastea target instead
of platform_get_resource as in 6.1 kernel implemetation of
platform_get_resource has changed.
Change-Id: Ia4fae607bd98b68554588cfb318e074d516bb1ff
CRs-Fixed: 3533543
Pass he_channel_width_cap, phy_qam_cap and rd_card_chain_cap
to wlan host driver as part of soc info.
Change-Id: I471de0df5452c960662955aad20cf1b1f6c8845e
CRs-Fixed: 3533554
Change-Id Ied2aae354aaea8a038461f6c74f26fe4f362a05a ("cnss2: Support
the Bazel DDK") introduced the logic to transition to Bazel. Now
update Android.mk to enable that functionality.
Also enable build of cnss_utils.
Change-Id: I5b0702070d2f169d486c4526676543009b3a9487
CRs-Fixed: 3478984
In some error cases AON completion event can be in wait
state, so complete it gracefully.
Change-Id: I98df398a74e00b9adc3c8d0cf7abcd48b66def1c
CRs-Fixed: 3527640
Add cnss_update_time_sync_period and cnss_reset_time_sync_period to
update time sync period vote sent from wlan driver based on use-case.
CNSS driver stores both wlan driver and sys config time sync period
value and will apply the minimum value of all votes.
Change-Id: I46ad2866bd70aefe121c8a68a9c869e75ffd8345
CRs-Fixed: 3502060
There is scenario where cnss-daemon is got connected with
cnss-plat-ipc module but message to initialize daemon
config is not yet received from cnss-daemon. At the same
time cnss2 module checks for DMS support in daemon config
which is not yet initialized. As use-nv-mac is set from DTSI,
DMS support must be enabled. Since it is not found enabled,
cnss2 asserts.
To fix this, along with cnss-daemon connection check also
wait for message from cnss-daemon which initializes daemon
config.
Change-Id: I2579e7e9040c0ea7286c265488e2050652c5cc21
CRs-Fixed: 3517692
Add qmi paratmeters in qmi target capability response to
get PHY QAM and PHY HE Channel width capability from
wlan fw.
Change-Id: Ib69afa7e09f96ddd2e9aa888c7209e78e058da5e
CRs-Fixed: 3516405
Host triggered force assert can be called asynchronous.
As part of force assert, CNSS dumps few MHI registers and
trigger RDDM asynchronously. There are chances of race between
force assert and runtime suspend.
To fix that take runtime get reference before MHI operations and
runtime put later.
Change-Id: Icef23910587ff280270bdd7c60ad8eba392822e9
CRs-Fixed: 3464127
During cold boot AON sends multiple DOWN and UP notifications
as part of its FW update. ICNSS driver should not initiate
any QMI handshakes and should wait till correct FW is flashed.
After successfully flashing correct FW, AON will send ready event.
Once AON ready event receives ICNSS driver sets AON ready bit and
proceeds with QMI handshakes.
Similarly in AON SSR, this change handles UP notification only if
AON ready bit is set.
Change-Id: I326d731cd3f619cef9fa8c072a1e898f4b21a6ce
CRs-Fixed: 3491699
Some platform PCIe RC impedance can't achieve the target defined in spec.
It will result to Genoa card link down. To WA the issue, downgrade RC speed
to Gen1 for auto Genoa EP. Because the linkdown issue may happen during
enum, and before enumunation we do not know EP device ID, so set init
speed to Gen1, and then restore speed to default for others wifi chip.
The change does not affect Genoa throughput, because Gen1 speed is enough
for Genoa.
Change-Id: Iffdbf8b98a82c200faf11edcdd180213366ed6ca
CRs-Fixed: 3479848
Add support for AUX UC download functionality if aux support is
indicated by both host and fw.
Change-Id: I3bfbebbb5cdfbbaa350a34378ab2f0809f27affb
CRs-Fixed: 3402104
Currently, power_up_complete and cal_complete are getting initialized
after registering for cnss reboot notifier and in cnss reboot
notifier callback we are completing power_up_complete and cal_complete.
In certain cases cnss_reboot_notifier cb getting called before
power_up_complete and cal_complete are getting initialized which
is leading to crash. To avoid these crashes move reboot notifier
registration after initializing completion variables.
Change-Id: Iaf9e925489f4faea621ea40836dcd7330c7b98d2
CRs-Fixed: 3503651
Commit 97303bf330 ("cnss_prealloc: update prealloc mem pool based on
device type") introduced several new dependencies:
- cnss_prealloc has a dependency upon a new header file
cnss_utils/cnss_common.h
- cnss2 has a dependency upon cnss_prealloc
- icnss2 has a dependency upon cnss_prealloc
- icnss2 has dependency upon cnss_utils and wlan_firmware_service
Add those dependencies to the DDK build rules.
Also add CNSS_OUT_OF_TREE config in icnss2/Kconfig file.
Change-Id: If00eb7623cffb82e02ed0f8001254082f2a19b93
CRs-Fixed: 3495407
Add support to configure log level for dmesg and
ipc logging. Default log level is set to DEBUG
for ipc logging and INFO for dmesg logging.
Change default behavior of cnss_pr_dbg and
cnss_pr_vdbg API to not print in dmesg.
Change-Id: I6bb9d0bd297be20e66f563c16bb2f3f9d39d2be6
CRs-Fixed: 3499975
The memory pool table decides number of reserved pools
needs to be preallocated during initialization. Update
the table for WCN6750.
Change-Id: I8679c574977026c9bb894e40384b74110d2c8ebd
CRs-Fixed: 3493255
Add support for direct QMP to communicate with AOP. There
are two ways to communicate with AOP: mailbox, and direct
QMP. Based on property set in the device tree use either
direct QMP or mailbox to send messages to AOP.
Change-Id: I9fc24f8a483abb3084cda4d85acf2d53e43d9ad8
CRs-Fixed: 3488507
Add wrapper api to avoid compilaton failure if
CONFIG_WCNSS_MEM_PRE_ALLOC flag is not enabled.
Change-Id: Ic0625d68f587c79f38f33495b53645f1d7582144
CRs-Fixed: 3492092
MHI INIT called during host driver registration leads to MHI state
mismatch because MHI is already in INIT state due to power up of
device as part of ongoing self recovery.
To fix this issue, avoid powering up device during recovery if host
driver is not registered. Device would be powered up later during
host driver registration.
Change-Id: I534dfc0e389ba97a6e2c4869d42be5ecff9609b3
CRs-Fixed: 3476947
Read MSI-X address from device tree file and initialize
MSI-X address and data to support MSI-X interrupts.
Change-Id: I7cc43ca4d3e4c937f09facf12dd02437ddc2e039
CRs-Fixed: 3488821
Android builds are transitioning to using Bazel for builds, and there
is a Driver Development Kit (DDK) which out-of-tree drivers must use
in this new scheme. Introduce the infrastructure to describe the wlan
platform driver modules using the DDK.
Change-Id: Ied2aae354aaea8a038461f6c74f26fe4f362a05a
CRs-Fixed: 3449426
Cnss prealloc is trying to allocate memory from mempool
for wlan host driver even after cnss prealloc pool has been
destroyed by platform driver because mempool and cache is
not cleaned up on cnss pool deinit. Clean up mempool and
cache on prealloc deinit.
Change-Id: If28a27f5a21441e8650bb846ded889a33580ceaf
CRs-Fixed: 3488178
Notify WLAN driver of system reboot to avoid state
mismatch between cnss driver and WLAN driver.
Change-Id: I03e867484ee450c796c0dfabac7ed550a1d0337c
CRs-Fixed: 3467387
API cnss_send_buffer_to_afcmem pass AFC data from driver to target
which is not changed in platform driver, and it is pass-through byte
stream for platform driver.
Change the AFC data pointer in API from char* to const uint8_t*.
Change-Id: Ib492dbcf028776858926d8a3e11edc528566fac1
CRs-Fixed: 3478093
Missing respectivie reserved memory region for wlan
device during cnss probe phase is not a critical
case, so change the log level to avoid confusion.
Change-Id: I629fd94ab8f20176a0c3854b0b1d8f6f53b1b407
CRs-Fixed: 3472865