mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Avoid ROC duration to exceed maximum ROC duration
While extending the duration for ROC, the driver updates the new duration value with the 2 or 5 times of the current duration value, that leads to exceed the maximum ROC duration value. The change is to check the current duration value and increase it accordingly to avoid exceeding the maximum ROC duration value. Change-Id: I05658adfdeae32eecdfff939d132484c584c0aa8 CRs-Fixed: 2008441
This commit is contained in:
parent
200b9dde1a
commit
8523472ac8
1 changed files with 6 additions and 4 deletions
|
|
@ -591,10 +591,12 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter,
|
|||
|
||||
/* Extending duration for proactive extension logic for RoC */
|
||||
duration = pRemainChanCtx->duration;
|
||||
if (isGoPresent == true)
|
||||
duration = P2P_ROC_DURATION_MULTIPLIER_GO_PRESENT * duration;
|
||||
else
|
||||
duration = P2P_ROC_DURATION_MULTIPLIER_GO_ABSENT * duration;
|
||||
if (duration < HDD_P2P_MAX_ROC_DURATION) {
|
||||
if (isGoPresent == true)
|
||||
duration *= P2P_ROC_DURATION_MULTIPLIER_GO_PRESENT;
|
||||
else
|
||||
duration *= P2P_ROC_DURATION_MULTIPLIER_GO_ABSENT;
|
||||
}
|
||||
|
||||
hdd_prevent_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC);
|
||||
qdf_runtime_pm_prevent_suspend(pHddCtx->runtime_context.roc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue