diff options
| -rw-r--r-- | hif/src/hif_napi.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c index 0656df49cc3c..de265fbc1021 100644 --- a/hif/src/hif_napi.c +++ b/hif/src/hif_napi.c @@ -41,8 +41,9 @@ #include <linux/interrupt.h> #include <linux/irq.h> #ifdef HELIUMPLUS -#include <soc/qcom/irq-helper.h> +#ifdef CONFIG_SCHED_CORE_CTL #include <linux/sched/core_ctl.h> +#endif #include <pld_snoc.h> #endif #include <linux/pm.h> @@ -1520,6 +1521,18 @@ static inline void hif_napi_bl_irq(struct qca_napi_data *napid, bool bl_flag) } } +#ifdef CONFIG_SCHED_CORE_CTL +/* Enable this API only if kernel feature - CONFIG_SCHED_CORE_CTL is defined */ +static inline int hif_napi_core_ctl_set_boost(bool boost) +{ + return core_ctl_set_boost(boost); +} +#else +static inline int hif_napi_core_ctl_set_boost(bool boost) +{ + return 0; +} +#endif /** * hif_napi_cpu_blacklist() - en(dis)ables blacklisting for NAPI RX interrupts. * @napid: pointer to qca_napi_data structure @@ -1559,7 +1572,7 @@ int hif_napi_cpu_blacklist(struct qca_napi_data *napid, enum qca_blacklist_op op ref_count++; rc = 0; if (ref_count == 1) { - rc = core_ctl_set_boost(true); + rc = hif_napi_core_ctl_set_boost(true); NAPI_DEBUG("boost_on() returns %d - refcnt=%d", rc, ref_count); hif_napi_bl_irq(napid, true); @@ -1570,7 +1583,7 @@ int hif_napi_cpu_blacklist(struct qca_napi_data *napid, enum qca_blacklist_op op ref_count--; rc = 0; if (ref_count == 0) { - rc = core_ctl_set_boost(false); + rc = hif_napi_core_ctl_set_boost(false); NAPI_DEBUG("boost_off() returns %d - refcnt=%d", rc, ref_count); hif_napi_bl_irq(napid, false); |
