kernel 2.6.17: hostap_cs not working, used to work on older kernels

claytonk at claytonk
Fri Nov 10 07:43:32 PST 2006

On Wed, 8 Nov 2006 12:45:05 -0500
Bryan Kadzban <bryan at> wrote:

> On Thu, Nov 09, 2006 at 12:08:16AM +0800, claytonk at wrote:
> > SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}
> > =="00:02:6f:34:96:3c", NAME="eth1"
> > 
> > however if I was to tweak this file it is not clear to me how I
> > would take care of the case where there are two interfaces with
> > exactly the same MAC.
> The DRIVERS=="?*" is supposed to handle that for bridge devices and
> VLAN sub-interfaces (this is another case where you have multiple
> interfaces with the same MAC).  But it doesn't handle wifi0/wlan0
> correctly.
> udev-103's write_net_rules script has logic in it to handle ath* or
> wlan* interfaces correctly.  If the name of the interface starts with
> "ath" or "wlan", it adds an ATTRS{type}=="1" match to the generated
> rule.  But this only takes effect when generating a new rule (the
> entire persistent generator scheme fails to update old rules, pretty
> much by design).
> So you should be able to change the rule to call the interface wlan0,
> and add the ATTRS{type}=="1" match to it (assuming udev >=098; for
> older versions use SYSFS{type}).  This should skip the rename of
> wifi0.
> > If it is fixed, the fix hasn't made it to unstable yet
> It's in testing -- or at least, the new write_net_rules script is, so
> new interfaces will work properly.  Your current setup is still broken
> because the rules don't update.  Your choices are to either update
> your rules file manually (as above), or remove your rules file and run
> "/lib/udev/write_net_rules all_interfaces" to regenerate it.

Thanks, the removing-the-rules-file option worked rather nicely for me. I haven't tried the card in Master mode yet, but it is currently doing just fine in Managed mode with hostap_cs. After plugging the card in, my /etc/udev/rules.d/z25_persistent-net.rules now contains:

# PCI device 0x1180:0x0476 (hostap_cs)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:02:6f:34:96:3c", ATTRS{type}=="1", NAME="wlan0"

as predicted. Is there an bug report that I should report success on, or is this all taken care of already?

> I'm not sure there's anything Debian can do about older incorrect
> rules...

Debian says there will be no attempt to fix the incorrect rules:

More information about the Hostap mailing list