qcacld-3.0: Enable interrupts after dp srngs are initialized
Currently the interrupts are enabled before the datapath srngs are initialized. This causes an invalid access of srngs when any interrupt is received before srngs initialization, which can happen during operation mode switch, eg during switch from monitor mode to mission mode. To avoid this invalid access of srngs, enable the interrupts only after the srngs are initialized. CRs-Fixed: 2486050 Change-Id: I9e436f30e2f6b67e02db3ed32231570ab51d5f7b
This commit is contained in:
@@ -785,12 +785,6 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
|
||||
QDF_STATUS qdf_status;
|
||||
struct dp_txrx_config dp_config;
|
||||
|
||||
if (cdp_txrx_intr_attach(gp_cds_context->dp_soc)
|
||||
!= QDF_STATUS_SUCCESS) {
|
||||
cds_alert("Failed to attach interrupts");
|
||||
goto close;
|
||||
}
|
||||
|
||||
cds_set_context(QDF_MODULE_ID_TXRX,
|
||||
cdp_pdev_attach(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
(struct cdp_ctrl_objmgr_pdev *)gp_cds_context->cfg_ctx,
|
||||
@@ -800,7 +794,13 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
|
||||
/* Critical Error ... Cannot proceed further */
|
||||
cds_alert("Failed to open TXRX");
|
||||
QDF_ASSERT(0);
|
||||
goto intr_close;
|
||||
goto close;
|
||||
}
|
||||
|
||||
if (cdp_txrx_intr_attach(gp_cds_context->dp_soc)
|
||||
!= QDF_STATUS_SUCCESS) {
|
||||
cds_alert("Failed to attach interrupts");
|
||||
goto pdev_detach;
|
||||
}
|
||||
|
||||
dp_config.enable_rx_threads =
|
||||
@@ -812,7 +812,7 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
|
||||
&dp_config);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
goto pdev_detach;
|
||||
goto intr_close;
|
||||
|
||||
ucfg_pmo_psoc_set_txrx_handle(psoc, gp_cds_context->pdev_txrx_ctx);
|
||||
ucfg_ocb_set_txrx_handle(psoc, gp_cds_context->pdev_txrx_ctx);
|
||||
@@ -821,11 +821,13 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
return 0;
|
||||
|
||||
intr_close:
|
||||
cdp_txrx_intr_detach(gp_cds_context->dp_soc);
|
||||
|
||||
pdev_detach:
|
||||
cdp_pdev_detach(gp_cds_context->dp_soc,
|
||||
cds_get_context(QDF_MODULE_ID_TXRX), false);
|
||||
intr_close:
|
||||
cdp_txrx_intr_detach(gp_cds_context->dp_soc);
|
||||
|
||||
close:
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user