提交線圖

296 次程式碼提交

作者 SHA1 備註 日期
Prateek Patil
5d5c769c28 cnss2: include qcom_aoss.h file at correct place
There may be multiple time inclusion of inline definition of the
APIs defined in the header file qcom_aoss.h if config
CONFIG_QCOM_AOSS_QMP is disabled for underlying target.
This may result in linking error. Move the header file to the correct
place in power.c.

Change-Id: I5c79eff3be4c758db1ab313843b36a02ecccbef9
CRs-Fixed: 3603827
2023-09-01 07:02:24 -07:00
Balaji Pothunoori
2f4117dcd2 icnss2: send ICNSS_UEVENT_FW_DOWN uevent instead ICNSS_UEVENT_FW_CRASH
PD restart triggered as part of host based SSR triggered,
this will call PLD shutdown and HDD shutdown.
While processing HDD shutdown host driver check CDS recovering state
and then ASSERT if it is not set.
To Avoid this ASSERT, fix introduced to set CDS recovering by
sending ICNSS_UEVENT_FW_DOWN uevent to Host driver during firmware
crash.

Change-Id: I4f06404b02bb7ce0018b3f8e1e5253e0ba155095
CRs-Fixed: 3595285
2023-08-31 21:46:40 -07:00
Naman Padhiar
e9066ddd35 cnss2: Add SMEM based Secure Peripheral check
Check secure peripheral HW state using SMEM APIs instead of
SCM APIs.

Change-Id: I3e652859189221d3b9d26bd2e71e254edf6843b0
CRs-Fixed: 3601121
2023-08-31 21:46:39 -07:00
Balaji Pothunoori
89f8f5e0b2 icnss2: support to add new flag rproc fw download
Currently wpss_supported variable which helps to download
wlan FW binary using rproc channel and also includes SMP2P
communication between platform and FW.
Currently SMP2P is not required for QCS405 target, Hence
introduced rproc_fw_download to download only wlan FW via rproc.

Change-Id: If230e05fc6098d4ea017d8af74b2b1c7a7afce25
CRs-Fixed: 3596283
2023-08-31 21:46:39 -07:00
Balaji Pothunoori
89ebfe7d2c icnss2: Enable icnss2 module for qcs405 target
This change is to enable icnss2 module for qcs405
target.

Change-Id: I9c7565b44a72145e11178fe360f413ff578142bb
CRs-Fixed: 3551635
2023-08-31 21:46:39 -07:00
Prateek Patil
e44a22665b icnss2: include qcom_aoss.h file at correct place
For bengal target, getting compilation error due to
Change-Id: Ifc5ff95208e79280543471d56fdb0a87ca973cf5, resulting in
multiple time inclusion of inline definition of the APIs defined in
the header file qcom_aoss.h. This is resulting in linking error.
Move the header file to the correct place in power.c.

Change-Id: I5a0f83fa954feb4656af09527c090f8e7d96bab8
CRs-Fixed: 3595936
2023-08-28 21:12:28 -07:00
Reut Zysman
0efc799a87 cnss2: Add securemsm-kernel uapi path
Add securemsm-kernel uapi path to
makefile, since smcinvoke.h is moving.

Change-Id: Ic44f31e2050bfd09400da312250029ab732ff0e1
CRs-Fixed: 3562598
2023-08-10 11:18:15 -07:00
Naman Padhiar
6f7e807fb9 cnss2: Move repetitive logs to cnss-long IPC logs
Move trivial repetitive logs from cnss IPC logs to
cnss-long IPC logs. This will reduce the chances of
losing important logs required for debug.

Change-Id: I9cfe76614603d5fb9b3e5d4a2f062abbb7fa754f
CRs-Fixed: 3580107
2023-08-09 01:01:30 -07:00
Sandeep Singh
87ee900083 icnss2: add blair config files to enable bazel compilation
Add blair config files to enable bazel compilation.

Change-Id: If22e082f51a53f359d760f70bde6d89189e12271
CRs-Fixed: 3578579
2023-08-03 16:28:08 -07:00
Sandeep Singh
dca762d821 cnss2: add support to enable wlan module based on target
Add support to enable wlan module based on target.

