From 53c00cb98a7ea23ad058f0721449076dd5fa0907 Mon Sep 17 00:00:00 2001 From: Saket Jha Date: Wed, 4 Dec 2019 17:56:01 -0800 Subject: [PATCH] qcacld-3.0: Featurize PM QoS support for 4.19 Kernel Due to upgrade to kernel 5.4, struct pm_qos_request fields have changed, causing compilation issues. Featurizing PM QoS so it is only enabled for 4.19 kernel. Change-Id: Ide2a3eb4b2bc970c6469efe8621bec55e50ecbd8 CRs-Fixed: 2580165 --- core/hdd/inc/wlan_hdd_main.h | 11 +++++++---- core/hdd/src/wlan_hdd_main.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 1e7be673b6af..853d184e1ee3 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -47,9 +47,6 @@ #include #include #include -#ifdef CLD_PM_QOS -#include -#endif #include #include #include @@ -112,6 +109,11 @@ #include "qdf_periodic_work.h" #endif +#if defined(CLD_PM_QOS) && \ + (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 19, 0)) +#include +#endif + #include "wlan_hdd_sta_info.h" /* @@ -1869,7 +1871,8 @@ struct hdd_context { qdf_time_t runtime_resume_start_time_stamp; qdf_time_t runtime_suspend_done_time_stamp; -#ifdef CLD_PM_QOS +#if defined(CLD_PM_QOS) && \ + (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 19, 0)) struct pm_qos_request pm_qos_req; #endif }; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 217b0e183422..154f75e70011 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8252,7 +8252,8 @@ static void hdd_clear_rps_cpu_mask(struct hdd_context *hdd_ctx) hdd_send_rps_disable_ind(adapter); } -#ifdef CLD_PM_QOS +#if defined(CLD_PM_QOS) && \ + (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 19, 0)) #define PLD_REMOVE_PM_QOS(x) #define PLD_REQUEST_PM_QOS(x, y) /**