Re: [ath5k-devel] [PATCH] [ath5k][leds] Ability to disable leds support. If leds support enabled do not force mac802.11 leds layer selection.

2010-06-11 Thread Dmytro Milinevskyy
In this case no way to control LEDs. If you turn LEDs support you can't tune them out, no? I believe that user should be able to chose whether LEDs support is needed or not. This is how done in intel wireless drivers. The driver should be tolerant. -- Dima On Fri, Jun 11, 2010 at 11:29 PM, Johan

Re: [ath5k-devel] [PATCH] [ath5k][leds] Ability to disable leds support. If leds support enabled do not force mac802.11 leds layer selection.

2010-06-11 Thread Johannes Berg
On Fri, 2010-06-11 at 23:26 +0300, Dmytro Milinevskyy wrote: > Generic LED class is not disabled so it's possible to control leds in sysfs. But if you turn off ATH5K_LEDS?? johannes ___ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists

Re: [ath5k-devel] [PATCH] [ath5k][leds] Ability to disable leds support. If leds support enabled do not force mac802.11 leds layer selection.

2010-06-11 Thread Dmytro Milinevskyy
Generic LED class is not disabled so it's possible to control leds in sysfs. -- Dima On Fri, Jun 11, 2010 at 11:09 PM, Johannes Berg wrote: > On Wed, 2010-06-09 at 17:43 +0300, Dmytro Milinevskyy wrote: >> Hi, Bob. >> >> For instance I don't use 802.11 leds layer and trigger leds from >> userspa

Re: [ath5k-devel] [PATCH] [ath5k][leds] Ability to disable leds support. If leds support enabled do not force mac802.11 leds layer selection.

2010-06-11 Thread Johannes Berg
On Wed, 2010-06-09 at 17:43 +0300, Dmytro Milinevskyy wrote: > Hi, Bob. > > For instance I don't use 802.11 leds layer and trigger leds from > userspace according to my purposes. Without the LED stuff in sysfs, how do you do that? johannes ___ ath5k-d

Re: [ath5k-devel] [PATCH] [ath5k][leds] Ability to disable leds support. If leds support enabled do not force mac802.11 leds layer selection.

2010-06-11 Thread Dmytro Milinevskyy
I didn't know. Thank you for noting that. However I think it's better to give a chance to disable 802.11 leds. -- Dima On Fri, Jun 11, 2010 at 8:07 PM, Bob Copeland wrote: > On Wed, Jun 9, 2010 at 10:43 AM, Dmytro Milinevskyy > wrote: >> Hi, Bob. >> >> For instance I don't use 802.11 leds layer

Re: [ath5k-devel] [PATCH 08/19] ath5k: never process the self-linked rx descriptor at the end

2010-06-11 Thread Robert Brown
What's the purpose of ath5k_rx_stop setting sc->rxlink to NULL? As Bob points out, it causes problems if it's not done while holding the rx buffer spinlock. There's code in ath5k_intr that sets sc->rxlink to NULL, apparently to handle a chip bug. It needs to hold the spinlock as well to avoid sel

[ath5k-devel] [RFT] ath5k: add new PCI devices

2010-06-11 Thread Luis R. Rodriguez
Found our PCI device list not up to date with respect to the PCI device ID db for 0x168c for legacy (non-802.11) devices: https://pci-ids.ucw.cz/read/PC/168c/ There a few bogus ones there but I believe these are also listed on our NDIS driver. Signed-off-by: Luis R. Rodriguez --- [RFT] request

Re: [ath5k-devel] [PATCH] [ath5k][leds] Ability to disable leds support. If leds support enabled do not force mac802.11 leds layer selection.

2010-06-11 Thread Bob Copeland
On Wed, Jun 9, 2010 at 10:43 AM, Dmytro Milinevskyy wrote: > Hi, Bob. > > For instance I don't use 802.11 leds layer and trigger leds from > userspace according to my purposes. FWIW you can disable mac80211 triggers from userspace as well. But, I guess hooking up null triggers will work too. --

Re: [ath5k-devel] [PATCH 07/19] ath5k: reset more pointers after we free skbs

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > After we free skbs for receive or transmit descriptors, make sure we have no > pointers to the now invalid memory address. > > Signed-off-by: Bruno Randolf > --- Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com _

