mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
qcacld-3.0: Resolve compilation error with 5.7 kernel
With kernel commit "2552d35 - PM: QoS: Rename things related to the CPU latency QoS", the PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE is renamed to PM_QOS_CPU_LATENCY_DEFAULT_VALUE. Update the same in the driver to resolve compilition issues due to above kernel commit. Change-Id: I522ebd2802397f6644fecb064971a6480dd9733b CRs-Fixed: 2788971
This commit is contained in:
parent
bf675b651a
commit
1a5c9ec6ef
3 changed files with 25 additions and 6 deletions
|
|
@ -112,7 +112,7 @@
|
|||
#include "qdf_periodic_work.h"
|
||||
#endif
|
||||
|
||||
#ifdef CLD_PM_QOS
|
||||
#if defined(CLD_PM_QOS) || defined(FEATURE_RUNTIME_PM)
|
||||
#include <linux/pm_qos.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -4710,6 +4710,25 @@ static inline void hdd_beacon_latency_event_cb(uint32_t latency_level)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CLD_PM_QOS) || defined(FEATURE_RUNTIME_PM)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
|
||||
/**
|
||||
* wlan_hdd_get_pm_qos_cpu_latency() - get PM QOS CPU latency
|
||||
*
|
||||
* Return: PM QOS CPU latency value
|
||||
*/
|
||||
static inline unsigned long wlan_hdd_get_pm_qos_cpu_latency(void)
|
||||
{
|
||||
return PM_QOS_CPU_LATENCY_DEFAULT_VALUE;
|
||||
}
|
||||
#else
|
||||
static inline unsigned long wlan_hdd_get_pm_qos_cpu_latency(void)
|
||||
{
|
||||
return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
|
||||
}
|
||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0) */
|
||||
#endif /* defined(CLD_PM_QOS) || defined(FEATURE_RUNTIME_PM) */
|
||||
|
||||
/**
|
||||
* hdd_netdev_feature_update - Update the netdev features
|
||||
* @net_dev: Handle to net_device
|
||||
|
|
|
|||
|
|
@ -9479,7 +9479,7 @@ static inline void hdd_pm_qos_update_request(struct hdd_context *hdd_ctx,
|
|||
qdf_cpumask_copy(&hdd_ctx->qos_cpu_mask, pm_qos_cpu_mask);
|
||||
|
||||
if (qdf_cpumask_empty(pm_qos_cpu_mask)) {
|
||||
latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
|
||||
latency = wlan_hdd_get_pm_qos_cpu_latency();
|
||||
qdf_for_each_possible_cpu(cpu) {
|
||||
dev_pm_qos_update_request(
|
||||
&hdd_ctx->pm_qos_req[cpu],
|
||||
|
|
@ -9494,7 +9494,7 @@ static inline void hdd_pm_qos_update_request(struct hdd_context *hdd_ctx,
|
|||
qdf_for_each_cpu_not(cpu, &hdd_ctx->qos_cpu_mask) {
|
||||
dev_pm_qos_update_request(
|
||||
&hdd_ctx->pm_qos_req[cpu],
|
||||
PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE);
|
||||
wlan_hdd_get_pm_qos_cpu_latency());
|
||||
}
|
||||
/* Set latency to 1 for CPUs included in mask */
|
||||
qdf_for_each_cpu(cpu, &hdd_ctx->qos_cpu_mask) {
|
||||
|
|
@ -9521,7 +9521,7 @@ static inline void hdd_pm_qos_add_request(struct hdd_context *hdd_ctx)
|
|||
|
||||
dev_pm_qos_add_request(cpu_dev, &hdd_ctx->pm_qos_req[cpu],
|
||||
DEV_PM_QOS_RESUME_LATENCY,
|
||||
PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE);
|
||||
wlan_hdd_get_pm_qos_cpu_latency());
|
||||
hdd_debug("Set qos_cpu_mask %*pb for affine_cores",
|
||||
cpumask_pr_args(&hdd_ctx->qos_cpu_mask));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1056,11 +1056,11 @@ int wlan_hdd_pm_qos_notify(struct notifier_block *nb, unsigned long curr_val,
|
|||
qdf_spin_lock_irqsave(&hdd_ctx->pm_qos_lock);
|
||||
|
||||
if (!hdd_ctx->runtime_pm_prevented &&
|
||||
curr_val != PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
|
||||
curr_val != wlan_hdd_get_pm_qos_cpu_latency()) {
|
||||
hif_pm_runtime_get_noresume(hif_ctx, RTPM_ID_QOS_NOTIFY);
|
||||
hdd_ctx->runtime_pm_prevented = true;
|
||||
} else if (hdd_ctx->runtime_pm_prevented &&
|
||||
curr_val == PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
|
||||
curr_val == wlan_hdd_get_pm_qos_cpu_latency()) {
|
||||
hif_pm_runtime_put(hif_ctx, RTPM_ID_QOS_NOTIFY);
|
||||
hdd_ctx->runtime_pm_prevented = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue