# wifi gone (atheros) [SOLVED]

## marinheiro

I just had to do a kernel upgrade on a first-generation macbook that had been working fine for a couple of years to sort out a udev poblem. After the upgrade everything was fine except that the wifi had vanished. I decided if it was broken it was about time I moved to the ath5k module anyway, so I unmerged madwifi-ng and rebuilt the kernel with ath5k. The module loads but isn't associated with the device, I can't work out why but I bet it's something basic I'm missing. I believe ath5k should work fine with these early macbooks.

Here's lsmod:

```

Module                  Size  Used by

ipv6                  206809  12 

ath5k                 121978  0 

mac80211              137092  1 ath5k

ath                     6576  1 ath5k

cfg80211              118623  3 ath5k,mac80211,ath

snd_hda_codec_idt      42945  1 

snd_hda_intel          17484  0 

ohci1394               25513  0 

snd_hda_codec          54584  2 snd_hda_codec_idt,snd_hda_intel

sky2                   40395  0 

ieee1394               61111  1 ohci1394

snd_pcm                57354  2 snd_hda_intel,snd_hda_codec

snd_timer              15022  1 snd_pcm

snd_page_alloc          5541  2 snd_hda_intel,snd_pcm

```

and here's lspci -k showing the device not being picked up:

```

   Subsystem: Intel Corporation Device 7270

   Kernel driver in use: ata_piix

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)

   Subsystem: Intel Corporation Device 7270

   Kernel driver in use: ata_piix

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)

   Subsystem: Intel Corporation Device 7270

01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)

   Subsystem: Marvell Technology Group Ltd. Marvell RDK-8053

   Kernel driver in use: sky2

   Kernel modules: sky2

02:00.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)

03:03.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 61)

   Subsystem: Agere Systems FW322/323

   Kernel driver in use: ohci1394

   Kernel modules: ohci1394

```

I've put my kernel config on pastebin: http://navtis.pastebin.com/UQS1c5Qx . 

And the output from dmesg too: http://navtis.pastebin.com/rK7EPjuJ

Dmesg shows some warnings about problems with dri and cpu temperature control that I haven't managed to remove, but I believe these are harmless.

Any ideas?

Thanks

GrahamLast edited by marinheiro on Tue Aug 10, 2010 10:00 pm; edited 1 time in total

----------

## BradN

CONFIG_ATH_COMMON=m

# CONFIG_ATH_DEBUG is not set

CONFIG_ATH5K=m

# CONFIG_ATH5K_DEBUG is not set

Try turning on these debug settings, install kernel modules, reboot, and then rmmod and modprobe ath5k to see if it shows any messages in dmesg.

From the supported device list on debian wiki:

PCI: 168C:0023 Atheros Communications Inc. AR5008 Wireless Network Adapter

PCI: 168C:0024 Atheros Communications Inc. AR5008 Wireless Network Adapter

So assuming your device identifies as 0023 or 0024 it should be picked up by the driver.  Make sure the old driver isn't present just in case it's messing something up.

----------

## marinheiro

Turned on both debug settings and it made no change to the dmesg output at all.

Can't find any trace of older modules being loaded. /etc/udev/rules.d/70-persistent-net-rules did mention the old module. I removed the file and let it autogenerate a new one; the new one ONLY has a line for eth0, nothing else. Is that a symptom or a cause?

Have been round the houses with this most of today and am completely stumped.

Graham

----------

## BradN

It's a symptom, udev will only make a record of it if it finds it... if the driver loads...

What's the output of lspci -n?

----------

## marinheiro

lspci -n:

