linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Ivo Van Doorn <ivdoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: Firmware files for Ralink RT28x0
Date: Sun, 10 Apr 2011 18:49:14 +0100	[thread overview]
Message-ID: <1302457754.5282.219.camel@localhost> (raw)
In-Reply-To: <BANLkTi=-bRn_6yie1b=wxgVowqZq6+03CQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3513 bytes --]

On Sun, 2011-04-10 at 18:35 +0200, Ivo Van Doorn wrote:
> Hi,
> 
> On Sun, Apr 10, 2011 at 5:56 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > 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).

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.

> 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?

> > 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.

> 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.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2011-04-10 17:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10 15:56 Firmware files for Ralink RT28x0 Ben Hutchings
2011-04-10 16:18 ` Larry Finger
2011-04-10 16:35 ` Ivo Van Doorn
2011-04-10 17:49   ` Ben Hutchings [this message]
2011-04-10 18:06     ` Ivo Van Doorn
2011-04-10 19:04       ` Ben Hutchings
  -- strict thread matches above, loose matches on Subject: below --
2011-04-10 17:02 Xose Vazquez Perez
2011-04-10 17:29 Xose Vazquez Perez
2011-04-10 17:35 ` Ivo Van Doorn
2011-04-10 18:12   ` Xose Vazquez Perez
2011-04-10 18:26   ` Larry Finger
2011-04-10 19:25 Xose Vazquez Perez
2011-04-10 21:03 ` Ben Hutchings
2011-04-10 21:30   ` Larry Finger
2011-04-10 21:46   ` Xose Vazquez Perez
2011-04-10 22:37     ` Larry Finger
2011-04-10 22:56       ` Xose Vazquez Perez
2011-04-11  3:01         ` Larry Finger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302457754.5282.219.camel@localhost \
    --to=ben@decadent.org.uk \
    --cc=gwingerde@gmail.com \
    --cc=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).