On Mon, Mar 19, 2012 at 10:50 PM, Qasim Javed <qas...@gmail.com> wrote: > Hi Alexander, > > As Adrian mentioned, indeed there is a timestamp field in the transmit > status descriptor which could be used for your purpose. This timestamp > is basically the last 16-bits of a snapshot of the TSF counter. Since > you are using a card based on AR5213 chipset, the TX status descriptor > has 4 32-bit words. > > The function used to process the TX status descriptor for your card is then: > > ath5khw_proc_4word_tx_status (in desc.c)
This is ath5k_hw_proc_4word_tx_status > > You will notice that within this function, the TX timestamp is recorded: Just a correction, the timestamp is not recorded here, but copied from the TX status descriptor. It is recorded at the last transmission attempt when the frame is put on air. > > ts->ts_tstamp = AR5K_REG_MS(txstat0, AR5K_DESC_TX_STATUS0_SEND_TIMESTAMP); > > where ts is of type "struct ath5k_tx_status". > > Having described this, I should mention that I have had mixed > experience when using this field. Some cards such as (Ubiquiti XR9) do > not fill the value properly (or there is some bug in the "firmware" > running on the card), for others such as AR5212 based cards, it works > fine. From what little I know, in case there are multiple > retransmissions, the reported TX timestamp is recorded when the frame > is finally transmitted, that is at the last successful transmission > attempt. > > I hope that helps. > > -Qasim > > > On Wed, Mar 14, 2012 at 6:42 PM, Adrian Chadd <adr...@freebsd.org> wrote: >> >> I'd ignore wireshark for now. Look through the TX and TX completion >> code. There's a timestamp field somewhere that should be populated for >> all TXed frames. >> >> Verify first that the TSF is being written into that timestamp field >> upon completion, and then verify that it's pushed all the way back up >> through radiotap. >> >> >> Adrian >> _______________________________________________ >> ath5k-devel mailing list >> ath5k-devel@lists.ath5k.org >> https://lists.ath5k.org/mailman/listinfo/ath5k-devel _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel