linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Randolf <br1@einfach.org>
To: linville@tuxdriver.com
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Subject: [PATCH 02/13] ath5k: use fixed antenna for tx descriptors
Date: Tue, 09 Mar 2010 16:55:23 +0900	[thread overview]
Message-ID: <20100309075523.30616.63612.stgit@void> (raw)
In-Reply-To: <20100309075124.30616.40896.stgit@void>

when using a fixed antenna we should use the antenna number in all tx
descriptors, otherwise the hardware will sometimes send the frame out on the
other antenna. it seems like the hardware does not always respect the default
antenna and diversity settings (esp.  AR5K_STA_ID1_DEFAULT_ANTENNA).

also i would like to note that antenna diversity does not always work correctly
on 5414 (at least) when only one antenna is connected: for example all frames
might be received on antenna A but still the HW tries to send on antenna B some
times, causing packet loss.

this is both verified with the antenna statistics output of the previous patch
and a spectrum analyzer.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/phy.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 72474c0..ffe253a 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1873,7 +1873,7 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
 		break;
 	case AR5K_ANTMODE_FIXED_A:
 		def_ant = 1;
-		tx_ant = 0;
+		tx_ant = 1;
 		use_def_for_tx = true;
 		update_def_on_tx = false;
 		use_def_for_rts = true;
@@ -1882,7 +1882,7 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
 		break;
 	case AR5K_ANTMODE_FIXED_B:
 		def_ant = 2;
-		tx_ant = 0;
+		tx_ant = 2;
 		use_def_for_tx = true;
 		update_def_on_tx = false;
 		use_def_for_rts = true;


  parent reply	other threads:[~2010-03-09  7:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  7:55 [PATCH 00/13] all my ath5k patches Bruno Randolf
2010-03-09  7:55 ` [PATCH 01/13] ath5k: add antenna statistics and debugfs file for antenna settings Bruno Randolf
2010-03-09 12:15   ` Nick Kossifidis
2010-03-09  7:55 ` Bruno Randolf [this message]
2010-03-09 12:16   ` [PATCH 02/13] ath5k: use fixed antenna for tx descriptors Nick Kossifidis
2010-03-09  7:55 ` [PATCH 03/13] ath5k: preserve antenna settings Bruno Randolf
2010-03-09 12:16   ` Nick Kossifidis
2010-03-09  7:55 ` [PATCH 04/13] ath5k: fix TSF reset Bruno Randolf
2010-03-09 12:17   ` Nick Kossifidis
2010-03-09  7:55 ` [PATCH 05/13] ath5k: remove double opmode definition Bruno Randolf
2010-03-09 12:17   ` Nick Kossifidis
2010-03-09  7:55 ` [PATCH 06/13] ath5k: remove ah_magic Bruno Randolf
2010-03-09 12:18   ` Nick Kossifidis
2010-03-09  7:55 ` [PATCH 07/13] ath5k: remove ah_mac_revision Bruno Randolf
2010-03-09 12:18   ` Nick Kossifidis
2010-03-09  7:55 ` [PATCH 08/13] ath5k: remove ah_gpio_npins Bruno Randolf
2010-03-09 12:19   ` Nick Kossifidis
2010-03-09  7:56 ` [PATCH 09/13] ath5k: add debugfs file frameerrors Bruno Randolf
2010-03-09 12:21   ` Nick Kossifidis
2010-03-09  7:56 ` [PATCH 10/13] ath5k: fix I/Q calibration (for real) Bruno Randolf
2010-03-09 12:22   ` Nick Kossifidis
2010-03-09  7:56 ` [PATCH 11/13] ath5k: read eeprom IQ calibration values correctly for G mode Bruno Randolf
2010-03-09 12:22   ` Nick Kossifidis
2010-03-09  7:56 ` [PATCH 12/13] ath5k: IQ calibration for AR5211 is slightly different Bruno Randolf
2010-03-09 12:23   ` Nick Kossifidis
2010-03-09  7:56 ` [PATCH 13/13] ath5k: Minor EEPROM documentation updates Bruno Randolf
2010-03-09 14:33 ` [PATCH 00/13] all my ath5k patches John W. Linville

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=20100309075523.30616.63612.stgit@void \
    --to=br1@einfach.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).