diff --git a/nss_core.c b/nss_core.c
index e4c93f3..6180768 100644
--- a/nss_core.c
+++ b/nss_core.c
@@ -2080,8 +2080,7 @@
 {
 	int16_t processed, weight, count = 0;
 	uint32_t prio_cause, int_cause = 0, cause_type;
-	struct netdev_priv_instance *ndev_priv = netdev_priv(napi->dev);
-	struct int_ctx_instance *int_ctx = ndev_priv->int_ctx;
+	struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
 	struct nss_ctx_instance *nss_ctx = int_ctx->nss_ctx;
 
 	/*
@@ -2164,8 +2163,7 @@
  */
 int nss_core_handle_napi_emergency(struct napi_struct *napi, int budget)
 {
-	struct netdev_priv_instance *ndev_priv = netdev_priv(napi->dev);
-	struct int_ctx_instance *int_ctx = ndev_priv->int_ctx;
+	struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
 
 	nss_info_always("NSS core %d signal COREDUMP COMPLETE %x\n",
 				int_ctx->nss_ctx->id, int_ctx->cause);
@@ -2180,9 +2178,8 @@
  */
 int nss_core_handle_napi_queue(struct napi_struct *napi, int budget)
 {
-	struct netdev_priv_instance *ndev_priv = netdev_priv(napi->dev);
-	struct int_ctx_instance *int_ctx = ndev_priv->int_ctx;
 	int processed;
+	struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
 
 	processed = nss_core_handle_cause_queue(int_ctx, int_ctx->cause, budget);
 	if (processed < budget) {
@@ -2199,8 +2196,7 @@
  */
 int nss_core_handle_napi_non_queue(struct napi_struct *napi, int budget)
 {
-	struct netdev_priv_instance *ndev_priv = netdev_priv(napi->dev);
-	struct int_ctx_instance *int_ctx = ndev_priv->int_ctx;
+	struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
 
 	nss_core_handle_cause_nonqueue(int_ctx, int_ctx->cause, 0);
 	napi_complete(napi);
diff --git a/nss_core.h b/nss_core.h
index 5a6d982..e8a3817 100644
--- a/nss_core.h
+++ b/nss_core.h
@@ -412,7 +412,6 @@
 	uint32_t irq;			/* HLOS IRQ numbers bind to this instance */
 	uint32_t shift_factor;	/* Shift factor for this IRQ queue */
 	uint32_t cause;			/* Interrupt cause carried forward to BH */
-	struct net_device *ndev;/* Netdev associated with this interrupt ctx */
 	struct napi_struct napi;/* NAPI handler */
 };
 
@@ -499,6 +498,7 @@
 	struct nss_top_instance *nss_top;
 					/* Back pointer to NSS Top */
 	struct device *dev;		/* Pointer to the original device from probe */
+	struct net_device napi_ndev;    /* Dummy_netdev for NAPI */
 	uint32_t id;			/* Core ID for this instance */
 	void __iomem *nmap;		/* Pointer to NSS CSM registers */
 	void __iomem *vmap;		/* Virt mem pointer to virtual register map */
@@ -510,6 +510,7 @@
 	struct nss_meminfo_ctx meminfo_ctx;	/* Meminfo context */
 	enum nss_core_state state;	/* State of NSS core */
 	uint32_t c2c_start;		/* C2C start address */
+	uint32_t num_irq;                /* IRQ numbers per queue */
 	struct int_ctx_instance int_ctx[NSS_MAX_IRQ_PER_CORE];
 					/* Interrupt context instances for each queue */
 	struct hlos_h2n_desc_rings h2n_desc_rings[NSS_H2N_DESC_RING_NUM];
diff --git a/nss_hal/fsm9010/nss_hal_pvt.c b/nss_hal/fsm9010/nss_hal_pvt.c
index a2a9bf2..164e5bd 100644
--- a/nss_hal/fsm9010/nss_hal_pvt.c
+++ b/nss_hal/fsm9010/nss_hal_pvt.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -290,7 +290,7 @@
 	}
 
 	int_ctx->irq = npd->irq[irq_num];
-	netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi, 64);
+	netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi, 64);
 	return 0;
 }
 
