qcacmn: Add qdf_device to psoc object

Add a new qdf device member to psoc object.
Add get/set methods for retreiving the new qdf
device member from psoc.

Change-Id: I0c2965b69fc038f9781dd52b6175bf642319834b
CRs-Fixed: 2014032
diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h
index 0abb4e0..dd87e03 100644
--- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h
+++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h
@@ -220,6 +220,7 @@
  * @peer_list:            Peer list
  * @ref_cnt:              Ref count
  * @ref_id_dbg:           Array to track Ref count
+ * @qdf_dev:              QDF Device
  */
 struct wlan_objmgr_psoc_objmgr {
 	uint8_t wlan_pdev_count;
@@ -233,6 +234,7 @@
 	struct wlan_peer_list peer_list;
 	qdf_atomic_t ref_cnt;
 	qdf_atomic_t ref_id_dbg[WLAN_REF_ID_MAX];
+	qdf_device_t qdf_dev;
 };
 
 /**
@@ -1014,6 +1016,48 @@
 }
 
 /**
+ * wlan_psoc_get_qdf_dev(): API to get qdf device
+ * @psoc: Psoc pointer
+ *
+ * API to get qdf device from psoc object
+ *
+ * Caller need to acquire lock with wlan_psoc_obj_lock()
+ *
+ * Return: qdf_device_t
+ */
+static inline qdf_device_t wlan_psoc_get_qdf_dev(
+			struct wlan_objmgr_psoc *psoc)
+{
+	/* This API is invoked with lock acquired, do not add log prints */
+	if (psoc == NULL)
+		return NULL;
+
+	return psoc->soc_objmgr.qdf_dev;
+}
+
+/**
+ * wlan_psoc_set_qdf_dev(): API to get qdf device
+ * @psoc: Psoc pointer
+ * dev: qdf device
+ *
+ * API to set qdf device from psoc object
+ *
+ * Caller need to acquire lock with wlan_psoc_obj_lock()
+ *
+ * Return: None
+ */
+static inline void wlan_psoc_set_qdf_dev(
+			struct wlan_objmgr_psoc *psoc,
+			qdf_device_t dev)
+{
+	/* This API is invoked with lock acquired, do not add log prints */
+	if (psoc == NULL)
+		return;
+
+	psoc->soc_objmgr.qdf_dev = dev;
+}
+
+/**
  * DOC: Examples to use PSOC ref count APIs
  *
  * In all the scenarios, the pair of API should be followed