Re: [Madwifi-devel] Does the mactime point to the first bit of the packet, or the last one?
Status: Beta
Brought to you by:
otaku
From: Lrj <ren...@gm...> - 2008-04-11 11:37:11
|
I agree that the key problem is when the mactime is taken. And, I also doubt that if the mactime is the end of the frame, would the "mactime - skb->len * 8 / ieeerate * 2" be exactly the first bit's arrival? On 4/11/08, bruno randolf <br...@th...> wrote: > > On Friday 11 April 2008 16:31:00 Lrj wrote: > > Hi, > > I did a google search, and find this one: > > http://madwifi.org/ticket/1429. > > According to it, the mactime in the Prism2 header points to the > end > > of the packet frame, and for the Radiotp header, if "th->wr_tsft = > > cpu_to_le64( mactime);" works, the mactime would point to the end of > the > > packet, and if "th->wr_tsft = cpu_to_le64(mactime - skb->len * 8 / > ieeerate > > * 2);" works, the mactime would point to the first bit of the pakcet > > arrives. Am I right? And if so, why we can calculate the time of the > first > > bit arrival with the "mactime - skb->len * 8 / ieeerate * 2"? > > the problem is that we simply don't know when the mactime is taken. > > it seems to be at the end of the packet, as the ticket suggests. but it > could > be some time later or earlier so before we make calcluations to adjust the > time i think we need further experiments or information (atheros?) to see > when mactime is actually taken. also i'm afraid it could be different for > different chipset versions. > > mactime - skb->len * 8 / ieeerate * 2 would subtract the time it takes to > send > all the bits in the packet. > > bruno > > > > > -- Best wishes, Lrj, NCI |