[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_wifi.c b/nss_wifi.c
index f0a3b17..a628daf 100644
--- a/nss_wifi.c
+++ b/nss_wifi.c
@@ -270,11 +270,15 @@
*/
void nss_wifi_register_handler(void )
{
+ struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *)&nss_top_main.nss[nss_top_main.wifi_handler_id];
+
+ nss_assert(nss_ctx);
+
nss_info("nss_wifi_register_handler");
- nss_core_register_handler(NSS_WIFI_INTERFACE0, nss_wifi_handler, NULL);
- nss_core_register_handler(NSS_WIFI_INTERFACE1, nss_wifi_handler, NULL);
- nss_core_register_handler(NSS_WIFI_INTERFACE2, nss_wifi_handler, NULL);
+ nss_core_register_handler(nss_ctx, NSS_WIFI_INTERFACE0, nss_wifi_handler, NULL);
+ nss_core_register_handler(nss_ctx, NSS_WIFI_INTERFACE1, nss_wifi_handler, NULL);
+ nss_core_register_handler(nss_ctx, NSS_WIFI_INTERFACE2, nss_wifi_handler, NULL);
}
EXPORT_SYMBOL(nss_wifi_get_context);