# Problems with atheros WiFi card

## pheil

I have a D-Link DWL-AG650 rev A3 a/b/g card. When I plug it in to my PC-Card slot, it doesn't appear in my list of wireless devices in iwconifg. My dmesg output (below) indicates I have trouble loading the ath_rate_sample module.

dmesg:

```
pccard: CardBus card inserted into slot 0

PCI: Enabling device 0000:03:00.0 (0000 -> 0002)

ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

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:03:00.0 disabled

```

I'm using kernel 2.6.22-gentoo-r5.

I've emerged madwifi-ng and madwifi-ng-tools 0.9.3.2.

In my kernel configuration, CONFIG_KMOD is enabled (automatic kernel module loading support)

I have this card working in other gentoo laptops and in Windows XP on this laptop just fine, so I know it's not the card or the laptop hardware. How can I fix this?

Thanks,

PaulH

----------

## jettjunker

I also have "Module Unloading" and "Module Versioning Support".  Try enabling those also..? Though from what I can tell, it should work with just CONFIG_KMOD (and CONFIG_MODULES, of course)

----------

## pheil

I already had 'Module Unloading'. I did enable 'Module versioning support' and recompiled, but I get the same error.

----------

## pheil

Also, if I do a 'sudo modprobe ath_rate_sample', everything works.

----------

## jettjunker

Well, then you could try adding it to your /etc/modules.autoload.d/kernel-2.6 , or perhaps adding the command to your /etc/conf.d/local.start

Of course both of those are just workarounds... I don't have any idea how to actually solve the issue.

----------

## pheil

I'm still stuck on this. Does anybody else have any ideas?

Thanks,

Paul

----------

## davidgurvich

Loading the module is not a workaround, it's the solution.

----------

## pheil

What's the solution to get the card to auto-load when it's inserted? every other card I try can do it.

----------

## wyv3rn

pheil, you do not have module autoloading support enabled in your running kernel.  Try following one of the kernel recompilation guides to recompile & install a new kernel.  Then recompile madwifi-ng/madwifi-ng-tools.  The modules will load automatically themselves if the hardware is present.

----------

## pheil

Is that different from the CONFIG_KMOD support I mentioned in the first post? What kernel option are you referring to? 

I've verified my kernel is configured as required in the madwifi documentation.

----------

## wyv3rn

 *pheil wrote:*   

> Is that different from the CONFIG_KMOD support I mentioned in the first post? What kernel option are you referring to? 
> 
> I've verified my kernel is configured as required in the madwifi documentation.

 

You may have changed that option but you either did not compile a new kernel with it and/or are not using it.  That's the only way you can get that error as far as I can tell.

What is the output of:

zcat /proc/config.gz | grep CONFIG_KMOD

?

----------

## cd_rom

 *wyv3rn wrote:*   

> pheil, you do not have module autoloading support enabled in your running kernel.  Try following one of the kernel recompilation guides to recompile & install a new kernel.  Then recompile madwifi-ng/madwifi-ng-tools.  The modules will load automatically themselves if the hardware is present.

 

Lately, i have tried to configure my two wireless usb adapters for my lappy and desktop. Got driver loads and system recognises the adapter. With the laptop, i only have to "ifconfig <device> up, iwconfig <device> essid <my_essid> and iwconfig <device> key <wep_key>" and it works. With the desktop, oh man, i pulled my hair out cause no way i could it to work with same setting on /etc/conf.d/net and commands. Then i thought that kernel setting that caused the problem so i went back on and check on the setting, it turned out that only kernel on my lappy has *automatic modules loading*. Recompiling kernel on my desktop with that option on and everything went smooth! Now both work flawlessly!

----------

## pheil

 *Quote:*   

> You may have changed that option but you either did not compile a new kernel with it and/or are not using it. That's the only way you can get that error as far as I can tell.
> 
> What is the output of:
> 
> zcat /proc/config.gz | grep CONFIG_KMOD
> ...

 

```
paul@localhost ~ $ zcat /proc/config.gz | grep CONFIG_KMOD

CONFIG_KMOD=y

```

I didn't know about that /proc/config.gz, that's a nice tip, thanks. But, it looks like my kernel is configured the way I think it is.

----------

## wyv3rn

Hmm, first time I've seen this error when CONFIG_KMOD was actually enabled... guess you're just lucky, heh.

So, let me make sure of these things:

1. You DO see atleast some of the ath*, etc. modules being loaded by udev at startup correct?

2. Then, if you log in and immediately use dmesg you see the error for no automatic kernel module loading, without having typed anything else?

3. You don't have any ath*/wlan*, etc. related module options in /etc/modules.autoload.d/kernel* or /etc/modprobe.d/blacklist and you don't have an old /etc/udev/rules.d/65-madwifi.rules laying around correct?

----------

## Iron_DragonLord

I have the same problem and I'm 100% CONFIDENT that auto loading is enabled. I've done make && make modules && make modules_install && make install, and it's still telling me this.

Furthermore, even after loading the said module, my device still isn't seen.  :Sad: 

Edit: Found this, it's my card. Will attempt: http://madwifi.org/wiki/Compatibility/Atheros#AtherosAR5006EG

----------

## Iron_DragonLord

No go, seems I still can't find my device as with iwconfig...

----------

## kensan2

Silly question but...

...is your boot partition mounted before copying the new kernel over?

I made this mistake myself.  Hehheh

----------

## Iron_DragonLord

Thansk for the reply, that's a good question I've done that before too.

But yes, it's mounted. I'll double check but it should be.

----------

