2011-05-17 19:33:36

by George Nychis

[permalink] [raw]
Subject: [BUG] ath9k_htc: new devices get name wlan%d if not in rules

I haven't narrowed it down to the exact build date where this breaks,
but I know that it works in compat-wireless-2011-05-01, and not in
compat-wireless-2011-05-11+ (including last night's build). I had
trouble building compat-wireless-2011-05-04/05 so it was hard for me
to narrow it down.

However, if there is no udev rule already in
/etc/udev/rules.d/70-persistent-net.rules for the USB device's MAC
address (e.g., ATTR{address}=="4c:e6:76:12:ce:48") ... then the
interface comes up as wlan%d and does not get successfully renamed.
If it has an entry in 70-persistent-net.rules, then it will
successfully rename it.

In compat-wireless-2011-05-01 and earlier, if the device does not
exist in 70-persistent-net.rules, it gets a name and then it is added
to the rules file (e.g., as wlan0).

These are my results from an x86 Ubuntu 10.04 machine.

- George


2011-05-18 10:11:22

by Ignacy Gawedzki

[permalink] [raw]
Subject: Re: [BUG] ath9k_htc: new devices get name wlan%d if not in rules

On Tue, May 17, 2011 at 03:33:34PM -0400, thus spake George Nychis:
> I haven't narrowed it down to the exact build date where this breaks,
> but I know that it works in compat-wireless-2011-05-01, and not in
> compat-wireless-2011-05-11+ (including last night's build). I had
> trouble building compat-wireless-2011-05-04/05 so it was hard for me
> to narrow it down.

The parsing of the format of interface name has been reworked in some recent
commit in the kernel. Consequently, several calls to dev_alloc_name (which
does the actual parsing of the format string and allocation of a number) have
been removed from several kernel components and the parsing and number
allocation is done in some unique common place down the road. The problem is,
compat-wireless doesn't add this bit of "common place" code, but still removes
the original calls to dev_alloc_name.

This is something that should be added to compat/, but in the meantime, you
can apply the attached patch.

Ignacy

--
A person is shit's way of making more shit.
-- S. Barnett, anthropologist.


Attachments:
(No filename) (1.04 kB)
compat-wireless-dev-alloc-name.patch (525.00 B)
Download all attachments