wireless firmware / hotplugging problem

I am having some difficulty with my Intel 4965AGN wireless card on openSuSE 11. Basic problem: I can’t get wlan0 up after I completely shut off the power to my notebook. However I am dual booting with vista and after reconnecting the power, booting vista and the rebooting into suse it works fine.

This leads me to think that somehow vista is loading something non-persistent into the device, linux isn’t. I’m not sure but firmware might be the proper term for this data.

The ifup output suggests that the firmware adds an additional “authentication-interface” to the device but since this isn’t active it returns “Operation not supported”.


linux-ssouffri:/home/ssouffri # ifup wlan0
    wlan0     device: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)
    wlan0     warning: WPA configured but may be unsupported
    wlan0     warning: by this device
    wlan0     starting wpa_supplicant
SIOCSIFFLAGS: No such file or directory
Could not set interface 'wlan0' UP
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
Starting DHCP Client Daemon on wlan0... . . . . . . . . . . . . . . . no IP address yet... backgrounding.
interface wlan0 is not up

So my question is how to get the “firmware” to load. After some research I found the file /lib/firmware/README.iwlwifi-4965-ucode. Maybe this will help. Thanks in advance.

Intel Wireless WiFi Link 4965AGN Adapter
Copyright (C) 2006 - 2007 Intel Corporation.  All rights reserved.

Microcode Package README.iwlwifi-4965-ucode

INDEX

1. OVERVIEW
2. INSTALLATION
3. LICENSE


1. OVERVIEW

The file iwlwifi-4965-1.ucode provided in this package must be
present on your system in order for the Intel Wireless WiFi Link
4965AGN driver for Linux (iwlwifi-4965) to operate on your system.

The "-1" in the filename reflects an interface/architecture version number.
It will change only when changes in new uCode releases make the new uCode
incompatible with earlier drivers.

On adapter initialization, and at varying times during the uptime of
the adapter, the microcode is loaded into the RAM on the network
adapter.  The microcode provides the low level MAC features including
radio control and high precision timing events (backoff, transmit,
etc.) while also providing varying levels of packet filtering which can
be used to keep the host from having to handle packets that are not of
interest given the current operating mode of the device.

2. INSTALLATION

The iwlwifi-4965 driver will look for the file iwlwifi-4965-1.ucode using the
kernel's firmware_loader infrastructure.  In order to function
correctly, you need to have this support enabled in your kernel.  When
you configure the kernel, you can find this option in the following
location:

        Device Drivers ->
                Generic Driver Options ->
                        Hotplug firmware loading support


You can determine if your kernel currently has firmware loader support
by looking for the CONFIG_FW_LOADER definition on your kernel's
.config.

In addition to having the firmware_loader support in your kernel, you
must also have a working hotplug and udev infrastructure configured.
The steps for installing and configuring hotplug and udev are very
distribution specific.

Once you have the firmware loader in place (or if you aren't sure and
you just want to try things to see if it works), you need to install
the microcode file into the appropriate location.

Where that appropriate location is depends (again) on your system
distribution.  You can typically find this location by looking in the
hotplug configuration file for your distro:

        % grep \"^FIRMWARE_DIR\" /etc/hotplug/firmware.agent

This should give you output like:

        FIRMWARE_DIR=/lib/firmware

If it lists more than one directory, you only need to put the
microcode in one of them.  In the above example, installation is
simply:

        % cp iwlwifi-4965-1.ucode /lib/firmware

You can now load the driver (see the INSTALL and README.iwlwifi provided with
the iwlwifi package for information on building and using that driver.)

3. LICENSE

The microcode in this package (iwlwifi-4965.ucode) is provided under the
terms of the following license (available in the file
LICENSE.iwlwifi-4965-ucode):

Copyright (c) 2006, Intel Corporation.
All rights reserved.

Redistribution.  Redistribution and use in binary form, without
modification, are permitted provided that the following conditions are
met:

* Redistributions must reproduce the above copyright notice and the
  following disclaimer in the documentation and/or other materials
  provided with the distribution.
* Neither the name of Intel Corporation nor the names of its suppliers
  may be used to endorse or promote products derived from this software
  without specific prior written permission.
* No reverse engineering, decompilation, or disassembly of this software
  is permitted.

