Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da801d39 authored by Karthik Kantamneni's avatar Karthik Kantamneni Committed by Gerrit - the friendly Code Review server
Browse files

qcacmn: Check for EP vote access during prevent l1 state

By the time driver reaches prevent l1 call there is chance
of EP vote access getting disabled in-flight, to handle
this skip vote request if EP vote access disabled in-flight.

Change-Id: I91e1cdfc08492188ad8614339d5918c294bf10e4
CRs-Fixed: 3113786
parent db781821
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -894,6 +894,14 @@ int hif_prevent_link_low_power_states(struct hif_opaque_softc *hif)
	if (pld_is_pci_ep_awake(scn->qdf_dev->dev) == -ENOTSUPP)
		return 0;

	if ((qdf_atomic_read(&scn->dp_ep_vote_access) ==
	     HIF_EP_VOTE_ACCESS_DISABLE) &&
	    (qdf_atomic_read(&scn->ep_vote_access) ==
	    HIF_EP_VOTE_ACCESS_DISABLE)) {
		hif_info_high("EP access disabled in flight skip vote");
		return 0;
	}

	start_time = curr_time = qdf_system_ticks_to_msecs(qdf_system_ticks());
	while (pld_is_pci_ep_awake(scn->qdf_dev->dev) &&
	       curr_time <= start_time + EP_WAKE_RESET_DELAY_TIMEOUT_MS) {