firmware loading broken with Karmic kernel

Bug #478874 reported by Brian Pitts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-wlan-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: linux-wlan-ng

I'm using Ubuntu 9.10.

linux-wlan-ng-build-firmware-deb produces a package that, when installed, places the firmware files in /etc/wlan. However, the kernel driver looks for them in /lib/firmware. Only after I manually copied them from /etc/wlan to /lib/firmware did the prism2_usb driver load the firmware.

Explanation: The 2.6.31 kernel driver looks itself in /lib/firmware for the file. However the linux-wlan-ng package uses its own firmware loading, and /etc/wlan is used for this. This loading is compatible with all kernels, but got a bit broken in karmic. In 2.6.32 the kernel driver loading will again be different, so changing to the 2.6.31 loading would not be the best solution. Making the linux-wlan-ng loading work as before will also help for those who uses it for non-usb devices, since the kernel loading is usb-only.

SRU:
The sole purpose of this package is to load firmware on prism2 USB devices. This is broken in Karmic, since the loading scripts relied on a /proc interface to select which loading function to use. However, only the prism2 loader is provided anyway, so the obvious workaround is to fall back to "prism2".

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for your report. I haven't looked at the status of the firmware loading for a while. I suppose that once you have copied the firmware files to /lib/firmware you do not need any linux-wlan-ng packages? We should maybe just ship the firmware in a separate package (if we are allowed to it) instead of this build-your-own package stuff.

Changed in linux-wlan-ng (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Pitts (bpitts) wrote :

I can swear to that because I haven't got the hardware (049F:0033) working yet.

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Some relevant threads:
https://lists.ubuntu.com/archives/kernel-team/2009-June/006204.html
http://patchwork.kernel.org/patch/42526/

It seems that the loading of prism2_ru.hex from /lib/firmware is just temporary in 2.6.31 and will be replaced by a new firmware format. So for now I guess we should stick to the old user-space loading, and then jump directly to the new format when it is available.

Brian, for your issue, did you have the linux-wlan-ng package installed?

Revision history for this message
Brian Pitts (bpitts) wrote :

Oops, I meant to say *can't* swear to that.

Installing linux-wlan-ng-firmware pulled in linux-wlan-ng, but I have not tried any of those tools yet.

At Free IT Athens we have a large number of laptops right now with various models of the compaq multiport usb wireless adapters (049f:0033 and 049f:0076 observed so far); we will do testing of prism2_usb and orinoco_usb as time allows.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I can confirm that the user-space firmware loading is broken in Ubuntu 9.10. The linux-wlan-ng package installs udev rules to call /etc/wlan/wlan-udev.sh when the module is loaded. But /etc/wlan/shared, which originally was prepared to deal with a large range of cards, looks up the now non-existing /proc/net/p80211/ to see which driver family this card is using ("prism2") to call the right firmware loading function (surprise, there is only one anyway).

As a quick fix, you can apply the below patch.

Alternatively, as suggested in the original report, you can copy /etc/wlan/prism2_ru.hex to /lib/firmware and then purge all linux-wlan-ng* packages. This also works fine here.

--- /etc/wlan/shared.orig 2009-11-09 23:53:43.000000000 +0100
+++ /etc/wlan/shared 2009-11-09 23:49:55.000000000 +0100
@@ -120,6 +120,7 @@ wlan_nsdname ()
  # $1 == wlandev
  # Writes the given device's name to stdout
  grep 'nsd name' /proc/net/p80211/$1/wlandev | sed -e 's/.*: \(.*\)_.*/\1/'
+ echo "prism2"
 }

 wlan_enable ()

summary: - linux-wlan-ng-build-firmware-deb places firmware in wrong directory
+ firmware loading broken with Karmic kernel
description: updated
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Note that the scripts in question are only called by udev for prism2 devices, so falling back to "prism2" is perfectly safe.

For Lucid, we will use the kernel firmware loading instead, which in the 2.6.32 kernel will be a bit different from what it is in the Karmic kernel.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I noticed another use of the /proc interface, although harmless. But for completeness here is a new debdiff.

description: updated
description: updated
Revision history for this message
Tormod Volden (tormodvolden) wrote :

This has been fixed in Lucid. The above patch has been incorporated, and there is also a new package prism2-usb-firmware-installer which can be used instead. For those who need this in Karmic, I would recommend to just install the prism2-usb-firmware-installer .deb package from Lucid.

Changed in linux-wlan-ng (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.