|
@@ -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.
|
|
|
*
|
|
@@ -1744,6 +1744,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;
|
|
@@ -1760,7 +1761,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);
|