[qca-nss-drv] Support for IGS interface stats.

Change-Id: I393e758df7b53a7b0e5f4fc3139ae9f8dcc25a75
Signed-off-by: Manish Verma <maniverm@codeaurora.org>
diff --git a/nss_igs.c b/nss_igs.c
index 7adbd4f..1fd91eb 100644
--- a/nss_igs.c
+++ b/nss_igs.c
@@ -15,6 +15,7 @@
  */
 
 #include "nss_tx_rx_common.h"
+#include "nss_igs_stats.h"
 
 /*
  * nss_igs_verify_if_num()
@@ -61,6 +62,10 @@
 
 	switch (ncm->type) {
 	case NSS_IGS_MSG_SYNC_STATS:
+		/*
+		 * Debug stats embedded in stats msg.
+		 */
+		nss_igs_stats_sync(nss_ctx, ncm, ncm->interface);
 		break;
 	}
 
@@ -106,6 +111,8 @@
 	nss_top_main.if_rx_msg_callback[if_num] = NULL;
 
 	nss_core_unregister_handler(nss_ctx, if_num);
+
+	nss_igs_stats_reset(if_num);
 }
 EXPORT_SYMBOL(nss_igs_unregister_if);
 
@@ -128,6 +135,9 @@
 	nss_top_main.if_rx_msg_callback[if_num] = event_callback;
 
 	nss_core_register_handler(nss_ctx, if_num, nss_igs_handler, netdev);
+	nss_igs_stats_dentry_create();
+
+	nss_igs_stats_init(if_num, netdev);
 
 	return nss_ctx;
 }