From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
mcgrof@qca.qualcomm.com, simon.wunderlich@s2003.tu-chemnitz.de
Subject: Re: [RFC] ath9k: add HT40 spectral scan capability
Date: Mon, 30 Sep 2013 18:48:40 +0200 [thread overview]
Message-ID: <20130930164840.GB15780@pandem0nium> (raw)
In-Reply-To: <1380206258-16452-1-git-send-email-lorenzo.bianconi83@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2600 bytes --]
On Thu, Sep 26, 2013 at 04:37:38PM +0200, Lorenzo Bianconi wrote:
> Add spectral scan feature on HT40 channels for ath9k. This patch extends
> previous capability added by Simon Wunderlich
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
> ---
> drivers/net/wireless/ath/ath9k/ath9k.h | 47 +++++++----
> drivers/net/wireless/ath/ath9k/calib.c | 10 +--
> drivers/net/wireless/ath/ath9k/calib.h | 3 +-
> drivers/net/wireless/ath/ath9k/hw.c | 2 +-
> drivers/net/wireless/ath/ath9k/link.c | 3 +-
> drivers/net/wireless/ath/ath9k/recv.c | 142 ++++++++++++++++++++++-----------
> 6 files changed, 139 insertions(+), 68 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
> index 2ee35f6..b44955e 100644
> --- a/drivers/net/wireless/ath/ath9k/ath9k.h
> +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
> @@ -875,32 +875,49 @@ static inline u8 spectral_bitmap_weight(u8 *bins)
> * TODO: this might need rework when switching to nl80211-based
> * interface.
> */
> -enum ath_fft_sample_type {
> - ATH_FFT_SAMPLE_HT20 = 1,
> +enum fft_sample_type {
> + FFT_SAMPLE_HT20 = 1,
> + FFT_SAMPLE_HT20_40,
> };
>
> struct fft_sample_tlv {
> - u8 type; /* see ath_fft_sample */
> + enum fft_sample_type type;
> __be16 length;
> /* type dependent data follows */
> } __packed;
>
> -struct fft_sample_ht20 {
> +struct fft_sample {
> struct fft_sample_tlv tlv;
> -
> - u8 max_exp;
> -
> __be16 freq;
> - s8 rssi;
> - s8 noise;
> -
> - __be16 max_magnitude;
> - u8 max_index;
> - u8 bitmap_weight;
> -
> __be64 tsf;
>
> - u8 data[SPECTRAL_HT20_NUM_BINS];
> + union {
> + struct {
> + s8 rssi;
> + s8 nf;
> +
> + u8 data[SPECTRAL_HT20_NUM_BINS];
> + __be16 max_mag;
> + u8 max_idx;
> + u8 bitmap_w;
> + u8 max_exp;
> + } ht20;
> + struct {
> + s8 lower_rssi;
> + s8 upper_rssi;
> + s8 lower_nf;
> + s8 upper_nf;
> +
> + u8 data[SPECTRAL_HT20_40_NUM_BINS];
> + __be16 lower_max_mag;
> + __be16 upper_max_mag;
> + u8 lower_max_idx;
> + u8 upper_max_idx;
> + u8 lower_bitmap_w;
> + u8 upper_bitmap_w;
> + u8 max_exp;
> + } ht20_40;
> + };
> } __packed;
One more thing: please don't change the format for HT20 - there are already userspace
programs which rely on the order of the parameters as they are now. This is why we have
added the TLVs in the first place - you can just add a new type for HT40 (as you did),
but keep the format of other formats (HT20).
Thanks,
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-09-30 16:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 14:37 [RFC] ath9k: add HT40 spectral scan capability Lorenzo Bianconi
2013-09-30 16:04 ` Simon Wunderlich
2013-09-30 16:19 ` Lorenzo Bianconi
2013-09-30 16:48 ` Simon Wunderlich [this message]
2013-09-30 21:11 ` Luis R. Rodriguez
2013-09-30 21:25 ` Lorenzo Bianconi
2013-09-30 21:47 ` Luis R. Rodriguez
2013-09-30 22:01 ` Lorenzo Bianconi
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=20130930164840.GB15780@pandem0nium \
--to=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lorenzo.bianconi83@gmail.com \
--cc=mcgrof@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: 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