diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2012-11-24 08:23:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-26 14:54:21 -0500 |
commit | 725d255e70a98fc5dc0f4ce7fa173c33c8515a07 (patch) | |
tree | de5920a8c6dd8a34c165fafbd83f07b61565cdc3 /drivers/net/wireless/p54/txrx.c | |
parent | 1d815ef4b8b8ebd6ef2cffcad663ae91d15646a2 (diff) |
p54: improve TSF timestamp precision
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>
Diffstat (limited to 'drivers/net/wireless/p54/txrx.c')
-rw-r--r-- | drivers/net/wireless/p54/txrx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c index 8ae982bd7cf3..12f0a34477f2 100644 --- a/drivers/net/wireless/p54/txrx.c +++ b/drivers/net/wireless/p54/txrx.c | |||
@@ -369,7 +369,11 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) | |||
369 | rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32; | 369 | rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32; |
370 | priv->tsf_low32 = tsf32; | 370 | priv->tsf_low32 = tsf32; |
371 | 371 | ||
372 | rx_status->flag |= RX_FLAG_MACTIME_START; | 372 | /* LMAC API Page 10/29 - s_lm_data_in - clock |
373 | * "usec accurate timestamp of hardware clock | ||
374 | * at end of frame (before OFDM SIFS EOF padding" | ||
375 | */ | ||
376 | rx_status->flag |= RX_FLAG_MACTIME_END; | ||
373 | 377 | ||
374 | if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN)) | 378 | if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN)) |
375 | header_len += hdr->align[0]; | 379 | header_len += hdr->align[0]; |