qcacmn: Add api to set intermediate EP vote access
Add api to set intermediate EP vote access state. Make sure reg work handler is complete before setting intermediate vote access. Change-Id: Ib229d9af8b1e58505a9ae5fbf39aa912ca21a3c3 CRs-Fixed: 2994040
This commit is contained in:

committed by
Madan Koyyalamudi

parent
7aa5b3ebb7
commit
b7e633e910
@@ -1059,12 +1059,30 @@ QDF_STATUS hif_try_prevent_ep_vote_access(struct hif_opaque_softc *hif_ctx)
|
||||
hif_err("timeout wait for pending work %d ", work);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
qdf_sleep(5);
|
||||
qdf_sleep(10);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void hif_set_ep_intermediate_vote_access(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
uint8_t vote_access;
|
||||
|
||||
vote_access = qdf_atomic_read(&scn->ep_vote_access);
|
||||
|
||||
if (vote_access != HIF_EP_VOTE_ACCESS_DISABLE)
|
||||
hif_info("EP vote changed from:%u to intermediate state",
|
||||
vote_access);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(hif_try_prevent_ep_vote_access(hif_ctx)))
|
||||
QDF_BUG(0);
|
||||
|
||||
qdf_atomic_set(&scn->ep_vote_access,
|
||||
HIF_EP_VOTE_INTERMEDIATE_ACCESS);
|
||||
}
|
||||
|
||||
void hif_allow_ep_vote_access(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
|
Reference in New Issue
Block a user