Skip to content

Commit

Permalink
p54: improve TSF timestamp precision
Browse files Browse the repository at this point in the history
The LMAC API states that the TSF clock value of
every rx'ed frame is a "usec accurate timestamp
of the hardware clock at the end of frame
(before OFDM SIFS EOF padding)".

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Nov 26, 2012
1 parent 1d815ef commit 725d255
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/p54/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,11 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32;
priv->tsf_low32 = tsf32;

rx_status->flag |= RX_FLAG_MACTIME_START;
/* LMAC API Page 10/29 - s_lm_data_in - clock
* "usec accurate timestamp of hardware clock
* at end of frame (before OFDM SIFS EOF padding"
*/
rx_status->flag |= RX_FLAG_MACTIME_END;

if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN))
header_len += hdr->align[0];
Expand Down

0 comments on commit 725d255

Please sign in to comment.