qcacmn: Unify hif_bus_get_context_size

Since the open logic needs to allocate the bus context
before initializing the bus ops table, we need a single
function that is aware of the bus context size for all
busses.

Change-Id: I681e91ed1a792da7e753b477f869ee415ea8f3c7
CRs-Fixed: 986480
diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c
index 6a0bd27..bab5782 100644
--- a/hif/src/hif_main.c
+++ b/hif/src/hif_main.c
@@ -411,7 +411,12 @@
 {
 	struct hif_softc *scn;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	int bus_context_size = hif_bus_get_context_size();
+	int bus_context_size = hif_bus_get_context_size(bus_type);
+
+	if (bus_context_size == 0) {
+		HIF_ERROR("%s: context size 0 not allowed", __func__);
+		return NULL;
+	}
 
 	scn = (struct hif_softc *)qdf_mem_malloc(bus_context_size);
 	if (!scn) {