Bug 297616

Summary: Yast doesn't write/save WLAN device settings
Product: [openSUSE] openSUSE 10.3 Reporter: Jörg Hermsdorf <funtasyspace>
Component: YaST2Assignee: Michal Zugec <mzugec>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: juergen.mell, kairo, mbra, snwint
Version: Alpha 7   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: tail -f /var/log/YaST2/y2log
ifcfg file of iwl3945 device

Description Jörg Hermsdorf 2007-08-05 15:05:21 UTC
Created attachment 155635 [details]
tail -f /var/log/YaST2/y2log

Yesterday I installed Alpha 7, it's the first time I installed an openSUSE 10.3 version at all. As openSUSE 10.3 ships the new mac80211 subsystem, I tried to make the 'Intel PRO/Wireless 3945ABG' device of my ThinkPad T60p work, using the iwlwifi driver from intellinuxwireless.org, which was written for the mac80211 subsystem.

So I got the iwlwifi driver (version 0.1.8) from http://intellinuxwireless.org/ 
together with the microcode image (version iwlwifi-3945-ucode-2.14.1.5). It 
compiles without errors and loading the iwl3945 kernel module works fine and 
brings up the 'wlan0' interface. Well, only the wlan LED on my ThinkPad does 
not light!

Now the device shows up in Yast too, and it seems like it can be configured as usual. But actually it doesn't work, because the settings are not written to disk. Every time I launch the Yast network device settings section again, my WLAN device appears unconfigured. Looking in /etc/sysconfig/network reveals, that no configuration file for the wlan devices is ever created. I nearly tried all possible settings in Yast by now, just to see if it will save the configuration to /etc/sysconfig/network/ under any circumstances, but that never happened. In contrast, the settings of my wired e1000 device are written to /etc/sysconfig/network/ifcfg-eth0 with no problem.

Next I tried copying the configuration of my wlan device from my openSUSE 10.2 configuration, to see if Yast will recognize and read it, at least. On openSUSE 10.2 the configuration file of my wlan device had the filename ifcfg-wlan-id-00:10:20:30:40:50 (where 00:10:20:30:40:50 is not my real mac address, I just don't want to post it here). Copying that file to /etc/sysconfig/network on openSUSE 10.3, won't let Yast detect the configuration, the device still appears as not configured in Yast. An 'rcnetwork restart' won't use the configuration, too. Here the output:

wlan0 device: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
              No configuration found for wlan0                       unused

Well, renaming 'ifcfg-wlan-id-00:10:20:30:40:50' to 'ifcfg-wlan0' causes the configuration to be recognized by ifup and rcnetwork start/restart will successfully establish a connection with my access point. Anyway, even now my wlan0 device still doesn't show up as configured in Yast.

I also tried the 'User Controlled with NetworkManager' Option, but this way, I can only connect using WEP encryption. WPA doesn't work with NetworkManager. Anyway, since I make heavy use of SCPM, NetworkManager is not really an option for me.


I come to the conclusion, that this is a YaST problem, because manually creating the ifcfg file and placing it in /etc/sysconfig/network works well. Next I did a 'tail -f /var/log/YaST2/y2log' to find out, why Yast doesn't write down the configuration for the wlan interface, but for the wired interface. I append the complete output as a file to this post. Interesting are the lines where it says:

2007-08-05 16:34:27 <1> myhost(21379) [YCP] NetworkModules.ycp:220 No changes to netcard modules -> nothing to write

2007-08-05 16:34:27 <1> myhost(21379) [YCP] NetworkDevices.ycp:651 No changes to netcard devices -> nothing to write


I hope this information helps to track down the problem.
Regards,
Jörg
Comment 1 Michal Zugec 2007-08-06 12:32:17 UTC
Hi Jörg,
you likes to write long descriptions ;-)

paragraphs 1,2:
this is no supported until that module will be included (replaced ipw3945) in our distribution

par. 3:
yes, this is problem

par. 4:
configuration files based on MAC address are depricated now
that's why you should rename copyed file

NetworkModules.ycp:
this is no important

NetworkDevices.ycp:
yes, here is the problem

You wrote that you was able to write configuration for eth device
Can you try to use old ipw3945 if this works?
Comment 2 Jörg Hermsdorf 2007-08-06 14:21:36 UTC
No I can't, because it seems that the old ipw3945 driver is no longer included with openSUSE. Although the firmware microcode image of ipw3945 is still included in the 'ipw-firmware' package in the 'Extra' repository. But I can't find a package that contains the ipw3945 kernel module.
Comment 3 Michal Zugec 2007-08-06 14:30:24 UTC
Jirko, it seems that we are "between" drivers, right? ;-)
Comment 4 Michal Zugec 2007-08-08 12:56:16 UTC
I installed iwlwifi driver, here is output from hwinfo --wlan:
20: PCI 300.0: 0282 WLAN controller
  [Created at pci.296]
  UDI: /org/freedesktop/Hal/devices/pci_8086_4227
  Unique ID: 2nea.kj44mnK68N2
  Parent ID: qTvu.bQ30eTbcr+3
  SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
  SysFS BusID: 0000:03:00.0
  Hardware Class: network
  Model: "Intel PRO/Wireless 3945ABG Network Connection"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x4227 "PRO/Wireless 3945ABG Network Connection"
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x1011
  Revision: 0x02
  Driver: "iwl3945"
  Driver Modules: "iwl3945"
  Device File: wmaster0
  Device Files: wmaster0, eth1
  Features: WLAN
  Memory Range: 0xedf00000-0xedf00fff (rw,non-prefetchable)
  IRQ: 21 (no events)
  HW Address: 00:18:de:64:b8:0d
  Module Alias: "pci:v00008086d00004227sv00008086sd00001011bc02sc80i00"
  Driver Info #0:
    Driver Status: iwl3945 is active
    Driver Activation Cmd: "modprobe iwl3945"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #5 (PCI bridge)


