# unsupported driver 'madwifi' [solved]

## jaylmaz

This is my first attempt at wireless and I'm not having any success. I get the unsupported driver "madwifi" error so I checked my kernel. I have Atheros 5xxxx compiled as a module (using genkernel --menuconfig all).

My /etc/conf.d/net:

```
modules=( "wpa_supplicant" )

wpa_supplicant="-Dmadwifi"

config_wlan0=( "dhcp" )
```

My wpa_supplicant.conf:

```
network={

ssid="cyteen"

proto=RSN

pairwise=TKIP CCMP

group=TKIP CCMP

psk=supersecretcode

}
```

Am I missing something obvious?

I can provide more detailed info tonight, when I have the laptop.Last edited by jaylmaz on Mon Feb 16, 2009 1:02 am; edited 1 time in total

----------

## mjf55

jaylmaz, 

I have used madwifi and wpa_supplicant ( not as a kernel config, but external from madwifi_ng ) in my old system and I think the /etc/conf.d/net should be 

```
modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

config_ath0=( "dhcp" )
```

.

I searched a little w/google and found this link using the kernel config and it appears to be the same

http://www.firmotech.com/lurker/message/20080627.020336.a3468582.pt.html

If that does not work,  post the output of ifconfig and iwconfig and I will check my other system later this evening.

----------

## jaylmaz

I have fixed /etc/conf.d/net:

 *Quote:*   

> modules=( "wpa_supplicant" )
> 
> wpa_supplicant_wlan0="-Dwext"
> 
> config_wlan0=( "dhcp" )

 

(udev shows my wireless card as wlan0)

I have recompiled wpa_supplicant with the madwifi flag enabled. now I don't get the unsupported driver error, but it still doesn't work.

ifconfig:

 *Quote:*   

> 
> 
> eth0      Link encap:Ethernet  HWaddr 00:1E:EC:C8:CA:1C  
> 
>           inet addr:192.168.0.23  Bcast:192.168.0.255  Mask:255.255.255.0
> ...

 

iwconfig:

 *Quote:*   

> lo        no wireless extensions.
> 
> eth0      no wireless extensions.
> 
> wmaster0  no wireless extensions.
> ...

 

I thought I'd include dmesg | grep ath, hoping that might be useful:

 *Quote:*   

> ath5k_pci 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> 
> ath5k_pci 0000:04:00.0: setting latency timer to 64
> 
> ath5k_pci 0000:04:00.0: registered as 'phy0'
> ...

 

Thanks for your help.

Jay

----------

## jaylmaz

A little more info, I used the wext drivers for the previous post, but going back to madwifi:

 *Quote:*   

> /etc/init.d/net.wlan0 restart
> 
>  * Caching service dependencies ...                                       [ ok ]
> 
>  * Stopping wlan0
> ...

 

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:"NETGEAR"  

          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated   

          Tx-Power=27 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[quote]

Thanks again.

----------

## mjf55

so here is my /etc/conf.d/net for wpa_supplicant

```
modules=( "ifconfig" "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

wpa_timeout_ath0=60

config_ath0=( "dhcp")
```

note: the _ath0 in each of the commands above.

note: I also use the external madwifi dirver 

```
emerge madwifi-ng madwifi-ng-tools
```

 and I do NOT use the kernel 5XXXX driver.  

EDIT:  look at this link http://www.linuxwireless.org/en/users/Drivers/ath5k

It suggests that you need to load the driver ( makes sense ) and that the device is indeed wlan0, not ath0.  

Let us know how you make out.

----------

## Pixys

Hi,

I have got the same error here with a D-Link DWA 556 (same chipset).

I have followed this 

I really do not understand how does this stuff work : we need a first driver for the chipset called "ath5k" in the kernel and we need another one called "ath_pci" for wpa_supplicant, and of course, both of them must be loaded, am I right ?

@mjf55 : if you do not use the kernel driver where have you found yours ? git ?Last edited by Pixys on Thu Feb 12, 2009 6:48 pm; edited 1 time in total

----------

## mjf55

I just use the madwifi-ng drivers in portage.

just  remove the 5XXX kernel driver, remake the kernel and 

```
emerge -av madwifi-ng madwifi-ng-tools
```

.

EDIT - I use the net-wireless/madwifi-ng-0.9.4-r1 and  net-wireless/madwifi-ng-tools-0.9.4 masked versions because I amd using kernel 2.6.24.

I am not saying that the kernel driver does not work, I just have the external driver working on this system.

----------

## Pixys

OK.

but it is weird :

```
* Messages for package net-wireless/madwifi-ng-0.9.4-r1:

 * Please note: This release is based off of 0.9.3.3 and NOT trunk.

 * # No AR5007 support in this release;

 * experimental support is available for i386 (32bit) in #1679

 * # No AR5008 support in this release; support is available in trunk

 * No, we will not apply the patch from 1679, if you must, please do so

 *      in an overlay on your system. That is upstreams ticket 1679, not Gentoo's.
```

the gentoo-sources-2.6.28-r1 (the latest) support ath5/9k chipset so I am not really sure that 

```
emerge -av madwifi-ng madwifi-ng-tools
```

 is needed ; maybe I am wrong...

----------

## jaylmaz

Partial success. Using the generic driver (wext) and wpa_gui, I can see several networks, including my own, but only connect to my neighbor's unencrypted network.  The madwifi drivers won't work at all. So I attempted to downgrade my kernel to 2.6.24 (using genkernel), but it failed (couldn't copy kernel image).  I'll look into that a bit more tonight. Is downgrading the kernel even likely to help with connecting to my encrypted network? Maybe it's time to start over......

Thanks for all your suggestions.

----------

## mjf55

Don't downgrade your kernel.  If you can connect to your neighbors network, then the driver is working, we just need to get wpa_supplicant working.

So here is my working wpa_supplicant.conf file ( sensitive information ****** out )

```
# The below line not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# WPA key

network={

  ssid="ANOTHER_ESSID"

  psk="**********"  

  priority=4

}

# Shared WEP key connection (no WPA, no IEEE 802.1X)

network={

  ssid="myESSID"

  scan_ssid=1

  key_mgmt=NONE

  wep_key0="*************"  # use 13 ascii characters, not sure how hex would look

  wep_tx_keyidx=0

  priority=5

}

# This is a network block that connects to any unsecured access point. Low Priority

network={

        key_mgmt=NONE

        priority=-9999999

}

```

Left a few comments in to help explain

I think you are using WPA, so that is the section you need to focus on.  Just make sure the PSK is correct.  Once you get this working, you can try adding your other options, like PROTO, PAIRWISE, GROUPS

----------

## jaylmaz

I am online using my very own encrypted network. I took the easy way out, I wiped out my gentoo installation and started over. Emerged gnome-light, wpa_supplicant, madwifi, and wicd, all with madwifi use flag enabled.

Here's my /etc/conf.d/net:

 *Quote:*   

> modules=( "wpa_supplicant" )
> 
> wpa_supplicant_wlan0="-Dwext"

 

Then I used wicd to configure wpa_suppicant for WPA2 encryption. It all works.

I don't know why I need the wext driver, but it works.

Somehow I managed to corrupt the shutdown scrip (I get a segmentation error and it just stops), but that's another thread.

Thanks to all for help.

----------