Limited patent license.  Intel Corporation grants a world-wide,
royalty-free, non-exclusive license under patents it now or hereafter
owns or controls to make, have made, use, import, offer to sell and
sell ("Utilize") this software, but solely to the extent that any
such patent is necessary to Utilize the software alone, or in
combination with an operating system licensed under an approved Open
Source license as listed by the Open Source Initiative at
http://opensource.org/licenses.  The patent license shall not apply to
any other combinations which include this software.  No hardware per
se is licensed hereunder.

DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

I found some additional errors /var/log/messages:


linux-ssouffri:/home/ssouffri # tail /var/log/messages
Feb  1 23:28:51 linux-ssouffri kernel: tg3: eth0: Flow control is on for TX and on for RX.
Feb  1 23:28:51 linux-ssouffri kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Feb  1 23:28:52 linux-ssouffri avahi-daemon[3835]: Registering new address record for fe80::21b:24ff:fe5f:d57f on eth0.*.
Feb  1 23:28:56 linux-ssouffri dhclient: bound to 192.168.0.6 -- renewal in 1692 seconds.
Feb  1 23:28:56 linux-ssouffri dhclient: receive_packet failed on eth0: Network is down
Feb  1 23:29:01 linux-ssouffri kernel: eth0: no IPv6 routers present
Feb  1 23:39:59 linux-ssouffri kernel: firmware: requesting iwlwifi-4965-2.ucode
Feb  1 23:39:59 linux-ssouffri kernel: iwlagn 0000:06:00.0: iwlwifi-4965-2.ucode firmware file req failed: -2
Feb  1 23:39:59 linux-ssouffri kernel: iwlagn 0000:06:00.0: Could not read microcode: -2
Feb  1 23:39:59 linux-ssouffri firmware.sh[15949]: Cannot find  firmware file 'iwlwifi-4965-2.ucode'

Update (sry for excessive posting):
I recently downloaded the new driver version from Intel® Wireless WiFi Link drivers for Linux* to solve the problem however it created a new problem. The firmware iwlwifi-4965-2.ucode can’t be found. I checked /lib/firmware and sure enough iwlwifi-4965-2.ucode wasn’t present but iwlwifi-4965-1.ucode was. So I downloaded the new firmware from intellinuxwireless.org to go along with my driver. However i still get some errors. I can however bring wlan0 up. The new situation is as follows:


linux-ssouffri:~ # ifdown wlan0
    wlan0     device: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)
linux-ssouffri:~ # ifup wlan0
    wlan0     device: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)
    wlan0     warning: WPA configured but may be unsupported
    wlan0     warning: by this device
    wlan0     starting wpa_supplicant
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
Starting DHCP Client Daemon on wlan0... . . . . . . . . . . . . . . . no IP address yet... backgrounding.

This is what the log says.


linux-ssouffri:~ # tail /var/log/messages
Feb  2 00:11:54 linux-ssouffri ifup:     wlan0     device: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)
Feb  2 00:11:54 linux-ssouffri ifup-wireless:     wlan0     warning: WPA configured but may be unsupported
Feb  2 00:11:54 linux-ssouffri ifup-wireless:     wlan0     warning: by this device
Feb  2 00:11:54 linux-ssouffri ifup-wireless:     wlan0     starting wpa_supplicant
Feb  2 00:11:54 linux-ssouffri kernel: iwlagn 0000:06:00.0: Radio disabled by HW RF Kill switch
Feb  2 00:11:54 linux-ssouffri kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Feb  2 00:11:54 linux-ssouffri ifup-dhcp: Starting DHCP Client Daemon on wlan0...
Feb  2 00:11:54 linux-ssouffri dhcpcd[4855]: wlan0: dhcpcd 3.2.3 starting
Feb  2 00:11:54 linux-ssouffri dhcpcd[4855]: wlan0: hardware address = 00:13:e8:42:00:83
Feb  2 00:11:54 linux-ssouffri ifup-dhcp: .
Feb  2 00:11:54 linux-ssouffri dhcpcd[4855]: wlan0: broadcasting for a lease
Feb  2 00:11:55 linux-ssouffri ifup-dhcp: .
Feb  2 00:12:10 linux-ssouffri syslog-ng[2292]: last message repeated 13 times
Feb  2 00:12:10 linux-ssouffri ifup-dhcp: no IP address yet... backgrounding.