Commit Graph

246 Commits

Author SHA1 Message Date
Venkateswara Naralasetty
058c73bc44 qcacld-3.0: Add pld support for get irq by ce id
Add pld support to get irq number by ce id.

Change-Id: I31499fa12ed3176c7cf3f38e65530764f169520c
CRs-Fixed: 3381121
2023-02-14 07:26:35 -08:00
Karthik Kantamneni
529cac3223 qcacld-3.0: Add support to send V3 Shadow config in IPCI PLD layer
Add support to send V3 shadow config in IPCI PLD layer.

Change-Id: I2eaea20b2913c607da07fb4a1f3dfa85d2a0f665
CRs-Fixed: 3381736
2023-02-14 04:44:14 -08:00
Gangadhar Kavalastramath
b486e63bc2 qcacld-3.0: Add PLD APIs required for thermal mitigation feature
Add PLD APIs to register, deregister and query current thermal state.

Change-Id: I3da5d3fae20478af66c8dc21468a306b26d09ab9
CRs-Fixed: 3386745
2023-02-14 01:55:25 -08:00
Ananya Gupta
b576218751 qcacld-3.0: Update SNOC freq to 200 MHz for SAP, P2P HE case
Previously, IPA had its default vote which will bump up the SNOC
frequency to 200 MHz. Now IPA has removed its vote which is
causing throughput drop in HE cases for SAP and P2P GO mode.
To fix this, add new throughput level TPUT_LEVEL_HIGH_HE_CASE and
provide ini to set its threshold to increase SNOC frequency to
200 MHz. To enable, set ini BandwidthMidHighThreshold to 7000.

Change-Id: Ica8c640597c37602aea2f5e4ff6b0646c49ff548
CRs-Fixed: 3297833
2023-01-28 04:02:23 -08:00
Mohammed Ahmed
e5a9e48766 qcacld-3.0: Adding peach device id
Adding peach device id.

Change-Id: I33cdacd7c18f461ebcc69abf2aa3c83f100eb4e9
CRs-Fixed: 3386937
2023-01-25 19:34:58 -08:00
Jeff Johnson
d57d4bbb66 qcacld-3.0: Fix core/pld documentation
There are quite a few documentation issues in core/pld:
- Documentation of implementations instead of interfaces
- Duplicate documentation
- Syntatically incorrect kernel-doc

Fix all of these issues.

Change-Id: Ia6ef2fda239e9021c879bc4672c9e80ec5c93921
CRs-Fixed: 3386837
2023-01-24 19:12:41 -08:00
Mohammed Ahmed
776c4cc10e qcacld-3.0: add SSR host log collection API usage
Current code does not use the SSR host log collection API.
Fix this by adding SSR host log collection API usage.

Change-Id: I364bd6281e886e8c50dfd6f45f78fb98e822f962
CRs-Fixed: 3339953
2023-01-19 20:43:32 -08:00
Sandeep Singh
42c5ba3834 qcacld-3.0: Update soc info parameters to get fw build id
Add code to get fw build id from platform driver
for ipci targets.

Change-Id: I0f3e866e77fd268c4cf57eb457a8189bf6d9a694
CRs-Fixed: 3335740
2023-01-03 01:34:33 -08:00
Naman Padhiar
2b2c0a0436 qcacld-3.0: Add PLD API to send WFC mode to FW
Add PLD API to send WFC(WiFi Calling) mode to WLAN FW.

Change-Id: I4aef58caa93d255233d2412aa6d03017da4b5f10
CRs-Fixed: 3346545
2022-12-15 21:17:57 +05:30
Yeshwanth Sriram Guntuka
8ec8609bb9 qcacld-3.0: Add PLD API for Audio SMMU map and unmap
Add PLD API support for mapping and unmapping memory
regions via platform driver API calls to Audio SMMU
context bank.

Change-Id: I93b5308ce6cb024773a780c0aaf98a4fd06281d7
CRs-Fixed: 3351568
2022-12-12 07:49:30 -08:00
Naman Padhiar
c5fe12891f qcacld-3.0: Add PLD API to check direct_link support
Add PLD API to check whether direct_link is supported
by FW or not. Call platform driver API to get direct_link
support from FW capability.

Change-Id: Iac16427a853a3548dd49ece7a2839792e7c87e84
CRs-Fixed: 3335266
2022-11-26 02:37:07 -08:00
Bing Sun
d23a0adbcb qcacld-3.0: Support one MSI vector dynamically
In some platform IRQ allocation may be failed because it can't support
so many MSI vectors. Driver can't be loaded in this platform.

Implement one MSI vector dynamic support. MSI vector number is defined
in platform driver, so add platform API to show whether platform is in
one MSI vector mode or not.

Change-Id: I5e87ec456b654701a195c793087f078cf7647a3c
CRs-Fixed: 3290815
2022-11-11 03:55:37 -08:00
Ashish Kumar Dhanotiya
2b851b6680 qcacld-3.0: Get wifi kobject irrespective of bus type
Currently host driver gets the wifi kobject from platform
driver based on the bus type, since this is a generic
functionality and it can be used for any bus type,
so add a logic to get the wifi kobject irrespective of
bus type.

Change-Id: I58b18f0006494e0602ef3b00dc5728071c7a0306
CRs-Fixed: 3308565
2022-10-11 08:28:28 -07:00
Jeff Johnson
806182f685 qcacld-3.0: core: pld: Fix misspellings
Fix misspellings in core/pld/...

Change-Id: If0aa0e88eaf765b47c9c25fa3549f9d3d59d766d
CRs-Fixed: 3303626
2022-10-04 18:56:40 -07:00
Sandeep Singh
6652edebb6 qcacld-3.0: Update soc info parameters to get fw build id
Update soc info parameters to get fw build id from
platform driver.

Change-Id: Ie6ae346a06c86f6b3b72638ac8a2efa9e5118170
CRs-Fixed: 3299395
2022-09-29 09:17:51 -07:00
Yu Ouyang
cc2bf81627 qcacld-3.0: Use PM wakelock to protect firmware downloading
To protect firmware not downloaded in system suspend, acquire/release
the cnss semaphore cnss_pm_sem. It is complex, and cnss function
cnss_pm_notify may trigger dead lock issue once PM_POST_SUSPEND is
ahead of PM_SUSPEND_PREPARE.

Optimize code to use PM wakelock API to protect firmware downloading.

Change-Id: I533c373b85f554fbcceb562d9f56c6b88e5155bb
CRs-Fixed: 3280247
2022-09-19 23:36:45 -07:00
Sandeep Singh
ca38ac5038 qcacld-3.0: Add PLD API to get wifi kobject
Add PLD API to get wifi kobject.

Change-Id: I136d3f4abec831ab05058678beb23fe2e1b05d49
CRs-Fixed: 3264204
2022-08-12 13:48:21 -07:00
Manikandan Mohan
4df1739060 qcacld-3.0: Add PLD API to enable WLAN HW
WLAN HW can be disabled at boot and thus wlan boot activities will be
deferred. Add PLD API to start wlan boot time sequence in platform
driver after HW is enabled.

Change-Id: I9dcdc9944b7f71dc3488a20719ca36c00ae62a4e
CRs-Fixed: 3222032
2022-06-23 14:35:50 -07:00
Yu Ouyang
6b2b1cfb27 Revert "qcacld-3.0: Add the Full Power Down feature support"
This reverts commit I293647175c151da0fd6628345f98ea65c83b1bb3.

New solution idle shutdown in suspend prepare is better.

Change-Id: I69a0e7401c811e4a9656fcc8e3dd069f4317cc35
CRs-Fixed: 3213236
2022-06-09 19:37:09 -07:00
Rakesh Pillai
a3392b9562 qcacld-3.0: Fix compilation error when shadow config v3 is unsupported
For targets not supporting shadow config v3, the compilation
may fail since the definition for shadow config v3 will not
be available.

Featurize the shadow config v3 properly to avoid any
compilation errors for targets not supporting this feature.

Change-Id: I6d968ff98776159319ec5edad1ada1b6d888f87e
CRs-Fixed: 3214412
2022-06-08 01:08:06 -07:00
Manikandan Mohan
d4498674f3 qcacld-3.0: Add config file for Mango WLAN device
Add config file for Mango WLAN device and enable emulation flag for
Mango WLAN device.

