[qca-nss-drv] Update callback handler
Update the callback handler to handle
per core requests
Change-Id: Id0502903ffd26c81620e34427af7e2f626a572b3
Signed-off-by: Thomas Wu <wthomas@codeaurora.org>
diff --git a/nss_tun6rd.c b/nss_tun6rd.c
index 2b7f0cf..d538b13 100644
--- a/nss_tun6rd.c
+++ b/nss_tun6rd.c
@@ -164,15 +164,15 @@
nss_top_main.tun6rd_msg_callback = event_callback;
- nss_core_register_handler(if_num, nss_tun6rd_handler, NULL);
+ nss_core_register_handler(nss_ctx, if_num, nss_tun6rd_handler, NULL);
return nss_ctx;
}
/*
- * nss_get_tun6rd_context()
+ * nss_tun6rd_get_context()
*/
-struct nss_ctx_instance * nss_tun6rd_get_context()
+struct nss_ctx_instance *nss_tun6rd_get_context()
{
return (struct nss_ctx_instance *)&nss_top_main.nss[nss_top_main.tun6rd_handler_id];
}
@@ -194,7 +194,7 @@
nss_top_main.tun6rd_msg_callback = NULL;
- nss_core_unregister_handler(if_num);
+ nss_core_unregister_handler(nss_ctx, if_num);
}
/*
@@ -203,7 +203,7 @@
*/
void nss_tun6rd_msg_init(struct nss_tun6rd_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len, void *cb, void *app_data)
{
- nss_cmn_msg_init(&ncm->cm, if_num, type, len, cb, app_data);
+ nss_cmn_msg_init(&ncm->cm, if_num, type, len, cb, app_data);
}
EXPORT_SYMBOL(nss_tun6rd_get_context);