Hi
A few days ago I downloaded rtl8821ce wireless network driver from endlessm/
linux repository (master branch), and I managed to build module for kernel
4.19.16 on my Linux laptop, a HP 15-DB0035NL with an AMD Ryzen 5 2500U CPU.
When upgrading to kernel 4.20.5 I could not build the module anymore, the
compilation stopped with an error about the use of get_monotonic_boottime()
function, which apparently was deprecated and has been removed.
I’m no expert in kernel development, however I discovered that such function
has been superseded by ktime_get_boottime_ts64(), and so I tried to use it in
place of get_monotonic_boottime(). The resulting code compiled correctly, and
the module seems to load and work without problem.
The code I changed is in the rtl8821ce/os_dep/linux/ioctl_cfg80211.c (lines
338-339), you can find a patchfile attached here.
Sorry for any mistake I may have done in this report, this is the first time I
do such a thing.
greetings
Francesco Napoleoni
--- ioctl_cfg80211.c.old 2019-02-02 01:15:41.407123709 +0100
+++ ioctl_cfg80211.c 2019-02-02 01:16:18.459536625 +0100
@@ -335,8 +335,8 @@
static u64 rtw_get_systime_us(void)
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
- struct timespec ts;
- get_monotonic_boottime(&ts);
+ struct timespec64 ts;
+ ktime_get_boottime_ts64(&ts);
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
#else
struct timeval tv;