Skip to contentSkip to conversation

RX timestamp is reported at end of frame

PATCH New Thomas Pedersen 3 participants 9 messages Nov 12, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

cover RX timestamp is reported at end of frame

At least this is true for the chips tested. Verified by bringing up two mesh nodes and checking their reported TSF offset is symmetrical within 5us. Before this patch there was a difference of 1.3ms or so.

Thomas Pedersen (2):
ath9k: RX timestamp is reported at end of frame
ath9k_htc: RX timestamp is reported at end of frame

 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c |    2 +-
 drivers/net/wireless/ath/ath9k/recv.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

Tested with AR9280.

---
 drivers/net/wireless/ath/ath9k/recv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/recv.c +1 -1
index a04028b..d4df98a 100644
@@ -976,7 +976,7 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
 	rx_status->freq = hw->conf.channel->center_freq;
 	rx_status->signal = ah->noise + rx_stats->rs_rssi;
 	rx_status->antenna = rx_stats->rs_antenna;
-	rx_status->flag |= RX_FLAG_MACTIME_MPDU;
+	rx_status->flag |= RX_FLAG_MACTIME_END;
 	if (rx_stats->rs_moreaggr)
 		rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
 
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 2/2 ath9k_htc: RX timestamp is reported at end of frame

In reply to Thomas Pedersen

Tested with AR9271.

---
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +1 -1
index 06cdcb7..1708b01 100644
@@ -1082,7 +1082,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 	rx_status->freq = hw->conf.channel->center_freq;
 	rx_status->signal =  rxbuf->rxstatus.rs_rssi + ATH_DEFAULT_NOISE_FLOOR;
 	rx_status->antenna = rxbuf->rxstatus.rs_antenna;
-	rx_status->flag |= RX_FLAG_MACTIME_MPDU;
+	rx_status->flag |= RX_FLAG_MACTIME_END;
 
 	return true;
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

In reply to Thomas Pedersen
Quoted 12 lines · Thomas Pedersen

Tested with AR9280.

---
 drivers/net/wireless/ath/ath9k/recv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/recv.c +0 -0
index a04028b..d4df98a 100644

drivers/net/wireless/ath/ath9k/recv.c static int ath9k_rx_skb_preprocess(struct ath_common *common, · line 981

Quoted 7 lines
drivers/net/wireless/ath/ath9k/recv.c +1 -1
@@ -976,7 +976,7 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
        rx_status->freq = hw->conf.channel->center_freq;
        rx_status->signal = ah->noise + rx_stats->rs_rssi;
        rx_status->antenna = rx_stats->rs_antenna;
-       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
+       rx_status->flag |= RX_FLAG_MACTIME_END;
        if (rx_stats->rs_moreaggr)
                rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;

Thanks but can you clarify the implications of this change within the commit log ? Was something not working, if not, why exactly is this change important?

Luis

#3 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

Quoted 8 lines · Luis R. Rodriguez
Quoted 7 lines · Thomas Pedersen

Tested with AR9280.

---
 drivers/net/wireless/ath/ath9k/recv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines

drivers/net/wireless/ath/ath9k/recv.c static int ath9k_rx_skb_preprocess(struct ath_common *common, · line 981

Quoted 12 lines
drivers/net/wireless/ath/ath9k/recv.c +1 -1
index a04028b..d4df98a 100644
@@ -976,7 +976,7 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
        rx_status->freq = hw->conf.channel->center_freq;
        rx_status->signal = ah->noise + rx_stats->rs_rssi;
        rx_status->antenna = rx_stats->rs_antenna;
-       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
+       rx_status->flag |= RX_FLAG_MACTIME_END;
        if (rx_stats->rs_moreaggr)
                rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;

Thanks but can you clarify the implications of this change within the commit log ? Was something not working, if not, why exactly is this change important?

Sure.

Thomas

#4 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

In reply to Thomas Pedersen

Hi,

Is that true for aggregate RX too? I didn't think the FIFO was big enough to receive the whole aggregate, so I wonder what timestamp aggregates sub-frames are receiving.

adrian

Quoted 27 lines · Thomas Pedersen

Tested with AR9280.

---
 drivers/net/wireless/ath/ath9k/recv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/recv.c +1 -2
index a04028b..d4df98a 100644
@@ -976,7 +976,7 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
        rx_status->freq = hw->conf.channel->center_freq;
        rx_status->signal = ah->noise + rx_stats->rs_rssi;
        rx_status->antenna = rx_stats->rs_antenna;
-       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
+       rx_status->flag |= RX_FLAG_MACTIME_END;
        if (rx_stats->rs_moreaggr)
                rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
 
--

1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

Quoted 5 lines · Adrian Chadd

Hi,

Is that true for aggregate RX too? I didn't think the FIFO was big enough to receive the whole aggregate, so I wonder what timestamp aggregates sub-frames are receiving.

#6 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

Quoted 2 lines · Thomas Pedersen

From our captures it looks like the entire aggragate gets the same timestamp (first frame?).

Right, so MACTIME_END is not appropriate there?

adrian

#7 lore raw

PATCH 1/2 ath9k: RX timestamp is reported at end of frame

Quoted 6 lines · Adrian Chadd
Quoted 2 lines · Thomas Pedersen

From our captures it looks like the entire aggragate gets the same timestamp (first frame?).

Right, so MACTIME_END is not appropriate there?

I don't think it really matters since before they would also all get the same timestamp anyway?

Thomas