mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Fix compilation failure when NAPI is disabled
Encap napi APIs by macro, inline the no-op version APIs, and define the API when the feature is disabled but API is called by others. Change-Id: I9c0409b8abcb6260b1adfd5a656f8c1fa42695b5 CRs-Fixed: 2534594
This commit is contained in:
parent
5d579844ba
commit
6e0ca6a328
2 changed files with 11 additions and 5 deletions
|
|
@ -467,7 +467,8 @@ static void hif_latency_profile_measure(struct hif_exec_context *hif_ext_group)
|
|||
hif_ext_group->sched_latency_stats[7]++;
|
||||
}
|
||||
#else
|
||||
static void hif_latency_profile_measure(struct hif_exec_context *hif_ext_group)
|
||||
static inline
|
||||
void hif_latency_profile_measure(struct hif_exec_context *hif_ext_group)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
@ -484,11 +485,13 @@ static void hif_latency_profile_start(struct hif_exec_context *hif_ext_group)
|
|||
hif_ext_group->tstamp = qdf_ktime_to_ms(qdf_ktime_get());
|
||||
}
|
||||
#else
|
||||
static void hif_latency_profile_start(struct hif_exec_context *hif_ext_group)
|
||||
static inline
|
||||
void hif_latency_profile_start(struct hif_exec_context *hif_ext_group)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_NAPI
|
||||
/**
|
||||
* hif_exec_poll() - napi poll
|
||||
* napi: napi struct
|
||||
|
|
@ -584,7 +587,6 @@ struct hif_execution_ops napi_sched_ops = {
|
|||
.kill = &hif_exec_napi_kill,
|
||||
};
|
||||
|
||||
#ifdef FEATURE_NAPI
|
||||
/**
|
||||
* hif_exec_napi_create() - allocate and initialize a napi exec context
|
||||
* @scale: a binary shift factor to map NAPI budget from\to internal
|
||||
|
|
@ -611,7 +613,7 @@ static struct hif_exec_context *hif_exec_napi_create(uint32_t scale)
|
|||
#else
|
||||
static struct hif_exec_context *hif_exec_napi_create(uint32_t scale)
|
||||
{
|
||||
HIF_WARN("%s: FEATURE_NAPI not defined, making tasklet");
|
||||
HIF_WARN("%s: FEATURE_NAPI not defined, making tasklet", __func__);
|
||||
return hif_exec_tasklet_create();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -237,6 +237,10 @@ static inline struct qca_napi_data *hif_napi_get_all(
|
|||
struct hif_opaque_softc *hif)
|
||||
{ return NULL; }
|
||||
|
||||
static inline struct qca_napi_info *hif_get_napi(int napi_id,
|
||||
struct qca_napi_data *napid)
|
||||
{ return NULL; }
|
||||
|
||||
static inline int hif_napi_event(struct hif_opaque_softc *hif,
|
||||
enum qca_napi_event event,
|
||||
void *data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue