نمودار کامیت

179 کامیت‌ها

مولف SHA1 پیام تاریخ
Dundi Raviteja
d2bd912107 icnss2: Register for co-processor subsystem notifier
WLAN RFA is present on another co-processor subsystem.
Any error fatal in co-processor subsystem will result in
WLAN reset.

In order to make sure that rf clock/rails are up before
accessing WLAN hardware, ICNSS platform driver needs to
register with co-processor SSR notification and wait for
POWER_UP event before starting QMI handshake.

Change-Id: Idf65e508a09d93e481349afc73de4804c7841111
2023-01-17 23:00:20 -08:00
Yu Wang
4d71059d9b cnss: store PCSS recovery config and send upon receiving fw ready
Keep PCSS recovery config as persistent during the whole
lifetime of cnss driver, and send it to WLAN firmware
service upon receiving firmware ready event.

Change-Id: Iec6c35c82750df3f8fd43723d102bcabfb539874
CRs-Fixed: 3378798
2023-01-13 06:12:59 -08:00
Naman Padhiar
b0d6e583c7 icnss2: Send ICNSS_SMMU_FAULT uevent to host driver
On detection of SMMU fault, platform driver send
SMMU_FAULT and FW_DOWN event to Host driver.

Change-Id: I623522231b5ee7ab0b03b8c1b25993395b7f3a2d
2023-01-12 07:35:10 -08:00
Yeshwanth Sriram Guntuka
a1b93f1d72 cnss2: Use IOMMU_CACHE flag for audio smmu mappings
WLAN IOMMU mappings have cached attribute set whereas
ADSP IOMMU mappings do not have cached attribute set.
This is resulting in an inconsistent memory view between
ADSP SS and WLAN SS. ADSP writes to a DDR location and
WLAN HW reads from the same location but since access is
cached from WLAN side, there is a possibility of reading
incorrect values.

Fix is to use IOMMU_CACHE flag for audio smmu mappings.

Change-Id: Ife97bee34bc8224fd2d0d2bb45b606efeea5aa53
CRs-Fixed: 3375521
2023-01-11 14:55:12 +05:30
Alan Chen
f12f76a73f cnss2: Create new driver ops for SSR Dump Collection
Create new driver ops for SSR Dump Collection.

Change-Id: I26b429ee3eba9e4d3125c0b9650c0801771816f2
CRs-Fixed: 3352309
2023-01-07 03:02:59 -08:00
Nijun Gong
b15f3ce9fe cnss2: Use external configurations
Add option to select configurations from other places
such as yocto recipe.

Change-Id: I9ce971f3548d65630642f0b467515090f10f1480
2023-01-05 12:31:47 -08:00
CNSS_WLAN Service
3c022af5f9 Merge "cnss2: treat no wlan regulator as no error" into wlan-platform.lnx.1.0 2023-01-05 07:21:36 -08:00
Nijun Gong
d173765b26 cnss2: treat no wlan regulator as no error
If device tree doesn't configure any regulators for
device, means this device doesn't need extra regulator.
This case shall not be treated as an error.

Return a positive value for this case to allow caller to
make proper choice.

Change-Id: I7ead81b3915d16f966f94c9d916e0d67bc04fda0
CRs-Fixed: 3355141
2023-01-05 13:22:01 +08:00
Surabhi Vishnoi
075cc964ce icnss2: Send rf_subtype to firmware via QMI command
Send rf_subtype based on dt node "qcom, rf_subtype" to
firmware using QMI_WLFW_WLAN_HW_INIT_CFG message after
qmi server arrive. Firmware will initialize different
halphy code based on rf_subtype sent by host.
Currently, this change will be applicable only for
adreastea targets which can have either slate RF or Apache
RF attached.

Change-Id: Iba327d0c221104a4ebb55a72d42e1a4b8dcb66c3
2023-01-05 10:28:42 +05:30
Alan Chen
ef9321c23d icnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()
Add a data length validation check in fw response message in
qdss_data_send_sync().

Change-Id: I750f46549bc914698baaf4e24f1710536ca8e356
CRs-Fixed: 3366343
2022-12-29 16:41:24 -08:00
Nijun Gong
1f53dc0696 cnss2: make sure wlan_en is low when power up
Some auto HW can't guarantee wlan_en low state when powerup.
Add a macro to enable initializing wlan_en state.

