[ath5k-devel] [PATCH v4] ath5k: make use of the new rate control API

2013-06-11 Thread Thomas Huehn
This patch enabels ath5k to use the new rate table to lookup each mrr rate and retry information per packet. Signed-off-by: Benjamin Vahl Signed-off-by: Thomas Huehn --- check for size mismatch between info->status.rates & bf-rates. thx to Felix Fietkau --- drivers/net/wireless/at

[ath5k-devel] [PATCH v3] ath5k: make use of the new rate control API

2013-06-07 Thread Thomas Huehn
This patch enabels ath5k to use the new rate table to lookup each mrr rate and retry information per packet. Signed-off-by: Benjamin Vahl Signed-off-by: Thomas Huehn --- drivers/net/wireless/ath/ath5k/base.c | 79 - drivers/net/wireless/ath/ath5k/base.h

[ath5k-devel] [PATCH v2] ath5k: make use of the new rate control API

2013-06-07 Thread Thomas Huehn
This patch enabels ath5k to use the new rate table to lookup each mrr rate and retry information per packet. Signed-off-by: Benjamin Vahl Signed-off-by: Thomas Huehn --- drivers/net/wireless/ath/ath5k/base.c | 77 - drivers/net/wireless/ath/ath5k/base.h

[ath5k-devel] [PATCH] ath5k: make use of the new rate control API

2013-06-06 Thread Thomas Huehn
This patch enabels ath5k to use the new rate table to lookup each mrr rate and retry information per packet. Signed-off-by: Benjamin Vahl Signed-off-by: Thomas Huehn --- drivers/net/wireless/ath/ath5k/base.c | 73 + drivers/net/wireless/ath/ath5k/base.h

Re: [ath5k-devel] [PATCH v2 5/5] ath5k: Return correct offset when reading frequencies

2012-08-08 Thread Thomas Huehn
e 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 > Tested-by: Thomas Huehn >

