From 60a1eeb69fb97b8c7f4b5d318cda834b79acabc3 Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Mon, 14 Mar 2016 21:11:44 -0700 Subject: [PATCH] qcacmn: Export the bus type Currently only ol_target_failure needs to query the bus type, but when usb and sdio busses are added there will be more external checks based on the bus type. Change-Id: I48172a918e75ff3a6e56fae5c311ae999efa607e CRs-Fixed: 986480 --- hif/inc/hif.h | 1 + hif/src/hif_main.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/hif/inc/hif.h b/hif/inc/hif.h index f7402a8f03aa..682223b665f3 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -491,6 +491,7 @@ void hif_lro_flush_cb_register(struct hif_opaque_softc *scn, void (handler)(void *), void *data); void hif_lro_flush_cb_deregister(struct hif_opaque_softc *scn); bool hif_needs_bmi(struct hif_opaque_softc *scn); +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); struct hif_config_info *hif_get_ini_handle(struct hif_opaque_softc *scn); diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index cc8931c428b6..d1670136fe81 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -803,6 +803,17 @@ bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx) return hif_sc->bus_type != QDF_BUS_TYPE_SNOC; } +/** + * hif_get_bus_type() - return the bus type + * + * Return: enum qdf_bus_type + */ +enum qdf_bus_type hif_get_bus_type(struct hif_opaque_softc *hif_hdl) +{ + struct hif_softc *scn = HIF_GET_SOFTC(hif_hdl); + return scn->bus_type; +} + /** * Target info and ini parameters are global to the driver * Hence these structures are exposed to all the modules in