linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org,
	rodrigue@qca.qualcomm.com
Subject: Re: [RFC v2 2/2] ath9k: integrate initial DFS module
Date: Thu, 03 Nov 2011 16:11:50 +0100	[thread overview]
Message-ID: <4EB2AF36.9070608@openwrt.org> (raw)
In-Reply-To: <1320328553-28066-3-git-send-email-zefir.kurtisi@neratec.com>

On 2011-11-03 2:55 PM, Zefir Kurtisi wrote:
> This patch integrates the DFS module into ath9k, including
>   * building the module into ath9k_hw
>   * setting up DFS debugfs
>   * defining HW capability flag for DFS support
>   * setting this flag by DFS supporting devices
>     (so far: AR_SREV_9280_20_OR_LATER, TBC)
>   * setting PHYRADAR rx filter flag to enable radar
>     pulse reporting
>   * forward radar PHY errors to dfs module
>
> This is WIP and at its current stage is limited to test ath9k
> pulse detection capabilities. The DFS pattern matching is
> TBD in the higher layers and is not part of this patch.
>
> CONFIG_ATH9K_DFS must be set to enable pulse detection.
>
> Signed-off-by: Zefir Kurtisi<zefir.kurtisi@neratec.com>
> ---
>   drivers/net/wireless/ath/ath9k/Makefile |    2 ++
>   drivers/net/wireless/ath/ath9k/debug.c  |    3 +++
>   drivers/net/wireless/ath/ath9k/debug.h  |    2 ++
>   drivers/net/wireless/ath/ath9k/hw.c     |   12 ++++++++++++
>   drivers/net/wireless/ath/ath9k/hw.h     |    1 +
>   drivers/net/wireless/ath/ath9k/main.c   |   17 +++++++++++++++++
>   drivers/net/wireless/ath/ath9k/recv.c   |   18 +++++++++++++-----
>   7 files changed, 50 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index d3b92ce..4d70aab 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -305,6 +305,23 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
>   		ath9k_hw_antdiv_comb_conf_set(ah,&div_ant_conf);
>   	}
>
> +	if (ah->caps.hw_caps&&  ATH9K_HW_CAP_DFS) {
> +		/**
> +		 * enable radar pulse detection
> +		 *
> +		 * TODO: do this only for DFS channels
> +		 */
> +		ah->private_ops.set_radar_params(ah,&ah->radar_conf);
> +		ath9k_hw_setrxfilter(ah,
> +			ath9k_hw_getrxfilter(ah) | ATH9K_RX_FILTER_PHYRADAR);
> +		ath_dbg(common, ATH_DBG_DFS,
> +			"DFS radar detection enabled for channel %d\n",
> +			ah->curchan->channel);
> +	} else {
> +		ath9k_hw_setrxfilter(ah,
> +			ath9k_hw_getrxfilter(ah)&  ~ATH9K_RX_FILTER_PHYRADAR);
> +	}
> +
Please drop this chunk of code and move the check to ath_calcrxfilter, 
which gets called after every reset anyway. Also, use a separate flag in 
sc->flags for actually enabling DFS. Even if the chip has DFS support, 
we don't always want to enable it - especially not on 2.4 GHz or indoor 
5 GHz channels.

- Felix


  reply	other threads:[~2011-11-03 15:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 13:55 [RFC v2 0/2] ath9k: DFS radar detection Zefir Kurtisi
2011-11-03 13:55 ` [RFC v2 1/2] ath9k: add DFS radar pulse processing Zefir Kurtisi
2011-11-03 15:54   ` Mohammed Shafi
2011-11-03 16:25     ` Zefir Kurtisi
2011-11-03 15:56   ` Mohammed Shafi
2011-11-03 16:26     ` Zefir Kurtisi
2011-11-03 13:55 ` [RFC v2 2/2] ath9k: integrate initial DFS module Zefir Kurtisi
2011-11-03 15:11   ` Felix Fietkau [this message]
2011-11-03 18:01     ` Zefir Kurtisi
2011-11-03 18:15       ` Felix Fietkau
2011-11-03 15:27   ` Mohammed Shafi
2011-11-03 16:45     ` Zefir Kurtisi
2011-11-03 16:57       ` Mohammed Shafi
2011-11-03 15:51   ` Christian Lamparter
2011-11-03 17:25     ` Zefir Kurtisi
2011-11-03 17:30       ` Felix Fietkau
2011-11-03 17:46         ` Zefir Kurtisi
2011-11-04  3:00       ` [ath9k-devel] " Peter Stuge
2011-11-04  9:47         ` Zefir Kurtisi

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=4EB2AF36.9070608@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rodrigue@qca.qualcomm.com \
    --cc=zefir.kurtisi@neratec.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).