diff --git a/nss_hal/ipq60xx/nss_hal_pvt.c b/nss_hal/ipq60xx/nss_hal_pvt.c
index 4843a39..42ce7a5 100644
--- a/nss_hal/ipq60xx/nss_hal_pvt.c
+++ b/nss_hal/ipq60xx/nss_hal_pvt.c
@@ -572,55 +572,55 @@
 	int err = -1, irq = npd->irq[irq_num];
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_EMPTY_BUFFER_SOS) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_EMPTY_BUFFERS_SOS;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_empty_buf_sos", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_EMPTY_BUFFER_QUEUE) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_EMPTY_BUFFER_RETURN_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_EMPTY_BUFFER_RETURN_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_EMPTY_BUFFER_QUEUE;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_empty_buf_queue", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_TX_UNBLOCKED) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_TX_UNBLOCKED_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_TX_UNBLOCKED_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_TX_UNBLOCKED;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss-tx-unblock", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_0) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_0;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue0", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_1) {
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_1;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue1", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_2) {
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_2;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue2", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_3) {
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_3;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue3", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_COREDUMP_COMPLETE) {
 		int_ctx->cause = NSS_N2H_INTR_COREDUMP_COMPLETE;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_emergency, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_emergency, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_coredump_complete", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_PAGED_EMPTY_BUFFER_SOS) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_PAGED_EMPTY_BUFFERS_SOS;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_paged_empty_buf_sos", int_ctx);
 	}
diff --git a/nss_hal/ipq806x/nss_hal_pvt.c b/nss_hal/ipq806x/nss_hal_pvt.c
index 4eedc90..e2a8203 100644
--- a/nss_hal/ipq806x/nss_hal_pvt.c
+++ b/nss_hal/ipq806x/nss_hal_pvt.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2013, 2015-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013, 2015-2019, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -1182,7 +1182,7 @@
 	}
 
 	int_ctx->irq = npd->irq[irq_num];
-	netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi, 64);
+	netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi, 64);
 
 	return 0;
 }
diff --git a/nss_hal/ipq807x/nss_hal_pvt.c b/nss_hal/ipq807x/nss_hal_pvt.c
index ed20b13..19702a2 100644
--- a/nss_hal/ipq807x/nss_hal_pvt.c
+++ b/nss_hal/ipq807x/nss_hal_pvt.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -654,55 +654,55 @@
 	irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY);
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_EMPTY_BUFFER_SOS) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_EMPTY_BUFFERS_SOS;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_empty_buf_sos", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_EMPTY_BUFFER_QUEUE) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_EMPTY_BUFFER_RETURN_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_EMPTY_BUFFER_RETURN_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_EMPTY_BUFFER_QUEUE;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_empty_buf_queue", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_TX_UNBLOCKED) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_TX_UNBLOCKED_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_TX_UNBLOCKED_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_TX_UNBLOCKED;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss-tx-unblock", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_0) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_0;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue0", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_1) {
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_1;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue1", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_2) {
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_2;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue2", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_DATA_QUEUE_3) {
 		int_ctx->cause = NSS_N2H_INTR_DATA_QUEUE_3;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_queue, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_queue3", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_COREDUMP_COMPLETE) {
 		int_ctx->cause = NSS_N2H_INTR_COREDUMP_COMPLETE;
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_emergency, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_emergency, NSS_DATA_COMMAND_BUFFER_PROCESSING_WEIGHT);
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_coredump_complete", int_ctx);
 	}
 
 	if (irq_num == NSS_HAL_N2H_INTR_PURPOSE_PAGED_EMPTY_BUFFER_SOS) {
-		netif_napi_add(int_ctx->ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
+		netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, nss_core_handle_napi_non_queue, NSS_EMPTY_BUFFER_SOS_PROCESSING_WEIGHT);
 		int_ctx->cause = NSS_N2H_INTR_PAGED_EMPTY_BUFFERS_SOS;
 		err = request_irq(irq, nss_hal_handle_irq, 0, "nss_paged_empty_buf_sos", int_ctx);
 	}
