From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabor Juhos Date: Wed, 20 May 2009 21:41:31 +0200 Subject: [ath9k-devel] EEE PC with AR9280 using N mode with WPA2 In-Reply-To: <4A130360.4000103@openwrt.org> References: <4A11C68F.5060108@openwrt.org> <1242717636.14488.14.camel@jm-desktop> <4A128DBF.5070807@openwrt.org> <1242742206.14488.20.camel@jm-desktop> <4A130360.4000103@openwrt.org> Message-ID: <4A145CEB.8020404@openwrt.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Hi Jouni, > Jouni Malinen ?rta: >> On Tue, 2009-05-19 at 03:45 -0700, Gabor Juhos wrote: >> >>> Ok, I will wait for the patches then. >> I just submitted the patches and they are also available from >> http://w1.fi/p/ps/ > > Thanks, I will try them. > >> After implementing additional debugging functionality, I did find number >> of issues with ath9k touching the hardware when in sleep mode. This did >> include 0xdeadbeef reads, too, which seems to be the result of a >> register read that should not have happened in the first place.. Anyway, >> after these patches (on top of the previous PS fixes that are now in >> wireless-testing.git), I have not seen that special value (or the >> interrupt indicating such access) anymore. > > Superb. > >> Or well, I think it is still possible to get a somewhat similar case by >> unloading the driver when in PS mode, but it does not seem to cause >> problems at least with AR9280. If you are seeing crashes with this >> version on an embedded board, I would be interested in getting more >> details of the board and wlan version. And well, even hitting the >> register read/write in sleep mode issue without a crash would be good >> thing to report since the driver should not really trigger those in >> general. > > Ok. I will tell you the results. I have tested your patches with 2.6.30-rc6+compat-wireless-2009-05-20 on a Gateworks Avila GW2348-2 board with an AR5416 card (MAC/BB Rev:2 AR2133 RF Rev:81). It works fine, i did not see the magic value nor a crash with it under normal usage. Thank you for the solution. Although i can make it crazy with the following script: --- #!/bin/sh cat << EOF > /var/run/wpa_supplicant-wlan0.conf ctrl_interface=/var/run/wpa_supplicant-wlan0 network={ scan_ssid=1 ssid="FOOBAR" key_mgmt=WPA-PSK proto=RSN psk="foobarbaz" } EOF rmmod ath9k dmesg -n8 insmod ath9k debug=0x1 while true; do wpa_supplicant -b br-lan -B -P /var/run/wpa_supplicant-wlan0.pid -D wext -i wlan0 -c /var/run/wpa_supplicant-wlan0.conf sleep 10 kill `cat /var/run/wpa_supplicant-wlan0.pid` rm -rf /var/run/wpa_supplicant-wlan0 done --- and i can get a result similar to this: [...] ath9k: NETWORK SLEEP -> AWAKE ath9k: AWAKE -> NETWORK SLEEP ath9k: NETWORK SLEEP -> AWAKE ath9k: AWAKE -> NETWORK SLEEP ath9k: NETWORK SLEEP -> AWAKE ath9k: AWAKE -> NETWORK SLEEP ath9k: *** Dead beef in register 00000024! ------------[ cut here ]------------ WARNING: at /openwrt/ixp4xx/build_dir/linux-ixp4xx_generic/compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/hw.c:120 warn_slowpath_null+0x18/0x20() Modules linked in: ath9k nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ipt_REJECT xt_TCPMSS ipt_LOG xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211 cfg80211 crc_ccitt arc4 aes_generic deflate ecb cbc cryptomgr crypto_hash crypto_blkcipher pcompress aead crypto_algapi [last unloaded: ath9k] Backtrace: [] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c) r6:00000078 r5:bf1ef6d8 r4:c17cdc25 [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_fmt+0x74/0x90) [] (warn_slowpath_fmt+0x0/0x90) from [] (warn_slowpath_null+0x18/0x20) r3:c06d7398 r2:c072db80 r7:00000000 r6:00000024 r5:c1158000 r4:deadbeef [] (warn_slowpath_null+0x0/0x20) from [] (ath9k_ioread32+0xc0/0x140 [ath9k]) [] (ath9k_ioread32+0x0/0x140 [ath9k]) from [] (ath9k_hw_set_interrupts+0x334/0x418 [ath9k]) r7:00000000 r6:c1158000 r5:00000000 r4:c1cba954 [] (ath9k_hw_set_interrupts+0x0/0x418 [ath9k]) from [] (ath9k_stop+0x78/0x14c [ath9k]) [] (ath9k_stop+0x0/0x14c [ath9k]) from [] (ieee80211_stop+0x32c/0x570 [mac80211]) r6:00000000 r5:c1cba180 r4:00000000 [] (ieee80211_stop+0x0/0x570 [mac80211]) from [] (dev_close+0x88/0xbc) r8:c17cde60 r7:00001003 r6:00001002 r5:bf095308 r4:c1079000 [] (dev_close+0x0/0xbc) from [] (dev_change_flags+0x80/0x180) r5:c1079000 r4:00000001 [] (dev_change_flags+0x0/0x180) from [] (devinet_ioctl+0x684/0x74c) r7:00008914 r6:c077a83c r5:c17cc000 r4:becd9ca0 [] (devinet_ioctl+0x0/0x74c) from [] (inet_ioctl+0x1bc/0x1f4) [] (inet_ioctl+0x0/0x1f4) from [] (sock_ioctl+0xdc/0x27c) [] (sock_ioctl+0x0/0x27c) from [] (vfs_ioctl+0x34/0x78) r6:00008914 r5:becd9ca0 r4:c1cea0a0 [] (vfs_ioctl+0x0/0x78) from [] (do_vfs_ioctl+0x210/0x530) r5:becd9ca0 r4:00000003 [] (do_vfs_ioctl+0x0/0x530) from [] (sys_ioctl+0x40/0x68) [] (sys_ioctl+0x0/0x68) from [] (ret_fast_syscall+0x0/0x2c) r6:00001002 r5:0005c4b8 r4:0005c4b8 ---[ end trace 9aa2912c945f3c8b ]--- ath9k: *** Dead beef in register 000000ac! ------------[ cut here ]------------ WARNING: at /openwrt/ixp4xx/build_dir/linux-ixp4xx_generic/compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/hw.c:120 warn_slowpath_null+0x18/0x20() Modules linked in: ath9k nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ipt_REJECT xt_TCPMSS ipt_LOG xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211 cfg80211 crc_ccitt arc4 aes_generic deflate ecb cbc cryptomgr crypto_hash crypto_blkcipher pcompress aead crypto_algapi [last unloaded: ath9k] Backtrace: [] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c) r6:00000078 r5:bf1ef6d8 r4:c17cdc25 [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_fmt+0x74/0x90) [] (warn_slowpath_fmt+0x0/0x90) from [] (warn_slowpath_null+0x18/0x20) r3:c06d7398 r2:c072db80 r7:00000000 r6:000000ac r5:c1158000 r4:deadbeef [] (warn_slowpath_null+0x0/0x20) from [] (ath9k_ioread32+0xc0/0x140 [ath9k]) [] (ath9k_ioread32+0x0/0x140 [ath9k]) from [] (ath9k_hw_set_interrupts+0x158/0x418 [ath9k]) r7:00000000 r6:c1158000 r5:00000000 r4:00000000 [] (ath9k_hw_set_interrupts+0x0/0x418 [ath9k]) from [] (ath9k_stop+0x78/0x14c [ath9k]) [] (ath9k_stop+0x0/0x14c [ath9k]) from [] (ieee80211_stop+0x32c/0x570 [mac80211]) r6:00000000 r5:c1cba180 r4:00000000 [] (ieee80211_stop+0x0/0x570 [mac80211]) from [] (dev_close+0x88/0xbc) r8:c17cde60 r7:00001003 r6:00001002 r5:bf095308 r4:c1079000 [] (dev_close+0x0/0xbc) from [] (dev_change_flags+0x80/0x180) r5:c1079000 r4:00000001 [] (dev_change_flags+0x0/0x180) from [] (devinet_ioctl+0x684/0x74c) r7:00008914 r6:c077a83c r5:c17cc000 r4:becd9ca0 [] (devinet_ioctl+0x0/0x74c) from [] (inet_ioctl+0x1bc/0x1f4) [] (inet_ioctl+0x0/0x1f4) from [] (sock_ioctl+0xdc/0x27c) [] (sock_ioctl+0x0/0x27c) from [] (vfs_ioctl+0x34/0x78) r6:00008914 r5:becd9ca0 r4:c1cea0a0 [] (vfs_ioctl+0x0/0x78) from [] (do_vfs_ioctl+0x210/0x530) r5:becd9ca0 r4:00000003 [] (do_vfs_ioctl+0x0/0x530) from [] (sys_ioctl+0x40/0x68) [] (sys_ioctl+0x0/0x68) from [] (ret_fast_syscall+0x0/0x2c) r6:00001002 r5:0005c4b8 r4:0005c4b8 ---[ end trace 9aa2912c945f3c8c ]--- ath9k: *** AR_IMR_S2: ((0xdeadbeef & ~(0x77c00000)) | 0x0) => 0x882dbeef in ath9k_hw_set_interrupts ------------[ cut here ]------------ WARNING: at /openwrt/ixp4xx/build_dir/linux-ixp4xx_generic/compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/hw.c:3120 warn_slowpath_null+0x18/0x20() Modules linked in: ath9k nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ipt_REJECT xt_TCPMSS ipt_LOG xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211 cfg80211 crc_ccitt arc4 aes_generic deflate ecb cbc cryptomgr crypto_hash crypto_blkcipher pcompress aead crypto_algapi [last unloaded: ath9k] Backtrace: [] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c) r6:00000c30 r5:bf1ef6d8 r4:c17cdc4d [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_fmt+0x74/0x90) [] (warn_slowpath_fmt+0x0/0x90) from [] (warn_slowpath_null+0x18/0x20) r3:c06d7398 r2:c072db80 r7:00000000 r6:c1158000 r5:00000000 r4:882dbeef [] (warn_slowpath_null+0x0/0x20) from [] (ath9k_hw_set_interrupts+0x2fc/0x418 [ath9k]) [] (ath9k_hw_set_interrupts+0x0/0x418 [ath9k]) from [] (ath9k_stop+0x78/0x14c [ath9k]) [] (ath9k_stop+0x0/0x14c [ath9k]) from [] (ieee80211_stop+0x32c/0x570 [mac80211]) r6:00000000 r5:c1cba180 r4:00000000 [] (ieee80211_stop+0x0/0x570 [mac80211]) from [] (dev_close+0x88/0xbc) r8:c17cde60 r7:00001003 r6:00001002 r5:bf095308 r4:c1079000 [] (dev_close+0x0/0xbc) from [] (dev_change_flags+0x80/0x180) r5:c1079000 r4:00000001 [] (dev_change_flags+0x0/0x180) from [] (devinet_ioctl+0x684/0x74c) r7:00008914 r6:c077a83c r5:c17cc000 r4:becd9ca0 [] (devinet_ioctl+0x0/0x74c) from [] (inet_ioctl+0x1bc/0x1f4) [] (inet_ioctl+0x0/0x1f4) from [] (sock_ioctl+0xdc/0x27c) [] (sock_ioctl+0x0/0x27c) from [] (vfs_ioctl+0x34/0x78) r6:00008914 r5:becd9ca0 r4:c1cea0a0 [] (vfs_ioctl+0x0/0x78) from [] (do_vfs_ioctl+0x210/0x530) r5:becd9ca0 r4:00000003 [] (do_vfs_ioctl+0x0/0x530) from [] (sys_ioctl+0x40/0x68) [] (sys_ioctl+0x0/0x68) from [] (ret_fast_syscall+0x0/0x2c) r6:00001002 r5:0005c4b8 r4:0005c4b8 ---[ end trace 9aa2912c945f3c8d ]--- ath9k: *** Dead beef in register 000000b8! ------------[ cut here ]------------ WARNING: at /openwrt/ixp4xx/build_dir/linux-ixp4xx_generic/compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/hw.c:120 warn_slowpath_null+0x18/0x20() Modules linked in: ath9k nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ipt_REJECT xt_TCPMSS ipt_LOG xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211 cfg80211 crc_ccitt arc4 aes_generic deflate ecb cbc cryptomgr crypto_hash crypto_blkcipher pcompress aead crypto_algapi [last unloaded: ath9k] Backtrace: [] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c) r6:00000078 r5:bf1ef6d8 r4:c17cdc25 [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_fmt+0x74/0x90) [] (warn_slowpath_fmt+0x0/0x90) from [] (warn_slowpath_null+0x18/0x20) r3:c06d7398 r2:c072db80 r7:00000000 r6:000000b8 r5:c1158000 r4:deadbeef [] (warn_slowpath_null+0x0/0x20) from [] (ath9k_ioread32+0xc0/0x140 [ath9k]) [] (ath9k_ioread32+0x0/0x140 [ath9k]) from [] (ath9k_hw_set_interrupts+0x1b8/0x418 [ath9k]) r7:00000000 r6:c1158000 r5:00000000 r4:882dbeef [] (ath9k_hw_set_interrupts+0x0/0x418 [ath9k]) from [] (ath9k_stop+0x78/0x14c [ath9k]) [] (ath9k_stop+0x0/0x14c [ath9k]) from [] (ieee80211_stop+0x32c/0x570 [mac80211]) r6:00000000 r5:c1cba180 r4:00000000 [] (ieee80211_stop+0x0/0x570 [mac80211]) from [] (dev_close+0x88/0xbc) r8:c17cde60 r7:00001003 r6:00001002 r5:bf095308 r4:c1079000 [] (dev_close+0x0/0xbc) from [] (dev_change_flags+0x80/0x180) r5:c1079000 r4:00000001 [] (dev_change_flags+0x0/0x180) from [] (devinet_ioctl+0x684/0x74c) r7:00008914 r6:c077a83c r5:c17cc000 r4:becd9ca0 [] (devinet_ioctl+0x0/0x74c) from [] (inet_ioctl+0x1bc/0x1f4) [] (inet_ioctl+0x0/0x1f4) from [] (sock_ioctl+0xdc/0x27c) [] (sock_ioctl+0x0/0x27c) from [] (vfs_ioctl+0x34/0x78) r6:00008914 r5:becd9ca0 r4:c1cea0a0 [] (vfs_ioctl+0x0/0x78) from [] (do_vfs_ioctl+0x210/0x530) r5:becd9ca0 r4:00000003 [] (do_vfs_ioctl+0x0/0x530) from [] (sys_ioctl+0x40/0x68) [] (sys_ioctl+0x0/0x68) from [] (ret_fast_syscall+0x0/0x2c) r6:00001002 r5:0005c4b8 r4:0005c4b8 ---[ end trace 9aa2912c945f3c8e ]--- ath9k: *** AR_IMR_S5: ((0xdeadbeef & ~(0x10)) | 0x0) => 0xdeadbeef in ath9k_hw_set_interrupts ------------[ cut here ]------------ WARNING: at /openwrt/ixp4xx/build_dir/linux-ixp4xx_generic/compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/hw.c:3138 warn_slowpath_null+0x18/0x20() Modules linked in: ath9k nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ipt_REJECT xt_TCPMSS ipt_LOG xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211 cfg80211 crc_ccitt arc4 aes_generic deflate ecb cbc cryptomgr crypto_hash crypto_blkcipher pcompress aead crypto_algapi [last unloaded: ath9k] Backtrace: [] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c) r6:00000c42 r5:bf1ef6d8 r4:c17cdc4d [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_fmt+0x74/0x90) [] (warn_slowpath_fmt+0x0/0x90) from [] (warn_slowpath_null+0x18/0x20) r3:c06d7398 r2:c072db80 r7:00000000 r6:c1158000 r5:00000000 r4:deadbeef [] (warn_slowpath_null+0x0/0x20) from [] (ath9k_hw_set_interrupts+0x3d8/0x418 [ath9k]) [] (ath9k_hw_set_interrupts+0x0/0x418 [ath9k]) from [] (ath9k_stop+0x78/0x14c [ath9k]) [] (ath9k_stop+0x0/0x14c [ath9k]) from [] (ieee80211_stop+0x32c/0x570 [mac80211]) r6:00000000 r5:c1cba180 r4:00000000 [] (ieee80211_stop+0x0/0x570 [mac80211]) from [] (dev_close+0x88/0xbc) r8:c17cde60 r7:00001003 r6:00001002 r5:bf095308 r4:c1079000 [] (dev_close+0x0/0xbc) from [] (dev_change_flags+0x80/0x180) r5:c1079000 r4:00000001 [] (dev_change_flags+0x0/0x180) from [] (devinet_ioctl+0x684/0x74c) r7:00008914 r6:c077a83c r5:c17cc000 r4:becd9ca0 [] (devinet_ioctl+0x0/0x74c) from [] (inet_ioctl+0x1bc/0x1f4) [] (inet_ioctl+0x0/0x1f4) from [] (sock_ioctl+0xdc/0x27c) [] (sock_ioctl+0x0/0x27c) from [] (vfs_ioctl+0x34/0x78) r6:00008914 r5:becd9ca0 r4:c1cea0a0 [] (vfs_ioctl+0x0/0x78) from [] (do_vfs_ioctl+0x210/0x530) r5:becd9ca0 r4:00000003 [] (do_vfs_ioctl+0x0/0x530) from [] (sys_ioctl+0x40/0x68) [] (sys_ioctl+0x0/0x68) from [] (ret_fast_syscall+0x0/0x2c) r6:00001002 r5:0005c4b8 r4:0005c4b8 ---[ end trace 9aa2912c945f3c8f ]--- [...] ... but this is far from a normal usage. Regards, Gabor