# Shutting Down Ath0 ---> System Crash DLW-G520

## joe1031

Hey all,

Where the hell do I begin?

I have a DLW-G520 (Aerthos) wireless nic.  I unmasked madwifi-driver and madwifi-tools and emerged them.  I have the latest kernel with wireless=y and radio=y installed.  I have wpa-supplicant and wireless-tools installed.

The device is net.ath0... I have functioning internet wirelessly!  However, when issuing /etc/init.d/net.ath0 stop (or restart computer) my system hangs at Shutting Down net.ath0

I have (in this order) wlan, ath_hal and ath_pci in /etc/modules.autoload.d/kernel-2.6.  I am connecting to my wireless router using WPA-RSK (shared key).

So wireless completely works!  However I can't restart my computer OR stop/restart net.ath0 because the system hangs.

PLEASE HELP!!  I have been pulling my hair out for days on this issue... I have searched the gentoo forums up and down however I havn't yet found a working solution!

----------

## joe1031

net.ath0 is a link of net.lo... i have tried linking it from net.eth0 (which is net.lo anyways) with same problem.

----------

## joe1031

Here is my /etc/wpa_supplicant.conf

 *Quote:*   

> 
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=wheel
> ...

 

/etc/conf.d/net

 *Quote:*   

> 
> 
> config_eth0=( "192.168.1.100 netmask 255.255.255.0" )
> 
> routes_eth0=( "default via 192.168.1.1" )
> ...

 

If you need any other information, I'll gladly supply it.  I am eager to solve this issue.

----------

## DevSolar

/bump

I was about to write the very same thing when a forum search turned up this post. My card is a Netgear WG311, also Atheros chipset, and does the very same thing. If I used DHCP, a dhcpcd -k also hangs the system.

I'd *really* like to stay with Gentoo, as it has served me well over the years, but this is a show stopper. Any ideas?

----------

## UberLord

net-wireless/madwifi-driver-0.1_pre20050420-r1

I use that version without any issues with my NetGear W311 on amd64 using gentoo-sources

----------

## PaulBredbury

```
etcat -v madwifi-driver
```

 shows quite a few versions to try.  I'm using a DWL-G520 with madwifi-driver-0.1_pre20050809-r1, and it's fine.

----------

## DevSolar

net-wireless/madwifi-driver-0.1_pre20050420-r1 is the one I've been trying, and madwifi-driver-0.1_pre20050809-r1 is package-masked.

UberLord, as it's obviously working for you - do you have *any* idea what could be different for me (aside from using a out-of-the-box pentium3 stage3 on an Athlon instead of amd64) to get those hangups? What is your version of wpa_supplicant (if that can have anything to do with it)?

----------

## PaulBredbury

 *DevSolar wrote:*   

> and madwifi-driver-0.1_pre20050809-r1 is package-masked.

 

That should not stop you from trying it, if you have a problem with an earlier version.

----------

## UberLord

 *DevSolar wrote:*   

> UberLord, as it's obviously working for you - do you have *any* idea what could be different for me (aside from using a out-of-the-box pentium3 stage3 on an Athlon instead of amd64) to get those hangups? What is your version of wpa_supplicant (if that can have anything to do with it)?

 

I'm not really a kernel guy - so I can't really help much. I use wpa_supplicant-0.4.4 alongside baselayout-1.12.0_pre8

I would open a a bug on bugs.gentoo.org if I were you

----------

## Computator

I've got a SMCWPCI-G card (Atheros chipset) on Athlon XP system with vanilla-sources.

After I switched from wired to wireless, I had the same problem, but now everything seems to be working ok. I'm using the following:

net-wireless/madwifi-driver-0.1_pre20050420-r1

net-wireless/madwifi-tools-0.1_pre20050420

net-wireless/wireless-tools-28_pre10

net-wireless/wpa_supplicant-0.3.9-r1

net-misc/udhcp-0.9.9_pre20041216-r1

First I used dhcpcd, but when shutting down the system hanged on "Stopping dhcpcd on ath0", so I swithed to udhcp and it looks like that solved the problem.

My wpa_supplicant.conf looks like this:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

   ssid="<myssid>"

   scan_ssid=1

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=TKIP

   group=TKIP

   psk="<mypsk>"

   priority=2

}
```

I hope this is helpful (for you or someone else).

Edit: during the next reboot, "stopping dhcp" went ok, but the system hanged on "shutting down ath0", so I tried DevSolar's solution (see below) and I haven't had any problems since (that means 2 or 3 reboots).Last edited by Computator on Sun Nov 06, 2005 10:20 am; edited 1 time in total

----------

## DevSolar

My system died on me even when I was *not* using DHCP at all...

I found a way, although I admit it's a brute force method. I copied net.lo to net.ath0 (instead of softlinking it), and turned

```

                # Do final shut down of this alias

                ebegin "Shutting down ${i}"

                interface_iface_stop ${i}

                eend $?

```

into

```

                # Do final shut down of this alias

                ebegin "Shutting down ${i}"

                # interface_iface_stop ${i} # commented out by local root as this crashes the system

                eend $?

```

Works well enough for me.[/code]

----------

## trouser_pilot

I've got 2 Gentoo boxes with the DWL-G520 card.  One works perfectly, the other will hang while shutting down dhcpcp on ath0.  I'll try the suggested fix on the "broken" box.  Kernels are almost identical.  The drivers are the same.  The only difference is that they're on different MOBOs.  The working card is on an Asus A7N8X-E Deluxe (standard ATX) board while the troublesome card is on an Asus A7N8X-VM/400 (micro-ATX) board.

----------

## 96140

I have a D-Link DWL-G650, and have had the same shutdown/restart crashes as you. I eventually hit upon a solution. It's quite hackish, but it works for me. I'm using:

* gentoo-sources 2.6.12-r9

* baselayout 1.11.13-r1

* madwifi-driver 0.1_pre20050420-r1

* wpa_supplicant 0.3.9-r1

* pcmcia-cs 3.2.8-r2

My computer will "properly" shut down and restart now that I've edited /etc/conf.d/net like so:

```
predown() {

        if [ "${IFACE}" == "ath0" ]; then

                killall wpa_supplicant

        fi

        return 0

}
```

I just added this predown function to the end of the file. AFAICT, it's caused by wpa_supplicant doing something wrong, or else it just isn't playing nice with the baselayout net scripts. Or else baselayout it to blame. No idea, really. This still isn't the "right" solution, but it's a solution that just works every single time.

----------

## trouser_pilot

All I can say is that this one is a real head scratcher since one box works perfectly while the other one acts up.  As well, the one that acts up will do it inconsistently.  When I want it to shutdown or reboot, it will not.  When I reboot and walk away, it'll reboot just fine.  As I said, I haven't been able to figure it out.  At least I;ve got some new things to try tomorrow.

----------

