# [Resolved] MadWifi stopped working

## Kristopher

I had MadWifi working perfectly, but then the other day "something" happened. It could no longer load ath0. 

So I unmerged madwifi-ng and madwifi-ng-tools, and re-emerged it. Still no luck.

dmesg reports:

 *Quote:*   

> localhost / # dmesg | grep 'ath_pci'
> 
> ath_pci: no version for "ieee80211_encap" found: kernel tainted.
> 
> ath_pci: 0.9.4.5 (0.9.3.3)

 

Not sure what this means?Last edited by Kristopher on Sun Mar 09, 2008 12:10 am; edited 1 time in total

----------

## mikegpitt

Have you updated your kernel or madwifi recently?  I would first recommend trying to use the latest stable kernel ( 2.6.23-gentoo-r8 ) and latest stable madwifi drivers (0.9.3.3).

----------

## didymos

Also, do you have module versioning enabled in your kernel or something?  If so, disable it, rebuild the kernel and all external modules.

----------

## Kristopher

I did update my kernel; that's what started this.

I updated my kernel using genkernel all. Updated the /usr/src/linux link, updated grub.conf to use the new kernel.

After rebooting, I then re-emerged madwifi-ng and madwifi-ng-tools. And that's where I am today.

----------

## mikegpitt

 *Kristopher wrote:*   

> I did update my kernel; that's what started this.
> 
> I updated my kernel using genkernel all. Updated the /usr/src/linux link, updated grub.conf to use the new kernel.
> 
> After rebooting, I then re-emerged madwifi-ng and madwifi-ng-tools. And that's where I am today.

 Can you post the version number of both the kernel and the madwifi drivers you are using?  I think there has been some breakage with kernel-2.6.24, but the ~x86 madwifi drivers should work for you in that case.

----------

## didymos

I'd skip genkernel.  It's better to just handle kernel updates yourself.  You want to run "make menuconfig" then read through the help for anything you're not sure about.  Things can change unexpectedly between versions.  New stuff gets enabled by default, other options disappear and are replaced by new settings, or they just go away entirely.  

Also, you didn't answer my question:  is module versioning enabled?  If it is, then turn it off, yourself, and rebuild the kernel, yourself.  If you don't know, the basic steps are:

```

cd /usr/src/linux

make menuconfig

make && make install modules_install

<rebuild external modules, like madwifi>

reboot

```

Depending on how grub is set up, you may need to alter it.  By default "make install" creates a symlink "vmlinuz" which points to the new kernel.  It creates another symlink "vmlinuz.old" pointing the the previous one.  Kernels older than that are still there, but not linked to.  If you've got a grub.conf like this:

```

# Boot automatically after 30 secs.

timeout 30

# By default, boot the first entry.

default 0

# Fallback to the second entry.

fallback 1

# Gentoo

title  Gentoo: current kernel

root (<grub root device,partition>)

kernel /vmlinuz root=<linux root partition> <other options, if any>

# Gentoo

title  Gentoo: last kernel

root (<grub root device,partition>)

kernel /vmlinuz.old root=<linux root partition> <other options, if any>

# For installing GRUB into the hard disk

title Install GRUB into the hard disk

root    (<grub root device,partition>)

setup   (<grub root device>)

```

then you've conveniently got your new kernel and a known-working one setup by default, every time you upgrade. All that changes are the files pointed to by the symlinks.

This also avoids the whole initrd thing, which you really only need for splash or peculiar hardware setups.  You can still use the tools that come with the splash package to make your initrd for the splash theme and install it, without genkernel.   If you set things up so that you don't have anything but the theme and helper programs in it, you only need to update it when either of those, or splashutils itself changes.  There's plenty on the wiki and, more importantly, in the official Gentoo docs about all this if you want more detail.

----------

## Kristopher

 *mikegpitt wrote:*   

> Can you post the version number of both the kernel and the madwifi drivers you are using?  I think there has been some breakage with kernel-2.6.24, but the ~x86 madwifi drivers should work for you in that case.

 

Kernel: 2.6.23-gentoo-r8

Madwifi: 0.9.3.3

----------

## Kristopher

 *didymos wrote:*   

> I'd skip genkernel.  It's better to just handle kernel updates yourself.  You want to run "make menuconfig" then read through the help for anything you're not sure about.

 

I'll give it a try. Thanks.

----------

## Kristopher

Recompiled the kernel the manual way (as opposed to genkernel), updated grub and restarted.

Re-emerged madwifi-ng and madwifi-ng-tools, and still not working. iwconfig shows no ath0 or wifi0 as it used to after doing modprobe ath0.

I see these warnings when madwifi-ng is compling:

 *Quote:*   

> WARNING: "ieee80211_rate_register" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.3/work/madwifi-0.9.3.3/ath_rate/amrr/ath_rate_amrr.ko] undefined!
> 
> WARNING: "ieee80211_rate_unregister" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.3/work/madwifi-0.9.3.3/ath_rate/amrr/ath_rate_amrr.ko] undefined!
> 
> WARNING: "ieee80211_iterate_nodes" [/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.3/work/madwifi-0.9.3.3/ath_rate/amrr/ath_rate_amrr.ko] undefined!
> ...

 

Doesn't look very good? Did I miss something in menuconfig?

----------

## mikegpitt

Do you have the ieee80211 stuff enabled in your kernel?  It it located under Networking->Wireless->Generic IEEE 802.11 Networking Stack.

----------

## Kristopher

 *mikegpitt wrote:*   

> Do you have the ieee80211 stuff enabled in your kernel?  It it located under Networking->Wireless->Generic IEEE 802.11 Networking Stack.

 

All except for one of them, which I enabled and tried all over again (make && make modules_install), re-emerging madwifi-ng, and I still get the same results (even the warnings)?

----------

## didymos

The warnings probably aren't an issue.  That happens a lot with external modules.  The symbols get defined when the module loads.  Quick question: is this

```

modprobe ath0

```

the actual command you used?  If so, try "modprobe ath_pci" instead. Also, what's in /etc/modules.d/ath_pci?

----------

## mikegpitt

One thing that I just thought of... if there is a version mismatch with your driver happening.  Try re-emerging madwifi, then when you are done run this:

```
update-modules -f

depmod
```

----------

## Kristopher

 *didymos wrote:*   

> If so, try "modprobe ath_pci" instead.

 

Sorry, I mistyped. I am using modprobe ath_pci.

 *didymos wrote:*   

> Also, what's in /etc/modules.d/ath_pci?

 

Just some comments:

 *Quote:*   

> # modules.d configuration file for ATH_PCI
> 
> # For more information please read:
> 
> #    README
> ...

 

----------

## Kristopher

 *mikegpitt wrote:*   

> One thing that I just thought of... if there is a version mismatch with your driver happening.  Try re-emerging madwifi, then when you are done run this:
> 
> ```
> update-modules -f
> 
> ...

 

No dice. 

 *Quote:*   

> dmesg | grep 'ath_pci'
> 
> ath_pci: no version for "ieee80211_encap" found: kernel tainted.
> 
> ath_pci: 0.9.4.5 (0.9.3.3)

 

----------

## Kristopher

 *mikegpitt wrote:*   

> One thing that I just thought of... if there is a version mismatch with your driver happening.  Try re-emerging madwifi, then when you are done run this:
> 
> ```
> update-modules -f
> 
> ...

 

I take it back, I think that did work, after a reboot.

MadWifi is working again. 

Buy you a beer?

----------

## mikegpitt

 *Kristopher wrote:*   

> Buy you a beer?

 Sure!  I love beer!   :Laughing: 

----------