Re: [ath5k-devel] [PATCH 18/19] ath5k: review RX descriptor functions

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:51 AM, Bruno Randolf wrote: >  - rs_phyerr should not be OR'ed ACK, I think it was just for consistency since they were both set to 0 at the start of the function. I think we should just add a memset to the top to be sure all of the flags are cleared rather than rely o

Re: [ath5k-devel] [PATCH 19/19] ath5k: report PHY error frames only for chips which need it

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:51 AM, Bruno Randolf wrote: > Only report PHY error frames for ANI on chipsets which do not have PHY error > counters in hardware. > > Signed-off-by: Bruno Randolf Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com _

Re: [ath5k-devel] [PATCH 15/19] ath5k: review and add comments for descriptors

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:51 AM, Bruno Randolf wrote: > I carefully reviewed desh.h against the HAL sources. Added comments and made > differences between 5210, 5211 and 5212 more clear by adding _521x to the > defines which are specific to that chipset. Renamed some defines. No > functional > ch

Re: [ath5k-devel] [PATCH 14/19] ath5k: remove pointless rx error overlay struct

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:51 AM, Bruno Randolf wrote: > ath5k_hw_rx_error was only used once, where we could easily just use > ath5k_hw_rx_status as well, so remove it. > > Signed-off-by: Bruno Randolf Nice cleanup! Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com __

Re: [ath5k-devel] [PATCH 13/19] ath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:51 AM, Bruno Randolf wrote: > Just whitespace and indentation. > > Signed-off-by: Bruno Randolf Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com ___ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://

Re: [ath5k-devel] [PATCH 09/19] ath5k: unify rx descriptor error handling

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > There is no reason for a special handling (return) here, just break like we do > with the checks before. > > Signed-off-by: Bruno Randolf Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com _

Re: [ath5k-devel] [PATCH 10/19] ath5k: split descriptor handling and frame receive

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > Move frame reception into it's own function to have a clearer separation > between buffer and descriptor handling and things that are done when we > actually receive a frame. > > Signed-off-by: Bruno Randolf Good idea! Acked-by: Bob Copela

Re: [ath5k-devel] [PATCH 08/19] ath5k: never process the self-linked rx descriptor at the end

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > Add an extra check to be sure we never process the self-linked rx descriptor > at the end of the list. This should not happen since in this case the RXDP Here's a way this might happen frequently BTW: cpu 0:

Re: [ath5k-devel] [PATCH 06/19] ath5k: print more errors when decriptor setup fails

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > Signed-off-by: Bruno Randolf > --- >  drivers/net/wireless/ath/ath5k/base.c |    8 ++-- >  1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath5k/base.c > b/drivers/net/wireless/ath/ath5k/base.c

Re: [ath5k-devel] [PATCH 03/19] ath5k: rename ath5k_txbuf_free() to ath5k_txbuf_free_skb()

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > Rename ath5k_txbuf_free() to ath5k_txbuf_free_skb() since this is what it > does: > it frees the skb and not the buf. Same for ath5k_rxbuf_free(). > > Signed-off-by: Bruno Randolf Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopelan

Re: [ath5k-devel] [PATCH 05/19] ath5k: fix rx descriptor debugging

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > In the debug ouptut rx_status_0 was printed twice instead of rx_status_1. Also > make the debug message more clear. > > Signed-off-by: Bruno Randolf Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com __

Re: [ath5k-devel] [PATCH 02/19] ath5k: more debug prints for resets

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > Add a debug print for every case of reset. > > Signed-off-by: Bruno Randolf Looks ok, I'm just not crazy about adding more debug junk to the driver given availability of ftrace etc. Another way is to add a tracepoint for reset() and a reas

Re: [ath5k-devel] [PATCH 04/19] ath5k: fix some comment typos

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf wrote: > Fix comment about dma sizes, brackets were missing. Replace 'insure' with > 'ensure'. > > Signed-off-by: Bruno Randolf Acked-by: Bob Copeland -- Bob Copeland %% www.bobcopeland.com ___ ath5k-d

Re: [ath5k-devel] [PATCH] ath5k: disable all tasklets while resetting

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 10:21 AM, Bob Copeland wrote: > On Fri, Jun 11, 2010 at 6:41 AM, Johannes Berg > wrote: > >> I have no idea how long a reset can take, but this means that all these >> tasklets will spin while your reset is running if they were scheduled. > > It looks to me like tasklet_ac