In addition, use static symbolic link '.mango -> .' for multi-ko support.

Change-Id: I0cebf11407e5625fd6475723496b9cda72cf5165
CRs-Fixed: 3210120
2022-06-07 08:18:32 -07:00
Rakesh Pillai
11e66ac007 qcacld-3.0: PLD interface API changes for shadow config v3
PLD interface related changes for using shadow
config v3 msg in KIWI.

Change-Id: I2b075b7ecffbedbdf9c2c5577866ba6a23a24ca2
CRs-Fixed: 3167763
2022-05-19 01:57:05 -07:00
Namita Nair
9f7f40c963 qcacld-3.0: Add threshold for SUPER_HIGH throughput
Added new threshold corresponding to SUPER_HIGH
throughput and maxed out vote level to PLD_BUS_WIDTH_MAX.

Change-Id: Ia6c411b2b1b77ff97d0058c84b2108415e6c0f45
CRs-Fixed: 3170485
2022-05-05 18:46:23 -07:00
nakul kachhwaha
df9500aef0 qcacld-3.0: Fix compilation issue due to missing braces
Compiler with option -Werror=missing-braces enabled wants
extra pair of braces while initializing variables during
declaration. Add extra pair of braces to fix compilation
issue.

Change-Id: I4ffd2711985cb01a9f6800800165280bddf00590
CRs-Fixed: 3180670
2022-04-25 14:08:07 -07:00
Vijay Patil
bdb2ed60ca qcacld-3.0: Add PLD API to check if ipa offload is disabled
Add PLD API to check if ipa offload is disabled or not in PLD
layer.

Change-Id: If2ef19cdc16a399cf5abfa495e01bab6da799c8d
CRs-Fixed: 3148041
2022-03-28 04:27:51 -07:00
Kai Liu
4ca1fafe71 qcacld-3.0: Provide chip version to platform driver
Add chip version info in driver structure, platform driver
can use this info to decide whether accept this registration or not.

Change-Id: I37ba897954147ad75515f88e7ff35417e5de39e4
CRs-Fixed: 3125766
2022-03-07 21:42:30 -08:00
Mohammed Siddiq
20e88cce9c qcacld-3.0: Extend the pld api to get PCI reg dump for kiwi
Extend the pld api to get PCI reg dump for kiwi.

Change-Id: I3dd25a40abacbe26a4ab4056a85a7224fc3040ce
CRs-Fixed: 3125184
2022-03-07 07:33:38 -08:00
Sandeep Singh
6b5e35b3f8 qcacld-3.0: Add device info table to driver ops
Add device information like device id etc to driver ops.
This device info tells platform driver about the devices
supported by CLD driver during driver registeration.

Change-Id: I6fdd34487db14c8ec43b35b3b75a4dc4e32f8add
CRs-Fixed: 3129895
2022-03-07 00:48:23 -08:00
Naman Padhiar
c2c7d6e1a5 qcacld-3.0: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if ICNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: I21f40fdfc2d9551769fbb7d027a383162aaaddef
2022-02-23 08:36:51 -08:00
Mohammed Siddiq
b53ad320b6 qcacld-3.0: Add code to rate limit pld logs
Due to SPF, multiple drivers are supported and are loaded
run time. It is expected for one driver to fail to load,
however the failing driver should not flood the dmesg.
Add code to rate limit pld logs to avoid flooding of dmesg.

Change-Id: I1a3b397a3e1de750e520b62d97ccea19a4bbbf7d
2022-02-16 23:44:54 -08:00
Vijay Patil
aff4a6514a qcacld-3.0: Add PLD API to check if mode of interrupt is legacy
Add PLD API to check if mode of interrupt is legacy or not in PLD
layer. It can be used by HIF layer when required.

Change-Id: Iac6fbe01755e833c062fc08940dd07f11b3452fa
CRs-Fixed: 3126969
2022-02-10 10:08:54 -08:00
Mohammed Siddiq
1c61feb5de qcacld-3.0: Add pld api to get PCI slot of attached device
Add pld api to get PCI slot of attached device.

Change-Id: I5adb49a8c28d4211ede5aee4e5bc0e8046bbf542
2022-01-19 15:30:10 -08:00
sandhu
afc4244d94 qcacld-3.0: Remove IP from code
Remove qualcomm IP from code

