qcacld-3.0: Use wma callback to get vdev dp handle

PMO should not know about vdev data path handle, but
pmo_unpause_all_vdev() need it, so register a wma callback to retrieve
the vdev dp handle instead of keep a copy in pmo vdev private context.

Refine current code to retrieve vdev dp handle using a wma callback

Change-Id: I1f668fff633a5e5cdfc478e7f619e9600930b333
CRs-Fixed: 2227384
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index f41fed7..70c9a09 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -2352,6 +2352,37 @@
 }
 
 /**
+ * wma_vdev_get_dp_handle() - Get vdev datapth handle
+ * @vdev_id: the Id of the vdev to configure
+ *
+ * Return: Vdev datapath handle else NULL on error
+ */
+static inline
+struct cdp_vdev *wma_vdev_get_vdev_dp_handle(uint8_t vdev_id)
+{
+	tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
+	struct wma_txrx_node *iface;
+
+	if (!wma) {
+		WMA_LOGE("%s: WMA context is invald!", __func__);
+		return NULL;
+	}
+
+	if (vdev_id >= wma->max_bssid)
+		return NULL;
+
+	iface = &wma->interfaces[vdev_id];
+
+	if (!iface) {
+		WMA_LOGE("%s: Failed to get iface: NULL",
+			 __func__);
+		return NULL;
+	}
+
+	return iface->handle;
+}
+
+/**
  * wma_vdev_is_device_in_low_pwr_mode - is device in power save mode
  * @vdev_id: the Id of the vdev to configure
  *