All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [RFC 3/3] ath9k: add spectral scan feature
Date: Wed, 05 Dec 2012 12:38:18 +0100	[thread overview]
Message-ID: <50BF322A.900@openwrt.org> (raw)
In-Reply-To: <20121205104008.GA29382@pandem0nium>

On 2012-12-05 11:40 AM, Simon Wunderlich wrote:
>> I suggest experimenting around with those particular parameters. You
>> should be able to coax out specific numbers of spectral scan events
>> when you set the COUNT parameter to something other than 8. But
>> polling that bit isn't needed. It should be asynchronous.
> 
> As I said, on AR9220 it appears I get 8 samples when doing setting 
> AR_PHY_SPECTRAL_SCAN_COUNT to 8 (plus maybe some other "stuff"/non-samples).
> On AR9380 I'm not so sure. Probably need to play with it a little
> more. Also, I don't know what "SHORT REPEAT" is supposed to mean, etc.
> 
> About polling, you mean the SCAN_ACTIVE bit? It is probably only
> needed when I want to trigger for few samples and want to be informed when
> it's finished -  which is a good thing when doing spectral scan (change channel,
> start and wait for samples, change again). But we probably don't need to wait
> for the "background spectral scanning" mode, that's right. If someone wants
> to implement detection for interfering radio users, that mode would be useful.
> I don't need it, but can prepare the neccesary functions.
> 
> So I'd repost then:
>  * ath9k/debugfs only patch for now, as Johannes suggested - I think we
>    should concentrate on this for now (their are still a lot of open
>    questions in my initial mail regarding sample interpretation etc)
>  * split commands into enable/disable/configure/trigger
>  * maybe add some defines for magic values (if I find any)
> 
> I'd like this patchset to make the graphical spectral scan possible (as
> a Ubiquiti Airview), and give others the opportunity to add own features
> (pattern matching etc) on top of it. However I (currently) don't plan to
> do the latter myself.
How about using relay (Documentation/filesystems/relay.txt) to stream
sample data to user space via the debugfs file?
That way you don't have to keep a linked list of small struct fft_sample
buffers in the kernel and you can stream much more data efficiently with
little kernel side overhead.
It also makes pushing the streaming data to a network socket via
sendfile much more efficient.

- Felix

WARNING: multiple messages have this Message-ID (diff)
From: Felix Fietkau <nbd@openwrt.org>
To: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Cc: Adrian Chadd <adrian@freebsd.org>,
	linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	johannes@sipsolutions.net, ath9k-devel@lists.ath9k.org,
	rodrigue@qca.qualcomm.com, zefir.kurtisi@neratec.com,
	kgiori@qca.qualcomm.com, mathias.kretschmer@fokus.fraunhofer.de,
	Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Subject: Re: [RFC 3/3] ath9k: add spectral scan feature
Date: Wed, 05 Dec 2012 12:38:18 +0100	[thread overview]
Message-ID: <50BF322A.900@openwrt.org> (raw)
In-Reply-To: <20121205104008.GA29382@pandem0nium>

On 2012-12-05 11:40 AM, Simon Wunderlich wrote:
>> I suggest experimenting around with those particular parameters. You
>> should be able to coax out specific numbers of spectral scan events
>> when you set the COUNT parameter to something other than 8. But
>> polling that bit isn't needed. It should be asynchronous.
> 
> As I said, on AR9220 it appears I get 8 samples when doing setting 
> AR_PHY_SPECTRAL_SCAN_COUNT to 8 (plus maybe some other "stuff"/non-samples).
> On AR9380 I'm not so sure. Probably need to play with it a little
> more. Also, I don't know what "SHORT REPEAT" is supposed to mean, etc.
> 
> About polling, you mean the SCAN_ACTIVE bit? It is probably only
> needed when I want to trigger for few samples and want to be informed when
> it's finished -  which is a good thing when doing spectral scan (change channel,
> start and wait for samples, change again). But we probably don't need to wait
> for the "background spectral scanning" mode, that's right. If someone wants
> to implement detection for interfering radio users, that mode would be useful.
> I don't need it, but can prepare the neccesary functions.
> 
> So I'd repost then:
>  * ath9k/debugfs only patch for now, as Johannes suggested - I think we
>    should concentrate on this for now (their are still a lot of open
>    questions in my initial mail regarding sample interpretation etc)
>  * split commands into enable/disable/configure/trigger
>  * maybe add some defines for magic values (if I find any)
> 
> I'd like this patchset to make the graphical spectral scan possible (as
> a Ubiquiti Airview), and give others the opportunity to add own features
> (pattern matching etc) on top of it. However I (currently) don't plan to
> do the latter myself.
How about using relay (Documentation/filesystems/relay.txt) to stream
sample data to user space via the debugfs file?
That way you don't have to keep a linked list of small struct fft_sample
buffers in the kernel and you can stream much more data efficiently with
little kernel side overhead.
It also makes pushing the streaming data to a network socket via
sendfile much more efficient.

