[qca-nss-drv] Added registration APIs for conn_sync_many message callback

APIs added for registering and unregistering callbacks for IPv4 and IPv6
conn_sync_many messages.

Change-Id: I44711353f192c8dadb050e596e7ee139bf7e9d47
Signed-off-by: Suruchi Agarwal <suruchia@codeaurora.org>
diff --git a/nss_ipv4.c b/nss_ipv4.c
index 81ea0e2..f991919 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -25,6 +25,11 @@
 static struct  nss_conn_cfg_pvt i4cfgp;
 
 /*
+ * Callback for conn_sync_many request message.
+ */
+nss_ipv4_msg_callback_t nss_ipv4_conn_sync_many_msg_cb = NULL;
+
+/*
  * nss_ipv4_max_conn_count()
  *	Return the maximum number of IPv4 connections that the NSS acceleration engine supports.
  */
@@ -165,6 +170,7 @@
 		 * Update driver statistics on connection sync many.
 		 */
 		nss_ipv4_driver_conn_sync_many_update(nss_ctx, &nim->msg.conn_stats_many);
+		ncm->cb = (uint32_t)nss_ipv4_conn_sync_many_msg_cb;
 		break;
 	}
 
@@ -302,6 +308,24 @@
 }
 
 /*
+ * nss_ipv4_conn_sync_many_notify_register()
+ *	Register to receive IPv4 conn_sync_many message response.
+ */
+void nss_ipv4_conn_sync_many_notify_register(nss_ipv4_msg_callback_t cb)
+{
+	nss_ipv4_conn_sync_many_msg_cb = cb;
+}
+
+/*
+ * nss_ipv4_conn_sync_many_notify_unregister()
+ *	Unregister to receive IPv4 conn_sync_many message response.
+ */
+void nss_ipv4_conn_sync_many_notify_unregister(void)
+{
+	nss_ipv4_conn_sync_many_msg_cb = NULL;
+}
+
+/*
  * nss_ipv4_get_mgr()
  *
  * TODO: This only suppports a single ipv4, do we ever want to support more?
@@ -593,6 +617,8 @@
 EXPORT_SYMBOL(nss_ipv4_tx_with_size);
 EXPORT_SYMBOL(nss_ipv4_notify_register);
 EXPORT_SYMBOL(nss_ipv4_notify_unregister);
+EXPORT_SYMBOL(nss_ipv4_conn_sync_many_notify_register);
+EXPORT_SYMBOL(nss_ipv4_conn_sync_many_notify_unregister);
 EXPORT_SYMBOL(nss_ipv4_get_mgr);
 EXPORT_SYMBOL(nss_ipv4_register_sysctl);
 EXPORT_SYMBOL(nss_ipv4_unregister_sysctl);