Steffen, I think this is bogus output:
  Device File: wmaster0
  Device Files: wmaster0, eth1

There should be:
  Device File: eth1
  Device Files: eth1, wmaster0

And this causes all problem. Can you fix it?
Comment 5 Steffen Winterfeldt 2007-08-08 13:12:49 UTC
For my machine, no interface is shown at all. Apparently loading
iwl3945 is not enough. Joe?
Comment 6 Michal Zugec 2007-08-08 13:17:49 UTC
I can see it only from ip (or in /sys/class/net) not in /sbin/ifconfig
Comment 7 Steffen Winterfeldt 2007-08-08 13:28:26 UTC
For me, it's not even in /sys/class/net.
Comment 8 Joachim Gleissner 2007-08-08 15:07:25 UTC
Loading iwl3945 is in fact not enough, you also require the firmware. And an Intel Wifi 4965 device, of course. The doubled "Device File(s)" output seems weird indeed, is it intended?
Comment 9 Steffen Winterfeldt 2007-08-08 15:32:37 UTC
But the driver loads the firmware, nothing I have to worry about. Or not?
Comment 10 Joachim Gleissner 2007-08-08 15:48:35 UTC
Ehm, comment 8 is wrong, of course you need an Intel 3945 device. The driver loads the firmware, correct. But Alpha7 packages do not match, you'll need the ucode package from stable.
Comment 11 Steffen Winterfeldt 2007-08-08 15:51:10 UTC
I'm testing beta1.
Comment 12 Michal Zugec 2007-08-09 08:29:23 UTC
Joachim, configuration file should be ifcfg-wmaster0 or ifcfg-eth1?
Comment 13 Jörg Hermsdorf 2007-08-09 08:57:20 UTC
It should be ifcfg-wlan0. AFAIK you don't configure wmaster0 directly, but several wlanX devices which belong to wmaster0. I'll attach my ifcfg-wlan0 file which I created by hand and which is working fine here. 
Comment 14 Michal Zugec 2007-08-09 09:02:26 UTC
In hwinfo (comment #4) there is no such device : wlan0
Comment 15 Jörg Hermsdorf 2007-08-09 09:03:33 UTC
Created attachment 156410 [details]
ifcfg file of iwl3945 device
Comment 16 Michal Zugec 2007-08-09 09:06:38 UTC
Now (after reboot) I'm really confused, hwinfo:

29: PCI 300.0: 0282 WLAN controller
  [Created at pci.296]
  UDI: /org/freedesktop/Hal/devices/pci_8086_4227
  Unique ID: JNkJ.kj44mnK68N2
  Parent ID: qTvu.bQ30eTbcr+3
  SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
  SysFS BusID: 0000:03:00.0
  Hardware Class: network
  Model: "Intel PRO/Wireless 3945ABG Network Connection"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x4227 "PRO/Wireless 3945ABG Network Connection"
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x1011
  Revision: 0x02
  Driver: "iwl3945"
  Driver Modules: "iwl3945"
  Device File: eth1
  Device Files: eth1, wlan0_rename
  Features: WLAN
  Memory Range: 0xedf00000-0xedf00fff (rw,non-prefetchable)
  IRQ: 21 (300508 events)
  HW Address: 00:18:de:64:b8:0d
  Module Alias: "pci:v00008086d00004227sv00008086sd00001011bc02sc80i00"
  Driver Info #0:
    Driver Status: iwl3945 is active
    Driver Activation Cmd: "modprobe iwl3945"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #14 (PCI bridge)


dmesg:
...
wmaster0: Selected rate control algorithm 'iwl-3945-rs'
wmaster0 renamed to eth1
udev: renamed network interface wmaster0 to eth1
wlan0 renamed to wlanxx0
...
wlanxx0 renamed to wlan0
wlan0 renamed to wlan0_rename
Comment 17 Jörg Hermsdorf 2007-08-09 09:09:09 UTC
Here's the '# hwinfo --wlan' on my ThinkPad T60p:
20: PCI 300.0: 0282 WLAN controller
  [Created at pci.296]
  UDI: /org/freedesktop/Hal/devices/pci_8086_4227
  Unique ID: 2nea.xxxxxxxxxxx
  Parent ID: qTvu.bQ30eTbcr+3
  SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
  SysFS BusID: 0000:03:00.0
  Hardware Class: network
  Model: "Intel PRO/Wireless 3945ABG Network Connection"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x4227 "PRO/Wireless 3945ABG Network Connection"
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x1011
  Revision: 0x02
  Driver: "iwl3945"
  Driver Modules: "iwl3945"
  Device File: wmaster0
  Device Files: wmaster0, wlan0
  Features: WLAN
  Memory Range: 0xedf00000-0xedf00fff (rw,non-prefetchable)
  IRQ: 17 (no events)
  HW Address: 00:11:22:33:44:55
  Link detected: yes
  Module Alias: "pci:v00008086d00004227sv00008086sd00001011bc02sc80i00"
  Driver Info #0:
    Driver Status: iwl3945 is active
    Driver Activation Cmd: "modprobe iwl3945"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #5 (PCI bridge)
Comment 18 Michal Zugec 2007-08-09 09:24:57 UTC
of course, you have "Device Files: wmaster0, wlan0", that's why your config name is ifcfg-wlan0, I have "Device Files: wmaster0, eth1", my configuration is ifcfg-eth1
but YaST always uses "Device File" option - this is the main problem
and there is conflict between "Device File" and udev rules ;-(
Comment 19 Jörg Hermsdorf 2007-08-09 10:40:07 UTC
Hm, I just upgraded to Beta1 which ships the iwlwifi driver within the iwlwifi-kmp-default package. I don't experience any udev conflicts here. There are also no 'renaming' messages in my dmesg output like you wrote in Comment #16.
Comment 20 Joachim Gleissner 2007-08-10 12:54:41 UTC
The renaming issue appears with you had ipw3945 loaded on the machine before and you now are using iwl3945. The first registered an interface eth1, the second two interfaces wlan0 and wmaster0. As the device is already known to the system, the interface gets renamed to eth1 in that case. Shouldn't be a problem. You can also remove the related entries of /etc/udev/rules.d/77-network.rules to switch to the new naming.
Comment 21 Michal Zugec 2007-08-17 10:33:57 UTC
What is status of this in Beta1?
I suppose that it's fixed now
Comment 22 Joachim Gleissner 2007-08-17 13:07:40 UTC
The situation in Beta1 is even worse, at least on my system, hwinfo does not detect any WLAN card anymore (means, hwinfo --wlan showing exactly nothing, neither the internal 3945, nor a PCMCIA card). Steffen?
Comment 23 Steffen Winterfeldt 2007-08-17 13:18:28 UTC
beta1 is really old, use hwinfo from STABLE
Comment 24 Joachim Gleissner 2007-08-17 13:38:28 UTC
That works better, thanks. It still features the "Device File: wlan0" and "Device Files: wlan0, wmaster0" oddity, but maybe that's intended. But even with that hwinfo package, YaST does not offer to configure the iwl3945 device. And I noticed another bug while trying to adding the card manually: When clicking on "Add" in the main dialog, I can select "wireless" as device type, but the settings seems to be ignored. In the next dialog, the device type is still "ethernet", and the wireless dialog does not appear either.
Comment 25 Michal Zugec 2007-08-17 16:07:05 UTC
yast2-network in Beta1 is old too ;-) - this is fixed in STABLE
buf if you want to upgrade id from STABLE, upgrade also yast2-core (changed bytecode)
Comment 26 Jörg Hermsdorf 2007-08-20 14:30:13 UTC
I don't know what this STABLE tree is you're talking about, but I just upgrated to the latest FACTORY packages. I also use the driver from the iwlwifi-kmp-default package now instead of compiling it own my own.

YaST2-Network detects the device and allows to configure it, but as soon as I finish the configuration and return to the overview dialog, the iwl3945 device is shown as 'not configured' again. If I hit the Configure-Button again, all the changes I did in the previous step are lost. Ergo, YaST2 won't write the config at all.

If I create /etc/sysconfig/network/ifcfg-wlan0 manually and call YaST2-Network afterwards, it gets even stranger. Now YaST2 shows my WLAN device two times. One is shown as 'not configured' but with a MAC address. The other one is shown as 'configured' but as 'not connected' and has the device name 'wlan-wlan0'. I can make configuration changes to that device and it seems that they are written to /etc/sysconfig/network/ifcfg-wlan0 correctly.
Comment 27 Jörg Hermsdorf 2007-08-20 15:12:07 UTC
*** Bug 301668 has been marked as a duplicate of this bug. ***
Comment 28 Michal Zugec 2007-08-21 08:53:55 UTC
fixed and tested in yast2-network-2.15.65
Comment 29 Jörg Hermsdorf 2007-08-29 14:51:39 UTC
Confirmed that! Works as expected after Factory update to yast2-network-2.15.67. Thanks!
Comment 30 Michal Zugec 2007-09-01 13:33:46 UTC
*** Bug 307026 has been marked as a duplicate of this bug. ***