[qca-nss-drv] Retrieve the feature list for virt_if from netdev

Retrieve the feature list for virt_if from netdev instead of
having a local variable in the register function.

Change-Id: I32146a227e17df8fa10e3d939a694cfe3aa23126
Signed-off-by: Sundarajan Srinivasan <sundaraj@codeaurora.org>
diff --git a/nss_tx_rx_virt_if.c b/nss_tx_rx_virt_if.c
index 4ee3776..0b7274d 100644
--- a/nss_tx_rx_virt_if.c
+++ b/nss_tx_rx_virt_if.c
@@ -33,14 +33,13 @@
 {
 	struct nss_ctx_instance *nss_ctx = &nss_top_main.nss[nss_top_main.ipv4_handler_id];
 	int32_t if_num = (int32_t)ctx;
-	uint32_t features = 0;
 
 	nss_assert(NSS_IS_IF_TYPE(VIRTUAL, if_num));
 
 	nss_top_main.subsys_dp_register[if_num].ndev = netdev;
 	nss_top_main.subsys_dp_register[if_num].cb = rx_callback;
 	nss_top_main.subsys_dp_register[if_num].app_data = NULL;
-	nss_top_main.subsys_dp_register[if_num].features = features;
+	nss_top_main.subsys_dp_register[if_num].features = (uint32_t)netdev->features;
 
 	return nss_ctx;
 }
diff --git a/nss_virt_if.c b/nss_virt_if.c
index 839f951..eafda4d 100644
--- a/nss_virt_if.c
+++ b/nss_virt_if.c
@@ -217,7 +217,6 @@
 {
 	struct nss_ctx_instance *nss_ctx = NULL;
 	uint32_t ret;
-	uint32_t features = 0;
 
 	/*
 	 * Register handler for dynamically allocated virtual interface on NSS with nss core.
@@ -240,7 +239,7 @@
 	nss_top_main.subsys_dp_register[if_num].ndev = netdev;
 	nss_top_main.subsys_dp_register[if_num].cb = data_callback;
 	nss_top_main.subsys_dp_register[if_num].app_data = NULL;
-	nss_top_main.subsys_dp_register[if_num].features = features;
+	nss_top_main.subsys_dp_register[if_num].features = (uint32_t)netdev->features;
 
 	nss_top_main.if_rx_msg_callback[if_num] = msg_callback;