Browse Source

qcacmn: Fix qdf_get_monotonic_boottime_ns()

Fix the API implementation to account for time spent in system
suspend. This matches with API qdf_get_monotonic_boottime()
implementation.

Change-Id: I4bf8980bfc4500c035e8de7df4d8a18dfc6775ae
CRs-Fixed: 2211953
Mahesh Kumar Kalikot Veetil 7 years ago
parent
commit
fe276b3bc7
2 changed files with 3 additions and 2 deletions
  1. 1 1
      qdf/inc/qdf_mc_timer.h
  2. 2 1
      qdf/linux/src/qdf_mc_timer.c

+ 1 - 1
qdf/inc/qdf_mc_timer.h

@@ -263,7 +263,7 @@ unsigned long qdf_mc_timer_get_system_time(void);
 /**
  * qdf_get_monotonic_boottime_ns() - Get kernel boottime in ns
  *
- * Return: kernel boottime in nano sec
+ * Return: kernel boottime in nano sec (includes time spent in suspend)
  */
 s64 qdf_get_monotonic_boottime_ns(void);
 

+ 2 - 1
qdf/linux/src/qdf_mc_timer.c

@@ -783,7 +783,8 @@ s64 qdf_get_monotonic_boottime_ns(void)
 {
 	struct timespec ts;
 
-	ktime_get_ts(&ts);
+	get_monotonic_boottime(&ts);
+
 	return timespec_to_ns(&ts);
 }
 qdf_export_symbol(qdf_get_monotonic_boottime_ns);