소스 검색

fix compilation for 4.20.0-rc1 by removing get_monotonic_boottime() - see https://github.com/torvalds/linux/commit/8498887660dfc9a07659ad545bfec389eb1d1d3f

Tomás Pinho 7 년 전
부모
커밋
d36c495bd3
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      os_dep/linux/ioctl_cfg80211.c

+ 3 - 1
os_dep/linux/ioctl_cfg80211.c

@@ -334,10 +334,12 @@ static const struct ieee80211_txrx_stypes
 
 static u64 rtw_get_systime_us(void)
 {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0))
 	struct timespec ts;
 	get_monotonic_boottime(&ts);
 	return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
+	return ktime_to_us(ktime_get_boottime());
 #else
 	struct timeval tv;
 	do_gettimeofday(&tv);