From 85cfe85c707ffecc890ad6e200083646b4e4adf2 Mon Sep 17 00:00:00 2001 From: Qiwei Cai Date: Wed, 13 Jun 2018 20:23:24 +0800 Subject: [PATCH] qcacmn: Featurize wlan BMI Featurize wlan BMI to compile out in mission mode. Change-Id: I1ac98765e470749d372be508b1f4fcb2a9012cb9 CRs-Fixed: 2259801 --- hif/inc/hif.h | 16 +++++++++++++++- hif/src/dispatcher/multibus.c | 2 ++ hif/src/usb/hif_usb.c | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/hif/inc/hif.h b/hif/inc/hif.h index 49a671843a..f27bf3be20 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -443,6 +443,7 @@ void hif_detach_htc(struct hif_opaque_softc *hif_ctx); * DiagRead/DiagWrite */ +#ifdef WLAN_FEATURE_BMI /* * API to handle HIF-specific BMI message exchanges, this API is synchronous * and only allowed to be called from a context that can block (sleep) @@ -453,6 +454,20 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx, uint8_t *pResponseMessage, uint32_t *pResponseLength, uint32_t TimeoutMS); void hif_register_bmi_callbacks(struct hif_softc *hif_sc); +bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx); +#else /* WLAN_FEATURE_BMI */ +static inline void +hif_register_bmi_callbacks(struct hif_softc *hif_sc) +{ +} + +static inline bool +hif_needs_bmi(struct hif_opaque_softc *hif_ctx) +{ + return false; +} +#endif /* WLAN_FEATURE_BMI */ + /* * APIs to handle HIF specific diagnostic read accesses. These APIs are * synchronous and only allowed to be called from a context that @@ -848,7 +863,6 @@ int ol_copy_ramdump(struct hif_opaque_softc *scn); void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx); void hif_get_hw_info(struct hif_opaque_softc *hif_ctx, u32 *version, u32 *revision, const char **target_name); -bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx); enum qdf_bus_type hif_get_bus_type(struct hif_opaque_softc *hif_hdl); struct hif_target_info *hif_get_target_info_handle(struct hif_opaque_softc * scn); diff --git a/hif/src/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c index bf2b308bc9..f6a5bbcc1a 100644 --- a/hif/src/dispatcher/multibus.c +++ b/hif/src/dispatcher/multibus.c @@ -510,9 +510,11 @@ int hif_apps_wake_irq_enable(struct hif_opaque_softc *hif_ctx) return 0; } +#ifdef WLAN_FEATURE_BMI bool hif_needs_bmi(struct hif_opaque_softc *scn) { struct hif_softc *hif_sc = HIF_GET_SOFTC(scn); return hif_sc->bus_ops.hif_needs_bmi(hif_sc); } +#endif /* WLAN_FEATURE_BMI */ diff --git a/hif/src/usb/hif_usb.c b/hif/src/usb/hif_usb.c index 779667cf98..53bd46cbda 100644 --- a/hif/src/usb/hif_usb.c +++ b/hif/src/usb/hif_usb.c @@ -665,6 +665,7 @@ static QDF_STATUS hif_ctrl_msg_exchange(struct HIF_DEVICE_USB *macp, return status; } +#ifdef WLAN_FEATURE_BMI /** * hif_exchange_bmi_msg() - send/recev ctrl message of type BMI_CMD/BMI_RESP * @scn: pointer to hif_opaque_softc @@ -694,6 +695,7 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *scn, USB_CONTROL_REQ_RECV_BMI_RESP, bmi_response, bmi_response_lengthp); } +#endif /* WLAN_FEATURE_BMI */ /** * hif_diag_read_access() - Read data from target memory or register