From: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
To: Nick Kossifidis <mickflemm@gmail.com>
Cc: jirislaby@gmail.com, johannes.berg@intel.com,
ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
linville@tuxdriver.com, nbd@nbd.name
Subject: Re: [ath5k-devel] [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A
Date: Thu, 26 Jul 2012 00:01:03 +0200 [thread overview]
Message-ID: <50106C9F.3050504@net.t-labs.tu-berlin.de> (raw)
In-Reply-To: <CAFtRNNx+YgGgFp_owGQJcsQVqTuOeWk2J0MwjKMtcUgRq_DF0w@mail.gmail.com>
Hi Nick,
Nick Kossifidis schrieb:
> Thanks for catching this but the bug is elsewhere:
> So guess why the last 2 "invalid" power gain values have the same
> power levels for all rates ? They are for XR mode (they've put it
> there on the eeprom because XR mode also operates at 5GHz) and since
> XR stuff is stripped off Madwifi (at least the public HAL) that's why
> it only reads 8 of the piers.
>
> Now notice that the last 2 readings on your previous post start from a
> different frequency and most important that 5360 < 5825 and that
> makes sense since the idea is to have only 2 points to interpolate
> between them for the whole XR range. So we have 2 frequency "ranges"
> to search, the one is the 11a mode from 4920 to 5825 and the other
> one is for XR mode from 5360 to 5720. When the first range ends the
> other starts.
>
> The bug is here:
>
> ath5k_get_rate_pcal_data:
> 2704 max = ee->ee_rate_target_pwr_num[mode] - 1;
> [...]
> 2713 if (target > rpinfo[max].freq) {
> 2714 idx_l = idx_r = max;
> 2715 goto done;
> 2716 }
>
> So please instead of tweaking the EEPROM code just change
> max = ee->ee_rate_target_pwr_num[mode] - 1;
> to
> max = ee->ee_rate_target_pwr_num[mode] - 3;
> in case of AR5K_MODE_11A
The calibration data for 802.11a in the standard conform mode should
only consider 8 reads from the eeprom, thats why I introduced this new
define... a "-3" is from my view of readability not as traceable.
Any other non standard mode as you mentioned XR as one of, could just
ready its necessary lines of the eeprom ones it get supported in ath5k.
Greetings Thomas
next prev parent reply other threads:[~2012-07-25 22:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 16:01 [PATCH 0/2] ath5k: fixing broken power gain calibration at 5GHz and txpower handling Thomas Huehn
2012-07-23 16:01 ` [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A Thomas Huehn
2012-07-25 18:42 ` Nick Kossifidis
2012-07-25 18:55 ` Felix Fietkau
2012-07-25 22:22 ` Nick Kossifidis
2012-07-25 22:01 ` Thomas Huehn [this message]
2012-07-25 22:31 ` [ath5k-devel] " Nick Kossifidis
2012-08-04 8:14 ` Thomas Huehn
2012-08-04 15:28 ` Nick Kossifidis
2012-08-05 11:06 ` Thomas Huehn
2012-08-05 11:56 ` Nick Kossifidis
2012-08-05 12:37 ` Thomas Huehn
2012-08-05 12:59 ` Nick Kossifidis
2012-08-05 18:26 ` Nick Kossifidis
2012-07-23 16:01 ` [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes Thomas Huehn
2012-07-23 16:42 ` [ath5k-devel] " Bob Copeland
2012-07-23 18:25 ` Thomas Huehn
2012-07-23 18:29 ` Thomas Huehn
2012-07-23 19:20 ` Bob Copeland
2012-07-25 19:22 ` Nick Kossifidis
2012-07-25 23:07 ` Thomas Huehn
2012-07-25 23:23 ` Nick Kossifidis
2012-07-25 23:40 ` [ath5k-devel] " Thomas Huehn
2012-07-26 10:20 ` Nick Kossifidis
2012-07-26 10:28 ` Felix Fietkau
2012-07-26 10:31 ` Nick Kossifidis
2012-07-26 10:41 ` Felix Fietkau
2012-07-26 17:48 ` Nick Kossifidis
2012-07-26 20:56 ` Thomas Huehn
2012-07-28 11:45 ` 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=50106C9F.3050504@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=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mickflemm@gmail.com \
--cc=nbd@nbd.name \
/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).