Open BioDiode opened 1 year ago
I got the same issue with a mt7601u-based WiFi usb stick that is on EEPROM ver:0c
. After going through these error messages the stick eventually works just fine. I would still like to get rid of these messages though.
Did you find a solution for this problem by any chance?
FYI, this repo appears to be dead: "Please report any issues upstream to the Linux Wireless community. This repo is no longer used." Maybe this is the right way to file a bug report.
Yes, I fixed the issue by recompiling the mt7601u kernel driver with the following line of eeprom.c commented out:
// mt7601u_config_tx_power_per_rate(dev, eeprom);
In 4.14.98, this is line 412: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/mediatek/mt7601u/eeprom.c?h=v4.14.98#n412
In 5.19.0, this is line 384: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/mediatek/mt7601u/eeprom.c?h=v5.19#n384
This prevents the kernel error and worked in my case, but there is undoubtedly a more elegant way to handle the issue without completely disabling the call to the config_tx_power_per_rate function. Instead, you could try commenting out the following line in eeprom.h to disable the kernel warning as mentioned in my original post:
// WARN_ON(reg & ~GENMASK(5, 0));
The issue was submitted to the linux-wireless mailing list, but I didn't have time to submit or test a proper patch: https://marc.info/?l=linux-wireless&m=169049931212694
I recently purchased a few different mt7601u-based WiFi modules from Amazon and a couple of them are causing repeated kernel errors on USB insertion with this driver:
This stack trace usually repeats itself a dozen times before the device eventually works:
I believe the issue may be relating to the s6_validate macro called from within the mt7601u_set_power_rate function. Here is the eeprom_param of a device (with reported firmware version 0c) that produces the above error:
Are these values unexpected? The eeprom_param instead looks like this on a device (with firmware version 0d) that doesn't produce the kernel error:
These errors are consistent in both kernel 4.14.98 and 5.19.0, so appear to be hardware-related.
The two different devices that reliably produce this kernel error are here (similar eeprom_param and firmware version 0c): https://www.amazon.com/dp/B008Z9IZSW https://www.amazon.com/dp/B0BNFKJPXS
The device that works without issue is here (different eeprom_param and firmware version 0d): https://www.amazon.com/dp/B00RBBUQLE
Any thoughts on a fix or workaround for the problematic devices? Is there any harm in simply commenting out the
WARN_ON(reg & ~GENMASK(5, 0))
line in the s6_validate macro or is there a better solution?