Change-Id: I6755bcd49c78f7bb9931f80cb385e62177ebe603
CRs-Fixed: 3355148
2022-12-26 17:47:35 +08:00
Geetha Jaya Sri Bandla
7e956ba94e cnss2: Add support for qca6174
Added below mentioned changes to support qca6174 in cnss2 driver.
1.    While resuming pci link, restore the pci config space before
     enabling pci device.
2.    Add 10ms delay between wlan_en become active and pcie reset
     de-assert.
3.    For wlan chipsets which don't support cold boot calibration,
     schedule Wlan driver load in cnss_cold_boot_cal_start_hdlr.

Change-Id: I28435896314783353db5dd830051df9467be6585
CRs-Fixed: 3359223
2022-12-26 17:39:43 +08:00
Sandeep Singh
219c37b87e platform: Add sanity change for fw memory size
Icnss and cnss2 driver receives and sends memory size
over qmi to and from wlan fw. This change add maximum
memory size check before sending or receiving fw mem size
over qmi. Also, use QMI_WLFW_MAX_NUM_MEM_SEG_V01 enum as
maximum size limit.

Change-Id: I392bfbbf0359e60bce9e93d909a119e8c72f07d5
CRs-Fixed: 3367408
2022-12-23 14:11:24 -08:00
Sai Kumar Kunchala
b1788474b3 cnss2: Add NULL check for 'dev' pointer
Add NULL check for 'dev' pointer before passing to
cnss_bus_dev_to_plat_priv function.

Change-Id: I8ab93a71219638e4b66d3b9fdcb164e052385129
CRs-Fixed: 3364740
2022-12-21 20:47:34 -08:00
Sai Kumar Kunchala
1def1b7402 cnss2: Add NULL check for 'dev' pointer
Add NULL check for 'dev' pointer before passing to
cnss_bus_dev_to_plat_priv function.

Change-Id: I319a9859c41d7e8096b3a4457f4a831e0e93f7ab
CRs-Fixed: 3360223
2022-12-18 20:36:49 -08:00
Naman Padhiar
f61b9298a1 cnss2: Validate maximum number of memory segments
For WIN use case maximum number of memory segments requested
by FW is increased to 52 in QMI layer. Since CNSS2 driver uses
same QMI header files and message structures the same maximum
number of segment is applicable for CNSS2. It means for memory
allocation, FW can request 52 memory segments to CNSS2 via QMI
indication but local CNSS2 variable which get segment info from
indication supports maximum 32 segments.
To fix it, change CNSS2 array variable size to same as number of
maximum segment supported in QMI layer.

Change-Id: I661b55b53cb31327da12f064d0a516884159eb5b
CRs-Fixed: 3355665
2022-12-16 20:26:38 -08:00
Alan Chen
4def39b409 cnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()
Add a data length validation check in fw response message in
qdss_data_send_sync().

Change-Id: I197b8d52c06e35f5fcf0f8fee94429fdcf500fcb
CRs-Fixed: 3359589
2022-12-16 20:26:37 -08:00
Rajesh Chauhan
ecb024f0d1 icnss2: Fix build issue when strict-prototypes is enabled
When strict-prototypes and format-insufficient-args are
enabled then icnss2 fails to build. Change prototype of
icnss_get_plat_priv() and remove extra arg from error log
in icnss_wlfw_wlan_mac_req_send_sync().

Change-Id: I81c7d90fa24b05d573a9ce47c0301d2798118182
CRs-Fixed: 3359853
2022-12-13 19:36:36 -08:00
Naman Padhiar
6660ad60be cnss2: Add support for Audio IOMMU map and unmap
Add support for IOMMU map and unmap of WLAN memory
regions into Audio SMMU for direct link usecases.

Change-Id: Ic136b1e5ac22641b6612ab5285452273233fcaea
2022-12-10 08:30:32 +05:30
Alan Chen
7e8d314913 cnss2: Include smcinvoke.h from include/linux path
smcinvoke.h header file is moved to include/linux for pineapple target.
Hence, include smcinvoke.h from include/linux path.

Change-Id: Iec5622b09f8dd6536f5b9c8f81c46320731ba630
CRs-Fixed: 3354727
2022-12-07 14:34:29 -08:00
chunquan
a7f6cb0389 cnss2: Free m3 blob memory once driver probed
Free m3 blob memory after driver probed.

