Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#7638 closed defect (wontfix)

RouterStation Pro + 2x ath9k card: PCI error, kernel oops

Reported by: Stijn Tintel <stijn@…> Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: Cc:


With two ath9k cards in my RouterStation Pro, I am getting a kernel oops almost every time I run "wifi". This is on trunk r22275.

root@wrt1:/# wifi
PCI error 1 at PCI addr 0x10017820
Data bus error, epc == 87184d30, ra == 87184d1c
Cpu 0
$ 0   : 00000000 00000000 deadc0de 00000019
$ 4   : 0000000f 0000003f 87161c38 871bffe8
$ 8   : 0000010f 00000000 00000000 00000000
$12   : 00000000 00000000 00000000 86239c48
$16   : 00000001 871e0000 871e0000 87862200
$20   : 871e0004 87862200 00000000 87862ab4
$24   : 00000000 87161bbc
$28   : 86238000 86239c68 00000200 87184d1c
Hi    : 00000014
Lo    : d2780000
epc   : 87184d30 ath9k_hw_setpower+0x12c/0x640 [ath9k_hw]
    Not tainted
ra    : 87184d1c ath9k_hw_setpower+0x118/0x640 [ath9k_hw]
Status: 1000fc02    KERNEL EXL
Cause : 1080001c
PrId  : 00019374 (MIPS 24Kc)
Modules linked in: mmc_spi mmc_block mmc_core fuse usb_storage ohci_hcd ip6t_REJECT ip6t_LOG ip6t_rt ip6t_hbh ip6t_mh ip6t_ipv6header ip6t_frag ip6t_eui64 ip6t_ah ip6table_raw ip6_queue ip6table_mangle ip6table_filter ip6_tables nf_conntrack_ipv6 nfnetlink_queue nfnetlink ipt_SET ipt_set ip_set_setlist ip_set_portmap ip_set_nethash ip_set_macipmap ip_set_iptreemap ip_set_iptree ip_set_ipportnethash ip_set_ipportiphash ip_set_ipporthash ip_set_ipmap ip_set_iphash ip_set 
xt_IMQ imq ipt_ULOG nf_nat_snmp_basic nf_nat_sip nf_conntrack_sip nf_nat_rtsp nf_conntrack_rtsp nf_nat_pptp nf_conntrack_pptp nf_nat_h323 nf_conntrack_h323 nf_nat_proto_gre nf_conntrack_proto_gre nf_nat_amanda nf_conntrack_amanda nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp xt_iprange xt_HL xt_hl xt_MARK ipt_ECN xt_CLASSIFY xt_time xt_tcpmss xt_statistic xt_mark xt_length ipt_ecn xt_DSCP xt_dscp xt_string xt_layer7 xt_quota xt_pkttype xt_owner ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE iptable_nat nf_nat xt_CONNMARK xt_recent xt_helper xt_conntrack xt_connmark xt_connbytes xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ehci_hcd sd_mod pppoe pppox pppoatm ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables sit tunnel4 tun ppp_async ppp_generic slhc vfat fat ext4 jbd2 br2684 atm ath9k ath9k_common ath9k_hw ath nls_utf8 nls_iso8859_15 nls_iso8859_1 nls_cp437 mac80211 usbcore ts_fsm ts_bm ts_kmp scsi_mod nls_base mbcache crc7 crc16 crc_itu_t crc_ccitt cfg80211 compat_firmware_class compat arc4 aes_generic deflate ecb cbc ipv6 leds_gpio button_hotplug gpio_buttons input_polldev input_core
Process ifconfig (pid: 2321, threadinfo=86238000, task=86246440, tls=00000000)
Stack : 000a000a 00000000 00000000 871bffe8 871bffe0 871840dc 00000001 871e0000
        87862a18 87862200 87175478 87862200 871e0004 87862ab4 00000200 87163cc8
        871e0000 00000003 00000000 00000007 871f0000 871652c4 00000000 871e0000
        00000000 00000000 00000000 00000000 00000001 87862200 87862a18 871e0000
        87862a00 871656c8 00000000 00000000 00000000 00800000 00000004 87862200
Call Trace:
[<87184d30>] ath9k_hw_setpower+0x12c/0x640 [ath9k_hw]
[<87163cc8>] ath9k_ps_wakeup+0x34/0x82c [ath9k]
[<871652c4>] ath_radio_disable+0x38/0x478 [ath9k]
[<871656c8>] ath_radio_disable+0x43c/0x478 [ath9k]

