Skip to contentSkip to conversation

ath9k: Fix mactime from being clobbered in rx_status

PATCH In review Ashok Nagarajan 2 participants 2 messages Mar 10, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ath9k: Fix mactime from being clobbered in rx_status

mactime was being overwritten by the function ath9k_rx_skb_preprocess. Fixed by memsetting rx_status in ath_rx_tasklet.

---
v1:
Fix reverting "ath9k: trivial: reorder rx_tasklet processing" logic (Christian Lamparter)

 drivers/net/wireless/ath/ath9k/recv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/recv.c +2 -2
index 1b1b279..f4ae3ba 100644
@@ -982,8 +982,6 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
 {
 	struct ath_hw *ah = common->ah;
 
-	memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
-
 	/*
 	 * everything but the rate is checked here, the rate check is done
 	 * separately to avoid doing two lookups for a rate for each frame.
@@ -1841,6 +1839,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 		if (sc->sc_flags & SC_OP_RXFLUSH)
 			goto requeue_drop_frag;
 
+		memset(rxs, 0, sizeof(struct ieee80211_rx_status));
+
 		rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;
 		if (rs.rs_tstamp > tsf_lower &&
 		    unlikely(rs.rs_tstamp - tsf_lower > 0x10000000))
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 2 lines · Ashok Nagarajan

mactime was being overwritten by the function ath9k_rx_skb_preprocess. Fixed by memsetting rx_status in ath_rx_tasklet.

thanks for fixing this. now i can see a proper non-zero MAC time stamp in ath9k sniffer.

Quoted 39 lines

---
v1:
Fix reverting "ath9k: trivial: reorder rx_tasklet processing" logic (Christian Lamparter)
 drivers/net/wireless/ath/ath9k/recv.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/recv.c +2 -2
index 1b1b279..f4ae3ba 100644
@@ -982,8 +982,6 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
  {
        struct ath_hw *ah = common->ah;
 
-       memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
-
        /*
         * everything but the rate is checked here, the rate check is done
         * separately to avoid doing two lookups for a rate for each frame.
@@ -1841,6 +1839,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
                if (sc->sc_flags & SC_OP_RXFLUSH)
                        goto requeue_drop_frag;
 
+               memset(rxs, 0, sizeof(struct ieee80211_rx_status));
+
                rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;

               if (rs.rs_tstamp > tsf_lower && unlikely(rs.rs_tstamp - tsf_lower > 0x10000000)) --
1.7.5.4

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

Signature · 2 lines
thanks,
shafi