[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_l2tpv2.c b/nss_l2tpv2.c
index 3b2a03d..0b37252 100644
--- a/nss_l2tpv2.c
+++ b/nss_l2tpv2.c
@@ -231,7 +231,7 @@
nss_top_main.l2tpv2_msg_callback = event_callback;
- nss_core_register_handler(if_num, nss_l2tpv2_handler, NULL);
+ nss_core_register_handler(nss_ctx, if_num, nss_l2tpv2_handler, NULL);
spin_lock_bh(&nss_l2tpv2_session_debug_stats_lock);
for (i = 0; i < NSS_MAX_L2TPV2_DYNAMIC_INTERFACES; i++) {
@@ -265,7 +265,7 @@
nss_top_main.l2tpv2_msg_callback = NULL;
- nss_core_unregister_handler(if_num);
+ nss_core_unregister_handler(nss_ctx, if_num);
spin_lock_bh(&nss_l2tpv2_session_debug_stats_lock);
for (i = 0; i < NSS_MAX_L2TPV2_DYNAMIC_INTERFACES; i++) {
@@ -299,8 +299,10 @@
*/
void nss_l2tpv2_register_handler(void)
{
+ struct nss_ctx_instance *nss_ctx = nss_l2tpv2_get_context();
+
nss_info("nss_l2tpv2_register_handler");
- nss_core_register_handler(NSS_L2TPV2_INTERFACE, nss_l2tpv2_handler, NULL);
+ nss_core_register_handler(nss_ctx, NSS_L2TPV2_INTERFACE, nss_l2tpv2_handler, NULL);
}
EXPORT_SYMBOL(nss_l2tpv2_get_context);