Author Topic: Wireless Interface: Wlan0 Vs Ethx?  (Read 3265 times)

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Wireless Interface: Wlan0 Vs Ethx?
« on: March 06, 2008, 01:52:49 am »
I was playing with upgrading the prism firmware on my Ambicom WL-1000C, which runs with the hostap driver, instead of orinoco.
After unsuccessful experiments, my card stopped to connect again. And I got a strange error which I remembered i had run into before:
Quote
eth3: invalid skb->cb magic (0x00000000, expected 0xf08a36a2)
But eth3 was always working before that.
It shouldn't be a consequence of unsuccessful firmware upgrading (dmesg showed that the firmware didn't (fail to) change), but should be a problem of loading the drivers.
There has been a kinda strange behavior of the system to rename the wireless interface. Originally the wifi0 interface cannot be used and is mapped to wlan0. (dmesg shows this.) But it will be renamed to ethX again when actually connected.

Finally I saw why the interface got changed to ethX.
I noticed that udev actually did that (looking at the booting messages in dmesg).
So, opening up /etc/udev/rules.d/z25_persistent-net.rules, I saw this:
Quote
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0e:0c:DD:EE:FF", NAME="eth0"

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0e:0c:DD:EE:FF", NAME="eth1"

# Unknown net device (/class/net/eth0) (spectrum_cs)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:a0:f8:AA:BB:CC", NAME="eth2"

# Unknown net device (/class/net/eth0) (orinoco_cs)
#SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:10:7a:XX:YY:ZZ", NAME="eth3"

# Unknown net device (/class/net/wlan0) (hostap_cs)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:10:7a:XX:YY:ZZ", ATTR{type}=="1", NAME="wlan0"

The device for hostap seems always to be either eth2 or eth3. I had eth3 because eth2 was already taken by the spectrum driver for the Symbol Spectrum 24 wifi card.
So it seemed two drivers were competing for the same device (same MAC address), and orinoco won over hostap here.

After commenting out the orinoco line, and then in /etc/network/interface changing from eth3 (back) to wlan0, i got my wireless connection again.

Note that simply blacklisting orinoco in /etc/modprobe.d/blacklist did NOT work.

I don't actually know why this happened. Perhaps the veterans can enlighten me here?  
« Last Edit: March 06, 2008, 02:06:48 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

rogalian

  • Newbie
  • *
  • Posts: 22
    • View Profile
Wireless Interface: Wlan0 Vs Ethx?
« Reply #1 on: April 03, 2008, 08:51:10 am »
Blacklisting will not prevent kernel modules loading at startup.

See: http://wiki.debian.org/udev

Best method aside from compiling your own kernel is to rename the offending modules, and run a depmod -ae

Disabling orinico breaks spectrum_cs