diff options
author | Zefir Kurtisi <zefir.kurtisi@neratec.com> | 2011-11-16 05:09:44 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-21 16:20:42 -0500 |
commit | 83c76570961573e56a238d84ba18f2581ef1e6b5 (patch) | |
tree | 5161bed1395ba78f7da455ce48adf4658b201438 /drivers/net/wireless/ath/ath9k/recv.c | |
parent | b68e6b3b33b208c5690355fd9804ea65cc53d3a5 (diff) |
ath9k: trivial: reorder rx_tasklet processing
DFS events are reported as PHY errors and need to be processed
with a correct timestamp set before ath9k_skb_preprocess() is
called and the frame is possibly dropped.
This patch puts the rxs->mactime calculation before the skb
is preprocessed to prepare for DFS event reporting.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 67b862cdae6d..4c8e296f663b 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -1838,11 +1838,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1838 | if (sc->sc_flags & SC_OP_RXFLUSH) | 1838 | if (sc->sc_flags & SC_OP_RXFLUSH) |
1839 | goto requeue_drop_frag; | 1839 | goto requeue_drop_frag; |
1840 | 1840 | ||
1841 | retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, | ||
1842 | rxs, &decrypt_error); | ||
1843 | if (retval) | ||
1844 | goto requeue_drop_frag; | ||
1845 | |||
1846 | rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp; | 1841 | rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp; |
1847 | if (rs.rs_tstamp > tsf_lower && | 1842 | if (rs.rs_tstamp > tsf_lower && |
1848 | unlikely(rs.rs_tstamp - tsf_lower > 0x10000000)) | 1843 | unlikely(rs.rs_tstamp - tsf_lower > 0x10000000)) |
@@ -1852,6 +1847,11 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1852 | unlikely(tsf_lower - rs.rs_tstamp > 0x10000000)) | 1847 | unlikely(tsf_lower - rs.rs_tstamp > 0x10000000)) |
1853 | rxs->mactime += 0x100000000ULL; | 1848 | rxs->mactime += 0x100000000ULL; |
1854 | 1849 | ||
1850 | retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, | ||
1851 | rxs, &decrypt_error); | ||
1852 | if (retval) | ||
1853 | goto requeue_drop_frag; | ||
1854 | |||
1855 | /* Ensure we always have an skb to requeue once we are done | 1855 | /* Ensure we always have an skb to requeue once we are done |
1856 | * processing the current buffer's skb */ | 1856 | * processing the current buffer's skb */ |
1857 | requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC); | 1857 | requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC); |