- Felix

  reply	other threads:[~2012-12-05 11:38 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 19:01 [ath9k-devel] [RFC 0/3] Add spectral scan support for Atheros AR92xx/AR93xx Simon Wunderlich
2012-11-27 19:01 ` Simon Wunderlich
2012-11-27 19:01 ` [ath9k-devel] [RFC 1/3] nl80211: add spec scan flag Simon Wunderlich
2012-11-27 19:01   ` Simon Wunderlich
2012-11-28 12:35   ` [ath9k-devel] " Johannes Berg
2012-11-28 12:35     ` Johannes Berg
2012-11-28 12:43     ` [ath9k-devel] " Johannes Berg
2012-11-28 12:43       ` Johannes Berg
2012-11-28 15:19       ` [ath9k-devel] " Simon Wunderlich
2012-11-28 15:19         ` Simon Wunderlich
2012-11-28 15:29         ` [ath9k-devel] " Malinen, Jouni
2012-11-28 15:29           ` Malinen, Jouni
2012-11-28 16:12           ` Simon Wunderlich
2012-11-28 16:12             ` Simon Wunderlich
2012-11-28 16:49             ` Malinen, Jouni
2012-11-28 16:49               ` Malinen, Jouni
2012-11-28 16:57               ` Johannes Berg
2012-11-28 16:57                 ` Johannes Berg
2012-11-28 17:06                 ` Malinen, Jouni
2012-11-28 17:06                   ` Malinen, Jouni
2012-11-28 17:09                   ` Johannes Berg
2012-11-28 17:09                     ` Johannes Berg
2012-11-28 16:26         ` Johannes Berg
2012-11-28 16:26           ` Johannes Berg
2012-11-28 19:39           ` [ath9k-devel] " Simon Wunderlich
2012-11-28 19:39             ` Simon Wunderlich
2012-11-27 19:01 ` [ath9k-devel] [RFC 2/3] mac80211: add spectral_scan function, hook it up in scanning Simon Wunderlich
2012-11-27 19:01   ` Simon Wunderlich
2012-11-27 19:01 ` [ath9k-devel] [RFC 3/3] ath9k: add spectral scan feature Simon Wunderlich
2012-11-27 19:01   ` Simon Wunderlich
2012-12-01  4:00   ` [ath9k-devel] " Adrian Chadd
2012-12-01  4:00     ` Adrian Chadd
2012-12-05 10:40     ` [ath9k-devel] " Simon Wunderlich
2012-12-05 10:40       ` Simon Wunderlich
2012-12-05 11:38       ` Felix Fietkau [this message]
2012-12-05 11:38         ` Felix Fietkau
2012-12-05 12:05         ` [ath9k-devel] " Adrian Chadd
2012-12-05 12:05           ` Adrian Chadd
2012-12-17 20:08           ` [ath9k-devel] " Adrian Chadd
2012-12-17 20:08             ` Adrian Chadd
2012-11-27 19:01 ` [ath9k-devel] [RFC] iw: add spectral scan attribute to scan function Simon Wunderlich
2012-11-27 19:01   ` Simon Wunderlich
2012-11-27 19:16 ` [RFC 0/3] Add spectral scan support for Atheros AR92xx/AR93xx Martin Schleier
2012-11-27 19:49   ` Simon Wunderlich
2012-11-27 20:32     ` Simon Wunderlich
2012-11-27 21:01       ` Jonathan Bither
2012-11-28 10:37         ` Simon Wunderlich

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=50BF322A.900@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@lists.ath9k.org \
    /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 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.