Code: 2405003f  38630014  00a3200a <00822024> 24020001  54820015  8e4300a0  02402021  0dc611f0
Disabling lock debugging due to kernel taint
Segmentation fault

Card 1: TP-Link WN-861N
phy0: Atheros AR5416 MAC/BB Rev:2 AR2122 RF Rev:81 mem=0xb0000000, irq=49

Card 2: Mikrotik R52N
phy1: Atheros AR9280 Rev:2 mem=0xb0010000, irq=50

When it doesn't oops, it seems to be mixing up the configured interfaces, in this case it tries to put the TP-Link (which is 2.4GHz only) in channel 52, while I configured the Mikrotik card to this channel.

root@wrt1:~# wifi
Configuration file: /var/run/hostapd-phy1.conf
wlan1: IEEE 802.11 Configured channel (52) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-1)
wlan1: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory
Failed to start hostapd for phy1

Here is my /etc/config/wireless:

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'macaddr' '00:1d:0f:bc:40:ba'
        option 'hwmode' '11ng'
        option 'htmode' 'HT20'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'disabled' '0'
        option 'channel' '1'
        option 'txpower' '20'

config 'wifi-iface'
        option 'device' 'radio0'
        option 'ssid' 'OpenWrt'
        option 'encryption' 'none'
        option 'network' 'wan'
        option 'mode' 'sta'

config 'wifi-device' 'radio1'
        option 'type' 'mac80211'
        option 'macaddr' '00:0c:42:61:aa:67'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'TX-STBC'
        list 'ht_capab' 'RX-STBC1'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'disabled' '0'
        option 'channel' '52'
        option 'hwmode' '11na'
        option 'htmode' 'HT40+'

config 'wifi-iface'
        option 'device' 'radio1'
        option 'network' 'lan'
        option 'mode' 'ap'
        option 'ssid' ''
        option 'encryption' 'psk2'
        option 'key' 'XXXXXXXX'

When I add option 'ifname' 'wlan0' and option 'ifname' 'wlan1' to the config 'wifi-iface' sections, the problem is the same.

Attachments (0)

Change History (7)

comment:1 Changed 8 years ago by Stijn Tintel <stijn@…>

After some more testing, it seems that the configurations are not mixed up. I forgot to set the correct countrycode for the card operating in 5GHz, which caused it not to be able to use the 5GHz channel. With countrycode BE and channel 36, both interfaces come up fine, one in AP mode the other in station mode.

But I am still seeing the kernel oops sometimes when running "wifi".

comment:2 Changed 7 years ago by KanjiMonster

I tested a somewhat similar setup using an AR5413 and a BCM4318 card. Both came up fine even after the 20th "wifi" without any pci errors.

I did not try to transfer data.

comment:3 Changed 7 years ago by Stijn Tintel <stijn@…>

After some more testing it seems that I can only reproduce this issue with the TP-Link card in the RS-Pro. I tested with the Mikrotik R52n + Alpha Networks WMP-G09SA.02 (ath5k), and also with 2x Miktrotik R52n, but I was unable to reproduce the issue with those combinations.

With the TP-Link + the Alhpa Networks, or the TP-Link + the Mikrotik, I mostly run into the issue after running wifi 3 times.

So I retested with only the TP-Link card in my RSPro, and after running wifi for the 4th time, I got the same crash again, so it looks as if this problem is with the TP-Link card. I can test another TP-Link card of the same type to see if it also has the issue, will post here when I get the result.

comment:4 Changed 7 years ago by Stijn Tintel <stijn@…>

Yesterday I tested another TP-Link of the same type in my RSPro, and after running wifi few times, I got the same oops. Both cards are TP-Link TL-WN861N, REV 1.0 (printed on the circuit board), Ver 1.2 (printed on the label on the back). The Atheros chips is AR5416-AC1A.

I can still test it on x86 hardware, but I do remember that when this card was in my laptop, I also had "random" freezes, never captured the oops though (lack of serial cable). So I guess this is just a hardware bug, and it's not a problem in OpenWRT. Feel free to close this ticket, sorry for the noise, should have done more testing before opening this ticket.

comment:5 Changed 7 years ago by nenad@…

I had same problem with TL-WN861N rev 1.x with Routerstation board, see
It seems that this card really has hw problems.

comment:6 Changed 7 years ago by jow

  • Resolution set to wontfix
  • Status changed from new to closed

hardware issue

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.