[qca-nss-drv] Send edma interface close message to firmware.
Send edma interface close message to firmware in edma interface
close callback to ensure firmware status is correct.
Change-Id: Idfbc02dee3204a14190275481218303db2a4d6a6
Signed-off-by: Shashank Balashankar <sbalasha@codeaurora.org>
diff --git a/nss_data_plane/nss_data_plane_edma.c b/nss_data_plane/nss_data_plane_edma.c
index adc165a..6684dc6 100644
--- a/nss_data_plane/nss_data_plane_edma.c
+++ b/nss_data_plane/nss_data_plane_edma.c
@@ -70,7 +70,16 @@
*/
static int __nss_data_plane_close(struct nss_dp_data_plane_ctx *dpc)
{
- return NSS_DP_SUCCESS;
+ struct nss_data_plane_edma_param *dp = (struct nss_data_plane_edma_param *)dpc;
+
+ if (!dp->notify_open) {
+ return NSS_DP_SUCCESS;
+ }
+ if (nss_phys_if_close(dp->nss_ctx, dp->if_num) == NSS_TX_SUCCESS) {
+ dp->notify_open = 0;
+ return NSS_DP_SUCCESS;
+ }
+ return NSS_DP_FAILURE;
}
/*