Change-Id: I43e6adce83ec0657604a00c953a18bb675f05a8c
CRs-Fixed: 3577272
2023-08-03 00:14:20 -07:00
Prateek Patil
882ac969c2 icnss2: Add support for direct QMP to communicate with AOP
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
2023-07-31 15:17:01 +05:30
gaolez
ac9fb6837b cnss2: Refine the pci power setting log
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
2023-07-24 15:51:36 -07:00
Zhiwei Yang
f0a7661f00 cnss2: Dump event desc history when SSR occurs
Dump hif_event_desc_history and hif_ce_desc_history_buff
when SSR occurs.

Change-Id: I3c115e1d6b35107e4f97f442a51bd50f50bd79ae
CRs-Fixed: 3553092
2023-07-23 17:09:05 -07:00
Naman Padhiar
785ec89f2a cnss2: Add logs to identify request_firmware issue
Add logs to identify request_firmware issue while downloading
files to WLAN FW.

Change-Id: Iff09261513650ff3cd61381453c30616fd9b087a
CRs-Fixed: 3567760
2023-07-22 06:40:28 -07:00
Yu Ouyang
7de707a939 cnss2: Trigger pci link to retrain
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
2023-07-21 13:39:53 -07:00
Naman Padhiar
4561632548 cnss2: Complete power_up event on probe failure
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
2023-07-21 01:16:38 -07:00
Naman Padhiar
1eb85173ef cnss2: Enable debug config only for debug build
Remove CONFIG_CNSS2_DEBUG from GKI config so that debug
config get enabled only for debug builds.

Change-Id: Iebe86b3b3969d7de5d5f65c372f7e6d6aa7aa126
CRs-Fixed: 3565145
2023-07-19 23:14:24 +05:30
Naman Padhiar
c4bc8cea33 cnss2: Add PCI link info to Host Cap QMI message
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
2023-07-14 03:57:54 -07:00
Naman Padhiar
3e85d50d6d cnss2: Correctly check for WCNSS_MEM_PRE_ALLOC macro
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
2023-07-12 15:39:07 -07:00
Naman Padhiar
c727c5eab9 cnss2: Resume PCI bus before reading registers
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
2023-07-11 06:52:00 -07:00
Li Feng
4a3ea46b17 cnss2: Set irq vector affinity to CPU0 with VT-d disabled
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
2023-07-11 06:52:00 -07:00
Sandeep Singh
495980e3ab icnss2: use platform_get_irq api to get irq for wcn6750/wcn6450 target
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
2023-07-07 11:25:15 -07:00
Naman Padhiar
4d274cd5af cnss2: Download QDSS config file based on build type
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
2023-07-07 11:25:15 -07:00
Lin Bai
02c2d4f750 cnss2: Provide platform name if it is required
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
2023-07-05 17:19:30 -07:00
Naman Padhiar
bdd3c6bf67 cnss2: Send QMI message to download TME-L patch
Send QMI message with TME-L patch information to WLAN FW, to
download TME-L patch.

Change-Id: Ieae07c0f761ada45ffcb990b1412654b9c6862b1
CRs-Fixed: 3521187
2023-07-03 09:34:38 -07:00
Alan Chen
2ec2768bfc cnss2: Make changes to support WLAN DDK for all modules
To be in line with upstream changes on bazel, create separate defconfig
files for each module instead.

Change-Id: Ic2c24f8d8c207b51a0a5b4b9d1088601bc91765c
CRs-Fixed: 3539620
2023-06-30 15:26:33 -07:00
Sandeep Singh
c07270aa95 icnss2: use platform_get_irq api to get irq for adrastea target
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
2023-06-17 23:31:14 -07:00
Sandeep Singh
c5b4320df3 icnss2: pass fw capability to wlan host driver
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
2023-06-16 21:29:31 -07:00
Dundi Raviteja
0168d637ed icnss2: Ignore FW ready timeout if AON is not up
Ignore FW ready timeout if AON is not up.

Change-Id: I77ae832e8d5c2fceb5228ff5554375fa3e6ecb08
CRs-Fixed: 3519857
2023-06-15 16:31:35 -07:00
Jeff Johnson
9b33792f8b cnss2: Enable Bazel DDK build
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
2023-06-14 22:02:19 -07:00
Dundi Raviteja
2f882a1189 icnss2: complete AON completion event gracefully
In some error cases AON completion event can be in wait
state, so complete it gracefully.

