Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-28 Thread Nick Kossifidis
2012/7/26 Thomas Huehn : > Hi Nick, > > Nick Kossifidis schrieb: > >> I think this is a better approach (I'll prepare a proper patch as soon >> as I have some bandwidth to work with wireless-testing, maybe >> tomorrow)... >> >> --- old/phy.c 2012-07-26 20:40:00.869150187 +0300 >> +++ new/phy.c 2012

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-26 Thread Thomas Huehn
Hi Nick, Nick Kossifidis schrieb: > I think this is a better approach (I'll prepare a proper patch as soon > as I have some bandwidth to work with wireless-testing, maybe > tomorrow)... > > --- old/phy.c 2012-07-26 20:40:00.869150187 +0300 > +++ new/phy.c 2012-07-26 20:43:25.074710577 +0300 > @@

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-26 Thread Nick Kossifidis
2012/7/26 Felix Fietkau : > On 2012-07-26 12:31 PM, Nick Kossifidis wrote: >> 2012/7/26 Felix Fietkau : >>> On 2012-07-26 12:20 PM, Nick Kossifidis wrote: 2012/7/26 Thomas Huehn : > Hi Nick, > > Nick Kossifidis schrieb: > >> 2012/7/26 Thomas Huehn : > >> There is no

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-26 Thread Felix Fietkau
On 2012-07-26 12:31 PM, Nick Kossifidis wrote: > 2012/7/26 Felix Fietkau : >> On 2012-07-26 12:20 PM, Nick Kossifidis wrote: >>> 2012/7/26 Thomas Huehn : Hi Nick, Nick Kossifidis schrieb: > 2012/7/26 Thomas Huehn : > There is nothing in your patch that suggests that

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-26 Thread Nick Kossifidis
2012/7/26 Felix Fietkau : > On 2012-07-26 12:20 PM, Nick Kossifidis wrote: >> 2012/7/26 Thomas Huehn : >>> Hi Nick, >>> >>> Nick Kossifidis schrieb: >>> 2012/7/26 Thomas Huehn : >>> There is nothing in your patch that suggests that's related to this. Anyway there's a simple way to fi

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-26 Thread Felix Fietkau
On 2012-07-26 12:20 PM, Nick Kossifidis wrote: > 2012/7/26 Thomas Huehn : >> Hi Nick, >> >> Nick Kossifidis schrieb: >> >>> 2012/7/26 Thomas Huehn : >> >>> There is nothing in your patch that suggests that's related to this. >>> Anyway there's a simple way to fix this: >>> >>> Just move this: >>> >

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-26 Thread Nick Kossifidis
2012/7/26 Thomas Huehn : > Hi Nick, > > Nick Kossifidis schrieb: > >> 2012/7/26 Thomas Huehn : > >> There is nothing in your patch that suggests that's related to this. >> Anyway there's a simple way to fix this: >> >> Just move this: >> >> 3575 /* Min/max in 0.25dB units */ >> 3576

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-25 Thread Thomas Huehn
Hi Nick, Nick Kossifidis schrieb: > 2012/7/26 Thomas Huehn : > There is nothing in your patch that suggests that's related to this. > Anyway there's a simple way to fix this: > > Just move this: > > 3575 /* Min/max in 0.25dB units */ > 3576 ah->ah_txpower.txp_min_pwr = 2 * rate

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-25 Thread Nick Kossifidis
2012/7/26 Thomas Huehn : > Hi Nick, > > Nick Kossifidis schrieb: > >> 2012/7/23 Thomas Huehn : >>> In such cases where phy_init() function got called, tx_power is always >>> set to ah->ah_txpower.txp_cur_pwr which is never updated with txpower >>> specified by the user instead it equale max chan po

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-25 Thread Thomas Huehn
Hi Nick, Nick Kossifidis schrieb: > 2012/7/23 Thomas Huehn : >> In such cases where phy_init() function got called, tx_power is always >> set to ah->ah_txpower.txp_cur_pwr which is never updated with txpower >> specified by the user instead it equale max chan power and got >> potentially incremen

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-25 Thread Nick Kossifidis
2012/7/23 Thomas Huehn : > In such cases where phy_init() function got called, tx_power is always > set to ah->ah_txpower.txp_cur_pwr which is never updated with txpower > specified by the user instead it equale max chan power and got > potentially incremented by ah_txpower.txp_offset. Never updat

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-23 Thread Bob Copeland
On Mon, Jul 23, 2012 at 08:25:26PM +0200, Thomas Huehn wrote: > > Did this / 2 move elsewhere or was it wrong before? Is txp_cur_pwr still > > used for anything? > > the "/2" is not needed anymore as I also skipped the "*2" in > ath5k_hw_set_txpower_limit .. so I avoid this calculations. > > Fel

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-23 Thread Thomas Huehn
Hi all, After applying this 2 patches I got the following eeprom read on an Wistron CM9: [ 38.88] ath5k: phy0: [bluse ath5k_eeprom] rate_pcal_info[0].freq = 4920, rate[0].target_power_6to24 = 36, rate[0].target_power_36 = 32, rate[0].target_power_48 = 28, rate[0].target_power_54 = 24 [ 38

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-23 Thread Thomas Huehn
Hi Bob, Bob Copeland schrieb: > On Mon, Jul 23, 2012 at 06:01:15PM +0200, Thomas Huehn wrote: >> /* Setup rate power table */ >> -ath5k_setup_rate_powertable(ah, txpower, &rate_info, ee_mode); >> +ath5k_setup_rate_powertable(ah, ah->ah_txpower.txp_user_pwr, >> &rate_info, ee_mode);

Re: [ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-23 Thread Bob Copeland
On Mon, Jul 23, 2012 at 06:01:15PM +0200, Thomas Huehn wrote: > /* Setup rate power table */ > - ath5k_setup_rate_powertable(ah, txpower, &rate_info, ee_mode); > + ath5k_setup_rate_powertable(ah, ah->ah_txpower.txp_user_pwr, > &rate_info, ee_mode); txpower used to be .5 dB units --

[ath5k-devel] [PATCH 2/2] ath5k: fix phy_init() to respect user txpower changes

2012-07-23 Thread Thomas Huehn
In such cases where phy_init() function got called, tx_power is always set to ah->ah_txpower.txp_cur_pwr which is never updated with txpower specified by the user instead it equale max chan power and got potentially incremented by ah_txpower.txp_offset. In any case the card was switching to a txpow