From: Simon Wunderlich <sw@simonwunderlich.de>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: mathias.kretschmer@fokus.fraunhofer.de, kgiori@qca.qualcomm.com,
linux-wireless@vger.kernel.org, sven@narfation.org,
ath10k@lists.infradead.org
Subject: Re: [PATCHv2 2/2] ath10k: add spectral scan feature
Date: Wed, 23 Jul 2014 18:40:22 +0200 [thread overview]
Message-ID: <201407231840.22674.sw@simonwunderlich.de> (raw)
In-Reply-To: <8738dst4o6.fsf@kamboji.qca.qualcomm.com>
Hey Kalle,
> Simon Wunderlich <sw@simonwunderlich.de> writes:
> >> > +struct fft_sample_ath10k {
> >> > + struct fft_sample_tlv tlv;
> >> > + u8 chan_width_mhz;
> >> > + __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 max_exp;
> >> > +
> >> > + u8 data[0];
> >> > +} __packed;
> >>
> >> __be16, that's a first. Just making sure that this really is big endian?
> >
> > As the __le32 you use in other ath10k structs, this is just for checking
> > - at least sparse should check that, maybe other tools as well.
>
> Sorry, I didn't understand your comment here. But basically I was asking
> is the fft sample really in big endian? I assume it would be little
> endian as everything else coming from the firmware.
Yeah that is intended - we are also using big endian in ath9k to send fft
samples to userspace, because that is the network byte order and we then just
use ntohs() and friends in userspace to read samples from any system.
Therefore we intent to use the same encoding in ath10k. :)
Cheers,
Simon
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Simon Wunderlich <sw@simonwunderlich.de>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: ath10k@lists.infradead.org,
mathias.kretschmer@fokus.fraunhofer.de, kgiori@qca.qualcomm.com,
linux-wireless@vger.kernel.org, sven@narfation.org
Subject: Re: [PATCHv2 2/2] ath10k: add spectral scan feature
Date: Wed, 23 Jul 2014 18:40:22 +0200 [thread overview]
Message-ID: <201407231840.22674.sw@simonwunderlich.de> (raw)
In-Reply-To: <8738dst4o6.fsf@kamboji.qca.qualcomm.com>
Hey Kalle,
> Simon Wunderlich <sw@simonwunderlich.de> writes:
> >> > +struct fft_sample_ath10k {
> >> > + struct fft_sample_tlv tlv;
> >> > + u8 chan_width_mhz;
> >> > + __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 max_exp;
> >> > +
> >> > + u8 data[0];
> >> > +} __packed;
> >>
> >> __be16, that's a first. Just making sure that this really is big endian?
> >
> > As the __le32 you use in other ath10k structs, this is just for checking
> > - at least sparse should check that, maybe other tools as well.
>
> Sorry, I didn't understand your comment here. But basically I was asking
> is the fft sample really in big endian? I assume it would be little
> endian as everything else coming from the firmware.
Yeah that is intended - we are also using big endian in ath9k to send fft
samples to userspace, because that is the network byte order and we then just
use ntohs() and friends in userspace to read samples from any system.
Therefore we intent to use the same encoding in ath10k. :)
Cheers,
Simon
next prev parent reply other threads:[~2014-07-23 16:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 12:32 [PATCHv2 0/2] ath10k spectral scan support Simon Wunderlich
2014-07-21 12:32 ` Simon Wunderlich
2014-07-21 12:32 ` [PATCHv2 1/2] ath: Move spectral debugfs structs to shared header Simon Wunderlich
2014-07-21 12:32 ` Simon Wunderlich
2014-07-21 12:32 ` [PATCHv2 2/2] ath10k: add spectral scan feature Simon Wunderlich
2014-07-21 12:32 ` Simon Wunderlich
2014-07-21 18:35 ` Kalle Valo
2014-07-21 18:35 ` Kalle Valo
2014-07-21 19:02 ` Sven Eckelmann
2014-07-21 19:02 ` Sven Eckelmann
2014-07-22 8:07 ` Michal Kazior
2014-07-22 8:07 ` Michal Kazior
2014-07-22 18:27 ` Kalle Valo
2014-07-22 18:27 ` Kalle Valo
2014-07-23 15:12 ` Simon Wunderlich
2014-07-23 15:12 ` Simon Wunderlich
2014-07-23 16:34 ` Kalle Valo
2014-07-23 16:34 ` Kalle Valo
2014-07-23 16:40 ` Simon Wunderlich [this message]
2014-07-23 16:40 ` Simon Wunderlich
2014-07-23 16:44 ` Kalle Valo
2014-07-23 16:44 ` Kalle Valo
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=201407231840.22674.sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=ath10k@lists.infradead.org \
--cc=kgiori@qca.qualcomm.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=sven@narfation.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.