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

Commit 40f3168f authored by Mohit Khanna's avatar Mohit Khanna Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Force "IDLE" level on BW timer stop

Bus bandwidth timer tweaks certain aspects of the system during
throughput transitions. For example, when throughput goes high, system
parameters are tweaked in favor of system performance. Hence, when high
performance is not needed, the timer relies on throughput transitioning
to low to reset the parameters in favor of power.

During a corner case, its possible that while througput is high, wlan
adapter is immediately brought down. This stops the bus bandwidth timer
abruptly without letting the the timer detect a throughput transition to
low. This may result in higher power consumption even when there is no
data activity or throughput is low.

Explicilty force a transition to "IDLE" state when bus bandwidth timer
is stopped.

Change-Id: I0a0a64a855714b1a8b5a52a048604fef54a0ee41
CRs-Fixed: 3087118
parent 77d79982
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -16195,15 +16195,16 @@ static void __hdd_bus_bw_compute_timer_stop(struct hdd_context *hdd_ctx)
exit:
	/**
	 * This check if for the case where the bus bw timer is forcibly
	 * This check is for the case where the bus bw timer is forcibly
	 * stopped. We should remove the bus bw voting, if no adapter is
	 * connected
	 */
	if (!is_any_adapter_conn) {
		uint64_t interval_us =
			hdd_ctx->config->bus_bw_compute_interval * 1000;
		qdf_atomic_set(&hdd_ctx->num_latency_critical_clients, 0);
		hdd_ctx->cur_vote_level = PLD_BUS_WIDTH_NONE;
		pld_request_bus_bandwidth(hdd_ctx->parent_dev,
					  PLD_BUS_WIDTH_NONE);
		hdd_pld_request_bus_bandwidth(hdd_ctx, 0, 0, interval_us);
	}
}