# ipw3945 not working (after upgrade)

## pholthau

Hey!

I know there are several threads around here about this topic, but my issue seems to be unrelated. at least i found no hint what might be my problem.

after bootup i am in the following situation: ipw modules are loaded, the daemon seems to run, but i am unable to start eth1.

```

ps -u root | grep ipw

 3269 ?        00:00:00 ipw3945/0

 3270 ?        00:00:00 ipw3945/1

 3271 ?        00:00:00 ipw3945/0

 3272 ?        00:00:00 ipw3945/1

```

```

lsmod | grep ipw

ipw3945                98336  0

ieee80211              26504  1 ipw3945

```

If i try to start eth1 it does not find the ipw driver:

```

/etc/init.d/net.eth1 start

 * Service net.eth1 starting

 Configuration not set for eth1 - assuming DHCP

 network interface eth1 does not exist

 Please verify hardware or kernel module (driver)                         [ !! ]

 * ERROR:  net.eth1 failed to start

```

So i try to start the daemon by hand:

```

/etc/init.d/ipw3945d start

 * Service ipw3945d starting

ipw3945d - regulatory daemon

Copyright (C) 2005-2006 Intel Corporation. All rights reserved.

version: 1.7.22

Intel PRO/Wireless 3945ABG Network Connection found at:

 /sys/bus/pci/drivers/ipw3945/0000:0c:00.0

Daemon launched as pid 9544.  Exiting.                                    [ !! ]

 * ERROR:  ipw3945d failed to start

```

My configuration is as follows:

```

cat /etc/conf.d/ipw3945d

ARGS="--timeout=-1 --quiet --pid-file=/var/run/ipw3945d/ipw3945d.pid"

```

```

cat /etc/modules.d/ipw3945d

install ipw3945 /sbin/modprobe --ignore-install ipw3945; sleep 0.5; /etc/init.d/ipw3945d start

remove ipw3945 /etc/init.d/ipw3945d stop; /sbin/modprobe -r --ignore-remove ipw3945

```

These packages are installed on my machine:

```

[ebuild   R   ] net-wireless/ieee80211-1.2.15  USE="-debug" 0 kB

[ebuild   R   ] net-wireless/ipw3945-1.1.3  USE="-debug" 0 kB

[ebuild   R   ] net-wireless/ipw3945d-1.7.22-r4  0 kB

[ebuild   R   ] net-wireless/ipw3945-ucode-1.13  0 kB

[ebuild   R   ] net-wireless/wpa_supplicant-0.5.6  USE="dbus qt3 qt4 readline ssl -gsm -madwifi"

```

Anyone out there with the same problem? Someone can help?

----------

## jasn

Make sure you set permissions correctly on your /var/run/ipw3945d directory, as well as you edit your /etc/conf.d/ipw3945d configuration file as Fran described in the following thread;

https://forums.gentoo.org/viewtopic-t-526447.html

----------

## pholthau

The configuration file is already edited (as shown above and hopefully correct), and the directory permissions, too:

```

drwxr-xr-x 2 ipw3945d root  4096 2006-12-27 14:46 ipw3945d

```

----------

## jasn

Weird.. I did have the exact same problem as you described (basically ipw3945d failing to start with similar error messages. It starting happening to me after I upgraded ipw3945d to 1.7.22-r4 from -r3). I fixed it with the instructions from the other thread, changing ipw3945d directory permissions, and editing the ipw3945d configuration file. My modules.d/ipw3945d is exactly as yours well, (although I never edited it..) hmmmm..

The only other thing I did do, although I don't think it's related, is use logic's method described on page 20 of the ipw3945 drivers thread, for getting the most recent ipw3945 git sources, patch my kernel so that I can select all relevant modules from within the kernel config (ieee80211 and ipw3945), recompile my kernel, and after booting, I noticed I was running a 1.1.4 version of ipw3945 module. Again I don't think it's related, but I did get the latest ipw3945 code the way logics described it here;

https://forums.gentoo.org/viewtopic-t-434817-postdays-0-postorder-asc-start-475.html

----------

## pholthau

thanks for your suggestions. i just edited /etc/init.d/ipw3945d

now i can bring up the interface with the following steps:

1. rmmod ipw3945

2. modprobe ipw3945

3. /etc/init.d/net.eth1 start

No matter if i have ipw3945 in /etc/modules.autoload.d/kernel-2.6 or not,

the module seems to be loaded at boot time. strange! why could that be?

even more strange: on manual modprobe the daemon is launched, but not

at boot time. this is why i do the first two steps. i would like to skip these,

but how can i achieve this?

my /etc/init.d/ipw3945d looks like this:

```

[..]

start() {

        check

        ebegin "Starting ipw3945d"

        chown ipw3945d /sys/bus/pci/drivers/ipw3945/00*/cmd

        chmod a-w,u+rw /sys/bus/pci/drivers/ipw3945/00*/cmd

        start-stop-daemon --start --exec /sbin/ipw3945d -- --pid-file=${PIDFILE}

        eend ${?}

}

stop() {

        ebegin "Stopping ipw3945d"

        start-stop-daemon --stop --exec /sbin/ipw3945d -- --pid-file=${PIDFILE}

        eend ${?}

}

```

could you post yours, please?

----------

## jasn

Yes..

```
#!/sbin/runscript

# Copyright 1999-2006 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw3945d/files/ipw3945d-init.d,v 1.4 2006/12/22 10:11:26 phreak Exp $

PIDFILE=/var/run/ipw3945d/ipw3945d.pid

depend() {

        before net

}

check() {

        # Let's check if the pidfile is still present.

        if [ -f "${PIDFILE}" ] ; then

                eerror "The pidfile ($PIDFILE) is still present."

                eerror "Please check that the daemon isn't running!"

                return 1

        fi

}

start() {

        check

        ebegin "Starting ipw3945d"

        chown ipw3945d /sys/bus/pci/drivers/ipw3945/00*/cmd

        chmod a-w,u+rw /sys/bus/pci/drivers/ipw3945/00*/cmd

        start-stop-daemon --start --exec /sbin/ipw3945d --pidfile ${PIDFILE} -- \

                --pid-file=${PIDFILE} ${ARGS}

        eend ${?}

}

stop() {

        ebegin "Stopping ipw3945d"

        start-stop-daemon --stop --exec /sbin/ipw3945d --pidfile ${PIDFILE}

        eend ${?}

}
```

----------

## pholthau

thanks. finally it is working, but i don't have a clue why exactly  :Wink: 

----------

