Firmware files for Ralink RT28x0
I notice that rt2800{pci,usb} each specify only one firmware image, regardless of the controller version.
This is inconsistent with rt28{6,7}0sta and with the firmware images in linux-firmware.
If you think that a single image per bus type can cover all controllers, please identify those firmware images, test them on each hardware generation, and get them into linux-firmware.
Ben.
Signature · 2 lines
Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
Quoted 9 lines · Ben Hutchings
I notice that rt2800{pci,usb} each specify only one firmware image, regardless of the controller version.
This is inconsistent with rt28{6,7}0sta and with the firmware images in linux-firmware.
If you think that a single image per bus type can cover all controllers, please identify those firmware images, test them on each hardware generation, and get them into linux-firmware.
With rt2800pci, my rt3090 works with rt2860.bin, which is already in linux-firmware.
Larry
Hi,
Quoted 5 lines · Ben Hutchings
I notice that rt2800{pci,usb} each specify only one firmware image, regardless of the controller version.
This is inconsistent with rt28{6,7}0sta and with the firmware images in linux-firmware.
Well the rt2800pci/usb firmware behavior is consistent with the original Ralink drivers (Not sure about the staging drivers, I only look to the drivers on the Ralink website).
As for the linux-firmware that contains some firmware files for rt30** chipsets, but that are not used by rt2800pci/usb for the simple reason that the latest version of the rt2860.bin and rt2870.bin files contain support for those chipsets
as well.
Quoted 3 lines
If you think that a single image per bus type can cover all controllers, please identify those firmware images, test them on each hardware generation, and get them into linux-firmware.
Updating the firmware files in the linux-firmware tree seems to be close to impossible. Multiple attempts have been made to update the firmware files for rt73usb, rt61pci, rt2800pci and rt2800usb, and every attempt has been ignored.
Even when Ralink sent the update directly, and it seemed that the patches were accepted, they were still not applied.
So honestly, I think it might be easier to simply remove the Ralink firmware files from the linux-firmware tree, as then at least the users won't accidently use the outdated firmware files from that tree.
Ivo
Quoted 6 lines · Ivo Van Doorn
Hi,
Quoted 3 lines · Ben Hutchings
I notice that rt2800{pci,usb} each specify only one firmware image, regardless of the controller version.
Quoted 6 lines
Quoted 2 lines
This is inconsistent with rt28{6,7}0sta and with the firmware images in linux-firmware.
Well the rt2800pci/usb firmware behavior is consistent with the original Ralink drivers (Not sure about the staging drivers, I only look to the drivers on the Ralink website).
Are you referring to the #ifdef BIN_IN_FILE code? This code is not enabled, so you should assume it is broken. I suspect that it was intended to ease firmware development.
Ralink provides multiple drivers per bus type for RT28xx and later chips. For PCI devices they split between RT2860 and RT309x; for USB devices they split between RT2870 and RT307x (I think - the chip model numbers don't seem to be stated consistently).
In addition, the USB drivers have two separate images packed together and they can select different images based on the controller version:
#ifdef RTMP_MAC_USB
if ((Version != 0x2860) && (Version != 0x2872) && (Version != 0x3070))
{ // Use Firmware V2.
//printk("KH:Use New Version,part2\n");
pFirmwareImage = (PUCHAR)&FirmwareImage[FIRMWAREIMAGEV1_LENGTH];
FileLength = FIRMWAREIMAGEV2_LENGTH;
}
else
{
//printk("KH:Use New Version,part1\n");
pFirmwareImage = FirmwareImage;
FileLength = FIRMWAREIMAGEV1_LENGTH;
}#endif // RTMP_MAC_USB //
The firmware blobs in RT2870 version 2009-08-20 and RT3070 version 2009-05-25 are all marked as version 17 (or 0.17), but *they all have different contents*.
I attempted to maintain the same version selection logic when converting the staging drivers to use the firmware loader, since I assumed there was a good reason for it.
Quoted 5 lines
As for the linux-firmware that contains some firmware files for rt30** chipsets, but that are not used by rt2800pci/usb for the simple reason that the latest version of the rt2860.bin and rt2870.bin files contain support for those chipsets
as well.
So I have heard. But do they still support the original chips correctly?
Quoted 10 lines
Quoted 3 lines
If you think that a single image per bus type can cover all controllers, please identify those firmware images, test them on each hardware generation, and get them into linux-firmware.
Updating the firmware files in the linux-firmware tree seems to be close to impossible. Multiple attempts have been made to update the firmware files for rt73usb, rt61pci, rt2800pci and rt2800usb, and every attempt has been ignored.
Even when Ralink sent the update directly, and it seemed that the patches were accepted, they were still not applied.
This roughly matches my experience, except that I have been persistent enough to get my changes applied eventually.
Quoted 3 lines
So honestly, I think it might be easier to simply remove the Ralink firmware files from the linux-firmware tree, as then at least the users won't accidently use the outdated firmware files from that tree.
linux-firmware is supposed to have all firmware files referenced by any version of Linux; therefore these files must not be removed.
If just two files are sufficient then the other files could be replaced by symlinks to them.
Ben.
Signature · 2 lines
Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
Hi,
Quoted 7 lines
Quoted 7 lines · Ben Hutchings
Quoted 5 lines
I notice that rt2800{pci,usb} each specify only one firmware image, regardless of the controller version.
This is inconsistent with rt28{6,7}0sta and with the firmware images in linux-firmware.
Quoted 7 lines
Quoted 3 lines
Well the rt2800pci/usb firmware behavior is consistent with the original Ralink drivers (Not sure about the staging drivers, I only look to the drivers on the Ralink website).
Are you referring to the #ifdef
BIN_IN_FILEcode? This code is not enabled, so you should assume it is broken. I suspect that it was intended to ease firmware development.
Not only BIN_IN_FILE, but the .bin files provided in the Ralink package itself. At some point I grabbed all .bin files from all Ralink packages, and compared them.
I also grabbed the firmware files, which Ralink provided separately, Basically it was very clear that the firmware provided by rt3070, was a simple later release of the rt2860 firmware (which is still used for rt2860 devices).
So with new versions of the firmware, support for new chipsets was being addded.
Quoted 23 lines
Ralink provides multiple drivers per bus type for RT28xx and later chips. For PCI devices they split between RT2860 and RT309x; for USB devices they split between RT2870 and RT307x (I think - the chip model numbers don't seem to be stated consistently).
In addition, the USB drivers have two separate images packed together and they can select different images based on the controller version:
#ifdef
RTMP_MAC_USB
if ((Version !=0x2860) && (Version !=0x2872) && (Version !=0x3070)) { // Use Firmware V2.
//printk("KH:Use New Version,part2\n"); pFirmwareImage = (PUCHAR)&FirmwareImage[FIRMWAREIMAGEV1_LENGTH]; FileLength =FIRMWAREIMAGEV2_LENGTH;
}
else
{
//printk("KH:Use New Version,part1\n"); pFirmwareImage = FirmwareImage;
FileLength =FIRMWAREIMAGEV1_LENGTH;
}
#endif //RTMP_MAC_USB//
Quoted 3 lines
The firmware blobs in RT2870 version 2009-08-20 and RT3070 version 2009-05-25 are all marked as version 17 (or 0.17), but *they all have different contents*.
How do you determine this version? I usually check the last couple of bytes of the firmware file. (The last 2 bytes of the firmware is the CRC, but the 2 bytes before that is the version).
Quoted 4 lines
I attempted to maintain the same version selection logic when converting the staging drivers to use the firmware loader, since I assumed there was a good reason for it.
Quoted 8 lines
Quoted 5 lines
As for the linux-firmware that contains some firmware files for rt30** chipsets, but that are not used by rt2800pci/usb for the simple reason that the latest version of the rt2860.bin and rt2870.bin files contain support for those chipsets
as well.So I have heard. But do they still support the original chips correctly?
Yes, I am using the latest firmware for my rt2860/2870 devices without problems.
Quoted 14 lines
Quoted 10 lines
Quoted 3 lines
If you think that a single image per bus type can cover all controllers, please identify those firmware images, test them on each hardware generation, and get them into linux-firmware.
Updating the firmware files in the linux-firmware tree seems to be close to impossible. Multiple attempts have been made to update the firmware files for rt73usb, rt61pci, rt2800pci and rt2800usb, and every attempt has been ignored.
Even when Ralink sent the update directly, and it seemed that the patches were accepted, they were still not applied.This roughly matches my experience, except that I have been persistent enough to get my changes applied eventually.
Quoted 6 lines
Quoted 3 lines
So honestly, I think it might be easier to simply remove the Ralink firmware files from the linux-firmware tree, as then at least the users won't accidently use the outdated firmware files from that tree.
linux-firmware is supposed to have all firmware files referenced by any version of Linux; therefore these files must not be removed.
I agree that the firmware should be in linux-firmware, but only if they are the latest version (and it is possible to keep them up-to-date). Having outdated firmware in the linux-firmware tree only causes more problems.
Quoted 2 lines
If just two files are sufficient then the other files could be replaced by symlinks to them.
Why? The patch to remove the staging drivers has been sent out a few days ago. After that we only have rt2800pci and rt2800usb drivers, so we can get rid of the rt30xx files completely. ;)
Ivo
Quoted 13 lines · Ivo Van Doorn
Hi,
Quoted 11 lines
Quoted 10 lines · Ben Hutchings
Quoted 5 lines
I notice that rt2800{pci,usb} each specify only one firmware image, regardless of the controller version.
This is inconsistent with rt28{6,7}0sta and with the firmware images in linux-firmware.
Well the rt2800pci/usb firmware behavior is consistent with the original Ralink drivers (Not sure about the staging drivers, I only look to the drivers on the Ralink website).
Quoted 7 lines
Quoted 3 lines
Are you referring to the #ifdef
BIN_IN_FILEcode? This code is not enabled, so you should assume it is broken. I suspect that it was intended to ease firmware development.Not only
BIN_IN_FILE, but the .bin files provided in the Ralink package itself. At some point I grabbed all .bin files from all Ralink packages, and compared them.
But this proves nothing, because the Ralink drivers don't use those files!
[...]
Quoted 7 lines
Quoted 3 lines
The firmware blobs in RT2870 version 2009-08-20 and RT3070 version 2009-05-25 are all marked as version 17 (or 0.17), but *they all have different contents*.
How do you determine this version? I usually check the last couple of bytes of the firmware file. (The last 2 bytes of the firmware is the CRC, but the 2 bytes before that is the version).
That's exactly what I'm looking at, in the file include/firmware.h. There are 256 lines * 16 bytes for each image, so the images end with:
RT2870 image 1: 0x00, 0x11, 0xc2, 0x7a
RT2870 image 2: 0x00, 0x11, 0x77, 0x81
RT3070 image 1: 0x00, 0x11, 0x7b, 0xc4
RT3070 image 2: 0x00, 0x11, 0x65, 0xd3
By the way, there is a comment in common/rtmp_mcu.c which says the version number for these chips is only 1 byte.
[...]
Quoted 1 line
Quoted 1 line
linux-firmware is supposed to have all firmware files referenced by any
--- ---
Quoted 6 lines
Quoted 1 line
version of Linux; therefore these files must not be removed.
I agree that the firmware should be in linux-firmware, but only if they are the latest version (and it is possible to keep them up-to-date). Having outdated firmware in the linux-firmware tree only causes more problems.
Quoted 6 lines
Quoted 2 lines
If just two files are sufficient then the other files could be replaced by symlinks to them.
Why? The patch to remove the staging drivers has been sent out a few days ago. After that we only have rt2800pci and rt2800usb drivers, so we can get rid of the rt30xx files completely. ;)
No. Read what I said again.
Ben.
Signature · 2 lines
Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.