Change-Id: I98df398a74e00b9adc3c8d0cf7abcd48b66def1c
CRs-Fixed: 3527640
2023-06-14 22:02:18 -07:00
Sandeep Singh
8ddac0b648 icnss2: return ENOSYS from smmu fault handler callback
Return -ENOSYS from smmu fault handler callback as iommu
driver requires -ENOSYS return value to print debug info.

Change-Id: Id395269542d40137323d413f20da67dc715efa2d
CRs-Fixed: 3513019
2023-06-14 21:47:36 -07:00
Dundi Raviteja
0fcf684c10 icnss2: Unregister AON event notifier
Unregister AON event notifier.

Change-Id: Ic247f7dc1a2672ccca54dac0dbef1d8dbec22fb1
CRs-Fixed: 3522232
2023-06-11 02:53:45 -07:00
Shailendra Singh
6ce40d5c60 cnss2: Update time sync period based on tsf sync start/stop
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
2023-06-07 11:12:47 -07:00
Naman Padhiar
b1be304dfc cnss_utils: Wait for initialization of daemon config
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
2023-06-06 15:19:09 +05:30
Sandeep Singh
1551c1bbe3 cnss_utils: Add qmi paratmeter in cap resp to get HW capabilities
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
2023-06-05 18:22:41 -07:00
Naman Padhiar
1f5d4ad661 cnss2: Get PM Runtime reference before RDDM trigger
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
2023-06-02 16:51:28 -07:00
Chaoli Zhou
7cd9a66ccc cnss2: Change log level for non-critical cases
Change log level from cnss_pr_err to cnss_pr_vdbg for
some non-critial cases.

Change-Id: I66b16afe5327bab77d52a1ba1b5d72fb88c71715
CRs-Fixed: 3509919
2023-06-01 18:16:16 -07:00
Dundi Raviteja
de80f12c97 icnss2: Handle AON ready event
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
2023-05-31 20:52:34 +05:30
Dundi Raviteja
401152234c icnss2: Move AON code under a macro
Move AON related code under a macro to make it as config.

Change-Id: I52b35aa8eb06556934250e7347d8d851d29964a6
CRs-Fixed: 3512075
2023-05-31 20:24:14 +05:30
Gangadhar Kavalastramath
5eaf0073cc cnss2: Downgrade RC speed to Gen1 for Genoa EP
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
2023-05-25 19:54:57 -07:00
Alan Chen
f4e0145655 cnss2: Add AUX UC download functionality
Add support for AUX UC download functionality if aux support is
indicated by both host and fw.

Change-Id: I3bfbebbb5cdfbbaa350a34378ab2f0809f27affb
CRs-Fixed: 3402104
2023-05-25 19:54:56 -07:00
Sandeep Singh
afc7a80790 cnss_prealloc: check cnss_pools before returning memory
Check cnss_pools before returning memory to wlan
host driver.

Change-Id: I44e2a34b3c232e08e7e1d4bdb567cd4de09f3eb1
CRs-Fixed: 3506939
2023-05-23 16:04:31 +05:30
Sandeep Singh
c32955295b cnss2: move reboot notifier registration after initializing completion
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
2023-05-22 15:02:57 -07:00
Jeff Johnson
6b432e8d56 cnss_prealloc: Update DDK for cnss_prealloc dependencies
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
2023-05-20 22:20:39 -07:00
Nirav Shah
ac734e4b27 cnss2: Reduce cnss logs as part of QDSS logging
Reduce cnss logs as part of QDSS logging

Change-Id: I851146c482253d8776b762c1d27ffb0f7bc62157
CRs-Fixed: 3499978
2023-05-18 18:53:15 -07:00
Nirav Shah
1e15d131ea cnss2: Add support to configure log level
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
2023-05-19 07:21:53 +05:30
Naman Padhiar
6506428355 cnss_prealloc: Update memory pool table for WCN6750
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
2023-05-13 19:27:51 -07:00
Rajesh Chauhan
90e0212ecc cnss2: Add support for direct QMP to communicate with AOP
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
2023-05-11 18:02:05 -07:00
Sandeep Singh
ff9d11362f cnss_prealloc: add wrapper APIs if MEM_PRE_ALLOC flag not enabled
Add wrapper api to avoid compilaton failure if
CONFIG_WCNSS_MEM_PRE_ALLOC flag is not enabled.

Change-Id: Ic0625d68f587c79f38f33495b53645f1d7582144
CRs-Fixed: 3492092
2023-05-11 15:36:42 -07:00