qcacmn: Remove cds from napi hot_plug_notifier functionality

Instead of using cds to get the hif context in the notifier callback
rely on the context_of semantics to traverse back to the hif context.

Change-Id: I7d57f9dcf8c09836c34ce16a4acaa8c3bc1624b9
CRs-Fixed: 1092842
This commit is contained in:
Houston Hoffman
2016-11-15 10:42:27 -08:00
committed by qcabuildsw
parent 60af6759fb
commit fec8ed1234
3 changed files with 38 additions and 35 deletions

View File

@@ -241,7 +241,6 @@ struct qca_napi_cpu {
*
* A variable of this type will be stored in hif module context.
*/
struct qca_napi_data {
spinlock_t lock;
uint32_t state;
@@ -253,6 +252,7 @@ struct qca_napi_data {
struct qca_napi_cpu napi_cpu[NR_CPUS];
int lilcl_head, bigcl_head;
enum qca_napi_tput_state napi_mode;
struct notifier_block hnc_cpu_notifier;
};
/**

View File

@@ -157,19 +157,21 @@ int hif_napi_poll(struct hif_opaque_softc *hif_ctx,
*/
/* fw-declare to make compiler happy */
struct qca_napi_data;
static inline int hif_napi_cpu_init(void *ctx) { return 0; }
static inline int hif_napi_cpu_deinit(void *ctx) { return 0; }
static inline int hif_napi_cpu_init(struct hif_opaque_softc *hif)
{ return 0; }
static inline int hif_napi_cpu_deinit(struct hif_opaque_softc *hif)
{ return 0; }
static inline int hif_napi_serialize(struct hif_opaque_softc *hif, int is_on)
{
return -EPERM;
}
{ return -EPERM; }
#else /* HELIUMPLUS - NAPI CPU symbols are valid */
/*
* prototype signatures
*/
int hif_napi_cpu_init(void *);
int hif_napi_cpu_deinit(void *);
int hif_napi_cpu_init(struct hif_opaque_softc *hif);
int hif_napi_cpu_deinit(struct hif_opaque_softc *hif);
int hif_napi_cpu_migrate(struct qca_napi_data *napid, int cpu, int action);
int hif_napi_cpu_blacklist(bool is_on);