qcacmn: Make One HIF Context

Have the hif context componentized but make it one contiguous pointer.
This simplifies the design as all apis can use the same default pointer
and all members will be one load away with a precomputed offset.

Change-Id: I181c9f011a7bac02944af53188b549efeea68470
CRs-Fixed: 967765
diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c
index 89202ed..db85368 100644
--- a/hif/src/ce/ce_main.c
+++ b/hif/src/ce/ce_main.c
@@ -1838,7 +1838,6 @@
  */
 int hif_config_ce(hif_handle_t hif_hdl)
 {
-	struct HIF_CE_state *hif_state;
 	struct HIF_CE_pipe_info *pipe_info;
 	int pipe_num;
 #ifdef ADRASTEA_SHADOW_REGISTERS
@@ -1847,6 +1846,7 @@
 	CDF_STATUS rv = CDF_STATUS_SUCCESS;
 	int ret;
 	struct ol_softc *scn = hif_hdl;
+	struct HIF_CE_state *hif_state = (struct HIF_CE_state *)scn;
 	struct icnss_soc_info soc_info;
 	struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
 
@@ -1880,12 +1880,6 @@
 		return CDF_STATUS_NOT_INITIALIZED;
 	}
 
-	hif_state = (struct HIF_CE_state *)cdf_mem_malloc(sizeof(*hif_state));
-	if (!hif_state) {
-		return -ENOMEM;
-	}
-	cdf_mem_zero(hif_state, sizeof(*hif_state));
-
 	hif_state->scn = scn;
 	scn->hif_hdl = hif_state;
 	scn->mem = soc_info.v_addr;
@@ -2016,10 +2010,8 @@
 		cdf_softirq_timer_free(&hif_state->sleep_timer);
 		hif_state->sleep_timer_init = false;
 	}
-	if (scn->hif_hdl) {
-		scn->hif_hdl = NULL;
-		cdf_mem_free(hif_state);
-	}
+
+	scn->hif_hdl = NULL;
 	athdiag_procfs_remove();
 	scn->athdiag_procfs_inited = false;
 	HIF_TRACE("%s: X, ret = %d\n", __func__, rv);