Change-Id: Icc3f239fbb6874a07272618b1be84d613b8fdc84
CRs-Fixed: 3073862
2021-12-29 04:28:21 -08:00
Surabhi Vishnoi
0320907b1e qcacld-3.0: Allow suspend in deep sleep or Hibernate
Deep Sleep or Hibernate are system level mode power
modes in which wlan firmware is shutdown gracefully
and linux kernel is suspended. Currently, suspend
is not allowed if firmware is down, with this change
suspend is allowed if firmware is down due to Deep
Sleep or Hibernate low power state.

A new pld api is introduced to know the low power
state from platform driver, this api is enabled based
on CONFIG_ENABLE_LOW_POWER_MODE flag. Currently, this
feature is enabled only for wearable targets.

Change-Id: Iddaa4da8ee4880a4223420f59cbe9c365c30344a
CRs-Fixed: 3090481
2021-12-16 15:07:33 -08:00
Mohit Khanna
320d7db738 qcacld-3.0: Account for sched delay in TX/RX BW tuning
Currently sched-delay is not taken into account while calculating TX/RX
offload packets in bus bandwidth work handler. This may result in an
incorrect calculation and determination of TX/RX bandwidth levels and
other params which are derived from it.

Add support to consider actual scheduling delay between two bandwidth
intervals to detemine TX/RX offloaded/not-offloaded packets.

Change-Id: Icfb961cbbc1a049df0133394883755418b631056
CRs-Fixed: 3079953
2021-12-02 02:24:50 -08:00
Mohit Khanna
49760b669f qcacld-3.0: Set PM_QOS for non-offloaded TX at V_HIGH
Set system PM_QOS with low latency only for "very-high" throughput levels
in TX case. Currently, its being done for "high" throughput levels.
In less than "very-high" throughput cases, this allows CPU cores to
enter low power modes. This is done only for non-offloaded packets e.g.
UDP.

Change-Id: Idf1dd2968b7dd8b4ef9f4061ee862de03d962c6e
CRs-Fixed: 3045963
2021-11-22 15:08:27 -08:00
Yue Ma
30dcc95b09 qcacld-3.0: Use corrent flag to handle CNSS utils driver
Use internal flag CNSS_UTILS instead of CONFIG_CNSS_UTILS which
will not be defined from kernel defconfig for out-of-kernel-tree
CNSS utils driver. CNSS_UTILS will be defined in the driver Kbuild
no matter where CONFIG_CNSS_UTILS gets defined.

Change-Id: Ifc07affd8e2dc78103be0aab54e20514c2e3b733
CRs-fixed: 3074629
2021-11-16 22:14:10 -08:00
Liangwei Dong
6e61b6bb8c qcacld-3.0: Handle vendor LTE unsafe channel ranges
In 3rd party platform, CNSS driver will provide
LTE avoidance channel frequency ranges by API
cnss_utils_get_wlan_unsafe_channel_sap.
Based on requirement, in single SAP case or SAP+SAP
case, ACS channel list should be filtered out based
on vendor unsafe channel frequency ranges.

Change-Id: I583c1bb2583c783858c54e8643fbe1af69d492b1
CRs-Fixed: 3061043
2021-11-15 20:37:12 -08:00
Prakash Manjunathappa
514d54117e qcacld-3.0: Vote for Max snoc/ddr votes for DBS ultra_high TPUTs
Add new MAX TPUT level to vote for Max snoc/DDR vote levels.
MAX TPUT level is only required for DBS ultra_high TPUT level.
DBS mode ultra high TPUT require highest snoc/ddr clocks.

Change-Id: Iac41f7157d61858c72ef1b28ba9ad6f768da325c
CRs-Fixed: 3071101
2021-11-15 15:00:11 -08:00
Yu Tian
9a91fcdc37 qcacld-3.0: Add ultra high bandwidth voting for dbs mode
Add a new SNOC/DDR voting slot for DBS mode. In DBS KPI tests,
more hardware resources are needed for both HW MAC0/1.
This change adds a new logic to vote more DDR frequency when
it's in DBS mode and the overall throughput is larger than a
pre-defined threshold.