Re: [ath5k-devel] [PATCH] ath5k: disable all tasklets while resetting

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 6:41 AM, Johannes Berg wrote: > I have no idea how long a reset can take, but this means that all these > tasklets will spin while your reset is running if they were scheduled. It looks to me like tasklet_action() will bail out when the tasklet has a positive t->count (wh

Re: [ath5k-devel] [PATCH 11/19] ath5k: move checks and stats into new function

2010-06-11 Thread Bob Copeland
On Fri, Jun 11, 2010 at 5:51 AM, Bruno Randolf wrote: > +/** ath5k_frame_receive_ok() - Do we want to receive this frame or not? > + * > + * Check if we want to further process this frame or not. Also update > + * statistics. Return 1 if we want this frame, 0 if not. > + */ > +static int > +ath5k_

Re: [ath5k-devel] [PATCH] ath5k: disable all tasklets while resetting

2010-06-11 Thread Johannes Berg
On Fri, 2010-06-11 at 19:12 +0900, Bruno Randolf wrote: > Make sure no tasklets can run concurrently to a reset. > > Signed-off-by: Bruno Randolf > --- > drivers/net/wireless/ath/ath5k/base.c | 12 > 1 files changed, 12 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/w

[ath5k-devel] [PATCH] ath5k: disable all tasklets while resetting

2010-06-11 Thread Bruno Randolf
Make sure no tasklets can run concurrently to a reset. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index

Re: [ath5k-devel] ath5k phy0: failed to warm reset the MAC Chip

2010-06-11 Thread Bruno Randolf
hi joerg! i was just wondering if the patch is sent in today: "[PATCH 01/19] ath5k: disable all tasklets while resetting" would solve this problem? could you give it a try? thanks, bruno On Tuesday 04 May 2010 15:38:58 Raghu Ramaraj wrote: > Hi, > Any update regarding this? > I just observ

[ath5k-devel] [PATCH 19/19] ath5k: report PHY error frames only for chips which need it

2010-06-11 Thread Bruno Randolf
Only report PHY error frames for ANI on chipsets which do not have PHY error counters in hardware. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/desc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/ne

[ath5k-devel] [PATCH 18/19] ath5k: review RX descriptor functions

2010-06-11 Thread Bruno Randolf
Reviewed RX descriptor functions against the HAL sources. Some minor changes: - check size before making changes to the descriptor - whitespace - add comments about 5210 timestamps. this needs to be adressed later! - FIFO overrun error only available on 5210 - rs_phyerr should not be

[ath5k-devel] [PATCH 17/19] ath5k: take descriptor differences between 5210 and 5211 into account

2010-06-11 Thread Bruno Randolf
There are some differences between 5210 and 5211 descriptors which we did not take into account before. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/desc.c | 29 ++--- drivers/net/wireless/ath/ath5k/desc.h |6 +++--- 2 files changed, 25 insertions

[ath5k-devel] [PATCH 16/19] ath5k: update 5210/5211 frame types

2010-06-11 Thread Bruno Randolf
Update 5210 frame types to match the HAL. We have to apply the same bitshift to the constants as we use later. Add 5211 specific frame types. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/desc.c |2 +- drivers/net/wireless/ath/ath5k/desc.h | 12 +++- 2 files chan

[ath5k-devel] [PATCH 15/19] ath5k: review and add comments for descriptors

2010-06-11 Thread Bruno Randolf
I carefully reviewed desh.h against the HAL sources. Added comments and made differences between 5210, 5211 and 5212 more clear by adding _521x to the defines which are specific to that chipset. Renamed some defines. No functional changes. Signed-off-by: Bruno Randolf --- drivers/net/wireless/at

[ath5k-devel] [PATCH 14/19] ath5k: remove pointless rx error overlay struct

2010-06-11 Thread Bruno Randolf
ath5k_hw_rx_error was only used once, where we could easily just use ath5k_hw_rx_status as well, so remove it. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/debug.c |2 +- drivers/net/wireless/ath/ath5k/desc.c | 12 drivers/net/wireless/ath/ath5k/desc.h |

[ath5k-devel] [PATCH 11/19] ath5k: move checks and stats into new function

2010-06-11 Thread Bruno Randolf
Create a new function ath5k_receive_frame_ok() which checks for errors, updates error statistics and tells us if we want to further "receive" this frame or not. This way we can avoid a goto and have a cleaner separation between buffer handling and other things. Signed-off-by: Bruno Randolf --- d

[ath5k-devel] [PATCH 13/19] ath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()

2010-06-11 Thread Bruno Randolf
Just whitespace and indentation. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/desc.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c index b5a5d45..50fc931 100644 -

[ath5k-devel] [PATCH 12/19] ath5k: use direct function calls for descriptors when possible

2010-06-11 Thread Bruno Randolf
Use direct function calls for ath5k_hw_setup_rx_desc() and ath5k_hw_setup_mrr_tx_desc() instead of a function pointer which always pointed to the same function in the case of ath5k_hw_setup_rx_desc() and which is easily unified in the case of ath5k_hw_setup_mrr_tx_desc(). Also simplify the initial

[ath5k-devel] [PATCH 09/19] ath5k: unify rx descriptor error handling

2010-06-11 Thread Bruno Randolf
There is no reason for a special handling (return) here, just break like we do with the checks before. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/driver

[ath5k-devel] [PATCH 10/19] ath5k: split descriptor handling and frame receive

2010-06-11 Thread Bruno Randolf
Move frame reception into it's own function to have a clearer separation between buffer and descriptor handling and things that are done when we actually receive a frame. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c | 149 + 1 files chan

[ath5k-devel] [PATCH 08/19] ath5k: never process the self-linked rx descriptor at the end

2010-06-11 Thread Bruno Randolf
Add an extra check to be sure we never process the self-linked rx descriptor at the end of the list. This should not happen since in this case the RXDP should also point at the same descriptor and the previous check should catch that. But we don't trust RXDP completely (might it be NULL or undefine

[ath5k-devel] [PATCH 07/19] ath5k: reset more pointers after we free skbs

2010-06-11 Thread Bruno Randolf
After we free skbs for receive or transmit descriptors, make sure we have no pointers to the now invalid memory address. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/

[ath5k-devel] [PATCH 06/19] ath5k: print more errors when decriptor setup fails

2010-06-11 Thread Bruno Randolf
Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 1da2f3f..2d15125 100644 --- a/drivers/net/wireless/ath/ath5k/

[ath5k-devel] [PATCH 03/19] ath5k: rename ath5k_txbuf_free() to ath5k_txbuf_free_skb()

2010-06-11 Thread Bruno Randolf
Rename ath5k_txbuf_free() to ath5k_txbuf_free_skb() since this is what it does: it frees the skb and not the buf. Same for ath5k_rxbuf_free(). Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff -

[ath5k-devel] [PATCH 05/19] ath5k: fix rx descriptor debugging

2010-06-11 Thread Bruno Randolf
In the debug ouptut rx_status_0 was printed twice instead of rx_status_1. Also make the debug message more clear. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/debug.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/deb

[ath5k-devel] [PATCH 04/19] ath5k: fix some comment typos

2010-06-11 Thread Bruno Randolf
Fix comment about dma sizes, brackets were missing. Replace 'insure' with 'ensure'. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/ath5k.h |2 +- drivers/net/wireless/ath/ath5k/base.c |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/

[ath5k-devel] [PATCH 01/19] ath5k: disable all tasklets while resetting

2010-06-11 Thread Bruno Randolf
Make sure no tasklets can run concurrently to a reset. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index

[ath5k-devel] [PATCH 02/19] ath5k: more debug prints for resets

2010-06-11 Thread Bruno Randolf
Add a debug print for every case of reset. Signed-off-by: Bruno Randolf --- drivers/net/wireless/ath/ath5k/base.c | 12 ++-- drivers/net/wireless/ath/ath5k/debug.c |1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/driver

[ath5k-devel] [PATCH 00/19] descriptor review series

2010-06-11 Thread Bruno Randolf
hi! this following series is a bunch of smaller changes i made while reviewing the rx buffer handling and some stuff i picked up while carefully reviewing the descriptor definitions from the HAL against what we have. most of the changes are trivial, but they touch important code, so it would be go