linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
To: Nick Kossifidis <mickflemm@gmail.com>, Felix Fietkau <nbd@openwrt.org>
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
	jirislaby@gmail.com, linville@tuxdriver.com
Subject: Re: [ath5k-devel] [PATCH v2 5/5] ath5k: Return correct offset when reading frequencies
Date: Wed, 08 Aug 2012 18:55:34 +0200	[thread overview]
Message-ID: <50229A06.9090106@net.t-labs.tu-berlin.de> (raw)
In-Reply-To: <1344195337-27461-6-git-send-email-mickflemm@gmail.com>

Hi Nick, hi Felix,

This patch does break the operation of all DCMA82 (AR5413), as this
chips have only 8 valid piers, but with the "continue" all 10 got read.
So the former version was correct as it break after 8 piers.
The patch was initiated by my observation and after revisiting what I
did, blame Thomas is correct here... The power variation is properly
working and I miss measured based on an uncleaned patch mess in my env.

Please revert this patch to get proper pier readings back in ath5k.


Greetings Thomas


Nick Kossifidis schrieb:

> If we have a zeroed frequency on the calibration piers it means that we
> shouldn't use that pier, not stop reading the EEPROM and break out from
> the loop. By doing that we return the wrong offset and the whole dataset
> gets corrupted.
> 
> Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
> Tested-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
> ---
>  drivers/net/wireless/ath/ath5k/eeprom.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
> index 4026c90..10a4396 100644
> --- a/drivers/net/wireless/ath/ath5k/eeprom.c
> +++ b/drivers/net/wireless/ath/ath5k/eeprom.c
> @@ -522,7 +522,7 @@ ath5k_eeprom_read_freq_list(struct ath5k_hw *ah, int *offset, int max,
>  
>  		freq1 = val & 0xff;
>  		if (!freq1)
> -			break;
> +			continue;
>  
>  		pc[i++].freq = ath5k_eeprom_bin2freq(ee,
>  				freq1, mode);
> @@ -530,7 +530,7 @@ ath5k_eeprom_read_freq_list(struct ath5k_hw *ah, int *offset, int max,
>  
>  		freq2 = (val >> 8) & 0xff;
>  		if (!freq2)
> -			break;
> +			continue;
>  
>  		pc[i++].freq = ath5k_eeprom_bin2freq(ee,
>  				freq2, mode);


  reply	other threads:[~2012-08-08 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 19:35 [PATCH v2 0/5] ath5k: Various tx power fixes Nick Kossifidis
2012-08-05 19:35 ` [PATCH v2 1/5] ath5k: Use correct value for min_pwr and cur_pwr Nick Kossifidis
2012-08-05 19:35 ` [PATCH v2 2/5] ath5k: Fix range scaling when setting rate power table Nick Kossifidis
2012-08-05 19:35 ` [PATCH v2 3/5] ath5k: Preserve tx power level requested from above on phy_init Nick Kossifidis
2012-08-05 19:35 ` [PATCH v2 4/5] ath5k: Put power_level where it belongs and rename it Nick Kossifidis
2012-08-05 19:35 ` [PATCH v2 5/5] ath5k: Return correct offset when reading frequencies Nick Kossifidis
2012-08-08 16:55   ` Thomas Huehn [this message]
2012-08-08 17:56     ` [ath5k-devel] " Nick Kossifidis

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=50229A06.9090106@net.t-labs.tu-berlin.de \
    --to=thomas@net.t-labs.tu-berlin.de \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mickflemm@gmail.com \
    --cc=nbd@openwrt.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 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).