Mt76 driver - replacement [for test]

Tried to revert them, but apparently a lot of the code has changed since and I can't simply revert the patches.

I have an tplink archer c2 and netgear r6220 with this family of chipset. Both of them are showing odd behavior (the tplink has unreliable wifi, the netgear keeps dropping connection and becomes unstable). I am willing/available to do some testing with the official driver if its still necessary.

Going a bit off-topic here, but… no message-signaled interrupts (yet?), @ryderlee1110…? I've been thinking of getting an MT7615 card, but I guess I'll wait. :thinking:

The link is broken now.Can you share it again?Thanks.

@ryderlee1110 Ryder, I see that Mediatek official drivers register as a fullmac if cfg80211 support is selected (newer drivers have os/linux/cfg80211 almost up to date) and have much better stability. Isn't updating this stack (to support newer kernels) easier than developing mac80211 drivers from the beginning?

I also do not understand why new drivers (like mt7615/mt7915) are developed on softmac layer instead of taking advantage of andes core offload?

@lukasz92 did you finally succeed in using the driver with cfg80211 support?

I actually prefer mac80211 fashion to support Mesh. All the Mesh configuration will pass through nl80211, mac80211 in order to set a Mesh node on physicalradio device using iw user space utility.

We've not implemented too much offloading features - offload Tx path to MCU, 802.3 header encapsulation ..., which will be added gradually in the upcoming days. I believe this is the major reason that throughput is not good on some weak CPUs - mt7621.

At least the performance is better than proprietary driver on other powerful platforms - mt7622. Glad to see more feedback from OpenWrt folks.

4 Likes

@ryderlee1110 I'm using the mt76 drivers you guys are improving constantly and I have to say that I'm currently quite happy with how it's implemented currently. I'm using it on my Linksys EA7500 v2 router, which is a mt7621a + 2 x mt7615n board. Granted, my use case is quite simple with less than 10 clients on the 2.4 & 5 GHz interfaces. Range and speed is good. No complaints on that department. Router is up for more than 12 days without any issues, other than the interrupt errors increasing. Doesn't seem to cause any problem for me tho.

Keep up the good work!

@thorsten97 Not really, even mt7615 driver (much more up-to-date) fails to register wiphy - WARN appears in this place: https://elixir.bootlin.com/linux/v4.19.120/source/net/wireless/core.c#L813 , probably my patch needs more work or I missed some calls/flags/definitions (original os/linux/cfg80211 implementation seems to not provide information about bands to cfg80211 subsystem in a correct way - this must have been changed somewhere between 3.10.14 and 4.19 kernels)

I also managed to patch mt7603u driver in such way that: support mt7603e chip and compiles with cfg80211 from 19.07.3.. but I am almost sure that something is missing, much more work is needed for it.
It is probably an old version optimized for mt7603u - I done it just for tests.

I can share patches and possibly someone (or me in not a near future?) could finish my work with success.

@MeIsReallyBa
here you go:
https://filebin.net/ruqm9au9y4x3cd94/drivers-mtk-linux-5.zip?t=qry246ut

I changed the name of the module to mt7615 and disabled the annoying flood of infos showing up on the console. The driver works nicely plus its now 600kb smaller in size.

@lukasz92
thanks for the info! Unfortunately my understanding in kernel programming goes close to zero, otherwise I would help in getting this thing to work ...

For the mt76 developers:
Shouldn't it be possible to figure out what causes these annoying interrupt errors by looking into the MTK code?

Thanks ur patch and I compiled it.When I try to modprobe the driver,it just shows:
[ 71.763870] Backport generated by backports.git v5.4.27-1-0-gf6e8852f
[ 273.990305] mt_wifi: Unknown symbol cfg80211_find_ie_match (err 0)
[ 274.002947] mt_wifi: Unknown symbol cfg80211_find_vendor_ie (err 0)

which router are you using?
try to remove the 001-build-cfg8022.patch only 001-build-linux-5.4.patch should be used (it should not be included as it is not located in the patches folder.)
also uncheck everything under kernel-modules/wireless drivers, than it should work.

you might have to compile en entire image, I don't think you can load it in an existing openwrt installation.

you probably need the applications as well ...

try this one:
https://filebin.net/cd5lkpnrt21tsgvx/ramips.zip?t=9eqajwox
Just copy the ramips folder to packages -> make menuconfig -> uncheck everything under Kernel-modules/Wireless-Drivers
and setup everything under MTK-Properties.

The Driver is patched to work with Xiaomi R3P, in case you have a different router it might be necessary to adjust several things including the factory partition settings ...

I have tried proprietary driver before and I'm just trying cfg80211...

@MeIsReallyBa You have to use OpenWRT SDK. SDK has kernel headers, exact config and compiled modules should work with official OpenWRT releases.

If you don't mind, could you reupload the drive for mt7612 thanks.

Hi, do you have the driver for mt7612?

https://filebin.net/xio5spf1yu20xj8m/MT7622_7615_SoftAP_5.0.4.0_bb5ba3_20190503__1_.tar.xz?t=rliov82m
7615-5.0.4.0 driver and it seems that some new kernel feature has been supported.

AFAIK we're all using mt7622 for development, and at least I cannot reproduce that error. Moreover, we don't have enough resource to solve everything at the same time. We're welcome everyone join to mt76.