# madwifi module not found

## cajzell

I have a strange problem, I use madwifi-ng and I cannot start my ath0 device since somehow a module that is not available, is requested:

```
 

#/etc/init.d/net.ath0 restart

* Caching service dependencies ...                                                                                                                     [ ok ]

 * Starting ath0

 *   Running preup function

 *     Loading module ath_hal

 *     Loading module wlan

 *     Loading module wlan_acl

 *     Loading module wlan_ccmp

 *     Loading module wlan_tkip

 *     Loading module wlan_wep

 *     Loading module wlan_xauth

 *     Loading module wlan_scan_sta

 *     Loading module wlan_scan_ap

 *     Loading module ath_rate_onoe

FATAL: Module ath_rate_onoe not found.

 *     Failed loading module ath_rate_onoe

 *   preup ath0 failed

```

This module is not available in /lib/modules for my current 2.6.17-kernel. But it IS there for an older kernel 2.6.12

```
 # find /lib/modules/ -name "ath_rate_onoe*"

/lib/modules/2.6.12-gentoo-r4h/net/ath_rate_onoe.ko

```

Anyone can tell me why this is happening?

----------

## msalerno

It does not come with the kernel.  Chances are you upgraded your kernel.  When you do that, you need to re-emerge madwifi-drivers.

----------

## cajzell

No, I think the modules are in madwifi-ng, which I have emerged today. I actually can't find madwifi-driver in Portage.

```
# equery belongs /lib/modules/2.6.16-gentoo-r7h/net/ath_pci.ko 

[ Searching for file(s) /lib/modules/2.6.16-gentoo-r7h/net/ath_pci.ko in *... ]

net-wireless/madwifi-ng-0.1531.20060427 (/lib/modules/2.6.16-gentoo-r7h/net/ath_pci.ko)
```

----------

## msalerno

You are correct sir.  I honestly have not updated my madwifi in quite some time.  I had a bad experience.

http://packages.gentoo.org/search/?sstring=madwifi

madwifi-driver is no more

Did you check the changelog?  Maybe the module has changed (merged, deleted, etc.).

----------

## cajzell

I found that madwifi-ng had a USE flag called "onoe", so I enabled that. Then the module was built, but when trying again, the module is found, but I get that it is of wrong format and cannot be loaded.

----------

## msalerno

Perhaps you recently rebuilt your gcc?

If the gcc you built your kernel with is different than the one you built the external module with, you will get an error very similar to that.

Check the result of

cat /proc/version

against

gcc --version

----------

## cajzell

You're right!

```
# cat /proc/version 

Linux version 2.6.16-gentoo-r7h (root@vaio) (gcc version 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)) #1 PREEMPT Sat May 27 12:26:20 CEST 2006
```

```

# gcc --version

gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)

Copyright (C) 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

I'll have to fix this later this evening, thanks for your help!

----------

## cajzell

The sad thing is, I still get the same trouble. I was really hoping that was the trouble.

Here's some (I think) relevant info.

```
# cat /proc/version

Linux version 2.6.16-gentoo-r7h (root@vaio) (gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)) #2 PREEMPT Fri Jun 16 23:27:35 CEST 2006
```

```
# gcc --version

gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)

Copyright (C) 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

```
# uname -a

Linux vaio 2.6.16-gentoo-r7h #2 PREEMPT Fri Jun 16 23:27:35 CEST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GNU/Linux
```

```
# modinfo /lib/modules/2.6.16-gentoo-r7h/net/ath_rate_onoe.ko

filename:       /lib/modules/2.6.16-gentoo-r7h/net/ath_rate_onoe.ko

author:         Errno Consulting, Sam Leffler

description:    Atsushi Onoe's rate control algorithm for Atheros devices

version:        svn 1531

license:        Dual BSD/GPL

vermagic:       2.6.16-gentoo-r7h preempt PENTIUM4 gcc-3.4

depends:        wlan

srcversion:     6949520CB6D93ED1A963289

```

This is e.g. one of the modules that load fine, still I can't see no difference in "vermagic".

```
# modinfo ieee1394

filename:       /lib/modules/2.6.16-gentoo-r7h/kernel/drivers/ieee1394/ieee1394.ko

license:        GPL

vermagic:       2.6.16-gentoo-r7h preempt PENTIUM4 gcc-3.4

depends:

parm:           ignore_drivers:Disable automatic probing for drivers. (int)

parm:           fcp:Map FCP registers (default = 1, disable = 0). (int)

parm:           disable_irm:Disable Isochronous Resource Manager functionality. (bool)

parm:           disable_nodemgr:Disable nodemgr functionality. (int)
```

```
# modprobe ath_rate_onoe

FATAL: Error inserting ath_rate_onoe (/lib/modules/2.6.16-gentoo-r7h/net/ath_rate_onoe.ko): Invalid module format

```

I compiled a new kernel and emerge madwifi just now, and still I get this error everytime.

----------

