linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* kernel 2.6.24 USB wi fi device firmware loading issue(s): rt73.bin...
@ 2009-02-04 16:45 Mike Timmons
  2009-02-04 19:14 ` Alan Nishioka
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Timmons @ 2009-02-04 16:45 UTC (permalink / raw)
  To: linuxppc-dev

I received great help last week in getting a USB wi fi device working. 
Thanks again, but can someone read below and advise me on kernel 2.6.24? 
The best out-of-the box solution for me was 2.6.27.8, for which I needed 
a Denx eldx toolchain in place of the toolchain I was using to compile 
2.6.24. The significance of all this is that I did get  USB wi fi 
working, but...

I'm not in a position to upgrade from 2.6.24 at this time. I need to get 
the USB wi wi (Linksys WUSB54GC) working under 2.6.24.

After success with linking firmware with the 2.6.27.8 kernel, 2.6.24 I 
keep hitting this error when loading from user space (I don't appear to 
have the, "link with kernel" option with 2.6.24)...

sh-2.05b# ifconfig wlan0 up
[  764.744354] phy0 -> rt2x00lib_request_firmware: Info - Loading 
firmware file 'rt73.bin'.

After a considerable delay I get an error that indicates the file can't 
be found.

I have spent many, many hours following leads (and links) this group has 
directed me to. Thanks again. I'm either missing a very simple step or 
indeed support under 6.2.24 is not good. Please advise. I've done the 
following...

1)placed rt73.bin in various locations (/lib/firmware, 
lib/firmware/'uname -a', and the location specified by my 
/etc/hotplug/firmware.agent), according to tips on some threads I've read.

None of this appears to make a difference.

2) I'm a bit confused by the hotplug dependancy, although I do have 
hotplug enabled. "hotplug" makes me think I should be configuring some 
script to load the firmware upon device insertion, but, "ifconfig wlan0 
up" appears to want to load the firmware anyway so I'm guessing if I 
just get rt73.bin installed correctly it should work.

Comparing my working 2.6.27.8 to 2.6.24 in the areas of, "firmware" and 
the ralink rt2x00 drivers reveals MANY changes, no doubt for the better.

QUESTIONS:
1) Am I missing something VERY simple on this firmware loading topic 
that should make this work under 2.6.24, or am I bumping into the reason 
so much of this code has changed between 2.6.24 and 2.6.27.8?
-linking firmware with the lernel at compile time is a nice, obvious 
method offered by the later kernel. I'm confused by the userspace method 
and I think this is where my problem lay.

2) am I correctly, "installing" the firmware just by placing rt73.bin in 
the correct location in my filesystem, or is there some other magic 
required before, "request_firmware()" will work?

Just when I thought I understood some of the kernel I hit a new topic: 
firmware loading! Any help much appreciated...

-Mike

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel 2.6.24 USB wi fi device firmware loading issue(s): rt73.bin...
  2009-02-04 16:45 kernel 2.6.24 USB wi fi device firmware loading issue(s): rt73.bin Mike Timmons
@ 2009-02-04 19:14 ` Alan Nishioka
  2009-02-04 20:18   ` Matt Gessner
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Nishioka @ 2009-02-04 19:14 UTC (permalink / raw)
  To: mike_timmons; +Cc: linuxppc-dev

request_firmware uses the hotplug code so the kernel doesn't have any 
sourceless binaries compiled into it.  on init, the driver requests the 
firmware, user mode hotplug daemon loads the firmware from disk and 
gives the driver a pointer to it.

since this is a short term problem, i would suggest converting rt73.bin 
to a header file and compiling it into the kernel.  you have to make a 
few minor changes to where request_firmware is called, but in the end 
firmware is just an array of bytes with a pointer to it.  this is what i 
did when i was testing usb wifi a little while ago.

i am probably going to open source hell for suggesting this, but i'm a 
hardware engineer, so i am in hell already.

alan nishioka


Mike Timmons wrote:
> I received great help last week in getting a USB wi fi device working. 
> Thanks again, but can someone read below and advise me on kernel 
> 2.6.24? The best out-of-the box solution for me was 2.6.27.8, for 
> which I needed a Denx eldx toolchain in place of the toolchain I was 
> using to compile 2.6.24. The significance of all this is that I did 
> get  USB wi fi working, but...
>
> I'm not in a position to upgrade from 2.6.24 at this time. I need to 
> get the USB wi wi (Linksys WUSB54GC) working under 2.6.24.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel 2.6.24 USB wi fi device firmware loading issue(s): rt73.bin...
  2009-02-04 19:14 ` Alan Nishioka
