소스 검색

qcacmn: Set NOL left time as 0 in print nol if it is negative

In some platform the timer is not precise. NOL timer may take more
than expected. During this time When print nol is called, NOL left
time is negative.

Set NOL left time as 0 in print nol if it is negative.

Change-Id: Ic6aec5f7ee080625adb39ae75785a271ad782f6c
CRs-Fixed: 2926548
bings 4 년 전
부모
커밋
8144d64a26
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      umac/dfs/core/src/misc/dfs_nol.c

+ 4 - 1
umac/dfs/core/src/misc/dfs_nol.c

@@ -400,7 +400,10 @@ void dfs_print_nol(struct wlan_dfs *dfs)
 	while (nol) {
 		diff_ms = qdf_do_div(qdf_get_monotonic_boottime() -
 				     nol->nol_start_us, 1000);
-		diff_ms = (nol->nol_timeout_ms - diff_ms);
+		if (nol->nol_timeout_ms > diff_ms)
+			diff_ms = (nol->nol_timeout_ms - diff_ms);
+		else
+			diff_ms = 0;
 		remaining_sec = diff_ms / 1000; /* Convert to seconds */
 		dfs_info(NULL, WLAN_DEBUG_DFS_ALWAYS,
 			"nol:%d channel=%d MHz width=%d MHz time left=%u seconds nol start_us=%llu",