Change-Id: I10803eae60f2308b3a024877cdb7c446f3d33802
CRs-Fixed: 3321438
2022-12-01 14:07:57 +08:00
Naman Padhiar
42fee6ecad cnss2: Add API to send WFC mode to WLAN FW
Add and export API to host driver to send WFC(WiFi Calling)
mode to WLAN FW.

Change-Id: I92d3d0baad9afc6fdf66f66b847a4e8a90a54341
CRs-Fixed: 3346550
2022-11-26 14:01:00 -08:00
Naman Padhiar
35fdadc9a2 cnss2: Avoid shadow register dump in RDDM mode
Before CNSS2 triggers RDDM mode in device it collects shadow
register dump in a global variable. Now when device moves to
RDDM, shadow registers will be reset. Reading shadow registers
in RDDM mode will override previously read correct values with
reset values. To avoid it, do not dump shadow register in RDDM
mode.

Change-Id: I470208be7e38bc9291932a7acfbaf07d87d46651
2022-11-26 11:53:00 -08:00
Naman Padhiar
69cf56c2cf cnss2: Dump PBL logging registers on RDDM timeout
Dump PBL and SBL logging registers to debug RDDM failure.

Change-Id: I9225e95c529a928e6e6f9e4528dadbe7237440b3
2022-11-26 11:52:59 -08:00
Rajesh Chauhan
8d75ecdd2d cnss2: Setup GPIOs for interrupt wakeup capable
Setup GPIOs for interrupt wakeup capable by calling
msm_gpio_mpm_wake_set() for such GPIOs.

Change-Id: I8a6e35b6e5ab49c569bfcb0a96c5361072cbe458
CRs-Fixed: 3345066
2022-11-23 21:25:51 -08:00
Vijay Raj
722aaf5581 wlan_platform: Add CLD80211_ATTR_IFINDEX to send interface index
Add CLD80211_ATTR_IFINDEX attribute to send interface index
in order to overcome duplicate logs for STA+STA case

Change-Id: Iba2a5d59b2e3a444844510afa2f17140244507d7
CRs-Fixed: 3340768
2022-11-23 13:54:50 -08:00
Rajesh Chauhan
3ea3cda16f cnss2: Add support for additional regulators
Add support for regulators: 1.2V IO, and Antenna sharing
to enable those based on entries in device tree file.

Change-Id: I362f0251ff3923c725f0e2a62922a35149bef3b9
CRs-Fixed: 3338737
2022-11-21 01:12:12 -08:00
Tiger Yu
e6f30383bf cnss2: Do not notify mhi about pcie link down for QCA6174
Do not invoke the mhi_control_error to notify the pcie link down event
for QCA6174 to avoid NULL pointer access.

Change-Id: I2c899ab51117aef2f9474e83217229b211eb4759
CRs-Fixed: 3335555
2022-11-18 06:52:12 -08:00
Naman Padhiar
2fd60f792b cnss2: Add API to get FW supported capabilities
Add and export API to check whether FW capabilities like
DIRECT_LINK, etc are supported by FW or not.
Update WLAN Firmware Service QMI file as per latest IDL file.

Change-Id: Ic33104ec55e18845b8c33ff611d1ecc15ec5cd77
CRs-Fixed: 3335259
2022-11-12 17:29:28 -08:00
Sandeep Singh
414f0dcf64 icnss2: pass fw build id in soc info to wlan host driver
Pass fw build id as part of  soc info to wlan host driver.

Change-Id: I6a8bced678ada0f88e744b5fd3f2ed58fa4173ef
CRs-Fixed: 3324963
2022-11-10 12:56:04 -08:00
Yu Wang
44ad9ad95f cnss_prealloc: Add null pointer check before accessing memory pool
Pointer for memory pool may be null if it fails to
create memory pool in cnss_pool_init().
Add null pointer check before accessing memory pool.

Change-Id: I8ae2b6a5193cffdcba3990b238178a1b93297925
CRs-Fixed: 3332360
2022-11-10 07:26:47 -08:00
Lin Bai
39a9deb49b cnss2: Only send host IOVA range to firmware when SMMU enabled
Only when SMMU S1 enabled, CNSS driver will send IOVA range in
HOST_CAP message, and let firmware to configure ATU.

Change-Id: Idd19063da975c0105d91e0e31575d0b0d1edd8e2
CRs-Fixed: 2896035
2022-11-08 22:04:29 -08:00
Will Huang
6dcd57f602 cnss2: Add support for handling AFC memory request from FW
Add APIs for handling AFC memory request from FW:
cnss_send_buffer_to_afcmem() and cnss_reset_afcmem().

