[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_ppe.c b/nss_ppe.c
index 06f0a6c..cd3e1f6 100644
--- a/nss_ppe.c
+++ b/nss_ppe.c
@@ -211,6 +211,16 @@
}
/*
+ * nss_ppe_get_context()
+ * get NSS context instance for ppe
+ */
+struct nss_ctx_instance *nss_ppe_get_context(void)
+{
+ return &nss_top_main.nss[nss_top_main.ppe_handler_id];
+}
+EXPORT_SYMBOL(nss_ppe_get_context);
+
+/*
* nss_ppe_register_handler()
* debugfs stats msg handler received on static ppe interface
*
@@ -218,7 +228,9 @@
*/
void nss_ppe_register_handler(void)
{
- nss_core_register_handler(NSS_PPE_INTERFACE, nss_ppe_handler, NULL);
+ struct nss_ctx_instance *nss_ctx = nss_ppe_get_context();
+
+ nss_core_register_handler(nss_ctx, NSS_PPE_INTERFACE, nss_ppe_handler, NULL);
}
/*