diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index 0adcd4d712..fae142f96a 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -507,6 +507,28 @@ int cdp_txrx_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, return 0; } +/** + * cdp_txrx_intr_attach(): function to attach and configure interrupt + * @soc: soc handle + */ +static inline QDF_STATUS cdp_txrx_intr_attach(ol_txrx_soc_handle soc) +{ + if (soc->ops->cmn_drv_ops->txrx_intr_attach) + return soc->ops->cmn_drv_ops->txrx_intr_attach(soc); + + return 0; +} + +/** + * cdp_txrx_intr_detach(): function to detach interrupt + * @soc: soc handle + */ +static inline void cdp_txrx_intr_detach(ol_txrx_soc_handle soc) +{ + if (soc->ops->cmn_drv_ops->txrx_intr_detach) + soc->ops->cmn_drv_ops->txrx_intr_detach(soc); +} + /** * cdp_display_stats(): function to map to dump stats * @soc: soc handle diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 789a4d5c6f..1f142b4ed6 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -206,6 +206,8 @@ struct cdp_cmn_ops { void (*txrx_soc_set_nss_cfg)(ol_txrx_soc_handle soc, int config); int(*txrx_soc_get_nss_cfg)(ol_txrx_soc_handle soc); + QDF_STATUS (*txrx_intr_attach)(void *soc); + void (*txrx_intr_detach)(void *soc); }; struct cdp_ctrl_ops { diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 424a81fe28..a05dc16f1b 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -965,8 +965,6 @@ static int dp_soc_cmn_setup(struct dp_soc *soc) goto fail1; } - dp_soc_interrupt_attach(soc); - /* Setup HW REO */ qdf_mem_zero(&reo_params, sizeof(reo_params)); @@ -1413,8 +1411,6 @@ static void dp_soc_detach_wifi3(void *txrx_soc) qdf_atomic_set(&soc->cmn_init_done, 0); - dp_soc_interrupt_detach(soc); - for (i = 0; i < MAX_PDEV_CNT; i++) { if (soc->pdev_list[i]) dp_pdev_detach_wifi3( @@ -3779,6 +3775,8 @@ static struct cdp_cmn_ops dp_ops_cmn = { .display_stats = dp_txrx_dump_stats, .txrx_soc_set_nss_cfg = dp_soc_set_nss_cfg_wifi3, .txrx_soc_get_nss_cfg = dp_soc_get_nss_cfg_wifi3, + .txrx_intr_attach = dp_soc_interrupt_attach, + .txrx_intr_detach = dp_soc_interrupt_detach, /* TODO: Add other functions */ };