linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Adrian Chadd <adrian@freebsd.org>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	mcgrof@qca.qualcomm.com
Subject: Re: [PATCH 3.8 2/3] ath9k_hw: fix chain swap setting when setting rx chainmask to 5
Date: Sun, 20 Jan 2013 23:31:43 +0100	[thread overview]
Message-ID: <50FC704F.5010706@openwrt.org> (raw)
In-Reply-To: <CAJ-Vmontz33Fzx5_=D=LDFoWEkmWSO5iku3aiv5S+gQJCDD3og@mail.gmail.com>

On 2013-01-20 11:05 PM, Adrian Chadd wrote:
> Hiya,
> 
> What's the motivation behind this?
> 
> The reason why the PHY analog swapping is done when the chainmask set
> to 0x5 is because pre-AR9280 chips didn't support arbitrary chainmask
> configurations for TX.
> So it could either be 0x1, 0x3, or 0x7.
>
> The AR5416 2-TX 3-TX reference design has TX antenna on chain 0 and 2
> (hence 0x5, as you know), so:
> 
> * One should never be allowed to configure a TX chainmask enabling
> chain 1, as that plain won't work (there's no actual TX bits on the
> card itself; it only has the RX related switch/amp/etc);
> * If the chainmask is set to 0x3 or 0x5 on a device that has 3 TX
> chains (ie, anything AR93xx and later with 3 chains and 3 TX capable
> switches/amplifiers on the NIC itself) then _strictly speaking_ I
> don't think it's necessary to do the analog swap, but that's when
> you'd do it.
The analog swapping was already there, I just changed it from being
enabled based on the runtime chainmask to being enabled based on the
EEPROM chainmask. I don't know if the analog swapping is still necessary
or not, but I think it should not be enabled on a 3x3 card when
disabling chain 1.

> The AR9130 and AR9160 have the same limitation. The AR9280 and later
> don't, but the AR92xx chips are one or two chain, so this doesn't
> (strictly speaking) need to happen.
> 
> For FreeBSD, I'm going to add code to enforce that the configured
> chainmask doesn't conflict with the EEPROM chainmask, in case people
> try to do stupid things.
The code in ath9k already does that when it calculates the runtime
chainmask from the user's antenna selection, the user does not set the
chainmask directly.

- Felix

  reply	other threads:[~2013-01-20 22:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 20:55 [PATCH 3.8 1/3] ath9k_hw: fix calibration issues on chainmask that don't include chain 0 Felix Fietkau
2013-01-20 20:55 ` [PATCH 3.8 2/3] ath9k_hw: fix chain swap setting when setting rx chainmask to 5 Felix Fietkau
2013-01-20 20:55   ` [PATCH 3.8 3/3] ath9k: allow setting arbitrary antenna masks on AR9003+ Felix Fietkau
2013-01-20 22:05   ` [PATCH 3.8 2/3] ath9k_hw: fix chain swap setting when setting rx chainmask to 5 Adrian Chadd
2013-01-20 22:31     ` Felix Fietkau [this message]
2013-03-07 14:31 ` [PATCH 3.8 1/3] ath9k_hw: fix calibration issues on chainmask that don't include chain 0 Wojciech Dubowik
2013-03-07 14:59   ` Felix Fietkau
2013-03-07 15:46     ` Wojciech Dubowik
2013-03-08  7:44       ` Wojciech Dubowik
2013-03-08  9:46         ` Wojciech Dubowik
2013-03-08 12:42           ` Felix Fietkau
2013-03-11  6:25             ` Wojciech Dubowik
2013-03-11  9:43               ` Wojciech Dubowik
2013-03-15  0:01                 ` Felix Fietkau
2013-03-15  1:32                   ` Felix Fietkau
2013-03-15  7:06                     ` Wojciech Dubowik
2013-03-08 20:34       ` John W. Linville
2013-03-11  6:29         ` Wojciech Dubowik

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=50FC704F.5010706@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=adrian@freebsd.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).