Kaynağa Gözat

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
Paul Zhang 8 yıl önce
ebeveyn
işleme
5e1eccc664
1 değiştirilmiş dosya ile 13 ekleme ve 2 silme
  1. 13 2
      core/wma/src/wma_power.c

+ 13 - 2
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.
  *
@@ -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);