# ath0 & wifi0 disappeared (Acer 5102, wireless-tools)[SOLVED]

## def_mornahan

I have found nothing in the Gentoo docs, Gentoo wiki, this forum, or madwifi.org to help me with this.  A couple of months ago, after an update, wireless stopped working.  I was moving...and buying an engagement ring...and I haven't tried to fix it until now.  I had originally downloaded and installed 0.9.2 from madwifi.org, then switched over to the version in the Portage tree.  So I went to /root/madwifi-0.9.2 and ran

```
make clean # (I was spacey, I know that shouldn't make any difference)

make uninstall
```

and then deleted the directory.  I did an emerge --sync and 

```
emerge madwifi-ng

emerge madwifi-ng-tools
```

getting version 0.9.3.1 and then ran

```
modprobe ath_pci
```

But when I run iwconfig I get

```
lo     no wireless extensions.

eth0     no wireless extensions.

sit0     no wireless extensions.
```

If I run /etc/init.d/net.ath0 start I get

```
* Starting ath0

*   Bringing up ath0

*     dhcp

*       network interface ath0 does not exist

*       Please verify hardware or kernel module (driver)
```

I do remember seeing something telling me to ensure that automatic module loading was supported in the kernel.  I just checked that and it was not, so I enabled it and recompiled the kernel (2.6.17-r7).  But I don't think that should make any difference when I'm loading it manually with modprobe.  Obviously the hardware hasn't gone anywhere.

lspci has this to say about my wireless controller:

06:02.0 Ethernet controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)

So anyway, where did wifi0 and ath0 go from my iwconfig list?  What is this sit0 that I don't recognize?  Am I doing something obviously stupid here, or what?

----------

## didymos

sit0 is an IPv6-in-IPv4 tunnel interface.  Must've unintentionally enabled that.  It might be a default choice if ipv6 is set.  Is there anything in dmesg about the wireless adapter?

----------

## pianosaurus

I was just having a problem that behaved exactly the same. My wifi stopped working after upgrading to 2.6.20-gentoo-r8. I don't use module autoloading, so it turns out I simply missed one of the modules (ath_rate_sample). Apparently, this was not neccessary on my previous kernel. There's a ton of madwifi-related modules. Make sure all of them get loaded (you probably don't need them all, but it won't hurt).

Also, my card is a PCMCIA, and after loading the correct modules, I had to eject and reinsert it. If your device is internal, you might have to load the modules in the right order.

Hope this helps. =)

----------

## def_mornahan

dmesg has 1686 copies of the line

```
ALSA /var/tmp/portage/alsa-driver-1.0.11/work/alsa-driver-1.0.11/pci/hda/hda_codec.c:204: hda_codec: invalid dep_range_val 0:7fff
```

(subject of a future post?) and then a few lines at the end:

```
GSI 20 sharing vector 0xE9 and IRQ 20

ACPI: PCI Interrupt 0000:06:02.0[A] -> GSI 22 (level, low) -> IRQ 233

Unable to load needed module: ath_rate_sample; no support for automatic module loading<3>Error loading module "ath_rate_sample"

ACPI: PCI interrupt for device 0000:06:02.0 disabled

fuse init (API version 7.8)

fuse distribution version: 2.6.4

ReiserFS: hda7: found reiserfs format "3.6" with standard journal

ReiserFS: hda7: using ordered data mode

ReiserFS: hda7: journal params: device hda7, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda7: checking transaction log (hda7)

ReiserFS: hda7: Using r5 hash to sort names

Adding 3911788k swap on /dev/hda6.  Priority:-1 extents:1 across:3911788k

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

eth0: no IPv6 routers present

psmouse.c: TouchPad at isa0060/serio4/input0 - driver resynched.
```

I guess lines 2-4 are telling me that ath_rate_sample wasn't autoloaded (I certainly do use module autoloading) and therefore the device was disabled.  I added ath_rate_sample to /etc/modules.autoload.d/kernel-2.6.  I also ran

```
modprobe ath_rate_sample
```

which ran without complaint, although it didn't change anything.  I guess I need to reboot?

Where can I find a list of all the modules?  madwifi.org doesn't seem helpful...even http://madwifi.org/wiki/UserDocs/Distro/Gentoo doesn't seem to describe a problem where wifi0 is not available.

----------

## pdr

As long as you enabled module autoloading in your kernel config when making the kernel then the only module you have to autoload is ath_pci - it will autoload the other modules since it is dependent on them.

----------

## def_mornahan

That's the same conclusion the author reached at http://www.yasker.org/en/blog/category/linux/.  I added that to the kernel the other day, but I guess I need to re-emerge the madwifi packages to rebuild against the new kernel, so that's what I'm doing right now.  I can't for the life of me remember why that option was unchecked in the kernel menuconfig--I must have unchecked it...why???...

In case some other n00b is reading this, placing ath_rate_sample before the other madwifi modules in kernel-2.6 doesn't help!

----------

## def_mornahan

Well, that apparently fixed it.  Thanks for the help!

----------

## Polynomial-C

Hi,

for all of you who don't want to have automatic module loading activated in the kernel, here is another solution:

Create a file /etc/modules.d/madwifi and put in the following content:

```
install ath_pci /sbin/modprobe ath_rate_sample; \

        /sbin/modprobe wlan_scan_sta; \

        /sbin/modprobe wlan_tkip; \

        /sbin/modprobe --ignore-install ath_pci; \

        /sbin/modprobe ath_rate_amrr; \

        /sbin/modprobe ath_rate_onoe; \

        /sbin/modprobe wlan_acl; \

        /sbin/modprobe wlan_ccmp; \

        /sbin/modprobe wlan_scan_ap; \

        /sbin/modprobe wlan_wep; \

        /sbin/modprobe wlan_xauth

remove ath_pci /sbin/modprobe -r wlan_xauth; \

        /sbin/modprobe -r wlan_wep; \

        /sbin/modprobe -r wlan_scan_ap; \

        /sbin/modprobe -r wlan_ccmp; \

        /sbin/modprobe -r wlan_acl; \

        /sbin/modprobe -r ath_rate_onoe; \

        /sbin/modprobe -r ath_rate_amrr; \

        /sbin/modprobe --ignore-remove -r ath_pci; \

        /sbin/modprobe -r wlan_tkip; \

        /sbin/modprobe -r wlan_scan_sta; \

        /sbin/modprobe -r ath_rate_sample
```

Run /sbin/update-modules force and you should have your ath0 back when you do modprobe ath_pci without automatic module loading in kernel.   :Smile: 

Cheers

Poly-C

P.S.: This solution only works with 2.6.x kernel series, as it requires module-init-tools to work.

----------

## honeymak

doesn't solve my problem

i got this line when i plug my card in syslog-ng

PCI: device 0000:07:00.0 has unknown header type 07, ignoring

my card has status LED flashing

my notebook is ibm t40

kernel 2.6.22

madwifi-ng-0.9.3.2

madwifi-ng-tools-0.9.3.2  :Embarassed: 

----------

## pdr

Probably udev does not have a rule for your device?

----------

## honeymak

my re-compile kernel steps just made my thing worked for several minutes

and it goes back.....

"Disabling IRQ #5"

and got the card hang

sigh......

----------

## honeymak

finally got fixed after kernel upgrade

2.6.22-r5

module-rebuild rebuild

i got my cisco working with madwifi

but just can't get ndiswrapper to work since it requires not to use ieee80211 in-kernel version

but seems the detection has to be patched

----------