cnss_send_buffer_to_afcmem() will be called if receive valid AFC
response data, cnss_reset_afcmem() will be called if receive
invalid AFC response data. After memory copy done, another WMI
command will indicate FW ready to read.

Change-Id: I34b9add3d7721d778e5474d9b11ad64adb4f04f0
CRs-Fixed: 3223607
2022-11-06 19:34:15 -08:00
Lin Bai
bf7a19829c cnss2: Print the bandwidth level voted to IPC log
This refine commit 418727f314 ("cnss2: Print the bandwidth level voted"),
to avoid too many vote log in dmesg during traffic test.

Change-Id: Ia260a84bcdb3e5154376471519340db1b5907ce4
CRs-Fixed: 3273973
2022-11-02 23:34:06 -07:00
Sandeep Singh
04ddb614e4 cnss2: Use ol cpr to update retention voltage of aop regulator
Use ol cpr to update retention voltage of aop regulator
for qca6490 chipsets.

Change-Id: Ic67ca32964bd89fb940be069ec9468d97bbec68d
CRs-Fixed: 3326028
2022-11-01 20:44:08 +05:30
Sandeep Singh
866685439c cnss2: Add RC_EP_ULTRASHORT_CHANNEL in cnss feature list
Add RC_EP_ULTRASHORT_CHANNEL in cnss feature if it
is enabled in dtsi and indicate it to wlan fw.

Change-Id: Ic70c4b1b2dd637f11c2e2b281521f2094a9a2fe9
CRs-Fixed: 3323608
2022-10-29 14:43:29 -07:00
Sandeep Singh
8690fc3697 cnss_utils: Add RC_EP_ULTRASHORT_CHANNEL in cnss feature enum
Add RC_EP_ULTRASHORT_CHANNEL parameter in cnss feature
to indicate wlan fw whether root complex and end point
has ultrashort length or not.

Change-Id: I96ce5eb0954e20f7aed4ecbcecdbcde617988791
CRs-Fixed: 3323600
2022-10-29 14:43:28 -07:00
Naman Padhiar
fb716dd278 cnss2: Unregister host driver during PCI remove
CNSS2 registers as both platform and PCI driver. PCI
device can be removed via sysfs exposed by kernel during
PCI device creation. When PCI device gets removed, CNSS
PCI remove ops gets called. In cnss_pci_remove, unregister
host driver and shutdown WLAN chip to cleanly remove PCI
device.

Change-Id: Ia60e8b69bda2b3bdd5990cb83f47c082d6667283
CRs-Fixed: 3308910
2022-10-28 17:57:29 -07:00
Bing Sun
bb44300a42 cnss2: get msi_data again after request_irq is called
The reservation mode of interrupts in kernel assigns a dummy vector
when the interrupt is allocated and assigns a real vector when the
request_irq is called. The reservation mode helps to ease vector
pressure when devices with a large amount of queues/interrupts
are initialized, but only a minimal subset of those queues/interrupts
is actually used.
So on reservation mode, the msi_data may change after request_irq
is called, so reads msi_data again after mhi request_irq is called,
and then the correct msi_data is programmed into hardware components.
Without this change, spurious interrupt occurs in case of one MSI
vector.

Change-Id: I41070987798835f8fa95304fce3b964bbd77b31d
CRs-Fixed: 3313984
2022-10-25 17:52:49 -07:00
Bing Sun
7418239f92 cnss2: Add force one MSI field for quirk
Add new bit FORCE_ONE_MSI for quirk to force one MSI configure

Change-Id: I5053a0f95619ee75aad8a4c3f413affc0f9af3f5
CRs-Fixed: 3313980
2022-10-25 10:08:13 -07:00
Bing Sun
fe37b559b9 cnss2: Add one MSI vector support
Some platforms can't meet the number of MSI interrupt vectors that
wlan driver requires.
Add one MSI interrupt vector support.
If CONFIG_ONE_MSI_VECTOR is not defined, wlan driver fails to load
if reuired MSI vector allocation fails. It is current behavior.
If CONFIG_ONE_MSI_VECTOR is defined, firstly it will allocate multiple
MSI vectors based on MSI config. If MSI vector allocation fails, it
fallbacks to one MSI vector automatically.

