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...)
mt7610u-linksys-ae6000-wifi-fixes$ make
make -C tools
make[1]: Entering directory '/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/tools'
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/tools/bin2h
chipset = mt7610u
cp -f os/linux/Makefile.6 /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/Makefile
make -C /lib/modules/4.8.0-25-generic/build SUBDIRS=/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-25-generic'
CC [M] /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.o
In file included from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rtmp_os.h:44:0,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rtmp_comm.h:75,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rt_config.h:33,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c:28:
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/os/rt_linux.h:77:0: warning: "EXT_BUILD_CHANNEL_LIST" redefined
#define EXT_BUILD_CHANNEL_LIST /* must define with CRDA */
<command-line>:0:0: note: this is the location of the previous definition
In file included from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/os/rt_linux.h:98:0,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rtmp_os.h:44,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rtmp_comm.h:75,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rt_config.h:33,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c:28:
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/cfg80211.h:35:49: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function)
struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
^~~~~~~~~~~~~~~~~~~
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’:
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c:341:16: warning: unused variable ‘pAd’ [-Wunused-variable]
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
^~~
In file included from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rtmp_os.h:44:0,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rtmp_comm.h:75,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/rt_config.h:33,
from /home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c:28:
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c: In function ‘STA_MonPktSend’:
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c:450:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
^
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/include/os/rt_linux.h:669:16: note: in definition of macro ‘DBGPRINT_RAW’
printk Fmt; \
^~~
/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.c:450:9: note: in expansion of macro ‘DBGPRINT’
DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
^~~~~~~~
scripts/Makefile.build:289: recipe for target '/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.o' failed
make[2]: *** [/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux/../../os/linux/rt_profile.o] Error 1
Makefile:1489: recipe for target '_module_/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux' failed
make[1]: *** [_module_/home/xionox/Downloads/src/mt7610u-linksys-ae6000-wifi-fixes/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-25-generic'
Makefile:394: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
$ uname -a Linux laptop 4.8.0-25-generic #27-Ubuntu SMP Thu Oct 13 03:34:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Probably need the same changes done for a similar driver in: https://github.com/neurobin/MT7630E/pull/36/files