diff --git a/nss_hal/nss_hal.c b/nss_hal/nss_hal.c
index 1b48f0a..46a234b 100644
--- a/nss_hal/nss_hal.c
+++ b/nss_hal/nss_hal.c
@@ -131,74 +131,45 @@
 }
 
 /*
- * nss_hal_dummy_netdev_setup()
- *	Dummy setup for net_device handler
+ * nss_hal_clean_up_irq()
  */
-static void nss_hal_dummy_netdev_setup(struct net_device *ndev)
+static void nss_hal_clean_up_irq(struct int_ctx_instance *int_ctx)
 {
-
-}
-
-/*
- * nss_hal_clean_up_netdevice()
- */
-static void nss_hal_clean_up_netdevice(struct int_ctx_instance *int_ctx)
-{
-	if (int_ctx->irq) {
-		irq_clear_status_flags(int_ctx->irq, IRQ_DISABLE_UNLAZY);
-		free_irq(int_ctx->irq, int_ctx);
-		int_ctx->irq = 0;
-	}
-
-	if (!int_ctx->ndev) {
+	if (!int_ctx->irq) {
 		return;
 	}
 
-	unregister_netdev(int_ctx->ndev);
-	free_netdev(int_ctx->ndev);
-	int_ctx->ndev = NULL;
+	/*
+	 * Wait here till the poll is complete.
+	 */
+	napi_disable(&int_ctx->napi);
+
+	/*
+	 * Interrupt can be raised here before free_irq() but as napi is
+	 * already disabled, it will be never sheduled from hard_irq
+	 * context.
+	 */
+	irq_clear_status_flags(int_ctx->irq, IRQ_DISABLE_UNLAZY);
+	free_irq(int_ctx->irq, int_ctx);
+	int_ctx->irq = 0;
+
+	netif_napi_del(&int_ctx->napi);
 }
 
 /*
- * nss_hal_register_netdevice()
+ * nss_hal_register_irq()
  */
-static int nss_hal_register_netdevice(struct nss_ctx_instance *nss_ctx, struct nss_platform_data *npd, int irq_num)
+static int nss_hal_register_irq(struct nss_ctx_instance *nss_ctx, struct nss_platform_data *npd,
+					struct net_device *netdev, int irq_num)
 {
 	struct nss_top_instance *nss_top = &nss_top_main;
-	struct net_device *netdev;
-	struct netdev_priv_instance *ndev_priv;
 	struct int_ctx_instance *int_ctx = &nss_ctx->int_ctx[irq_num];
 	int err = 0;
 
 	/*
-	 * Register netdevice handlers
-	 */
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 16, 0))
-	netdev = alloc_netdev(sizeof(struct netdev_priv_instance),
-					"qca-nss-dev%d", nss_hal_dummy_netdev_setup);
-#else
-	netdev = alloc_netdev(sizeof(struct netdev_priv_instance),
-					"qca-nss-dev%d", NET_NAME_ENUM, nss_hal_dummy_netdev_setup);
-#endif
-	if (!netdev) {
-		nss_warning("%p: Could not allocate net_device for queue %d\n", nss_ctx, irq_num);
-		return -ENOMEM;
-	}
-
-	netdev->netdev_ops = &nss_netdev_ops;
-	netdev->ethtool_ops = &nss_ethtool_ops;
-	err = register_netdev(netdev);
-	if (err) {
-		nss_warning("%p: Could not register net_device %d\n", nss_ctx, irq_num);
-		free_netdev(netdev);
-		return err;
-	}
-
-	/*
 	 * request for IRQs
 	 */
 	int_ctx->nss_ctx = nss_ctx;
-	int_ctx->ndev = netdev;
 	err = nss_top->hal_ops->request_irq(nss_ctx, npd, irq_num);
 	if (err) {
 		nss_warning("%p: IRQ request for queue %d failed", nss_ctx, irq_num);
@@ -208,8 +179,6 @@
 	/*
 	 * Register NAPI for NSS core interrupt
 	 */
-	ndev_priv = netdev_priv(netdev);
-	ndev_priv->int_ctx = int_ctx;
 	napi_enable(&int_ctx->napi);
 	return 0;
 }
