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/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c
index 7ab537e..4f4f9c6 100644
--- a/hif/src/dispatcher/multibus.c
+++ b/hif/src/dispatcher/multibus.c
@@ -31,6 +31,7 @@
 #include "hif.h"
 #include "hif_main.h"
 #include "multibus.h"
+#include "ce_main.h"
 
 /**
  * hif_intialize_default_ops() - intializes default operations values
@@ -75,6 +76,23 @@
 }
 
 /**
+ * hif_bus_get_context_size - API to return size of the bus specific structure
+ *
+ * Return: sizeof of hif_pci_softc
+ */
+int hif_bus_get_context_size(enum qdf_bus_type bus_type)
+{
+	switch (bus_type) {
+	case QDF_BUS_TYPE_PCI:
+		return hif_pci_get_context_size();
+	case QDF_BUS_TYPE_SNOC:
+		return hif_snoc_get_context_size();
+	default:
+		return 0;
+	}
+}
+
+/**
  * hif_bus_open() - initialize the bus_ops and call the bus specific open
  * hif_sc: hif_context
  * bus_type: type of bus being enumerated