@ 2009-02-04 20:18   ` Matt Gessner
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Gessner @ 2009-02-04 20:18 UTC (permalink / raw)
  To: mike_timmons, alan, linuxppc-dev

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

On Wed, Feb 4, 2009 at 2:14 PM, Alan Nishioka <alan@nishioka.com> wrote:

> request_firmware uses the hotplug code so the kernel doesn't have any
> sourceless binaries compiled into it.  on init, the driver requests the
> firmware, user mode hotplug daemon loads the firmware from disk and gives
> the driver a pointer to it.
>
> since this is a short term problem, i would suggest converting rt73.bin to
> a header file and compiling it into the kernel.  you have to make a few
> minor changes to where request_firmware is called, but in the end firmware
> is just an array of bytes with a pointer to it.  this is what i did when i
> was testing usb wifi a little while ago.
>
> i am probably going to open source hell for suggesting this, but i'm a
> hardware engineer, so i am in hell already.
>
> alan nishioka


Yes, you will certainly burn for this.  :-)

Mike Timmons:

I'll show you how MINE works (and if someone out there can point out errors,
fire away -- I'm not making the claim that this is completely correct).  I
hope that this will be new and helpful information for you.  If it's not, my
apologies; feel free to dump this in the bit bucket.

In my /sbin/hotplug I have a bunch of stuff for doing field updates, but at
the very bottom, I have this:

if [ "$1" == "firmware" ] && [ "$ACTION" == "add" ]; then
  echo 1 > /sys/$DEVPATH/loading
  cat /lib/firmware/$FIRMWARE > /sys/$DEVPATH/data
  echo 0 > /sys/$DEVPATH/loading
  echo "RT73 firmware loaded." > /dev/console
fi

That's how the firmware is loaded.

caveat: I am using 2.6.25 in my system.  I have no idea what's changed from
.24 to .25 that might be getting in your way.  You could consider moving
just the section in .25 that deals with the chipsets in question (ralink, I
think??).

I put all this together in about an hour after doing a little reading.  It
all works very well.

Now if I could just get that pesky AP mode working...

Also in my hotplug script is

if [ "$1" == "net" ] && [ "$ACTION" == "add" ] && [ "$INTERFACE" == "wlan0"
]; then
  iwconfig wlan0 mode managed
  iwconfig wlan0 channel auto
  iwconfig wlan0 key DADADADADADADADADADADADADA
  iwconfig wlan0 essid mlxwap
fi

You will want to get the sources for the wifi utilities compiled for your
target, too.  Not hard to do.  I don't think I had to make any changes to
it.

Those who wish, feel free to post suggestions, etc.  I'm doing all of my
work on an ARM target, so I don't know if there are any gotchas in the rt
drivers for the rt73 usb stuff.

Also, you could check out rt2x00.serialmonkey.com if you haven't found it.
They are live (well, mostly dead) on #rt2x00 on freenode.

Good luck; if you have questions, feel free to email me directly.

[-- Attachment #2: Type: text/html, Size: 3484 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-04 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 16:45 kernel 2.6.24 USB wi fi device firmware loading issue(s): rt73.bin Mike Timmons
2009-02-04 19:14 ` Alan Nishioka
2009-02-04 20:18   ` Matt Gessner

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