[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#488267: Should add hostap modules



Frans Pop wrote:
Barry: a few requests.
1) What was the wireless interface called in the installer?
   You can probably tell from /var/log/installer/syslog.
eth1
You can check this from my original report (email of Fri, 27 Jun 2008
14:16:15 +0100 in bug 488267), and in the installer outputs I provided
in my email of Fri, 27 Jun 2008 18:15:56 +0100 (cat /proc/net/dev and
ifconfig while installer running)

That's not what I meant, but I probably was not clear enough.
I wanted to know what the name of the interface was when the driver loads it. What you list here could be _after_ it is renamed by udev. So, you have to look in the installer's syslog for lines where you see the orinoco driver being loaded and how the interface is being referred to there. Possibly that is indeed eth1, but it is also possible that it's first something else and that you later see a line mentioning that udev renames it.

Apologies - you're right, I didn't understand that.
From the installer syslog, orinoco_csi creates eth1 directly and AFAICT udev doesn't touch it.
The relevant lines of the syslog look like this:
Jun 26 10:06:18 kernel: orinoco 0.15 (David Gibson <hermes@gibson.dropbear.id.au>, Pavel Roskin <proski@gnu.org>, et al)
Jun 26 10:06:19 kernel: orinoco_pci 0.15 (Pavel Roskin <proski@gnu.org>, David Gibson <hermes@gibson.dropbear.id.au> & Jean Tourrilhes <jt@hpl.hp.com>)
Jun 26 10:06:19 kernel: ACPI: PCI Interrupt 0000:02:0b.0[A] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
Jun 26 10:06:19 kernel: eth1: Hardware identity 8013:0000:0001:0000
Jun 26 10:06:19 kernel: eth1: Station identity  001f:0003:0001:0004
Jun 26 10:06:19 kernel: eth1: Firmware determined as Intersil 1.4.3
Jun 26 10:06:19 kernel: eth1: Ad-hoc demo mode supported
Jun 26 10:06:19 kernel: eth1: IEEE standard IBSS ad-hoc mode supported
Jun 26 10:06:19 kernel: eth1: WEP supported, 104-bit key
Jun 26 10:06:19 kernel: eth1: MAC address 00:d0:59:bd:d5:c5
Jun 26 10:06:19 kernel: eth1: Station name "Prism  I"
Jun 26 10:06:19 kernel: eth1: ready
Jun 26 10:06:19 kernel: eth1: orinoco_pci at 0000:02:0b.0
Jun 26 10:06:19 net/hw-detect.hotplug: Detected hotpluggable network interface eth0
Jun 26 10:06:19 net/hw-detect.hotplug: Detected hotpluggable network interface eth1

At that stage (while running the installer), /etc/udev/rules.d/z25_persistent-net.rules contains the single rule for eth1:
# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", NAME="eth1"

The only vaguely relevant udev lines I could find in installer/syslog are:
Jun 26 10:13:20 in-target: Setting up udev (0.114-2) ...
Jun 26 10:13:20 in-target: /etc/udev/rules.d/z25_persistent-net.rules exists, persistent interface names
Jun 26 10:13:20 in-target: not saved.

-------------------

2) Does the workaround described above work?

<snip of quite relevant stuff from previous mail>

Ah, I see the error. Typo in my last mail. It should be "ATTR{type}=1" (and not "ATTRS"). Please try again with that.

When I rebooted to do this, to my slight surprise, I found that
~$ cat /etc/udev/rules.d/z25_persistent-net.rules # This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x1031 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="08:00:46:77:ce:be", NAME="eth0"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTRS{type}=1, NAME="eth1"

# PCI device 0x1260:0x3873 (hostap_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=="1", NAME="wlan0"
Note that I had not hand installed the third rule, but had used the incorrect ATTRS in the hand installed second rule. I guessed that the best thing to do was to correct ATTRS to ATTR and also delete the third rule (expecting it might be regenerated anyway). So I did that (definitely deleting the third rule).

After your modprobe remove&reload hostap_pci, the results were exactly as before: ifconfig -a had interfaces wifi0 and wlan0, and the last two rules in z25_persistent-net.rules had become:
# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=1, NAME="eth1"

# PCI device 0x1260:0x3873 (hostap_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=="1", NAME="wlan0"
which seem to me to be two rules trying to apply to the same device and data.

I did try to think of a new experiment, but couldn't see a useful one.

It seems to me that no, your workaround does not work as you wish; and that the hostap_pci module is writing the wlan0 rule into z25_persistent-net.rules I suppose this does make some kind of sense, as hostap_pci must in fact do (at least) two things in succession: * create the master interface wifiN (where N=0 for us as it's the first such interface to be created) * create an sta interface based on wifiN, and it chooses (hard-coded?) to call this wlanN

And if the installer used hostap_pci too, then presumably at install time, the device created would be wlan0.

(Ah, the joys of udev and drivers. Not.)

In case it helps, now
:~$ ls -l /sys/class/net/
total 0
drwxr-xr-x 4 root root 0 2008-06-30 20:42 eth0
drwxr-xr-x 4 root root 0 2008-06-30 20:42 lo
drwxr-xr-x 5 root root 0 2008-06-30 20:55 wifi0
drwxr-xr-x 5 root root 0 2008-06-30 20:55 wlan0
and the diff between the output of
  udevinfo -a -p /sys/class/net/wlan0/
and the one in my last email for wlan0_rename is just:

8,9c8,9
<   looking at device '/class/net/wlan0_rename':
<     KERNEL=="wlan0_rename"
---
>   looking at device '/class/net/wlan0':
>     KERNEL=="wlan0"
13,14c13,14
<     ATTR{iflink}=="4"
<     ATTR{ifindex}=="4"
---
>     ATTR{iflink}=="6"
>     ATTR{ifindex}=="6"

I'm happy to provide further info.  Sorry if I've missed anything obvious.

Barry





Reply to: