prism2 firmware is not loaded

Bug #29706 reported by Tormod Volden
6
Affects Status Importance Assigned to Milestone
linux-wlan-ng (Ubuntu)
Fix Released
Medium
Tormod Volden

Bug Description

I have installed the linux-wlan-ng-firmware package and run the script to make the linux-wlan-firmware-files package. (I had to install several packages like subversion, gcc etc, the dpkg dependencies were not complete). Then installed the produced package, and have now .hex files in /etc/wlan. However, AFAICS they are not loaded into my prism2_usb device (D-Link DWL-122) automatically.

I tried to manually run /etc/init.d/wlan but it fails because /etc/wlan/shared looks up /proc/net/p80211/ which does not exist (even if the ieee80211 module is loaded). Then I tried to hardcode the expected wlan_nsdname to prism2 so that it would run the prism2_fwload function. This gives warnings like "prism2dl: warning: Failed to find PDR for plugrec 0x0405." and finally "Failed to enable the device, resultcode= implementation_failure ."

At this point dmesg confirm that I finally have updated the firmware (RAM). And it is reloaded at reboot. But - if I unplug the device and replug it, it ends up with its original firmware version.

This is running dapper flight 3, with updated linux-wlan-ng 0.2.3-1ubuntu1. My device is a 0x8026.

Tags: patch
Revision history for this message
Barry deFreese (bddebian) wrote :

linux-wlan-ng is now ubuntu7. Do you still have this issue? Thank you.

Changed in linux-wlan-ng:
status: Unconfirmed → Needs Info
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I don't have the card myself for the moment, so I have to answer properly some other time. I haven't tried since flight-6, but looking at the changelog, I am not so optimistic about anything having changed in this respect. Unless something outside this package has changed. The /proc/net/p80211 path in /etc/wlan/shared is still the same, for instance.

Revision history for this message
reech (r-mcmillan) wrote :

I have a prism2 card on dapper final and I still need to use wlan-ng commands in a script.

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

Barry, this is still broken in Ubuntu 6.06 (0.2.3-1ubuntu7).

Reech, you might want to have a look at bug #37451. This bug is only about the optional updated firmware loading.

Revision history for this message
Tormod Volden (tormodvolden) wrote : adapts shared script to dapper

1) The Dapper kernel does not have the /proc/net/p80211 tree that the linux-wlan-ng scripts uses to determine the nsd name of the card, typically "prism2". Anyway since the only card supported is "prism2", there should not be much harm in using "prism2" as a default if the /proc probing fails.

2) After uploading the firmware, the ifstate=enable will always fail on my card. Inserting an "ifstate=disable" after the upload fixes this.

This patch makes the wlan_enable and wlan_bring_it_up functions work. Left to do is to have one of these functions called when the network card is plugged in. The current linux-wlan-ng relies on hotplug to do this, so in Dapper we'll have to tune the udev rules instead.

Revision history for this message
Tormod Volden (tormodvolden) wrote : udev rules to load firmware

This file replaces the old /etc/udev/rules.d/85-linux-wlan-ng.rules. It uses the "wlan_enable" function instead of only ifstate=enable, so that the firmware get uploaded as well.

Note that this has to be run before 85-ifupdown.rules (hence the new 84- name), otherwise the ifup will do an ifstate=enable first, which will block the firmware upload.

I have only tested this with an USB device...

Changed in linux-wlan-ng:
status: Needs Info → Unconfirmed
Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: [patch] prism2 firmware is not loaded

I am "proactively" testing 0.2.4+svn20060909-3ubuntu1 from merge-o-matic. The only thing I needed to do here was to replace the udev/rules.d file according to my previous comment.

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

I cleaned up the udev rules file to make use of a new version of the wlan-udev.sh script.

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

The missing /proc/net/p80211 in the edgy kernel is still an issue (bug #53748).

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

With kernel 2.6.17-10.31, /proc/net/p80211 is back in Edgy. The "shared" patch is therefore obsolete for edgy. Only the udev rules need to be fixed.

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

Replaced PHYSDEVDRIVER with DRIVER for Feisty.

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

Oops, that should be DRIVER and not ENV{DRIVER}

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

Actually, it should be DRIVERS.

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

I updated the patch for wlan-udev.sh to reflect the newest version of the udev rules in the example in the comments.

Revision history for this message
Paulus (donmatteo) wrote :

Tormod, thanks for your work on this. Could you tell me the current state? Are the patches needed to use NetworkManager already included in the curren linux-wlan-ng package? I am talking about the patches mentioned in http://lists.linux-wlan.com/pipermail/linux-wlan-devel/2007-January/003626.html

What else is needed to get this working?

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

The Ubuntu developers don't seem to have time to review and apply my patches. (And the only developer I know with such a card is not interested in firmware loading). It would maybe help if people like you test them out and report here.

For the NetworkManager patches, they are not even applied upstream AFAIK. If NetworkManager is important for Ubuntu, maybe they should be applied anyway, after some testing. But that will probably have to wait until Feisty+1. I will post some patched modules for testing once Feisty is released. Note that the NetworkManager patches for the prism2_usb module have to go in the kernel, not (only) in linux-wlan-ng.

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

For the network-manager operation, see bug #104037.

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

linux-wlan-ng (0.2.8+dfsg-1ubuntu1) gutsy; urgency=low

  [ Tormod Volden ]
  * Merge from debian unstable, remaining changes:
    - debian/control updates concerning modules in Ubuntu kernels.
    - no hotplug agent
    - enable CONF_etc_Makefile.dpatch for udev rules
    - enable CONF_etc_linux-wlan-ng_rules.dpatch
  * better p80211 module probing (closes ubuntu #65195)
  * use DRIVERS in udev rules (closes ubuntu #78021)
  * move udev rules to before ifupdown (ubuntu #29706)
  * new udev rules and ubuntu-wlan-udev-sh.dpatch for
      network-manager compatibility (ubuntu #104037)
  * changed maintainer fields

Changed in linux-wlan-ng:
assignee: nobody → tormodvolden
status: Unconfirmed → 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.