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
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
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
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
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
Add a data length validation check in fw response message in
qdss_data_send_sync().
Change-Id: I750f46549bc914698baaf4e24f1710536ca8e356
CRs-Fixed: 3366343
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
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
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
Add NULL check for 'dev' pointer before passing to
cnss_bus_dev_to_plat_priv function.
Change-Id: I8ab93a71219638e4b66d3b9fdcb164e052385129
CRs-Fixed: 3364740
Add NULL check for 'dev' pointer before passing to
cnss_bus_dev_to_plat_priv function.
Change-Id: I319a9859c41d7e8096b3a4457f4a831e0e93f7ab
CRs-Fixed: 3360223
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
Add a data length validation check in fw response message in
qdss_data_send_sync().
Change-Id: I197b8d52c06e35f5fcf0f8fee94429fdcf500fcb
CRs-Fixed: 3359589
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
Add support for IOMMU map and unmap of WLAN memory
regions into Audio SMMU for direct link usecases.
Change-Id: Ic136b1e5ac22641b6612ab5285452273233fcaea
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
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
Setup GPIOs for interrupt wakeup capable by calling
msm_gpio_mpm_wake_set() for such GPIOs.
Change-Id: I8a6e35b6e5ab49c569bfcb0a96c5361072cbe458
CRs-Fixed: 3345066
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Fix issue in return type of following functions:
- cnss_rddm_trigger_debug()
- cnss_rddm_trigger_check()
Change-Id: I41eb4637605f9a2189e03e732c688c25b0895a90
CRs-Fixed: 3304957