From: Zefir Kurtisi Date: Tue, 15 Nov 2011 16:52:28 +0100 Subject: [ath9k-devel] [PATCH 2/2] ath9k: integrate initial DFS module In-Reply-To: References: <1320770044-12271-1-git-send-email-zefir.kurtisi@neratec.com> <1320770044-12271-3-git-send-email-zefir.kurtisi@neratec.com> Message-ID: <4EC28ABC.70307@neratec.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 11/15/2011 04:24 PM, Mohammed Shafi wrote: > Hi Zefir, > > just few doubt, sorry for the late reply > > On Tue, Nov 8, 2011 at 10:04 PM, Zefir Kurtisi > wrote: >> This patch integrates the DFS module into ath9k, including >> * build the module into ath9k_hw >> * set up DFS debugfs >> @@ -1855,11 +1858,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) >> if (sc->sc_flags & SC_OP_RXFLUSH) >> goto requeue_drop_frag; >> >> - retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, >> - rxs, &decrypt_error); >> - if (retval) >> - goto requeue_drop_frag; >> - >> rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp; >> if (rs.rs_tstamp > tsf_lower && >> unlikely(rs.rs_tstamp - tsf_lower > 0x10000000)) >> @@ -1869,6 +1867,17 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) >> unlikely(tsf_lower - rs.rs_tstamp > 0x10000000)) >> rxs->mactime += 0x100000000ULL; >> >> + if ((rs.rs_status & ATH9K_RXERR_PHY) && >> + (rs.rs_phyerr == ATH9K_PHYERR_RADAR)) { >> + /* DFS: check for radar pulse */ >> + ath9k_dfs_process_phyerr(sc, hdr, &rs, rxs->mactime); >> + } >> + >> + retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, >> + rxs, &decrypt_error); >> + if (retval) >> + goto requeue_drop_frag; > > does the above fixes any bug related to mactime displayed in sniffer > > Hi Mohammed, no, like all other modifications within this patch the above does not fix anything (at least not intentionally) ;) What it does is moving the calculation of rxs->mactime before ath9k_rx_skb_preprocess(), since the mactime is needed to stamp the radar event. So, the five lines marked as removals are actually moved further down which shouldn't have any side effects. Thanks Zefir