qcacmn: Add CDP APIs for configuring interrupt

Add CDP API for interrupt configuration to decouple interrupt
setup from soc attach / detach.

Change-Id: I422205ff5687fdc4a0936c68850455cc4e733e4d
CRs-fixed: 2046055
This commit is contained in:
Venkateswara Swamy Bandaru
2017-05-19 20:20:30 +05:30
committed by snandini
parent 1dfdf64381
commit a95b324a8c
3 changed files with 26 additions and 4 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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 */
};