qcacmn: Featurize wlan BMI

Featurize wlan BMI to compile out in mission mode.

Change-Id: I1ac98765e470749d372be508b1f4fcb2a9012cb9
CRs-Fixed: 2259801
This commit is contained in:
Qiwei Cai
2018-06-13 20:23:24 +08:00
committed by nshrivas
parent 37bf7f4d22
commit 85cfe85c70
3 changed files with 19 additions and 1 deletions

View File

@@ -443,6 +443,7 @@ void hif_detach_htc(struct hif_opaque_softc *hif_ctx);
* DiagRead/DiagWrite * DiagRead/DiagWrite
*/ */
#ifdef WLAN_FEATURE_BMI
/* /*
* API to handle HIF-specific BMI message exchanges, this API is synchronous * 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) * 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, uint8_t *pResponseMessage,
uint32_t *pResponseLength, uint32_t TimeoutMS); uint32_t *pResponseLength, uint32_t TimeoutMS);
void hif_register_bmi_callbacks(struct hif_softc *hif_sc); 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 * APIs to handle HIF specific diagnostic read accesses. These APIs are
* synchronous and only allowed to be called from a context that * 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_crash_shutdown(struct hif_opaque_softc *hif_ctx);
void hif_get_hw_info(struct hif_opaque_softc *hif_ctx, u32 *version, void hif_get_hw_info(struct hif_opaque_softc *hif_ctx, u32 *version,
u32 *revision, const char **target_name); 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); 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 * struct hif_target_info *hif_get_target_info_handle(struct hif_opaque_softc *
scn); scn);

View File

@@ -510,9 +510,11 @@ int hif_apps_wake_irq_enable(struct hif_opaque_softc *hif_ctx)
return 0; return 0;
} }
#ifdef WLAN_FEATURE_BMI
bool hif_needs_bmi(struct hif_opaque_softc *scn) bool hif_needs_bmi(struct hif_opaque_softc *scn)
{ {
struct hif_softc *hif_sc = HIF_GET_SOFTC(scn); struct hif_softc *hif_sc = HIF_GET_SOFTC(scn);
return hif_sc->bus_ops.hif_needs_bmi(hif_sc); return hif_sc->bus_ops.hif_needs_bmi(hif_sc);
} }
#endif /* WLAN_FEATURE_BMI */

View File

@@ -665,6 +665,7 @@ static QDF_STATUS hif_ctrl_msg_exchange(struct HIF_DEVICE_USB *macp,
return status; return status;
} }
#ifdef WLAN_FEATURE_BMI
/** /**
* hif_exchange_bmi_msg() - send/recev ctrl message of type BMI_CMD/BMI_RESP * hif_exchange_bmi_msg() - send/recev ctrl message of type BMI_CMD/BMI_RESP
* @scn: pointer to hif_opaque_softc * @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, USB_CONTROL_REQ_RECV_BMI_RESP,
bmi_response, bmi_response_lengthp); bmi_response, bmi_response_lengthp);
} }
#endif /* WLAN_FEATURE_BMI */
/** /**
* hif_diag_read_access() - Read data from target memory or register * hif_diag_read_access() - Read data from target memory or register