Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 458200

Summary: sys-kernel/gentoo-sources-3.6.11 - ath9k cannot connect to WPA2-PSK network when rate is control enabled
Product: Gentoo Linux Reporter: Victor Malov <malvikus>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge info
kernel config
dmesg output on failure
wpa_cli output

Description Victor Malov 2013-02-18 23:58:30 UTC
When I build ath9k kernel module with "Atheros ath9k rate control" option, I can't connect to network by wpa_supplicant.
As soon as I disabled this option, authentication passed successfully.
WPA2-PSK authentication is used.

Reproducible: Always

Steps to Reproduce:
1. Build ath9k modules with enabled "Atheros ath9k rate control" option (3.6.1 kernel)
2. Load new module / Reboot
3. Try to connect to network with WPA2-PSK authentication by wpa_supplicant program:
/usr/sbin/wpa_supplicant -iwlan0 -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf
Comment 1 Victor Malov 2013-02-19 00:00:23 UTC
Created attachment 339320 [details]
emerge info
Comment 2 Victor Malov 2013-02-19 00:03:46 UTC
lspci | grep -i net:
03:00.0 Network controller: Atheros Communications Inc. AR9300 Wireless LAN adaptor (rev 01)

lsmod | grep ath
ath9k                  75962  0 
ath9k_common            1849  1 ath9k
ath9k_hw              329465  2 ath9k_common,ath9k
ath                    14071  3 ath9k_common,ath9k,ath9k_hw
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-21 02:48:39 UTC
Please attach any output from the kernel and/or wpa_supplicant that might help resolve this issue.
Comment 4 Victor Malov 2013-02-21 21:31:19 UTC
Ok, the behaviour is even more strange. It connects from time to time. When wpa_supplicant fails to connect in the same time I can do that by Android smartphone, thus I propose the problem not in the router. Here is the info when I connect successfully. As soon as I reproduce failure I'll post it.

wpa_cli status
Selected interface 'wlan0'
bssid=10:bf:48:53:c0:98
ssid=Perfecto
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.1.203

wpa_cli scan_results 
bssid / frequency / signal level / flags / ssid
10:bf:48:53:c0:98	2412	-58	[WPA2-PSK-CCMP][ESS]	Perfecto
00:22:b0:3e:8f:0b	2437	-65	[WPA-PSK-TKIP][ESS]	dlink
90:f6:52:3b:db:2e	2452	-65	[WPA2-PSK-CCMP][ESS]	MAGNUM-PC_Network
20:cf:30:88:99:ef	2412	-79	[WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]	bla-bla

wpa_cli list_networks
network id / ssid / bssid / flags
0	Perfecto	any	[CURRENT]

rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no