Re: [ath5k-devel] [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A

2012-08-05 Thread Thomas Huehn
Hi Nick > According to EEPROM docs there are 10 calibration piers on all chips > after 5111 for 11a but some of them are not used and the way to test > this is if frequency is zero. Now here is a bug in the EEPROM code > that might result the wrong reads you get, check this out: > > on ath5k_eepr

Re: [ath5k-devel] [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A

2012-08-05 Thread Thomas Huehn
Hi Nick, > There is nothing suspicious about it, it's what EEPROM docs say: > > a) For 11a mode there are 10 calibration peers As I tested AR5413, AR5414 and AR5213 there are only 8 eeprom lines for 802.11a that provide valid per rate target power levels. I am curious if this also holds for ot

Re: [ath5k-devel] [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A

2012-08-04 Thread Thomas Huehn
Hi all, After several experiments on cm9 and dcma82 cards, I figured out that this patch does not solve the max_power calibration problem as intended. The partly reduction to 8 with this: #define AR5K_EEPROM_N_5GHZ_CHAN 10 #define AR5K_EEPROM_N_5GHZ_RATE_CHAN8 ... creates a wrong pow

Re: [ath5k-devel] [PATCH 3/4] ath5k: Preserve tx power level requested from above on phy_init

2012-07-30 Thread Thomas Huehn
Hi Nick Nick Kossifidis schrieb: > 2012/7/29 Thomas Huehn : >> Hi Nick, >> >> >>> Anyway if readability is the issue we can just do something like >>> >>> int txpower_halfdb = 0; >>> >>> [...] >>> >

Re: [ath5k-devel] [PATCH 3/4] ath5k: Preserve tx power level requested from above on phy_init

2012-07-29 Thread Thomas Huehn
Hi Nick, > Anyway if readability is the issue we can just do something like > > int txpower_halfdb = 0; > > [...] > > if(ah->power_level) { > txpower_halfdb = ah->power_level * 2; > } else { > txpower_halfdb = AR5K_TUNE_MAX_TXPOWER; > } > > and then it'll look like this > > ret = ath5k_hw

Re: [ath5k-devel] [PATCH 3/4] ath5k: Preserve tx power level requested from above on phy_init

2012-07-28 Thread Thomas Huehn
Let my correct myself Thomas Huehn schrieb: > Hi Nick, > > Nick Kossifidis schrieb: > >> By using cur_pwr on phy_init we re-use the power level previously set by the >> driver, not the one we got from above. >> >> Signed-off-by: Nick Kossifidis >> --

Re: [ath5k-devel] [PATCH 3/4] ath5k: Preserve tx power level requested from above on phy_init

2012-07-28 Thread Thomas Huehn
Hi Nick, Nick Kossifidis schrieb: > By using cur_pwr on phy_init we re-use the power level previously set by the > driver, not the one we got from above. > > Signed-off-by: Nick Kossifidis > --- > drivers/net/wireless/ath/ath5k/phy.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions

Re: [ath5k-devel] [PATCH v6] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-27 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: > I did it myself now, all applied. > Awesome ! I am going to prepare the TPC patches now. Greetings Thomas ___ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k

Re: [ath5k-devel] [PATCH v6] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-27 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: > When you do, please remove the last two hunks from your patch that are > spurious indentation changes in tx.c When Ariks two TI driver patches make it in your tree I will clean up this two hunks... no prob. Greetings Thomas ___

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 v6] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-26 Thread Thomas Huehn
Hi Arik, Arik Nemtsov schrieb: > Better to just wait some time. I wrote up something to make it much > easier for you. Waiting for some internal review before sending it up. > Thx for helping out here, I ws allready checking into what kind of struct I can put the sta pointer. But if you have a

Re: [ath5k-devel] [PATCH v6] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-26 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: >> >> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In >> function ‘wl1271_skb_queue_head’: >> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48: >> warning: ‘hlid’ may be used uninitialized in this function >> [-Wuniniti

Re: [ath5k-devel] [PATCH v5] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-26 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: > On Thu, 2012-07-26 at 11:27 +0200, Thomas Huehn wrote: > >> (2) >> url = git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git >> >> last commit e4cbd6542efdab97ed6d38e706b7cac51c68ced7 > > I'm

Re: [ath5k-devel] [PATCH v5] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-26 Thread Thomas Huehn
Hi Johannes, On my Linux box I applied and compiled the current v5 version of the patch successfully. On top of the following freshly checked out git repos I put the remove-sta patch: (1) url = git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git last commit 80f3bc801e351e

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

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 powe

Re: [ath5k-devel] [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A

2012-07-25 Thread Thomas Huehn
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 >

Re: [ath5k-devel] [PATCH v5] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-25 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: >> Finally applied, but I dropped these spurious changes: > Never mind, it still doesn't compile, dropped it. > > I had to rebase my tree due to that, sorry! > My last PATCH included some changes at a TI driver which was adapted in wireless-testing in John's

Re: [ath5k-devel] [PATCH v4] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-24 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: > On Mon, 2012-07-23 at 21:33 +0200, Thomas Huehn wrote: > >> --- a/net/mac80211/ieee80211_i.h >> +++ b/net/mac80211/ieee80211_i.h >> @@ -196,6 +196,8 @@ struct ieee80211_tx_data { >> struct ieee80211_channel *channel; &

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_

[ath5k-devel] [PATCH 1/2] ath5k: fix wrong per rate target power eeprom reads for AR5K_EEPROM_MODE_11A

2012-07-23 Thread Thomas Huehn
performance. This was fix validated against the madwifi codebase and a new AR5K_EEPROM_N_5GHZ_RATE_CHAN 8 is defined. Signed-off-by: Thomas Huehn --- madwifi cross validation check. Thx to Felix Fiethkau --- drivers/net/wireless/ath/ath5k/eeprom.c | 2 +- drivers/net/wireless/ath/ath5k/eeprom.h

[ath5k-devel] [PATCH 0/2] ath5k: fixing broken power gain calibration at 5GHz and txpower handling

2012-07-23 Thread Thomas Huehn
This patch series fix a wrong power gain calibration in ath5k for entire 5GHz band and enables consistent usage of tx_power specified by the user. (1) Function ath5k_eeprom_read_target_rate_pwr_info() read 10 lines of rate_pcal_info[i].target_power which worngly produces e.g. from Winstron CM9: [

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

2012-07-23 Thread Thomas Huehn
o a txpower level higher that someone specified to use. This patch fix this by introducing ah_txpower.txp_user_pwr which holds the tx_power specified at userland. Function ath5k_hw_txpower is restructured and uses the value at ah_txpower.txp_user_pwr directly. Signed-off-by: Thomas Huehn --- restruct

Re: [ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-17 Thread Thomas Huehn
Hi Johannes, > No, I'm not going to play that game. Make sure it compiles on > wireless-next. Virtual box did the job and I found 3 drivers that somehow did not complain in my OpenWRT build env... thx for not playing :)... v3 is out. I used wireless-testing and not -next,as in -next the necessa

[ath5k-devel] [PATCH v3 1/2] mac80211_hwsim: fix possible race condition in usage of info->control.sta & control.vif

2012-07-17 Thread Thomas Huehn
info->control.sta and control.vif may only be dereferenced during the drv_tx call otherwise could lead to use-after-free bugs. Signed-off-by: Thomas Huehn --- drivers/net/wireless/mac80211_hwsim.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c

[ath5k-devel] [PATCH v3 0/0] mac80211: Restructure ieee80211_tx_info->control to gain free space along tx-path

2012-07-17 Thread Thomas Huehn
In order to enable new annotations per data packet along the max80211 tx-path, (e.g. upcoming Transmit Power Control (TPC) per packet) this patch-serie does: - fix the ieee80211_tx_info->control usage in driver mac80211_hwsim - remove control.sta from ieee80211_tx_info and adapt all affected drive

[ath5k-devel] [PATCH v2 0/0] mac80211: Restructure ieee80211_tx_info->control to gain free space along tx-path

2012-07-17 Thread Thomas Huehn
In order to enable new annotations per data packet along the max80211 tx-path, (e.g. upcoming Transmit Power Control (TPC) per packet) this patch-serie does: - fix the ieee80211_tx_info->control usage in driver mac80211_hwsim - remove control.sta from ieee80211_tx_info and adapt all affected drive

[ath5k-devel] [PATCH v2 0/0 1/2] mac80211_hwsim: fix possible race condition in usage of info->control.sta & control.vif

2012-07-17 Thread Thomas Huehn
info->control.sta and control.vif may only be dereferenced during the drv_tx call otherwise could lead to use-after-free bugs. Signed-off-by: Thomas Huehn --- drivers/net/wireless/mac80211_hwsim.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c

Re: [ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-17 Thread Thomas Huehn
Hi Johannes, Johannes Berg schrieb: > Ok first of all, please actually compile the tree after your changes. It > doesn't. When it does, please fix I always do compile the compat-wireless-tree after changes I introduce, and it compiles without errors in the case of this mac80211:sta-remove patch.

[ath5k-devel] mac80211: Restructure ieee80211_tx_info->control to gain free space along tx-path

2012-07-13 Thread Thomas Huehn
In order to enable new annotations per data packet along the max80211 tx-path, (e.g. upcoming Transmit Power Control (TPC) per packet) this patch-serie does: - fix the ieee80211_tx_info->control usage in driver mac80211_hwsim - remove control.sta from ieee80211_tx_info and adapt all affected drive

[ath5k-devel] [PATCH 1/2] mac80211_hwsim: fix possible race condition in usage of info->control.sta & control.vif

2012-07-13 Thread Thomas Huehn
info->control.sta and control.vif may only be dereferenced during the drv_tx call otherwise could lead to use-after-free bugs. Signed-off-by: Thomas Huehn --- drivers/net/wireless/mac80211_hwsim.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c

[ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path

2012-07-13 Thread Thomas Huehn
of modified drivers: ath9k ath5k iwl3954 iwl4965 iwl-agn mwl8k carl9170 ath9k-htc p54 rt2x00 rtl8180 rtl8087 hwsim b43 b43legacy brcmsmac zd1211rw wl1251 wlcore rtlwifi libertas_tf at76c50x-usb adm8211 Signed-off-by: Thomas Huehn Signed-off-by: Alina Friedrichsen Signed-off-by: Felix Fietkau