# Wireless card periodically loses connection

## Lepaca Kliffoth

I have some netgear PCI card that uses the Atheros kernel drivers. I'm on 2.6.32-gentoo-r1. Some time ago (a couple of kernel versions earlier) I noticed the card was de-associating from the AP and losing its IP. I finally figured out that it happens only after the connection has been idle for a few minutes (not long, more like 5 minutes). The same thing happens with an Asus USB key that uses the ralink drivers.

I turned off support  for putting the wireless cards to sleep in the kernel, but nothing changed.

Any ideas?

----------

## gerdesj

When the card disconnects, then check the output of dmesg to see if there are any clues there.

Is the disconnect at exactly a certain time period?

If the card is being powersave'd off despite your kernel config (what was that anyway) then a quick hack would be a cron job to send a single ping every minute, eg:

#ping -I wlan0 -c 1 192.168.0.1 

Cheers

Jon

----------

## Lepaca Kliffoth

Sorry it took so long, busy at work and tired at home lately (and playing Mass Effect 2). Looking at the logs like you suggested I noticed this sequence: "deauthenticated from <ap mac address> (reason:1)", then a probe which gets a response, then an attempt to autheticate and finally a "deauthenticating from <ap mac address> by local choice (reason=3)". Some guy named "ADDRCONF(NETDEV_UP)" finally says the link is not ready.

I looked into this and found out reason 1 means "client associated but no longer authorized" and reason 3 "the access point went offline". None of this makes sense to me, the other PCs are fine (although they are on Windows now, I've run SUSE on my laptop and it never had this problem, I would have noticed). I'm sure the router isn't going offline, so I guess reason 3 simply means that not being authenticated anymore the driver is giving up and de-associating too. But I have no idea what the problem might be.

---

edit: as for how much it takes for it to de-auth it must be less than 15 minutes because that's how often fetchmail runs.

----------

## patrikas

What userspace tools are you using for authentication ? wpa-supplicant ? NetworkManager ? Recheck for configurations. Maybe you have multiple utilities that are interfering ? What does the 'lspci' show ?

----------

## Lepaca Kliffoth

No userspace stuff, I just use the Gentoo init script to connect at boot. It picks up the AP by itself and starts dhcpcd by itself. I don't have NM or anything like that. The signal is unprotected - long story, let's just say if you come here and you manage to pick the signal outside of my home or even from the floor above mine I'll give you 100$. So no wpa stuff either.

lspci:

http://pastebin.com/m26dfae9d

------

edit: I also ran dhcpcd without letting it detach itself so I could see the output. After about 10 minutes of inactivity it said "carrier lost" (but didn't quit).

----------

