Re: [ath5k-devel] [PATCH v2 00/20] pending ath5k + antenna patches

2010-05-18 Thread Luis R. Rodriguez
On Tue, May 18, 2010 at 6:30 PM, Bruno Randolf wrote: > These are all my pending ath5k patches + the antenna support for cfg80211 > rebased against 2.6.34 and based on the previous patch i sent for stable > ("ath5k: consistently use rx_bufsize for RX DMA"). No need to bunch these up together, in

[ath5k-devel] [PATCH v2 20/20] ath5k: no need to save/restore the default antenna

2010-05-18 Thread Bruno Randolf
Since ath5k_hw_set_antenna_mode() always writes the default antenna register and is called at the end of reset, there is no need to separately save and restore the default antenna. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/reset.c |8 +--- 1 files changed, 1 inserti

[ath5k-devel] [PATCH v2 19/20] ath5k: new function for setting the antenna switch table

2010-05-18 Thread Bruno Randolf
Collect all pieces concering the antenna switch table into one function. Previously it was split up between ath5k_hw_reset() and ath5k_hw_commit_eeprom_settings(). Also we need to set the antenna switch table when ath5k_hw_set_antenna_mode() is called manually (by "iw phy0 antenna set", for exampl

[ath5k-devel] [PATCH v2 18/20] ath5k: update AR5K_PHY_RESTART_DIV_GC values to match masks

2010-05-18 Thread Bruno Randolf
#define AR5K_PHY_RESTART_DIV_GC 0x001c is 3 bit wide. The previous values of 0xc and 0x8 are 4bit wide and bigger than the mask. Writing 0 and 1 to AR5K_PHY_RESTART_DIV_GC is consistent with the comments and initvals we have in the HAL. Signed-off-by: Bruno Randolf --- driver

[ath5k-devel] [PATCH v2 17/20] ath5k: fix NULL pointer in antenna configuration

2010-05-18 Thread Bruno Randolf
If the channel is not set yet and we configure the antennas just store the setting. It will be activated during the next reset, when the channel is set. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/phy.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --

[ath5k-devel] [PATCH v2 16/20] ath5k: remove setting ANI and antenna thru debugfs files

2010-05-18 Thread Bruno Randolf
Remove the possibility to set ANI parameters and antenna iconfiguration thru debugfs, since we have proper interfaces for both now: * /sys/class/ieee80211/phy0/device/ani/* for ANI * "iw antenna set X" for antenna configuration. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath

[ath5k-devel] [PATCH v2 15/20] ath5k: Add support for antenna configuration

2010-05-18 Thread Bruno Randolf
Support setting the antenna configuration via cfg/mac80211. At the moment only allow the simple pre-defined configurations we already have (fixed antenna A/B or diversity), but more advanced settings should be possible later. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c

[ath5k-devel] [PATCH v2 14/20] mac80211: Add antenna configuration

2010-05-18 Thread Bruno Randolf
Allow antenna configuration by calling driver's function for it. Signed-off-by: Bruno Randolf --- include/net/mac80211.h |2 ++ net/mac80211/cfg.c | 16 ++ net/mac80211/driver-ops.h | 23 net/mac80211/driver-trace.h | 50

[ath5k-devel] [PATCH v2 13/20] cfg80211: Add nl80211 antenna configuration

2010-05-18 Thread Bruno Randolf
Allow setting TX and RX antenna configuration via nl80211/cfg80211. The antenna configuration is defined as a bitmap of allowed antennas. This bitmap is 8 bit at the moment, each bit representing one antenna. If multiple antennas are selected, the driver may use diversity for receive and transmit.

[ath5k-devel] [PATCH v2 12/20] ath5k: print error message if ANI levels are out of range

2010-05-18 Thread Bruno Randolf
Since we have sysfs to manually set the ANI levels, we should print errors to the kernel log if the values are out of bounds. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/ani.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/wirel

[ath5k-devel] [PATCH v2 11/20] ath5k: always calculate ANI listen time

2010-05-18 Thread Bruno Randolf
Calculate 'listen' time also when automatic ANI is off, since this and the "busy" time is useful information also in manual mode. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/ani.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wir

[ath5k-devel] [PATCH v2 10/20] ath5k: add sysfs files for ANI parameters

2010-05-18 Thread Bruno Randolf
/sys/class/ieee80211/phy0/device/ani/ani_mode /sys/class/ieee80211/phy0/device/ani/noise_immunity_level /sys/class/ieee80211/phy0/device/ani/spur_level /sys/class/ieee80211/phy0/device/ani/firstep_level /sys/class/ieee80211/phy0/device/ani/ofdm_weak_signal_detection /sys/class/ieee80211/phy0/device

[ath5k-devel] [PATCH v2 09/20] ath5k: use ath5k_softc as driver data

2010-05-18 Thread Bruno Randolf
It's our "private driver data"... It's used more often and hw is the mac80211 part. This makes more sense with the next (sysfs) patch. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dri

[ath5k-devel] [PATCH v2 07/20] ath5k: remove ATH_TRACE macro

2010-05-18 Thread Bruno Randolf
Now that we have ftrace, it is not needed any more. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/attach.c |2 -- drivers/net/wireless/ath/ath5k/caps.c |7 --- drivers/net/wireless/ath/ath5k/debug.c |1 - drivers/net/wireless/ath/ath5k/debug.h |8 ---

[ath5k-devel] [PATCH v2 08/20] ath5k: clarify logic when to enable spur mitigation filter

2010-05-18 Thread Bruno Randolf
The old code logically did not make sense and seems to have been confused by the fact that we could have newer EEPROMs on older hardware. In any case the spur mitigation filter was set if the srev was >= AR5K_SREV_AR5424. Spur info is available only from EEPROM versions bigger than 5.3 but but the

[ath5k-devel] [PATCH v2 06/20] ath5k: run NF calibration only every 60 seconds

2010-05-18 Thread Bruno Randolf
Since NF calibration interferes with TX and RX and also has been the cause of other problems (when it's run concurrently with ath5k_reset) we want to run it less often - every 60 seconds for now. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/ath5k.h |2 ++ drivers/net/wirel

[ath5k-devel] [PATCH v2 05/20] ath5k: Stop queues only for NF calibration

2010-05-18 Thread Bruno Randolf
As far as we know, only NF calibration interferes with RX/TX so we can leave the queues enabled for the other calibrations. BTW: Stopping the queues is not enough for avoiding transmissions, since there might be packets in the queue + beacons are also sent regularly! But i leave it like this until

[ath5k-devel] [PATCH v2 03/20] ath5k: initialize calibration timers

2010-05-18 Thread Bruno Randolf
Initialize calibration timers on reset, since otherwise they might be in the future and the calibration tasklet might not be scheduled for a long time. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a

[ath5k-devel] [PATCH v2 04/20] ath5k: move noise floor calibration into tasklet

2010-05-18 Thread Bruno Randolf
Seperate noise floor calibration from other PHY calibration and move it to the tasklet. This is the first step to more separation of different calibrations. Also move out ath5k_hw_request_rfgain_probe(ah) so we have one clean function for I/Q calibration on 5111x parts. Signed-off-by: Bruno Rando

[ath5k-devel] [PATCH v2 01/20] ath5k: add debugfs file for queue debugging

2010-05-18 Thread Bruno Randolf
Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/debug.c | 66 drivers/net/wireless/ath/ath5k/debug.h |1 2 files changed, 67 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k

[ath5k-devel] [PATCH v2 02/20] ath5k: wake queues on reset

2010-05-18 Thread Bruno Randolf
We can wake all queues after a chip reset since everything should be set up and we are ready to transmit. If we don't do that we might end up starting up with stopped queues, not beeing able to transmit. (This started to happen after "ath5k: clean up queue manipulation" but since periodic calibrati

[ath5k-devel] [PATCH v2 00/20] pending ath5k + antenna patches

2010-05-18 Thread Bruno Randolf
These are all my pending ath5k patches + the antenna support for cfg80211 rebased against 2.6.34 and based on the previous patch i sent for stable ("ath5k: consistently use rx_bufsize for RX DMA"). Also i'd like to note that there are quite a few ath5k patches which haven't made it into linux-nex

[ath5k-devel] [PATCH 3] ath5k: consistently use rx_bufsize for RX DMA

2010-05-18 Thread Bruno Randolf
We should use the same buffer size we set up for DMA also in the hardware descriptor. Previously we used common->rx_bufsize for setting up the DMA mapping, but used skb_tailroom(skb) for the size we tell to the hardware in the descriptor itself. The problem is that skb_tailroom(skb) can give us a l

[ath5k-devel] [PATCH 2] ath5k: consistently use rx_bufsize for RX DMA

2010-05-18 Thread Bruno Randolf
We should use the same buffer size we set up for DMA also in the hardware descriptor. Previously we used common->rx_bufsize for setting up the DMA mapping, but used skb_tailroom(skb) for the size we tell to the hardware in the descriptor itself. The problem is that skb_tailroom(skb) can give us a l

Re: [ath5k-devel] Ath5k ixp4xx, dead radios.

2010-05-18 Thread Robert
Bruno Randolf wrote: > On Tuesday 18 May 2010 17:38:12 Robert wrote: > >> Hi. >> >> I'm currently trying to migrate a small embedded linux distribution from >> madwifi >> to ath5k and have run in to some problems. >> >> I started out using kernel version 2.6.27-44 and compat-wireless >> 2010-03

[ath5k-devel] [PATCH 3/4] ath5k: new function for setting the antenna switch table

2010-05-18 Thread Bruno Randolf
Collect all pieces concering the antenna switch table into one function. Previously it was split up between ath5k_hw_reset() and ath5k_hw_commit_eeprom_settings(). Also we need to set the antenna switch table when ath5k_hw_set_antenna_mode() is called manually (by "iw phy0 antenna set", for exampl

[ath5k-devel] [PATCH 4/4] ath5k: no need to save/restore the default antenna

2010-05-18 Thread Bruno Randolf
Since ath5k_hw_set_antenna_mode() always writes the default antenna register and is called at the end of reset, there is no need to separately save and restore the default antenna. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/reset.c |8 +--- 1 files changed, 1 inserti

[ath5k-devel] [PATCH 1/4] ath5k: fix NULL pointer in antenna configuration

2010-05-18 Thread Bruno Randolf
If the channel is not set yet and we configure the antennas just store the setting. It will be activated during the next reset, when the channel is set. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/phy.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --

[ath5k-devel] [PATCH 2/4] ath5k: update AR5K_PHY_RESTART_DIV_GC values to match masks

2010-05-18 Thread Bruno Randolf
#define AR5K_PHY_RESTART_DIV_GC 0x001c is 3 bit wide. The previous values of 0xc and 0x8 are 4bit wide and bigger than the mask. Writing 0 and 1 to AR5K_PHY_RESTART_DIV_GC is consistent with the comments and initvals we have in the HAL. Signed-off-by: Bruno Randolf --- driver

[ath5k-devel] [PATCH 0/4] Antenna configuration series

2010-05-18 Thread Bruno Randolf
hi! in this series i try to cleanup the antenna configuration somewhat... part of this is also necessary for the "iw phyX antenna" command i am working on. i send it here for review, before posting to linux-wireless. question: does anyone have an idea if we have to set the antenna switchtable b

Re: [ath5k-devel] Ath5k ixp4xx, dead radios.

2010-05-18 Thread Bruno Randolf
On Tuesday 18 May 2010 17:38:12 Robert wrote: > Hi. > > I'm currently trying to migrate a small embedded linux distribution from > madwifi > to ath5k and have run in to some problems. > > I started out using kernel version 2.6.27-44 and compat-wireless > 2010-03-28 with > some success (links cam

[ath5k-devel] Ath5k ixp4xx, dead radios.

2010-05-18 Thread Robert
Hi. I'm currently trying to migrate a small embedded linux distribution from madwifi to ath5k and have run in to some problems. I started out using kernel version 2.6.27-44 and compat-wireless 2010-03-28 with some success (links came up but i experienced system lockups). I then proceeded to