xtknight / mt7610u-linksys-ae6000-wifi-fixes

Trying to fix the MT7610U chipset driver by MediaTek so it's usable on modern Linux kernels and with nl80211/NetworkManager (and not completely breaking on old ones, maybe...)
187 stars 71 forks source link

Doesn't build on Linux 4.15 #36

Open unixfox opened 6 years ago

unixfox commented 6 years ago

I can't build the mt7610u module on Linux kernel 4.15.2. Here are the logs:

<command-line>:0:0: note: this is the location of the previous definition
/var/lib/dkms/mt7610u_sta/1.0/build/os/linux/../../os/linux/rt_linux.c: In function '__RTMP_OS_Init_Timer':
/var/lib/dkms/mt7610u_sta/1.0/build/os/linux/../../os/linux/rt_linux.c:117:3: error: implicit declaration of function 'init_timer'; did you mean 'init_timers'? [-Werror=implicit-function-declaration]
   init_timer(pTimer);
   ^~~~~~~~~~
   init_timers
/var/lib/dkms/mt7610u_sta/1.0/build/os/linux/../../os/linux/rt_linux.c:118:9: error: 'OS_NDIS_MINIPORT_TIMER {aka struct timer_list}' has no member named 'data'
   pTimer->data = (unsigned long)data;
         ^~
/var/lib/dkms/mt7610u_sta/1.0/build/os/linux/../../os/linux/rt_linux.c:119:20: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
   pTimer->function = function;
                    ^

It's because with the Linux version 4.15-rc1, the old interface init_timer() is no longer available:

With version 4.15-rc1, conversion to new timer interface is finished and old interface using init_timer() is no longer available. Convert both users to new one.

-mkubecek

@xtknight Can you look at this?

Viish commented 6 years ago

Hi,

Check out my PR that fixes it: https://github.com/xtknight/mt7610u-linksys-ae6000-wifi-fixes/pull/37

Best regards,

unixfox commented 6 years ago

@Viish I got a working build with your patch! Merci!

Segaja commented 6 years ago

Why close this bug if the related PR was not merged yet?

tinhtrilac commented 6 years ago

same. I tried it on Ubuntu 18.04 still get error when make cc1: some warnings being treated as errors scripts/Makefile.build:332: recipe for target '/home/johny/Downloads/mt7610u-linksys-ae6000-wifi-fixes-master/os/linux/../../os/linux/rt_linux.o' failed make[2]: *** [/home/johny/Downloads/mt7610u-linksys-ae6000-wifi-fixes-master/os/linux/../../os/linux/rt_linux.o] Error 1 Makefile:1552: recipe for target '_module_/home/johny/Downloads/mt7610u-linksys-ae6000-wifi-fixes-master/os/linux' failed make[1]: *** [_module_/home/johny/Downloads/mt7610u-linksys-ae6000-wifi-fixes-master/os/linux] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic' Makefile:394: recipe for target 'LINUX' failed make: *** [LINUX] Error 2 Hope it could be fix soon

Thanks :)