[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_ipv6.c b/nss_ipv6.c
index 3e6fa02..6c2f4a8 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -24,6 +24,11 @@
 static struct  nss_conn_cfg_pvt i6cfgp;
 
 /*
+ * Callback for conn_sync_many request message.
+ */
+nss_ipv6_msg_callback_t nss_ipv6_conn_sync_many_msg_cb = NULL;
+
+/*
  * nss_ipv6_max_conn_count()
  *	Return the maximum number of IPv6 connections that the NSS acceleration engine supports.
  */
@@ -168,6 +173,7 @@
 		 * Update driver statistics on connection sync many.
 		 */
 		nss_ipv6_driver_conn_sync_many_update(nss_ctx, &nim->msg.conn_stats_many);
+		ncm->cb = (uint32_t)nss_ipv6_conn_sync_many_msg_cb;
 		break;
 	}
 
@@ -263,7 +269,7 @@
 
 /*
  * nss_ipv6_tx()
- *	Transmit an ipv4 message to the FW.
+ *	Transmit an ipv6 message to the FW.
  */
 nss_tx_status_t nss_ipv6_tx(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_msg *nim)
 {
@@ -305,6 +311,24 @@
 }
 
 /*
+ * nss_ipv6_conn_sync_many_notify_register()
+ *	Register to receive IPv6 conn_sync_many message response.
+ */
+void nss_ipv6_conn_sync_many_notify_register(nss_ipv6_msg_callback_t cb)
+{
+	nss_ipv6_conn_sync_many_msg_cb = cb;
+}
+
+/*
+ * nss_ipv6_conn_sync_many_notify_unregister()
+ *	Unregister to receive IPv6 conn_sync_many message response.
+ */
+void nss_ipv6_conn_sync_many_notify_unregister(void)
+{
+	nss_ipv6_conn_sync_many_msg_cb = NULL;
+}
+
+/*
  * nss_ipv6_get_mgr()
  *
  * TODO: This only suppports a single ipv6, do we ever want to support more?
@@ -594,6 +618,8 @@
 EXPORT_SYMBOL(nss_ipv6_tx_with_size);
 EXPORT_SYMBOL(nss_ipv6_notify_register);
 EXPORT_SYMBOL(nss_ipv6_notify_unregister);
+EXPORT_SYMBOL(nss_ipv6_conn_sync_many_notify_register);
+EXPORT_SYMBOL(nss_ipv6_conn_sync_many_notify_unregister);
 EXPORT_SYMBOL(nss_ipv6_get_mgr);
 EXPORT_SYMBOL(nss_ipv6_register_handler);
 EXPORT_SYMBOL(nss_ipv6_register_sysctl);