ath9k - AR5416/5133 card DMA issues
Ok, stared some more at the code, I'm now wondering if it's an endian-ness issue. the board I'm working with is an IXP425 based one, which is Big endian. The driver does detect check the eeprom the does the swap, and does set AR_CFG_SWRD and AR_CFG_SWTD. What seems to be happening is when the scan changes channels and receives a packet, it gets to
the ath9k_hw_stopdmarecv.It then sets AR_CR_RXD (diable RX), but the RX is not disbled (i.e. AR_CR_RXE is still set, hence AR_CR=0x24), hence the timeout messages. This only happens when it receives a response, as empirically demonstrated by turning off the AP nearby and counting the errors. I've tried increasing the timeout to larger numbers, with no avail. I observed that the AR_CR status does return to 0x0 after around 45 seconds of inactivity, but I'm assuming that's more powersaving related. Can anyone enlighten me as to what AR_DIAG_SW_DIS_RX is/should be showing? It seems that AR_DIAG_SW_DIS_TX is set, i.e. transmit is diabled, but RX is still enabled.
Thanks
mtb
Quoted 42 lines · mtbottle
Hi,
I'm trying to get an AR5416/AR5133 card working on the latest trunk of openwrt, with todays compat-wireless. The card is recognized, however I can't scan or associate. Here's a dmesg from iw list scancfg80211: Calling CRDA to update world regulatory domain
ath: Country alpha2 being used: AM
ath: Regpair detected:0x30
phy0: Selected rate control algorithm 'ath9k_rate_control' Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR5416 MAC/BB Rev:2 AR5133 RF Rev:81: mem=0xc49e0000, irq=0
cfg80211: Calling CRDA for country: AM
PPP generic driver version 2.4.2ip_tables: (C) 2000-2006 Netfilter Core Teamnf_conntrackversion 0.5.0 (1024 buckets, 4096 max)
phy0: device now idle
phy0: device no longer idle - scanning
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
wlan0: dropped data frame to not associated stationc3c16644
phy0: device now idle
phy0: device no longer idle - scanning
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
wlan0: dropped data frame to not associated stationc3c16444
phy0: device now idleNote, in the second scan I turned on a linysys ap close by. So the power is turned on ;) I also had changed the DMA timeout to 100ms from 10, just to see if there was a timeout.
Similar results occur when attempting to associate.
Can anyone point me in the right direction? I'm not particularly familiar with ath9k yet, so I don;t really know where to start! I did step back from the stop DMA error, but I can;t seem to make the connection.
Quoted 3 lines
Regards
MTB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090625/41266a68/attachment.htm
To try and be a little clearer, let me rephrase..
AR_CR = 0x00000024
== AR_CR_RXE + AR_CR_RXD
(from reg.h)
i.e. the register to disable RX has been set, but in ath9k_hw_stopdmarecv this never happens, i.e. AR_CR_RXE never goes low, which then times out and puts out the error shown below.
At the same time,AR_DIAG_SW = 0x40000020
== AR_DIAG_RX_DIS + ?????.
reg.h has values for AR_DIAG_SW upto 0x20000000, but no 0x40000000. I'm not sure how to interpret this, as I'm not 100% on what AR_DIAG_SW is, nor what the 0x40000000 means. When not scanning, 0x40000000 is still set in AR_DIAG_SW, and AR_CR=0x4 or 0x0, dependant on time since last scan.
This only seems to occur when receiving a packet (be it scan or associate attempt).
Could anyone offer a sugestion as to what to test, or which way to go now!
Thanks,
mtb
Quoted 49 lines · mtbottle
Ok, stared some more at the code, I'm now wondering if it's an endian-ness issue. the board I'm working with is an IXP425 based one, which is Big endian. The driver does detect check the eeprom the does the swap, and does set
AR_CFG_SWRDandAR_CFG_SWTD.
What seems to be happening is when the scan changes channels and receives a packet, it gets to theath9k_hw_stopdmarecv.
It then setsAR_CR_RXD(diable RX), but the RX is not disbled (i.e.AR_CR_RXEis still set, hence AR_CR=0x24), hence the timeout messages. This only happens when it receives a response, as empirically demonstrated by turning off the AP nearby and counting the errors. I've tried increasing the timeout to larger numbers, with no avail. I observed that theAR_CRstatus does return to0x0after around 45 seconds of inactivity, but I'm assuming that's more powersaving related. Can anyone enlighten me as to whatAR_DIAG_SW_DIS_RXis/should be showing? It seems thatAR_DIAG_SW_DIS_TXis set, i.e. transmit is diabled, but RX is still enabled.Thanks
mtbQuoted 38 lines · mtbottle
Hi,
I'm trying to get an AR5416/AR5133 card working on the latest trunk of openwrt, with todays compat-wireless. The card is recognized, however I can't scan or associate. Here's a dmesg from iw list scancfg80211: Calling CRDA to update world regulatory domain
ath: Country alpha2 being used: AM
ath: Regpair detected:0x30
phy0: Selected rate control algorithm 'ath9k_rate_control' Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR5416 MAC/BB Rev:2 AR5133 RF Rev:81: mem=0xc49e0000, irq=0
cfg80211: Calling CRDA for country: AM
PPP generic driver version 2.4.2ip_tables: (C) 2000-2006 Netfilter Core Teamnf_conntrackversion 0.5.0 (1024 buckets, 4096 max)
phy0: device now idle
phy0: device no longer idle - scanning
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
wlan0: dropped data frame to not associated stationc3c16644
phy0: device now idle
phy0: device no longer idle - scanning
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
ath9k: DMA failed to stop in 100 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020
wlan0: dropped data frame to not associated stationc3c16444
phy0: device now idleNote, in the second scan I turned on a linysys ap close by. So the power is turned on ;) I also had changed the DMA timeout to 100ms from 10, just to see if there was a timeout. Similar results occur when attempting to associate.
Can anyone point me in the right direction? I'm not particularly familiar with ath9k yet, so I don;t really know where to start! I did step back from the stop DMA error, but I can;t seem to make the connection. Regards
MTB