linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: "Pan, Miaoqing" <miaoqing@qti.qualcomm.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath9k-devel <ath9k-devel@qca.qualcomm.com>,
	"Valo, Kalle" <kvalo@qca.qualcomm.com>
Subject: Re: [PATCH v2] ath9k: export HW random number generator
Date: Tue, 07 Jul 2015 09:08:44 +0200	[thread overview]
Message-ID: <559B7AFC.3040202@openwrt.org> (raw)
In-Reply-To: <262dbfcff3564c4ba2025f9fde11e8e2@NASANEXM01E.na.qualcomm.com>

On 2015-07-07 07:07, Pan, Miaoqing wrote:
> AR_PHY_TST_ADC is BB ADC sample register, it doesn't depend on other
> BB registers. Get non zero data if it has the ADC values.
This is completely wrong!

AR_PHY_TST_ADC is a generic observation register which can be configured
to observe multiple points in the rx path.
I did my own experiments with sampling raw I/Q values from the ADC, and
you can find my patch here:

http://git.openwrt.org/?p=openwrt.git;a=blob_plain;f=package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch

It right now uses only the lowest bits (they are the hardest to control
from the outside).

Through extensive testing (not just by me, but also by many people in
the OpenWrt community), I found that leaving the AR_PHY_TST_ADC register
configured for raw I/Q samples causes the radio to become unstable on
AR5008-AR9002. That's why my patch currently only gathers some data at
driver init time.
By the way, on AR5008-AR9002 this register is in a different location
than AR9003, something your patch also needs to take into account.

You should also make sure that the radio is actually configured to a
channel (and active!) before gathering data.

When you rework your patch, please carefully review the documentation
for the fields rx_obs_sel and cf_bbb_obs_sel before you change the code
again.

- Felix

  reply	other threads:[~2015-07-07  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03  8:28 [PATCH v2] ath9k: export HW random number generator miaoqing
2015-07-06 10:31 ` Felix Fietkau
2015-07-07  5:07   ` Pan, Miaoqing
2015-07-07  7:08     ` Felix Fietkau [this message]
2015-07-07  9:20       ` Pan, Miaoqing

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=559B7AFC.3040202@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=miaoqing@qti.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;
as well as URLs for NNTP newsgroup(s).