From cba67ba550d567acd0941bdde132d6ed3ce9919b Mon Sep 17 00:00:00 2001 From: jiad Date: Thu, 28 Dec 2017 20:24:43 +0800 Subject: qcacmn: Fix compile error for SDIO build SDIO build complains implicit definition of ce_lro_flush_cb_register and ce_lro_flush_cb_deregister. Neither NAPI nor CE are enabled for SDIO. Fix is to add empty definitions for SDIO build. Change-Id: I505f47f25fe4f218577e2da1dc61d847c513dd2d CRs-Fixed: 2165501 --- hif/src/hif_main.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 9d998b5b5b0c..8a4e54c6167d 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -802,6 +802,7 @@ int hif_get_rx_ctx_id(int ctx_id, struct hif_opaque_softc *hif_hdl) return ctx_id; } +#if defined(HIF_PCI) || defined(HIF_SNOC) || defined(HIF_AHB) /** * hif_offld_flush_cb_register - API to register for LRO Flush Callback * @scn: HIF Context @@ -822,6 +823,32 @@ void hif_offld_flush_cb_register(struct hif_opaque_softc *scn, offld_init_handler); } +/** + * hif_offld_flush_cb_deregister - API to deregister offload Flush Callbacks + * @hif_hdl: HIF Context + * @offld_deinit_cb: Rx offload deinit callback + * + * Return: void + */ +void hif_offld_flush_cb_deregister(struct hif_opaque_softc *hif_hdl, + void (offld_deinit_cb)(void *)) +{ + hif_napi_lro_flush_cb_deregister(hif_hdl, offld_deinit_cb); + ce_lro_flush_cb_deregister(hif_hdl, offld_deinit_cb); +} +#else +void hif_offld_flush_cb_register(struct hif_opaque_softc *scn, + void (offld_flush_handler)(void *), + void *(offld_init_handler)(void)) +{ +} + +void hif_offld_flush_cb_deregister(struct hif_opaque_softc *hif_hdl, + void (offld_deinit_cb)(void *)) +{ +} +#endif + #if defined(FEATURE_LRO) /** * hif_get_lro_info - Returns LRO instance for instance ID @@ -844,19 +871,6 @@ void *hif_get_lro_info(int ctx_id, struct hif_opaque_softc *hif_hdl) #endif -/** - * hif_offld_flush_cb_deregister - API to deregister offload Flush Callbacks - * @hif_hdl: HIF Context - * @offld_deinit_cb: Rx offload deinit callback - * - * Return: void - */ -void hif_offld_flush_cb_deregister(struct hif_opaque_softc *hif_hdl, - void (offld_deinit_cb)(void *)) -{ - hif_napi_lro_flush_cb_deregister(hif_hdl, offld_deinit_cb); - ce_lro_flush_cb_deregister(hif_hdl, offld_deinit_cb); -} /** * hif_get_target_status - API to get target status -- cgit v1.2.3