diff options
| author | Mohit Khanna <mkhannaqca@codeaurora.org> | 2017-03-10 11:48:12 -0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-15 23:36:20 -0700 |
| commit | 06f707302260412bcdaa17d31d49d3131ddfa414 (patch) | |
| tree | 0b6ecc8d1d45ec5ec27352edb6225266316aae49 | |
| parent | 8a7d727c27f2a88c52ed5d42f22b3806a4e39541 (diff) | |
qcacmn: stub core_ctl_set_boost if not defined
In hif_napi.c, we are calling this kernel API core_ctl_set_boost. This
API is only present in the kernel if the feature CONFIG_SCHED_CORE_CTL
is present. In case the feature is not present in the kernel, it will
result in a compilation error.
Create a new internal API hif_napi_core_ctl_set_boost as a wrapper
around the kernel API. The new API is stubbed in case the kernel feature
is not present.
Change-Id: Ia52f1110304816670efe3480da3aa78d7b2ecb9e
CRs-Fixed: 2018089
| -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); |
