From: Zefir Kurtisi <zefir.kurtisi@neratec.com> To: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org Cc: kgiori@qca.qualcomm.com, rodrigue@qca.qualcomm.com, nbd@openwrt.org, Zefir Kurtisi <zefir.kurtisi@neratec.com> Subject: [RFC 6/6] ath9k: handle pulse data reported by DFS HW Date: Mon, 3 Oct 2011 12:29:18 +0200 [thread overview] Message-ID: <1317637758-11907-7-git-send-email-zefir.kurtisi@neratec.com> (raw) In-Reply-To: <1317637758-11907-1-git-send-email-zefir.kurtisi@neratec.com> Note: calculation of mactime had to be shifted before ath9k_rx_skb_preprocess() since it is used to time-stamp the radar pulse. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> --- drivers/net/wireless/ath/ath9k/recv.c | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 02c9f97..f5bb114 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -17,6 +17,10 @@ #include <linux/dma-mapping.h> #include "ath9k.h" #include "ar9003_mac.h" +#ifdef CONFIG_ATH9K_DFS +#include "dfs.h" +#endif + #define SKB_CB_ATHBUF(__skb) (*((struct ath_buf **)__skb->cb)) @@ -1850,11 +1854,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) if (flush) 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)) @@ -1864,6 +1863,19 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) unlikely(tsf_lower - rs.rs_tstamp > 0x10000000)) rxs->mactime += 0x100000000ULL; +#ifdef CONFIG_ATH9K_DFS + if ((hdr != NULL) && ((rs.rs_status & ATH9K_RXERR_PHY) != 0) && + (rs.rs_phyerr == ATH9K_PHYERR_RADAR)) { + /* DFS: feed radar pulse */ + ath9k_dfs_process_phyerr(sc, hdr, &rs, rxs->mactime); + } +#endif + + retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, + rxs, &decrypt_error); + if (retval) + goto requeue_drop_frag; + /* Ensure we always have an skb to requeue once we are done * processing the current buffer's skb */ requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC); -- 1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
From: Zefir Kurtisi <zefir.kurtisi@neratec.com> To: ath9k-devel@lists.ath9k.org Subject: [ath9k-devel] [RFC 6/6] ath9k: handle pulse data reported by DFS HW Date: Mon, 3 Oct 2011 12:29:18 +0200 [thread overview] Message-ID: <1317637758-11907-7-git-send-email-zefir.kurtisi@neratec.com> (raw) In-Reply-To: <1317637758-11907-1-git-send-email-zefir.kurtisi@neratec.com> Note: calculation of mactime had to be shifted before ath9k_rx_skb_preprocess() since it is used to time-stamp the radar pulse. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> --- drivers/net/wireless/ath/ath9k/recv.c | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 02c9f97..f5bb114 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -17,6 +17,10 @@ #include <linux/dma-mapping.h> #include "ath9k.h" #include "ar9003_mac.h" +#ifdef CONFIG_ATH9K_DFS +#include "dfs.h" +#endif + #define SKB_CB_ATHBUF(__skb) (*((struct ath_buf **)__skb->cb)) @@ -1850,11 +1854,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) if (flush) 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)) @@ -1864,6 +1863,19 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) unlikely(tsf_lower - rs.rs_tstamp > 0x10000000)) rxs->mactime += 0x100000000ULL; +#ifdef CONFIG_ATH9K_DFS + if ((hdr != NULL) && ((rs.rs_status & ATH9K_RXERR_PHY) != 0) && + (rs.rs_phyerr == ATH9K_PHYERR_RADAR)) { + /* DFS: feed radar pulse */ + ath9k_dfs_process_phyerr(sc, hdr, &rs, rxs->mactime); + } +#endif + + retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, + rxs, &decrypt_error); + if (retval) + goto requeue_drop_frag; + /* Ensure we always have an skb to requeue once we are done * processing the current buffer's skb */ requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC); -- 1.7.4.1
next prev parent reply other threads:[~2011-10-03 10:30 UTC|newest] Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-03 10:29 [RFC 0/6] ath9k: DFS pattern detection Zefir Kurtisi 2011-10-03 10:29 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 10:29 ` [RFC 1/6] ath9k: add DFS statistics to debugfs Zefir Kurtisi 2011-10-03 10:29 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 18:14 ` Luis R. Rodriguez 2011-10-03 18:14 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-04 8:27 ` Zefir Kurtisi 2011-10-04 8:27 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 10:29 ` [RFC 2/6] ath9k: add DFS debug flag Zefir Kurtisi 2011-10-03 10:29 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 18:15 ` Luis R. Rodriguez 2011-10-03 18:15 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-04 8:31 ` Zefir Kurtisi 2011-10-04 8:31 ` [ath9k-devel] " Zefir Kurtisi 2011-10-04 9:40 ` Mohammed Shafi 2011-10-04 9:40 ` [ath9k-devel] " Mohammed Shafi 2011-10-03 10:29 ` [RFC 3/6] ath9k: initial radar pulse detection for DFS Zefir Kurtisi 2011-10-03 10:29 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 11:57 ` Adrian Chadd 2011-10-03 11:57 ` [ath9k-devel] " Adrian Chadd 2011-10-03 12:23 ` Zefir Kurtisi 2011-10-03 12:23 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 12:43 ` Adrian Chadd 2011-10-03 12:43 ` [ath9k-devel] " Adrian Chadd 2011-10-03 14:21 ` Zefir Kurtisi 2011-10-03 14:21 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 14:23 ` Adrian Chadd 2011-10-03 14:23 ` [ath9k-devel] " Adrian Chadd 2011-10-03 10:29 ` [RFC 4/6] ath9k: add DFS build parameter Zefir Kurtisi 2011-10-03 10:29 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 18:26 ` Luis R. Rodriguez 2011-10-03 18:26 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-04 9:55 ` Zefir Kurtisi 2011-10-04 9:55 ` [ath9k-devel] " Zefir Kurtisi 2011-10-04 10:37 ` Felix Fietkau 2011-10-04 10:37 ` [ath9k-devel] " Felix Fietkau 2011-10-04 12:25 ` Adrian Chadd 2011-10-04 12:25 ` [ath9k-devel] " Adrian Chadd 2011-10-05 22:20 ` Luis R. Rodriguez 2011-10-05 22:20 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-03 10:29 ` [RFC 5/6] ath9k: enable DFS pulse detection Zefir Kurtisi 2011-10-03 10:29 ` [ath9k-devel] " Zefir Kurtisi 2011-10-03 18:27 ` Luis R. Rodriguez 2011-10-03 18:27 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-03 19:24 ` Christian Lamparter 2011-10-03 19:24 ` [ath9k-devel] " Christian Lamparter 2011-10-03 19:31 ` Luis R. Rodriguez 2011-10-03 19:31 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-04 13:38 ` Christian Lamparter 2011-10-04 13:38 ` [ath9k-devel] " Christian Lamparter 2011-10-04 14:17 ` Zefir Kurtisi 2011-10-04 14:17 ` [ath9k-devel] " Zefir Kurtisi 2011-10-04 14:34 ` Adrian Chadd 2011-10-04 14:34 ` [ath9k-devel] " Adrian Chadd 2011-10-05 22:31 ` Luis R. Rodriguez 2011-10-05 22:31 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-05 22:53 ` Peter Stuge 2011-10-05 23:02 ` Luis R. Rodriguez 2011-10-04 14:42 ` Christian Lamparter 2011-10-04 14:42 ` [ath9k-devel] " Christian Lamparter 2011-10-04 14:50 ` Adrian Chadd 2011-10-04 14:50 ` [ath9k-devel] " Adrian Chadd 2011-10-04 15:26 ` Christian Lamparter 2011-10-04 15:26 ` [ath9k-devel] " Christian Lamparter 2011-10-04 15:57 ` Adrian Chadd 2011-10-04 15:57 ` [ath9k-devel] " Adrian Chadd 2011-10-04 16:42 ` Christian Lamparter 2011-10-04 16:42 ` [ath9k-devel] " Christian Lamparter 2011-10-04 17:03 ` Adrian Chadd 2011-10-04 17:03 ` [ath9k-devel] " Adrian Chadd 2011-10-04 17:49 ` Christian Lamparter 2011-10-04 17:49 ` [ath9k-devel] " Christian Lamparter 2011-10-05 22:37 ` Luis R. Rodriguez 2011-10-05 22:37 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-04 16:26 ` Zefir Kurtisi 2011-10-04 16:26 ` [ath9k-devel] " Zefir Kurtisi 2011-10-05 22:30 ` Luis R. Rodriguez 2011-10-05 22:30 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-05 22:27 ` Luis R. Rodriguez 2011-10-05 22:27 ` Luis R. Rodriguez 2011-10-06 16:49 ` Christian Lamparter 2011-10-06 16:49 ` Christian Lamparter 2011-10-06 18:36 ` Luis R. Rodriguez 2011-10-06 18:36 ` Luis R. Rodriguez 2011-10-06 18:41 ` Luis R. Rodriguez 2011-10-06 18:41 ` Luis R. Rodriguez 2011-10-06 20:32 ` Zefir Kurtisi 2011-10-06 20:32 ` Zefir Kurtisi 2011-10-06 20:41 ` Luis R. Rodriguez 2011-10-06 20:41 ` Luis R. Rodriguez 2011-10-06 21:08 ` Zefir Kurtisi 2011-10-06 21:08 ` Zefir Kurtisi 2011-10-06 21:12 ` Luis R. Rodriguez 2011-10-06 21:12 ` Luis R. Rodriguez 2011-10-07 3:06 ` Adrian Chadd 2011-10-07 3:06 ` Adrian Chadd 2011-10-07 7:54 ` Luis R. Rodriguez 2011-10-07 7:54 ` Luis R. Rodriguez 2011-10-07 8:48 ` Zefir Kurtisi 2011-10-07 8:48 ` Zefir Kurtisi 2011-10-07 11:43 ` Adrian Chadd 2011-10-07 11:43 ` Adrian Chadd 2011-10-04 10:11 ` Zefir Kurtisi 2011-10-04 10:11 ` [ath9k-devel] " Zefir Kurtisi 2011-10-05 22:23 ` Luis R. Rodriguez 2011-10-05 22:23 ` [ath9k-devel] " Luis R. Rodriguez 2011-10-03 10:29 ` Zefir Kurtisi [this message] 2011-10-03 10:29 ` [ath9k-devel] [RFC 6/6] ath9k: handle pulse data reported by DFS HW Zefir Kurtisi 2011-10-03 18:30 ` Luis R. Rodriguez 2011-10-03 18:30 ` [ath9k-devel] " Luis R. Rodriguez
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1317637758-11907-7-git-send-email-zefir.kurtisi@neratec.com \ --to=zefir.kurtisi@neratec.com \ --cc=ath9k-devel@lists.ath9k.org \ --cc=kgiori@qca.qualcomm.com \ --cc=linux-wireless@vger.kernel.org \ --cc=nbd@openwrt.org \ --cc=rodrigue@qca.qualcomm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.