Change-Id: I813f7ddf678ecf405e573f3bc72af3e758d1c96d
CRs-Fixed: 3312670
2022-10-25 10:08:12 -07:00
Alan Chen
e3b36fcd46 cnss_prealloc: Update preallocation pool entries
Update pre allocation pool entries as below:

8kb: 22 -> 16
16kb: 16 -> 16
32kb: 6 -> 22
64kb: 8 -> 38
128kb: 2 -> 10

Change-Id: I2ba69d7332447229f0ad2907dd380f663a8a3fd8
CRs-Fixed: 3306034
2022-10-25 00:22:10 -07:00
Wade Song
99580edb00 cnss2: Remove function cnss_pm_notify
To protect firmware download not be processed when system goes into
suspend, before we add semaphore cnss_pm_sem in cnss driver.
Function cnss_pm_notify, PM_POST_SUSPEND may be got before
PM_SUSPEND_PREPARE. Once it happens, the count of cnss_pm_sem will
be abnormal.

And, ROME firmware download is in qcacld driver. Not in cnss driver.

So, remove function cnss_pm_notify, and the export symbol cnss_lock_pm_sem
and cnss_release_pm_sem. Move the protection to qcacld driver. In qcacld
driver, use wakeup source to protect ROME firmware download.

Change-Id: I7768fdbeb1fa8cd6ef3b260eb0aafb231aeed324
CRs-Fixed: 3294347
2022-10-24 18:57:14 -07:00
Wade Song
6d69e079af cnss2: Fix a typo in a parameter type
There is a typo in the parameter list of function
cnss_aop_set_vreg_param's declaration, and that is causing
a compilation error when CONFIG_MSM_QMP is not defined on
certain platforms.

Fix the compilation error by changing the 3rd parameter's
type from 'cnss_aop_tcs_seq_pram' to 'cnss_aop_tcs_seq_param'.

Change-Id: Iccb832e1d841a82db3df42c93ef8ed8367a93d26
CRs-Fixed: 3314506
2022-10-17 21:23:30 -07:00
Rajesh Chauhan
48cfe543c6 cnss_prealloc: add new functions to store cache at beginning of memory
CNSS prealloc maintains various prealloc pools of 8Kb, 16Kb, 32Kb
and so on, and allocates buffer from the pool for wlan driver. When
wlan driver requests to free the memory buffer then CNSS prealloc
derives slab_cache from virtual memory via page struct to identify
prealloc pool id to put memory buffer back into the pool.

In kernel 5.17, slab_cache is removed from the page struct. Add new
functions to store cache at the beginning of allocated buffer and
when wlan driver requests to free the memory then use that cache to
identify CNSS prealloc pool to put back memory.

Change-Id: I6b3a54d3f502d977c6a61cfa6aeae597df9c8e72
CRs-Fixed: 3309289
2022-10-17 21:23:29 -07:00
Jayachandran Sreekumaran
e079e8958c cnss2: Check calibration support after pci probe
Ensure the completion of pci probe before checking
whether the calibration is supported for the device id or not.

Change-Id: Ifb6b6b15c434c16822bb8a4291403e4a635f985f
CRs-Fixed: 3303831
2022-10-17 11:07:58 -07:00
Sandeep Singh
24816433ba cnss2: Read GCC register only for qca6490
Read GCC spare register after SOC reset for qca6490
device.

Change-Id: I20a110020224116f93225f55ae0124324441031c
CRs-Fixed: 3309323
2022-10-11 13:29:38 +05:30
Naman Padhiar
9eaccc90ab cnss2: Dump PCI scratch registers for MANGO and KIWI
Add support to dump PCIE SOC scratch registers for MANGO
and KIWI device.

Change-Id: I4f7a64c2bf186d19d96500ffedc5e732cc50fc03
CRs-Fixed: 3306157
2022-10-04 21:36:23 +05:30
Rajesh Chauhan
f7e10ed87e cnss2: fix issue in return type of debug functions
Fix issue in return type of following functions:
 - cnss_rddm_trigger_debug()
 - cnss_rddm_trigger_check()

Change-Id: I41eb4637605f9a2189e03e732c688c25b0895a90
CRs-Fixed: 3304957
2022-10-02 14:04:25 -07:00
Naman Padhiar
60f897b63a icnss2: Send WLAN_EN delay during Mode request
Send WLAN_EN delay during Mode On QMI request if temperature is
below threshold at that time.

Change-Id: I910168dafa09c25cc4a263a7756379eb8be46824
2022-10-02 01:17:36 -07:00