@@ -253,6 +222,7 @@
 	nss_ctx = &nss_top->nss[nss_dev->id];
 	nss_ctx->id = nss_dev->id;
 #endif
+	nss_ctx->num_irq = npd->num_irq;
 	nss_ctx->nss_top = nss_top;
 
 	/*
@@ -322,10 +292,15 @@
 		goto err_init;
 	}
 
+	/*
+	 * Initialize the dummy netdevice.
+	 */
+	init_dummy_netdev(&nss_ctx->napi_ndev);
+
 	for (i = 0; i < npd->num_irq; i++) {
-		err = nss_hal_register_netdevice(nss_ctx, npd, i);
+		err = nss_hal_register_irq(nss_ctx, npd, &nss_ctx->napi_ndev, i);
 		if (err) {
-			goto err_register_netdevice;
+			goto err_register_irq;
 		}
 	}
 
@@ -575,7 +550,7 @@
 	 */
 	err = nss_top->hal_ops->core_reset(nss_dev, nss_ctx->nmap, nss_ctx->load, nss_top->clk_src);
 	if (err) {
-		goto err_register_netdevice;
+		goto err_register_irq;
 	}
 
 	/*
@@ -593,20 +568,18 @@
 	}
 
 	/*
-	 * Enable interrupts for NSS core
+	 * Enable interrupts for NSS core.
 	 */
-	nss_hal_enable_interrupt(nss_ctx, nss_ctx->int_ctx[0].shift_factor, NSS_HAL_SUPPORTED_INTERRUPTS);
-
-	if (npd->num_queue > 1) {
-		nss_hal_enable_interrupt(nss_ctx, nss_ctx->int_ctx[1].shift_factor, NSS_HAL_SUPPORTED_INTERRUPTS);
+	for (i = 0; i < npd->num_irq; i++) {
+		nss_hal_enable_interrupt(nss_ctx, nss_ctx->int_ctx[i].shift_factor, NSS_HAL_SUPPORTED_INTERRUPTS);
 	}
 
 	nss_info("%p: All resources initialized and nss core%d has been brought out of reset", nss_ctx, nss_dev->id);
 	goto out;
 
-err_register_netdevice:
-	for (i = 0; i < npd->num_queue; i++) {
-		nss_hal_clean_up_netdevice(&nss_ctx->int_ctx[i]);
+err_register_irq:
+	for (i = 0; i < npd->num_irq; i++) {
+		nss_hal_clean_up_irq(&nss_ctx->int_ctx[i]);
 	}
 
 err_init:
@@ -635,6 +608,7 @@
 {
 	struct nss_top_instance *nss_top = &nss_top_main;
 	struct nss_ctx_instance *nss_ctx = &nss_top->nss[nss_dev->id];
+	int i;
 
 	/*
 	 * Clean up debugfs
@@ -642,18 +616,12 @@
 	nss_stats_clean();
 
 	/*
-	 * Clean up netdev/interrupts
+	 * Clear up the resources associated with the interrupt
 	 */
-	nss_hal_disable_interrupt(nss_ctx, nss_ctx->int_ctx[0].shift_factor, NSS_HAL_SUPPORTED_INTERRUPTS);
-	nss_hal_clean_up_netdevice(&nss_ctx->int_ctx[0]);
-
-	/*
-	 * Check if second interrupt is supported
-	 * If so then clear resources for second interrupt as well
-	 */
-	if (nss_ctx->int_ctx[1].ndev) {
-		nss_hal_disable_interrupt(nss_ctx, nss_ctx->int_ctx[1].shift_factor, NSS_HAL_SUPPORTED_INTERRUPTS);
-		nss_hal_clean_up_netdevice(&nss_ctx->int_ctx[1]);
+	for (i = 0; i < nss_ctx->num_irq; i++) {
+		nss_hal_disable_interrupt(nss_ctx, nss_ctx->int_ctx[i].shift_factor,
+					  NSS_HAL_SUPPORTED_INTERRUPTS);
+		nss_hal_clean_up_irq(&nss_ctx->int_ctx[i]);
 	}
 
 	/*
