[qca-nss-drv] Add new APIs for type specific msg init

Add new APIs for type specific msg init which inturn would
call the nss_cmn_msg_init().

Change-Id: I8cad8d3f69beef5c968b1bd09810916bbe9fc80f
Signed-off-by: Sundarajan Srinivasan <sundaraj@codeaurora.org>
diff --git a/nss_ipv4.c b/nss_ipv4.c
index a81c9e1..1052de8 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -293,7 +293,7 @@
  * nss_ipv4_conn_cfg_callback()
  *	call back function for the ipv4 connection configuration handler
  */
-static void nss_ipv4_conn_cfg_callback(void *app_data, struct nss_if_msg *nim)
+static void nss_ipv4_conn_cfg_callback(void *app_data, struct nss_ipv4_msg *nim)
 {
 
 	if (nim->cm.response != NSS_CMN_RESPONSE_ACK) {
@@ -377,8 +377,8 @@
 
 	nss_info("%p: IPv4 supported connections: %d\n", nss_ctx, nss_ipv4_conn_cfg);
 
-	nss_cmn_msg_init(&nim.cm, NSS_IPV4_RX_INTERFACE, NSS_IPV4_TX_CONN_CFG_RULE_MSG,
-	sizeof(struct nss_ipv4_rule_conn_cfg_msg), nss_ipv4_conn_cfg_callback, NULL);
+	nss_ipv4_msg_init(&nim, NSS_IPV4_RX_INTERFACE, NSS_IPV4_TX_CONN_CFG_RULE_MSG,
+	sizeof(struct nss_ipv4_rule_conn_cfg_msg), (nss_ipv4_msg_callback_t *)nss_ipv4_conn_cfg_callback, NULL);
 
 	nirccm = &nim.msg.rule_conn_cfg;
 	nirccm->num_conn = htonl(nss_ipv4_conn_cfg);
@@ -501,9 +501,20 @@
 	}
 }
 
+/*
+ * nss_ipv4_msg_init()
+ *	Initialize IPv4 message.
+ */
+void nss_ipv4_msg_init(struct nss_ipv4_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
+			nss_ipv4_msg_callback_t *cb, void *app_data)
+{
+	nss_cmn_msg_init(&nim->cm, if_num, type, len, (void *)cb, app_data);
+}
+
 EXPORT_SYMBOL(nss_ipv4_tx);
 EXPORT_SYMBOL(nss_ipv4_notify_register);
 EXPORT_SYMBOL(nss_ipv4_notify_unregister);
 EXPORT_SYMBOL(nss_ipv4_get_mgr);
 EXPORT_SYMBOL(nss_ipv4_register_sysctl);
 EXPORT_SYMBOL(nss_ipv4_unregister_sysctl);
+EXPORT_SYMBOL(nss_ipv4_msg_init);