# ath5k + wpa_supplicant cannot connect to wlan

## Leocifre

Hi, 

I use the in-kernel ath5k driver, since I upgraded my kernel to 2.6.29-r2 I cannot connect to my wlan. iwlist wlan0 scan works though, when starting wpa_supplicant it says:

```
ioctl[SIOCSIWMODE]: Device or resource busy

Could not configure driver to use managed mode

ioctl[SIOCSIWAUTH]: Operation not supported
```

Any ideas?

----------

## d2_racing

Hi, can you post this :

```

# ifconfig -a

# iwconfig

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## Leocifre

here we go:

ifconfig

```
dummy0    Link encap:Ethernet  HWaddr fe:e7:c9:d8:7a:9b  

          BROADCAST NOARP  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:1d:60:cd:cf:23  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:27 Base address:0x4000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:48 errors:0 dropped:0 overruns:0 frame:0

          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:3408 (3.3 KiB)  TX bytes:3408 (3.3 KiB)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:15:af:42:73:9f  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-15-AF-42-73-9F-00-00-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

iwconfig  

```
wlan0     IEEE 802.11bg  ESSID:""  

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

          Tx-Power=20 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

```

/etc/conf.d/net

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "dhcp" )

#dhcp_eth0="nodns nontp nonis"

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=("dhcp")

#iwconfig_wlan0="mode managed"

```

/etc/wpa_supplicant/wpa_supplicant.conf

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

# We give it a low priority so any defined blocks are preferred.

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=0

network={

   ssid="weberwlan"

   psk="xxxx"

   priority=5

}

#network={

#   ssid="quakenet"

#   psk="xxxx"

#   priority=5

#}

#network={

#   ssid="Jay"

#   psk="xxxx"

#   priority=5

#}

#network={

#   ssid="quakenet"

#   psk="xxxx"

#   priority=5

#}

```

----------

## d2_racing

Can you post this plz :

```

# iwlist scan

# dmesg | tail

```

----------

## Leocifre

iwlist scan

```
lo        Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     Scan completed :

          Cell 01 - Address: 00:18:39:23:CD:0E

                    ESSID:"quakenet"

                    Mode:Master

                    Channel:4

                    Frequency:2.427 GHz (Channel 4)

                    Quality=60/100  Signal level:-68 dBm  Noise level=-89 dBm

                    Encryption key:on

                    IE: Unknown: 00087175616B656E6574

                    IE: Unknown: 010882848B960C121824

                    IE: Unknown: 030104

                    IE: Unknown: 050400010000

                    IE: Unknown: 2A0100

                    IE: Unknown: 32043048606C

                    IE: Unknown: DD180050F2020101050003A4000027A4000042435E0062322F00

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                    IE: Unknown: DD1E00904C334E1003FFFF000000000000000000000000000000000000000000

                    IE: Unknown: DD1A00904C3404050100000000000000000000000000000000000000

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:tsf=0000001357155980

                    Extra: Last beacon: 1345ms ago

```

dmesg | tail

```
[   20.287480] find used greatest stack depth: 3704 bytes left

[   21.893965] bash used greatest stack depth: 3448 bytes left

[   28.087605] r8169: eth0: link down

[   28.088008] ADDRCONF(NETDEV_UP): eth0: link is not ready

[   63.431761] ADDRCONF(NETDEV_UP): wlan0: link is not ready

[  112.954927] [drm] Initialized radeon 1.29.0 20080528 on minor 0

[  114.693408] [drm] Setting GART location based on new memory map

[  114.697368] [drm] Loading RS690/RS740 Microcode

[  114.697392] [drm] Num pipes: 1

[  114.697402] [drm] writeback test succeeded in 1 usecs

```

----------

## d2_racing

Ok, your /etc/wpa_supplicant/wpa_supplicant.conf need to be like this :

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

   ssid="quakenet"

   psk="YOUR_PASSPHRASE"

   proto=WPA2

   key_mgmt=WPA-PSK

   pairwise=CCMP

   group=CCMP

   priority=5

}

```

----------

## d2_racing

After that, can you run this :

```

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

# iwconfig

# ifconfig -a

# dmesg | tail

```

----------

## Leocifre

still same problem, here is output:

```
mobilequake bollverk # /etc/init.d/net.wlan0 restart

 * Stopping wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4

 *   Bringing down wlan0

 *     Shutting down wlan0 ...                                            [ ok ]

 *     Stopping wpa_cli on wlan0 ...                                      [ ok ]

 *     Stopping wpa_supplicant on wlan0 ...                               [ ok ]

 * Starting wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4

 *       wpa_supplicant provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Configuring wlan0 for MAC address 00:15:AF:42:73:9F ...              [ ok ]

 *   Starting wpa_supplicant on wlan0 ...

ioctl[SIOCSIWMODE]: Device or resource busy

Could not configure driver to use managed mode

ioctl[SIOCSIWAUTH]: Operation not supported                                      [ ok ]th param 4 value 0x0 - 

 *   Starting wpa_cli on wlan0 ...                                        [ ok ]

 *     Waiting for association                                            [ ok ]

 *     Backgrounding ...

mobilequake bollverk # iwconfig

lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:""  

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

          Tx-Power=20 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

mobilequake bollverk # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr 0e:cc:aa:65:9d:f4  

          BROADCAST NOARP  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:1d:60:cd:cf:23  

          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::21d:60ff:fecd:cf23/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:347 errors:0 dropped:0 overruns:0 frame:0

          TX packets:301 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:148948 (145.4 KiB)  TX bytes:52823 (51.5 KiB)

          Interrupt:27 Base address:0x4000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:15:af:42:73:9f  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-15-AF-42-73-9F-00-00-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

mobilequake bollverk # dmesg | tail

[   30.801773] r8169: eth0: link up

[   30.801779] r8169: eth0: link up

[   41.072027] eth0: no IPv6 routers present

[   45.374779] ADDRCONF(NETDEV_UP): wlan0: link is not ready

[  663.479831] [drm] Initialized radeon 1.29.0 20080528 on minor 0

[  665.417417] [drm] Setting GART location based on new memory map

[  665.423444] [drm] Loading RS690/RS740 Microcode

[  665.423468] [drm] Num pipes: 1

[  665.423475] [drm] writeback test succeeded in 1 usecs

[  919.729828] ADDRCONF(NETDEV_UP): wlan0: link is not ready

mobilequake bollverk # 

```

----------

## Leocifre

```
[    7.645480] ath5k 0000:06:00.0: setting latency timer to 64

[    7.645480] ath5k 0000:06:00.0: registered as 'phy0'

[    7.824958] wmaster0 (ath5k): not using net_device_ops yet

[    7.829037] wlan0 (ath5k): not using net_device_ops yet

[    7.830229] ath5k phy0: Atheros AR5414 chip found (MAC: 0xa0, PHY: 0x61)

```

this is output from dmesg | grep ath

maybe this has something to do with the net_device_ops... ???

----------