dmesg | grep wlan0
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: authenticate with 10:bf:48:53:c0:98
wlan0: send auth to 10:bf:48:53:c0:98 (try 1/3)
wlan0: authenticated
wlan0: associate with 10:bf:48:53:c0:98 (try 1/3)
wlan0: RX AssocResp from 10:bf:48:53:c0:98 (capab=0x411 status=0 aid=2)
wlan0: associated
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.203  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::92f6:52ff:fe13:1036  prefixlen 64  scopeid 0x20<link>
        ether 90:f6:52:13:10:36  txqueuelen 1000  (Ethernet)
        RX packets 3573  bytes 1656406 (1.5 MiB)
        RX errors 0  dropped 858  overruns 0  frame 0
        TX packets 2387  bytes 446373 (435.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Comment 5 Victor Malov 2013-02-21 21:33:30 UTC
Created attachment 339636 [details]
kernel config

Kernel config from /proc/config.gz
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-02-22 14:06:08 UTC
Can you try kernel 3.7.9 too?
Comment 7 Victor Malov 2013-02-22 23:33:42 UTC
Yes, but first I want to catch failure on this kernel (computer of my parents) to be sure that I'm not wrong. And to put failure info.
Comment 8 Victor Malov 2013-02-24 15:01:36 UTC
This is failure info:

wpa_cli status
Selected interface 'wlan0'
bssid=10:bf:48:53:c0:98
ssid=Perfecto
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=4WAY_HANDSHAKE

wpa_cli list_networks
network id / ssid / bssid / flags
0       Perfecto        any     [CURRENT]

wpa_cli scan_results
bssid / frequency / signal level / flags / ssid
10:bf:48:53:c0:98       2462    -57     [WPA2-PSK-CCMP][ESS]    Perfecto
00:22:b0:3e:8f:0b       2437    -62     [WPA-PSK-TKIP][ESS]     dlink
90:f6:52:3b:db:2e       2452    -76     [WPA2-PSK-CCMP][ESS]    MAGNUM-PC_Network
20:cf:30:88:99:ef       2412    -76     [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]    bla-bla
20:c9:d0:24:a1:f1       2417    -70     [WPA2-PSK-CCMP][ESS]    Home
1c:7e:e5:4a:3e:47       2417    -77     [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]    dlink
84:c9:b2:62:7a:54       2462    -75     [WPA-PSK-CCMP][ESS]     NAIV
40:4a:03:ae:a8:07       2437    -62     [WPA2-PSK-CCMP][ESS]    ZyXEL
ac:f1:df:2e:2c:1a       2412    -76     [WPA2-PSK-CCMP][ESS]    DIR-300NRUB7

ifconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::92f6:52ff:fe13:1036  prefixlen 64  scopeid 0x20<link>
        ether 90:f6:52:13:10:36  txqueuelen 1000  (Ethernet)
        RX packets 26  bytes 3510 (3.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26  bytes 4030 (3.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
Comment 9 Victor Malov 2013-02-24 15:04:19 UTC
Created attachment 339950 [details]
dmesg output on failure

This is dmesg output when failure has happened.
Comment 10 Victor Malov 2013-02-24 15:11:42 UTC
Created attachment 339960 [details]
wpa_cli output

This is what wpa_cli write on console, when I'm using wpa_cli in interactive mode.
Comment 11 Victor Malov 2013-02-24 15:22:28 UTC
Well now I'm not sure that the problem in kernel configuration or "Atheros ath9k rate control" is enabled. I've catch the situation when I connected successfully and later have lost connection with the similar symptoms. I couldn't ping any address, even 192.168.1.1 (my router). But wpa_cli status gave me "CONNECTED" status (maybe because the status was not refreshed).
Comment 12 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-24 15:22:56 UTC
Reason 3 is "deauthenticated by local choice" which often means you are running multiple network managers at the same time. Did you disable the net init script (which starts its own instance of wpa_supplicant)? Do you have anything else running?
Comment 13 Victor Malov 2013-02-25 08:08:25 UTC
Thanks for advise. I've checked running services and couldn't find others network managers. Neither any suitable running processes. I'm using Gnome which installed NetworkManager, its running init script put in /etc/init.d. But it is not configured or added to any init level.

I'm using wpa_supplicant for connecting to WPA2-PSK network and dhcpcd for getting IP addresses. Maybe there is some other ways to look at?
Comment 14 Victor Malov 2013-02-25 08:13:01 UTC
When I talking that wpa_supplicant failed I often mean that it starts by init script, without running it manually. I open browser and it works, then after some time of browsing something fail and I can't open html pages.
Comment 15 Victor Malov 2013-02-25 08:13:29 UTC
ps aux | grep wpa
root     18926  0.0  0.0  27668  1284 ?        Ss   15:33   0:00 /usr/sbin/wpa_supplicant -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf -W -B -i wlan0 -P /var/run/wpa_supplicant-wlan0.pid
root     18933  0.0  0.0  11092   352 ?        Ss   15:33   0:00 /usr/bin/wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh -p /var/run/wpa_supplicant -i wlan0 -P /var/run/wpa_cli-wlan0.pid -B
Comment 16 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-16 15:43:24 UTC
We would like to know if this is still present.

Can you please try =sys-kernel/gentoo-sources-3.8.7?
Comment 17 Victor Malov 2013-04-22 17:59:38 UTC
Yes, of course. On this week I will make deep testing with this kernel.
Comment 18 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-08 12:09:41 UTC
(In reply to Victor Malov from comment #17)
> Yes, of course. On this week I will make deep testing with this kernel.

We're more than a month later now, do you still experience this?

If so, please try a more recent kernel; 3.8.13, 3.9.5 and 3.10-rc4.
Comment 19 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-04 12:57:23 UTC
(In reply to Tom Wijsman (TomWij) from comment #18)
> We're more than a month later now, do you still experience this?
> 
> If so, please try a more recent kernel; 3.8.13, 3.9.5 and 3.10-rc4.