Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Updated Kernel Calls for Linux >= 5.0 #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,15 @@ static const struct ieee80211_txrx_stypes

static u64 rtw_get_systime_us(void)
{

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
struct timespec64 ts;
ktime_get_boottime_ts64(&ts);
return (ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
struct timespec ts;
get_monotonic_boottime(&ts);

return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
#else
struct timeval tv;
Expand Down