Sunday, March 20. 2011

Getting Prism 2.5 working with Ubuntu 10.04

I've recently upgraded my system from Ubuntu 8.02 to 10.04 (Lucid Lynx). After the reboot, my wireless PCI card with Intersil Prism 2.5 Wavelan chipset (rev 01) did not work anymore.

First I thought the driver for this rather old card is missing. However, it turned out the interface was named wrong by the udev rules.

To fix the issue, I edited /etc/udev/rules.d/70-persistent-net.rules. There were two entries for my wireless card, one for the hostap_pci driver that named the interface wlan0 and one for the orinoco_pci driver that named the interface eth1. As eth1 showed up with ifconfig, but wlan0 did not, I figured orinoco_pci is working, but hostap_pci is not. So I changed the following lines in 70-persistent-net.rules from

# PCI device 0x1260:0x3873 (hostap_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:09:5b:11:e2:c9", 
    ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:09:5b:11:e2:c9", 
    ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

to

# PCI device 0x1260:0x3873 (hostap_pci)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:09:5b:11:e2:c9", 
    ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:09:5b:11:e2:c9", 
    ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

That is, I commented out the section for hostap_pci and renamed the entry for orinoco_pci to use wlan0 as the interface name.

After a reboot, I could use my wireless network again.

Update: However, a new entry was added to the udev rules file so that after the next reboot, my wireless network card did not work anymore. The culprit was the udev rules generator file at /lib/udev/rules.d/75-persistent-net-generator.rules, which thought it still had to add a udev rule for the eth1 interface. I don't know how to debug udev rules, so the easiest way to fix this issue is to disable the rule generation once everything is set up nicely. For this, I added the following line at the beginning of the 75-persistent-net-generator.rules file, with the effect that no further rule generation for network cards happens:

GOTO="persistent_net_generator_end"

Of course, if you add or change your network cards, you should uncomment this new line to generate new rules.