From 9c19c7f2ddab78c056e2a8441a6d4b6a82ae8015 Mon Sep 17 00:00:00 2001 From: Praveen Kurapati Date: Mon, 22 Jul 2019 15:11:28 +0530 Subject: [PATCH] msm: ipa3: vote to turbo incase of APQ platform Change the modem vote to turbo during usb-tethering only when APQ platform was configured. Change-Id: Ie41b9ac11eba954705acbf15836a632ee9c01347 Signed-off-by: Praveen Kurapati --- ipa/ipa_v3/rmnet_ipa.c | 26 ++++++++++++++++---------- ipa/ipa_v3/teth_bridge.c | 7 ++++--- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ipa/ipa_v3/rmnet_ipa.c b/ipa/ipa_v3/rmnet_ipa.c index 8e56e2d434af..d1f23c52376d 100644 --- a/ipa/ipa_v3/rmnet_ipa.c +++ b/ipa/ipa_v3/rmnet_ipa.c @@ -2147,19 +2147,25 @@ int ipa3_wwan_set_modem_state(struct wan_ioctl_notify_wan_state *state) return -EINVAL; if (state->up) { - bw_mbps = 5200; - ret = ipa3_vote_for_bus_bw(&bw_mbps); - if (ret) { - IPAERR("Failed to vote for bus BW (%u)\n", bw_mbps); - return ret; + if (rmnet_ipa3_ctx->ipa_config_is_apq) { + bw_mbps = 5200; + ret = ipa3_vote_for_bus_bw(&bw_mbps); + if (ret) { + IPAERR("Failed to vote for bus BW (%u)\n", + bw_mbps); + return ret; + } } ret = ipa_pm_activate_sync(rmnet_ipa3_ctx->q6_teth_pm_hdl); } else { - bw_mbps = 0; - ret = ipa3_vote_for_bus_bw(&bw_mbps); - if (ret) { - IPAERR("Failed to vote for bus BW (%u)\n", bw_mbps); - return ret; + if (rmnet_ipa3_ctx->ipa_config_is_apq) { + bw_mbps = 0; + ret = ipa3_vote_for_bus_bw(&bw_mbps); + if (ret) { + IPAERR("Failed to vote for bus BW (%u)\n", + bw_mbps); + return ret; + } } ret = ipa_pm_deactivate_sync(rmnet_ipa3_ctx->q6_teth_pm_hdl); } diff --git a/ipa/ipa_v3/teth_bridge.c b/ipa/ipa_v3/teth_bridge.c index 99cdcf54c113..6bb8f96dbdff 100644 --- a/ipa/ipa_v3/teth_bridge.c +++ b/ipa/ipa_v3/teth_bridge.c @@ -178,9 +178,10 @@ int ipa3_teth_bridge_connect(struct teth_bridge_connect_params *connect_params) TETH_ERR("fail to register with PM %d\n", res); return res; } - /* vote for turbo */ - res = ipa_pm_set_throughput(ipa3_teth_ctx->modem_pm_hdl, - 5200); + /* vote for turbo in case of MHIP channels*/ + if (ipa3_is_apq()) + res = ipa_pm_set_throughput(ipa3_teth_ctx->modem_pm_hdl, + 5200); res = ipa_pm_activate_sync(ipa3_teth_ctx->modem_pm_hdl); TETH_DBG_FUNC_EXIT();