Bläddra i källkod

qcacld-3.0: Add check for cca busy time

When ini "exclude_selftx_from_cca_busy" is set,
the self tx time is deducted from cca busy time.
Currently when the cca busy time is less than tx time
the value becomes negative.

To fix this add check value of cca busy time and tx time.

CRs-Fixed: 3653488
Change-Id: I9e0321dc58172362d9d9db2801b40714232da9ec
Amruta Kulkarni 1 år sedan
förälder
incheckning
f4a03c5828
1 ändrade filer med 5 tillägg och 3 borttagningar
  1. 5 3
      core/wma/src/wma_utils.c

+ 5 - 3
core/wma/src/wma_utils.c

@@ -2393,7 +2393,9 @@ __wma_unified_link_radio_stats_event_handler(tp_wma_handle wma_handle,
 		}
 
 		for (count = 0; count < radio_stats->num_channels; count++) {
-			if (exclude_selftx_from_cca_busy)
+			if (exclude_selftx_from_cca_busy &&
+			    channel_stats->cca_busy_time >=
+			    channel_stats->tx_time)
 				channel_stats->cca_busy_time -=
 						channel_stats->tx_time;
 
@@ -2421,7 +2423,7 @@ __wma_unified_link_radio_stats_event_handler(tp_wma_handle wma_handle,
 
 			if (stats_len >= (WMI_MAX_RADIO_STATS_LOGS -
 					WMI_MAX_RADIO_SINGLE_STATS_LEN)) {
-				wmi_nofl_debug("freq[width][freq0][freq1][awake time][cca busy time][rx time][tx time] :%s",
+				wmi_nofl_debug("freq[width][freq0][freq1][awake time][cca busy time][tx time][rx time] :%s",
 					       info);
 				stats_len = 0;
 			}
@@ -2437,7 +2439,7 @@ __wma_unified_link_radio_stats_event_handler(tp_wma_handle wma_handle,
 		}
 
 		if (stats_len)
-			wmi_nofl_debug("freq[width][freq0][freq1][awake time][cca busy time][rx time][tx time] :%s",
+			wmi_nofl_debug("freq[width][freq0][freq1][awake time][cca busy time][tx time][rx time] :%s",
 				       info);
 
 		qdf_mem_free(info);