From: Christian Lamparter <chunkeey@googlemail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Felix Fietkau <nbd@openwrt.org>,
linux-wireless@vger.kernel.org, linville@tuxdriver.com,
lrodriguez@atheros.com, vasanth@atheros.com
Subject: Re: [PATCH v2 5/7] ath9k_hw: fix PA predistortion training power selection
Date: Mon, 13 Dec 2010 12:28:48 +0100 [thread overview]
Message-ID: <201012131228.49202.chunkeey@googlemail.com> (raw)
In-Reply-To: <1292235614.3539.14.camel@jlt3.sipsolutions.net>
On Monday 13 December 2010 11:20:14 Johannes Berg wrote:
> On Mon, 2010-12-13 at 11:52 +0100, Christian Lamparter wrote:
>
> > > + return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
> > > +}
> > > +
> > I think there's a generic library function for that:
> > hweight[8|16|32].
>
> but note the !!, which makes this return 0, 1, 2 or 3 only, not the bit
> weight.
>
what?
the "Hamming weight/Population count" returns the
number of symbols that are different from the zero-symbol.
e.g.: The Hamming weight of 0x800000000000000000000000000000000
is just "1".
Furthermore, if tx_chainmask contains now more than just the available
tx_chains, then they can always mask the hweight* input with:
AR9300_ANT_CHAIN_MASK (for 3x3) or
AR9300_ANT_COMMON_MASK (for future 4x4)
Regards,
Chr
prev parent reply other threads:[~2010-12-13 10:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 7:40 [PATCH v2 1/7] ath9k_hw: initialize ah->slottime Felix Fietkau
2010-12-13 7:40 ` [PATCH v2 2/7] ath9k_hw: fix the slot time setting for long distance links Felix Fietkau
2010-12-13 7:40 ` [PATCH v2 3/7] ath9k: fix PA predistortion thermal measurement handling Felix Fietkau
2010-12-13 7:40 ` [PATCH v2 4/7] ath9k_hw: fix the PA predistortion rate mask Felix Fietkau
2010-12-13 7:40 ` [PATCH v2 5/7] ath9k_hw: fix PA predistortion training power selection Felix Fietkau
2010-12-13 7:40 ` [PATCH v2 6/7] ath9k_hw: update AR9003 initvals for improved radar detection Felix Fietkau
2010-12-13 7:40 ` [PATCH v2 7/7] ath9k_hw: update AR9003 initvals to improve carrier leak calibration/correction Felix Fietkau
2010-12-13 10:52 ` [PATCH v2 5/7] ath9k_hw: fix PA predistortion training power selection Christian Lamparter
2010-12-13 10:20 ` Johannes Berg
2010-12-13 11:28 ` Christian Lamparter [this message]
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=201012131228.49202.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=nbd@openwrt.org \
--cc=vasanth@atheros.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).