You are not logged in.

#1 2007-09-18 15:05:36

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Udev renaming not working with mac80211 stack?

Not sure if it belongs here, doesn't really seem to fit in anywhere roll?

On my old system I used to rename the network devices (IPW2200 and Realtek onboard NIC) to respectively 'intel' and 'realtek' to avoid confusion and make for persistent device naming (which afaik Arch does now too since a while).

I have tried to rename devices using the new wireless stack & related drivers (an RT2500 card with rt2x00 drivers and an IPW3945 with iwlwifi drivers). They both show up as wlan0 on the respective boxes, along with some wlmaster0 'master' device.

I used to base my udev renaming scheme on MAC addresses, like this:

ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="xx:xx:xx:xx:xx:xx", NAME="intel"

This does not work anymore, the devices just stick with their wlan0 name. I rely on this guide which has proven quite useful and is frequently updated. However, it does not offer any solution.

This whole renaming thing is not necessary, but as a lot of other stuff, it is fancy, so I'd like to get it working again cool.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#2 2007-09-19 21:56:54

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Udev renaming not working with mac80211 stack?

Someone?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2007-09-20 08:08:16

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Udev renaming not working with mac80211 stack?

From the rt2x00 README

===================
10.1: udev interface naming
=========

In some cases when loading the rt2x00 drivers the interface names are
different from the names used in this README. This is usually caused by the
udev handler who has set some rules regarding the interface. These rules
are usually set up by the distribution and have been created especially for
for the legacy driver and their strange behavior.
To change the rules udev applies to your interface you should edit the udev
rules stored in /etc/udev/rules.d/ (exact location might be different
depending on distribution).
When editing this file, search for the line that contains something like this:

    # ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
    #    SYSFS{address}=="<mac address>", NAME="<interface>"
    (line has been wrapped due to max line length limit)

Where <mac address> is the hardware address of your wireless networkcard,
and <interface> is the interface name the interface takes as soon as the
rt2x00 modules are loaded.
This line should be changed to look like:

    # ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
    #    SYSFS{address}=="<mac address>", SYSFS{type}=="801",
    #    NAME="wmaster0"
    # ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
    #    SYSFS{address}=="<mac address>", NAME="wlan0"
    (the 2 lines have been wrapped due to max line length limit)

Where <mac address> is the hardware address of your wireless networkcard,
and thus should be the same as on the original line.

No idea if it works though... wink


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#4 2007-09-20 18:27:56

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Udev renaming not working with mac80211 stack?

Ah smile. Thanks for that, I'll dig into it and report back cool


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2007-10-05 00:10:14

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Udev renaming not working with mac80211 stack?

Klixon, again - thanks for the hint smile. It turns out the info in the rt2x00 tarball is a bit deprecated, but it did set me on the right track though - it seems SYSFS has been traded for ATTR now in a lot of udev values.

This is what made it work:

ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{type}=="801", NAME="wmaster0"
ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="intel"
ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="broadcom"

The first is necessary for the wmaster0 to preserve its name (not sure what it's for but the 'type' attribute is the only thing that differentiates the interface from the real network interface, so you don't want to rename them both by just specifying the MAC address. After that it's pretty easy, as you can see wink.

I hope this info is useful to someone, I'm just glad to have my interfaces back tongue


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2007-10-05 07:22:50

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Udev renaming not working with mac80211 stack?

B wrote:

The first is necessary for the wmaster0 to preserve its name (not sure what it's for [...]

there you go


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#7 2007-10-05 18:45:15

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Udev renaming not working with mac80211 stack?

Quite interesting. I wonder why they don't just hide it, as the patch makes it possible. Oh well, kernel politics...


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2007-10-06 12:22:28

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Udev renaming not working with mac80211 stack?

yeah weird... i like weird, though... good excuse to dig for info and educate myself whahaha wink


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

Board footer

Powered by FluxBB