```

00:00.0 0600: 8086:27a0 (rev 03)

00:02.0 0300: 8086:27a2 (rev 03)

00:02.1 0380: 8086:27a6 (rev 03)

00:07.0 1101: 8086:27a3 (rev 03)

00:1b.0 0403: 8086:27d8 (rev 02)

00:1c.0 0604: 8086:27d0 (rev 02)

00:1c.1 0604: 8086:27d2 (rev 02)

00:1d.0 0c03: 8086:27c8 (rev 02)

00:1d.1 0c03: 8086:27c9 (rev 02)

00:1d.2 0c03: 8086:27ca (rev 02)

00:1d.3 0c03: 8086:27cb (rev 02)

00:1d.7 0c03: 8086:27cc (rev 02)

00:1e.0 0604: 8086:2448 (rev e2)

00:1f.0 0601: 8086:27b9 (rev 02)

00:1f.1 0101: 8086:27df (rev 02)

00:1f.2 0101: 8086:27c4 (rev 02)

00:1f.3 0c05: 8086:27da (rev 02)

01:00.0 0200: 11ab:4362 (rev 22)

02:00.0 0280: 168c:0024 (rev 01)

03:03.0 0c00: 11c1:5811 (rev 61)

```

----------

## BradN

02:00.0 0280: 168c:0024 (rev 01)   <-  that device ID looks correct, I have no idea why the driver isn't picking it up.

I guess now it's down to maybe trying older/newer kernels and seeing if there's a bug in your version.

----------

## cach0rr0

might try out madwifi again, but on a new kernel; zen-sources includes the madwifi drivers, and is what ive been using in lieu of ath9k. 

that would be my suggestion at least. tells you if it's ath5k specific, or something a bit deeper down in the wireless networking stack on that kernel revision

----------

## marinheiro

I was using 2.6.23-r6 when the udev update lost me my hard drive. I switched to 2.6.34-r1 which was the one I put on pastebin, and found a configuration that gave me my hard drive back but no wifi. I also previously tried 2.6.32-r7 with ath5k with the same results. Now I've also tried 2.6.30-r8 with madwifi (I used the version in portage) with the same results - the ath_pci driver module is loaded apparently ok but lspci -k shows no driver associated with the Atheros network adapter. So it's not likely to be the ath5k driver that's the problem, if madwifi behaves the same.

So I think there are two possibilities: either my hardware died, coincidentally at the exact moment I changed kernel, or there's something I'm doing wrong somewhere. I still think me doing something wrong with configuration somewhere seems more likely.

Here's my current dmesg:

```

ath_hal: module license 'Proprietary' taints kernel.

Disabling lock debugging due to kernel taint

ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: svn r4119 (branch madwifi-0.9.4)

ath_pci: svn r4119 (branch madwifi-0.9.4)

```

Graham

----------

## BradN

If this wireless is on a pci card, you could try removing and reinserting it - it's possible that if an address line or data line isn't connected correctly, the card could show up in lspci but not respond correctly when the driver probes for it.  It's kinda a long shot, because you'll often see crashing or data corruption more often, and the PCI ids are showing correctly so at least most connections are good...  If a data line is screwed up you can often see one of the ID numbers it returns off by a bit even!

----------

## marinheiro

I was being dumb, it's not a hardware problem: I left an OSX partition on it, though I never use it, and the wireless in that is still working fine. So it's a configuration problem. Or udev, which is still giving me problems (just realised my cdrom is no longer recognised as /dev/hda).

----------

## BradN

You should consider building your wireless driver into the kernel instead of as a module - that will rule out problems with udev as the driver will have already been set up by the time udev is loaded.

----------

## marinheiro

I copied the kernel config from http://www.odi.ch/prog/macbookpro/config-2.6.34.txt, and (with some minor changes for the graphics and hard drive) it worked. It uses ath9k as an inbuilt module, but there are a lot of other differences from my old .configure - which was a mess-  so I'm not exactly sure what made the difference (at this point I'm a bit out of patience to investigate more). I'm going to mark this as solved, anyway. 

For anyone else with macbook problems - http://www.odi.ch/prog/macbookpro is a good resource.

Thanks to both of you, and especially to Odi for his site.

Graham

----------

## BradN

Oh wow, we were trying to use the wrong driver the whole time.  You'd think 5xxx chip model number would mean 5k series, but not in wireless land I guess...

----------

