diff options
| author | Paul Zhang <paulz@codeaurora.org> | 2016-12-28 17:12:41 +0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-12 02:19:40 -0800 |
| commit | 47fcd2f9a09ac37a7a9484cd98c30acdad94ef8e (patch) | |
| tree | 0b31eaaba3a05edae9621bb880430622bae8124c | |
| parent | 98fe396f75545a424f743bc7981f4b6a991612a1 (diff) | |
qcacld-3.0: Calculate LI per AP's BI and DTIM
Propagation from qcacld-2.0 to qcacld-3.0.
Assuming gEnableModulatedDTIM=9 and gMaxLIModulatedDTIM=9,
when AP's beacon interval is 100ms, the DUT's listen
interval is 900ms, it is OK; But if AP's beacon interval
is 200ms or more, the DUT's listen interval is 1800ms
or even more. This causes large data latency.
Change-Id: I622ae9ab21aaf23c585ca67efa8452a705f8e3f0
CRs-Fixed: 1087619
| -rw-r--r-- | core/wma/src/wma_power.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c index 885b696c1f04..8e263dc96af5 100644 --- a/core/wma/src/wma_power.c +++ b/core/wma/src/wma_power.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1748,6 +1748,7 @@ static void wma_set_vdev_suspend_dtim(tp_wma_handle wma, uint8_t vdev_id) QDF_STATUS ret; uint32_t listen_interval; uint32_t max_mod_dtim; + uint32_t beacon_interval_mod; if (wma->staDynamicDtim) { listen_interval = wma->staDynamicDtim; @@ -1764,7 +1765,17 @@ static void wma_set_vdev_suspend_dtim(tp_wma_handle wma, uint8_t vdev_id) * Else * Set LI to maxModulatedDTIM * AP_DTIM */ - max_mod_dtim = wma->staMaxLIModDtim / iface->dtimPeriod; + + beacon_interval_mod = iface->beaconInterval / 100; + if (beacon_interval_mod == 0) + beacon_interval_mod = 1; + + max_mod_dtim = wma->staMaxLIModDtim + / (iface->dtimPeriod*beacon_interval_mod); + + if (max_mod_dtim <= 0) + max_mod_dtim = 1; + if (max_mod_dtim >= wma->staModDtim) { listen_interval = (wma->staModDtim * iface->dtimPeriod); |
