From: Sven Eckelmann <sven@narfation.org>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Simon Wunderlich <sw@simonwunderlich.de>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
"Giori, Kathy" <kgiori@qca.qualcomm.com>,
Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Subject: Re: [RFC 2/2] ath10k: add spectral scan feature
Date: Wed, 16 Jul 2014 16:35:41 +0200 [thread overview]
Message-ID: <3551054.tVFpeBPdYt@bentobox> (raw)
In-Reply-To: <CA+BoTQm1i2UoTtPBf7Z3QLQDBs_1uXwdG8gYOkP556+a7AqcpQ@mail.gmail.com>
On Wednesday 16 July 2014 11:30:12 Michal Kazior wrote:
> > +static void ath_debug_send_fft_sample(struct ath10k *ar,
> > + struct fft_sample_tlv
> > *fft_sample_tlv) +{
>
> Why ath_debug_... instead of ath10k_debug_.. ?
>
>
> [...]
Will be modified.
>
> > +static int ath_get_spectral_vdevid(struct ath10k *ar)
>
> ath_get_..? Shouldn't this be ath10k_get?
>
> > +{
> > + struct ath10k_vif *arvif;
> > +
> > + if (list_empty(&ar->arvifs))
> > + return -ENODEV;
> > +
> > + arvif = list_first_entry(&ar->arvifs, typeof(*arvif), list);
> > + return arvif->vdev_id;
> > +}
>
> No locks? Access to arvifs must be protected with conf_mutex.
Will be handled by the caller and lockdep_assert will be added to this
function
>
> What happens when an interface is removed without spectral scan being
> stopped?
This is a question for the QCA firmware guys.
> > +int ath10k_spectral_scan_config(struct ath10k *ar, enum spectral_mode
> > mode) +{
> > + int count, ret;
>
> We tend to use `res` in ath10k.
Thanks, will be changed. But actually, I found a lot of ret stuff in the
ath10k code.
[...]
> + ath10k_warn("failed to configure spectral scan: %d\n", ret);
[...]
> "failed to parse phyerr tlv header at byte %d\n", i
[...]
> "failed to parse phyerr tlv payload at byte %d\n", i
[...]
> "failed to parse fft report at byte %d\n", i
[...]
> + ath10k_warn("failed to process fft report: %d\n", res)
Ok, warning messages will be modified.
> > +int ath10k_vdev_spectral_configure(struct ath10k *ar,
> > + const struct wmi_vdev_spectral_configure_arg
> > *arg)
> ath10k_wmi_vdev_spectral_configure
[...]
> > +int ath10k_vdev_spectral_enable(struct ath10k *ar, u32 vdev_id, u32
> > trigger, + u32 enable)
>
> ath10k_wmi_vdev_spectral_enable
Ok, will be renamed.
> [...]
> > +struct wmi_vdev_spectral_configure_arg {
> > + u32 vdev_id;
> > + u32 scan_count;
> > + u32 scan_period;
> > + u32 scan_priority;
> > + u32 scan_fft_size;
> > + u32 scan_gc_ena;
> > + u32 scan_restart_ena;
> > + u32 scan_noise_floor_ref;
> > + u32 scan_init_delay;
> > + u32 scan_nb_tone_thr;
> > + u32 scan_str_bin_thr;
> > + u32 scan_wb_rpt_mode;
> > + u32 scan_rssi_rpt_mode;
> > + u32 scan_rssi_thr;
> > + u32 scan_pwr_format;
> > + u32 scan_rpt_mode;
> > + u32 scan_bin_scale;
> > + u32 scan_dBm_adj;
> > + u32 scan_chn_mask;
>
> Some stuff isn't self-explanatory. I'd love to see some of these
> fields documented to account for possible values (wb_rpt_mode?) and
> units (init_delay?).
Sorry, I got no documentation to anything. So I cannot provide one to you.
Maybe you can get it easier than me.
> [...]
>
> > +struct fft_sample_ath10k_ht20 {
> > + struct fft_sample_tlv tlv;
> > + u8 mhz;
>
> A more suitable name would be "chan_width_mhz" I guess?
Ok,
> > + __be16 freq1;
> > + __be16 freq2;
> > + __be16 noise;
> > + __be16 max_magnitude;
> > + __be16 total_gain_db;
> > + __be16 base_pwr_db;
> > + __be64 tsf;
> > + s8 max_index;
> > + u8 rssi;
> > + u8 relpwr_db;
> > + u8 avgpwr_db;
> > +
> > + u8 data[SPECTRAL_ATH10K_HT20_NUM_BINS];
>
> And as pointed out the size/count of bins is most likely not
> bandwidth-dependant. It's just a matter of resolution configured with
> fft_size + bin_scale. Maybe this should be a variable-sized array?
Ok, bin_scale didn't make a difference in my tests (I've just repeated them).
But 2 ** (fft_size - 1) seems to be relevant. We have to change the format
accordingly.
But currently we don't see any change in the bandwidth (20MHz/40MHz) for the
different bin numbers. This has to be checked later in detail.
Kind regards,
Sven
next prev parent reply other threads:[~2014-07-16 14:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 16:32 [RFC 0/2] ath10k spectral scan support Simon Wunderlich
2014-07-15 16:32 ` [RFC 1/2] ath: Move spectral debugfs structs to shared header Simon Wunderlich
2014-07-15 16:32 ` [RFC 2/2] ath10k: add spectral scan feature Simon Wunderlich
2014-07-16 9:30 ` Michal Kazior
2014-07-16 14:35 ` Sven Eckelmann [this message]
2014-07-17 5:34 ` Michal Kazior
2014-07-16 6:24 ` [RFC 0/2] ath10k spectral scan support Michal Kazior
2014-07-16 8:25 ` Sven Eckelmann
2014-07-16 8:38 ` Simon Wunderlich
2014-07-16 8:56 ` Michal Kazior
2014-07-18 10:26 ` Janusz Dziedzic
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=3551054.tVFpeBPdYt@bentobox \
--to=sven@narfation.org \
--cc=ath10k@lists.infradead.org \
--cc=kgiori@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=michal.kazior@tieto.com \
--cc=sw@simonwunderlich.de \
/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).