Hi,
i’m trying to include mt76-driver from lede-Project to the bananapi-r2 kernel-repo lede includes somewhere compat-wireless since net-includes in 4.4.71 are too old.
here my current work (mt76 must be unpacked to linux-mt/drivers/net/wireless/mediatek/): https://www.file-upload.net/download-12740868/mt76.tgz.html
https://www.file-upload.net/download-12740874/compat-wireless.tar.gz.html
i’ve tried to replace the files (include/net/mac80211.h, net/mac80211/,include/uapi/linux/nl80211.h,include/net/cfg80211.h) from kernel with same from compat-wireless, but ran into “implicit declaration of function”-errors
i’ve found also a Patch (don’t know kernel-version) from march 2016 to add mt76-driver: https://patchwork.kernel.org/patch/8496171/ maybe this is more compatible
edit: last patch needed some more files ( https://www.spinics.net/lists/linux-wireless/msg154015.html ) but errors seems the same…
here the merged patches (bitfield.h [new] and bug.h [added 2 lines] and must be in linux-mt/include/linux/)
edit again:
CC [M] drivers/net/wireless/mediatek/mt76/mt76x2_core.o
In file included from drivers/net/wireless/mediatek/mt76/mt76x2.h:38:0,
from drivers/net/wireless/mediatek/mt76/mt76x2_init.c:15:
drivers/net/wireless/mediatek/mt76/mt76.h: In function ‘mt76_channel_state’:
drivers/net/wireless/mediatek/mt76/mt76.h:301:14: warning: comparison between ‘enum ieee80211_band’ and ‘enum nl80211_band’ [-Wenum-compare]
if (c->band == NL80211_BAND_2GHZ)
^
drivers/net/wireless/mediatek/mt76/mt76x2_init.c: In function ‘mt76x2_register_device’:
drivers/net/wireless/mediatek/mt76/mt76x2_init.c:733:20: error: ‘struct mt76_sband’ has no member named ‘ht_cap’
dev->mt76.sband_2g.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
^
drivers/net/wireless/mediatek/mt76/mt76x2_init.c:734:20: error: ‘struct mt76_sband’ has no member named ‘ht_cap’
dev->mt76.sband_5g.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
mt76.diff.txt (16,4 KB) mt76_p.tar.gz (162,3 KB)
i’ve found no definition of 'struct mt76_sband’->‘ht_cap’
regards Frank