Bug 205305 - MT7610U incomplete driver information (struct ethtool_drvinfo)
Summary: MT7610U incomplete driver information (struct ethtool_drvinfo)
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-24 08:50 UTC by Michael
Modified: 2020-02-05 11:26 UTC (History)
3 users (show)

See Also:
Kernel Version: 5.3.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
0001-mt76-mt76u-rely-on-usb_interface-instead-of-usb_dev.patch (4.15 KB, patch)
2019-10-28 11:57 UTC, Lorenzo Bianconi
Details | Diff
signature.asc (228 bytes, application/pgp-signature)
2020-01-25 08:33 UTC, lorenzo
Details

Description Michael 2019-10-24 08:50:38 UTC
It looks like the driver information is incomplete

On MT7610U (ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter):
ID 148f:761a Ralink Technology, Corp. MT7610U ("Archer T2U" 2.4G+5G WLAN Adapter
struct ethtool_drvinfo driver show: usb and interface name wlan0
$ hcxdumptool -I
wlan interfaces:
503eaaa08f6f wlan0 (usb)
That leads me to the assumption that systemd isn't able to get this information, too (systemd.net-naming-scheme, Predictable Network Interface Names)


For example a MT7601 device showing correct information (ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter):
struct ethtool_drvinfo driver show: mt7601u and interface is wlp39s0f3u3u1u2
$ hcxdumptool -I
wlan interfaces:
00e62d05131a wlp39s0f3u3u1u2 (mt7601u)

as well as a rt2800usb device (ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter):
struct ethtool_drvinfo driver show: rt2800usb and interface is wlp39s0f3u3u1u2
$ hcxdumptool -I
wlan interfaces:
c83a35cb08e3 wlp39s0f3u3u1u2 (rt2800usb)
Comment 1 Lorenzo Bianconi 2019-10-28 11:57:43 UTC
Created attachment 285693 [details]
0001-mt76-mt76u-rely-on-usb_interface-instead-of-usb_dev.patch
Comment 2 Lorenzo Bianconi 2019-10-28 11:59:09 UTC
Hi Michael,

could you please try the attached patch? (0001-mt76-mt76u-rely-on-usb_interface-instead-of-usb_dev.patch)

Regards,
Lorenzo
Comment 3 Michael 2019-10-28 12:49:18 UTC
H Lorenzo.
Patch is working like a charm.

$ dmesg
[19849.669653] mt76x0u 1-2:1.0: ASIC revision: 76100002 MAC revision: 76502000
[19854.991239] mt76x0u 1-2:1.0: EEPROM ver:02 fae:01
[19864.961757] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[19864.962199] usbcore: registered new interface driver mt76x0u
[19864.976482] mt76x0u 1-2:1.0 wlp3s0f0u2: renamed from wlan0

$ hcxdumptool -I
wlan interfaces:
503eaaa08f6f wlp3s0f0u2 (mt76x0u)

This driver family (mt76 series) is one of the best I have ever seen. The driver accept everything coming from hcxdumptool and run fast and stable inclusive full monitor mode and full packet injection. That is really high quality.
The Mediatek chipset is sensitiv and tx power is more than enough. Even small and cheap devices like the ALLNET ALLWA0150 or the SEMPRE WU150-1 doing a good job, as well as the TP-LINK Archer T2UH and the EDIMAX EW-7711UAN

You are doing a great job. Thanks again.

Cheers
Mike


We can close this issue.
Comment 4 Zero_Chaos 2019-10-29 13:38:08 UTC
Tested, works great. thanks!
Comment 5 Michael 2020-01-14 17:56:20 UTC
Hi Lorenzo.
do you know when we can expect the final fix?

still not fixed in:
$ uname -r
5.4.11-arch1-1

...
[88184.445808] usb 5-3.1.2: EEPROM ver:02 fae:01
[88184.902984] ieee80211 phy4: Selected rate control algorithm 'minstrel_ht'
[88184.903441] usbcore: registered new interface driver mt76x0u
...

$ hcxdumptool -I
wlan interfaces:
503eaaa08f6f wlan0 (usb)

$ iw dev
phy#5
	Interface wlan0
		ifindex 8
		wdev 0x500000001
		addr 50:3e:aa:a0:8f:6f
		type managed
Comment 6 lorenzo 2020-01-15 09:41:08 UTC
> https://bugzilla.kernel.org/show_bug.cgi?id=205305
> 
> --- Comment #5 from Michael (ZeroBeat@gmx.de) ---
> Hi Lorenzo.
> do you know when we can expect the final fix?
> 
> still not fixed in:
> $ uname -r
> 5.4.11-arch1-1
> 
> ...
> [88184.445808] usb 5-3.1.2: EEPROM ver:02 fae:01
> [88184.902984] ieee80211 phy4: Selected rate control algorithm 'minstrel_ht'
> [88184.903441] usbcore: registered new interface driver mt76x0u
> ...
> 
> $ hcxdumptool -I
> wlan interfaces:
> 503eaaa08f6f wlan0 (usb)
> 
> $ iw dev
> phy#5
>         Interface wlan0
>                 ifindex 8
>                 wdev 0x500000001
>                 addr 50:3e:aa:a0:8f:6f
>                 type managed

Could you please double-check if the following commit is included?

commit 80df01f4dc79abbed724bbe0851cab3fe8ad9d99
mt76: mt76u: rely on usb_interface instead of usb_dev

Regards,
Lorenzo

> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are watching the assignee of the bug.
Comment 7 Michael 2020-01-24 16:44:43 UTC
Patch is missing in 5.14
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/mediatek/mt76/mt76.h?h=v5.4.14

eg.:
still unpatched code here:
	struct usb_device *udev = to_usb_device(dev->dev);
instead of
	struct usb_interface *uintf = to_usb_interface(dev->dev);
	struct usb_device *udev = interface_to_usbdev(uintf);
Comment 8 lorenzo 2020-01-25 08:33:26 UTC
Created attachment 286965 [details]
signature.asc

> https://bugzilla.kernel.org/show_bug.cgi?id=205305
> 
> --- Comment #7 from Michael (ZeroBeat@gmx.de) ---
> Patch is missing in 5.14
>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/mediatek/mt76/mt76.h?h=v5.4.14
> 
> eg.:
> still unpatched code here:
>         struct usb_device *udev = to_usb_device(dev->dev);
> instead of
>         struct usb_interface *uintf = to_usb_interface(dev->dev);
>         struct usb_device *udev = interface_to_usbdev(uintf);

This patch will fix the reported issue I guess

Regards,
Lorenzo

> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are watching the assignee of the bug.
Comment 9 Michael 2020-02-05 11:26:35 UTC
The patch is now applied:
$ uname -r
5.5.1-arch1-1

$ dmesg:
mt76x0u 5-3.1.2:1.0 wlp39s0f3u3u1u2: renamed from wlan0

$ hcxdumptool -I
wlan interfaces:
503eaaa08f6f wlp39s0f3u3u1u2 (mt76x0u)

Great job, thanks again!

Note You need to log in before you can comment on or make changes to this bug.