Skip to contentSkip to conversation

How can i distinguish TXOK and TXDESC

ath9k-devel lastnoname 2 participants 3 messages Jun 17, 2012 – Jun 18, 2012 1 message not in the archive

lore
Share & tools
lore

lastnoname

author
#0 lore raw
Quoted 10 lines

Hello every body!
I've been working with madwifi for days, I want to measure the
time elapse from the time a frame is sent off and the time the sent packet is acked. I tried to read the AR_ISR register in the ath_intr
function to get in status of interrupt. But I found that most of
the interrupts which signed as HAL_INT_TX by ath_hal_getisr are mixture of AR_ISR_TXOK_INT and AR_ISR_TXDESC_INT. How can I distinguish these two interrupts(AR_ISR_TXOK_INT and AR_ISR_TXDESC_INT)?
Thanks all!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20120617/0d2fbdfe/attachment.htm

#1 lore raw

HAL_INT_TX? ath_hal_getisr() ? Which codebase are you using?

Adrian

A message that is not in the archive (sent off-list or not yet received): 001401cd4d06$0893aa10$6f00a8c0@what

#3 lore raw

Hi,

Right. So you'll have to just add a new HAL_TX_INT field to distinguish TXOK and TXDESC.

Or, you can just hack the HAL get interrupts function to return a bitmap of which _hardware_ interrupts were set ,rather than just the HAL interrupt flags.

Quoted 19 lines · lastnoname

----- Original Message -----
From: "Adrian Chadd" <[email protected]>
To: "lastnoname" <[email protected]>
Cc: <[email protected]>
Sent: Monday, June 18, 2012 2:58 AM
Subject: Re: [ath9k-devel] How can i distinguish TXOK and TXDESC

Quoted 4 lines

HAL_INT_TX? ath_hal_getisr() ? Which codebase are you using?

Adrian

I'm using madwifi-0.9.4 openhal , but it doesn't matter. The ath_hal_getisr() function in madwifi euqls ath_isr() in ath9k, and the HAL_INT_TX interrupt mask equals ATH9K_INT_TX in ath9k.
so ?my question can be asked as follows:
The get_isr function combines the AR_ISR_TXOK ,AR_ISR_TXERR , AR_ISR_TXEOL and AR_ISR_TXDESC interrupts as a ATH9K_INT_TX mask. so I cannot get the actual interrupts from the get_isr ?function.
I tried to destinguish the interrupts AR_ISR_TXOK ,AR_ISR_TXERR , AR_ISR_TXEOL and AR_ISR_TXDESC. I've tried to read the AR_ISR_S0 and AR_ISR_S1 registers, and ?found that the AR_ISR_TXOK interrupt always appears togerther with the AR_ISR_TXDESC interrupt, though the AR_IMR,AR_IMR_S0 and AR_IMR_S1 interrupt related bits are set. I have no idea how to distinguish the time when the frame is being transmitted(AR_ISR_TXDESC interrupt theoretically) ?and when the frame is acked (AR_ISR_TXOK interrupt theoretically). ?I just want to measure the time delay between such two events. So, How can i distinguish TXOK and TXDESC interupts?