Change-Id: I14a318b417a39714865de0617c9943c1a5e04ae6
CRs-fixed: 3064197
2021-11-12 21:15:51 -08:00
Ke Huang
b43015863f qcacld-3.0: Add the Full Power Down feature support
Add the support for the feature of Full Power Down while
in low power mode.
For this feature, it need to power down wlan chip when
suspend, and power up wlan chip when resume, so need to
change to call wlan driver shutdown and then power off the
wlan chip instead of calling wlan driver suspend when do
suspend, and changing to do power on wlan chip, download
wlan firmware, and calling wlan driver reinit instead of
calling wlan driver resume when do resume.

Change-Id: I293647175c151da0fd6628345f98ea65c83b1bb3
CRs-Fixed: 3061366
2021-11-11 03:12:28 -08:00
Naman Padhiar
24053827cc qcacld-3.0: Add PLD API for devm_request_irq
Add PLD API for devm_request_irq in PLD layer.It can be used
by HIF layer when required.

Change-Id: I1bd08e3c3dc64c47b9792b428322100e12150b27
2021-10-26 04:43:49 -07:00
Prateek Patil
2456d78bd3 qcacld-3.0: Receive HOST wakeup event from FW
For IPCI_FW_SIM HOST is not sending WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID to
FW. To wakeup HOST after suspend add api pld_ipci_fw_sim_exit_power_save
to redirect HOST wakeup.

Change-Id: Iaec5c947c5f3c1fd23dc5b31801ff94612fb7c47
2021-09-23 14:59:39 -07:00
Yue Ma
39066dbed1 qcacld-3.0: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: Icc1253f65a596c8579424f056dcd0fcb5e73a4a1
CRs-fixed: 3022566
2021-08-27 15:12:20 -07:00
Yue Ma
2e49f1156d qcacld-3.0: Handle flags defined as modules properly
The current way in the driver to handle CONFIG_CNSS_UTILS=m and
CONFIG_WCNSS_MEM_PRE_ALLOC=m will not work if the flags are not
coming from kernel Kconfig directly (e.g. CNSS utils and prealloc
module sources are built out of kernel tree) since "cppflags-
$(CONFIG_FLAG) += -DCONFIG_FLAG" will not take effect if CONFIG_FLAG=m.
Fix it in a proper way which is same as handling CONFIG_CNSS_GENL.

Change-Id: Iab4bf34bd1ae89f947bc5f7080e18569810f5f58
CRs-fixed: 3022560
2021-08-27 15:12:16 -07:00
Jinwei Chen
b01dccdb52 qcacld-3.0: suppot WHUNT for CMEM allocation
support WHUNT for CMEM allocation.

Change-Id: I2e28a39bdc5a910526707bc278e6e4a7b08d703f
CRs-Fixed: 2929515
2021-06-23 23:32:28 -07:00
Rakesh Pillai
e86da7276c qcacld-3.0: Changes to enable BE/WCN7850 flags
Changes to enable compilation for beryllium target(chip WCN7850).

CRs-Fixed: 2888534
Change-Id: I7b3d252fc8550883a2d24b6beb2b78f482f5004b
2021-06-04 10:43:23 -07:00
Naman Padhiar
04f511151f qcacld-3.0: Return correct value from PLD layer
For APsI pld_get_mhi_state() and pld_is_pci_ep_awake() return
proper value for buses other than IPCI where these APIs are not
supported.

Change-Id: I2dfe8118d29aa2bc75484ff4d708b21eba264350
2021-06-03 05:52:48 -07:00
Naman Padhiar
8e73a4a3b5 qcacld-3.0: Add support for new uevent from ICNSS2
Add support in PLD layer to handle uevent ICNSS_SMMU_FAULT.

Change-Id: Idf89467f9041281f824ad4c9b2386cbfcee27105
2021-06-02 09:01:41 -07:00
Lin Bai
732ea69682 qcacld-3.0: Add CNSS_BUS_EVENT event handler
CNSS platform will notify bus related event, and add related
handler in CLD driver.

Change-Id: I257f2e09c4fbefa6c4913eb7a7deba165a9b73ec
CRs-Fixed: 2922102
2021-05-13 20:34:03 -07:00