qcacmn: Remove cds_get_context in HIF

Refactor Transport Layer from cds_get_context and pass the hif context
to all the API's to operate.

Change-Id: I1dedda76357f844e08fd422bf9eb15af70587eae
CRs-Fixed: 967765
diff --git a/htc/htc_services.c b/htc/htc_services.c
index 0e6ce13..d2cb0dd 100644
--- a/htc/htc_services.c
+++ b/htc/htc_services.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -36,6 +36,24 @@
 #define DEBUG_CREDIT 0
 #endif
 
+/**
+ * htc_update_htc_htt_config - API to update HIF with the HTT endpoint info
+ * @target: HTC handle
+ * @endpoint: Endpoint on which HTT messages flow
+ *
+ * Return: void
+ */
+#ifdef HIF_PCI
+void htc_update_htc_htt_config(HTC_TARGET *target, int endpoint)
+{
+	hif_save_htc_htt_config_endpoint(target->hif_dev, endpoint);
+}
+#else
+void htc_update_htc_htt_config(HTC_TARGET *target, int endpoint)
+{
+}
+#endif
+
 A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 			     HTC_SERVICE_CONNECT_REQ *pConnectReq,
 			     HTC_SERVICE_CONNECT_RESP *pConnectResp)
@@ -335,7 +353,10 @@
 
 	} while (false);
 
-	AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-htc_connect_service \n"));
+	if (HTT_SERVICE_GROUP == (pConnectReq->service_id >> 8))
+		htc_update_htc_htt_config(target, assignedEndpoint);
+
+	AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-htc_connect_service\n"));
 
 	return status;
 }
@@ -363,7 +384,12 @@
 }
 
 /* Disable ASPM : disable PCIe low power */
-void htc_disable_aspm(void)
+void htc_disable_aspm(HTC_HANDLE HTCHandle)
 {
-	hif_disable_aspm();
+	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
+
+	if (!target->hif_dev)
+		return;
+
+	hif_disable_aspm(target->hif_dev);
 }