Re: [ath9k-devel] [RFC/RFT] ath9k_htc: avoid scheduling while atomic on sta_rc_update

2014-02-03 Thread Stanislaw Gruszka
On Sun, Feb 02, 2014 at 10:02:15AM +0100, Oleksij Rempel wrote: Am 31.01.2014 20:38, schrieb Stanislaw Gruszka: On Fri, Jan 31, 2014 at 07:24:05PM +0100, Oleksij Rempel wrote: I have different HW. How can trigger sta_rc_update? Below patch should trigger it when any management frame

[ath9k-devel] [PATCH] ath9k_htc: avoid scheduling while atomic on sta_rc_update

2014-02-03 Thread Stanislaw Gruszka
rates to that work. Tested-by: Oleksij Rempel li...@rempel-privat.de Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- This is on top of my previous patch: ath9k_htc: make -sta_rc_update atomic for most calls drivers/net/wireless/ath/ath9k/htc.h | 2 + drivers/net/wireless/ath/ath9k

[ath9k-devel] [RFC/RFT] ath9k_htc: avoid scheduling while atomic on sta_rc_update

2014-01-31 Thread Stanislaw Gruszka
mac80211 -sta_rc_update() callback must be atomic. Since we have to take mutex and do other operations that can sleep when sending fimrware commands to device, the only option to satisfy atomicity requirement of -sta_rc_update(), that I can see, is introduce work_struct and defer uploading new

Re: [ath9k-devel] [RFC/RFT] ath9k_htc: avoid scheduling while atomic on sta_rc_update

2014-01-31 Thread Stanislaw Gruszka
On Fri, Jan 31, 2014 at 07:24:05PM +0100, Oleksij Rempel wrote: I have different HW. How can trigger sta_rc_update? Below patch should trigger it when any management frame is received from know sta and print information about it. Thanks Stanislaw diff --git

[ath9k-devel] [PATCH] ath9k_htc: make -sta_rc_update atomic for most calls

2014-01-28 Thread Stanislaw Gruszka
/show_bug.cgi?id=990955 Cc: sta...@vger.kernel.org Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers

Re: [ath9k-devel] [PATCH] ath9k : Fix ieee80211 work while going to suspend

2013-03-22 Thread Stanislaw Gruszka
*sc = (struct ath_softc *)data; - ieee80211_queue_work(sc-hw, sc-hw_check_work); + if (!test_bit(SC_OP_INVALID, sc-sc_flags)) + ieee80211_queue_work(sc-hw, sc-hw_check_work); } That looks ok for me as -stable fix Reviewed-by: Stanislaw Gruszka sgrus...@redhat.com

Re: [ath9k-devel] [PATCH] ath9k : Fix ieee80211 work while going to suspend

2013-03-21 Thread Stanislaw Gruszka
On Mon, Mar 18, 2013 at 02:03:08PM -0700, Luis R. Rodriguez wrote: --- a/drivers/net/wireless/ath/ath9k/link.c +++ b/drivers/net/wireless/ath/ath9k/link.c @@ -158,7 +158,8 @@ void ath_start_rx_poll(struct ath_softc *sc, u8 nbeacon) { if (!AR_SREV_9300(sc-sc_ah)) return;

Re: [ath9k-devel] [PATCH -next 0/8] ath9k: ASPM fixes

2011-08-12 Thread Stanislaw Gruszka
On Thu, Aug 11, 2011 at 12:08:48PM -0400, John W. Linville wrote: On Fri, Aug 05, 2011 at 01:10:31PM +0200, Stanislaw Gruszka wrote: This patch series try to fix ath9k ASPM. Some of patches are cleanup only or do merging common code (with e1000e driver). With CONFIG_PCIEASPM it's

[ath9k-devel] [PATCH -next 2/8] ath9k: merge common -config_pci_powersave() checks

2011-08-05 Thread Stanislaw Gruszka
Move common checks into wrapper function. Since ASPM can be only enabled on PCIe devices -is_pciexpress check is unneeded. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |3 --- drivers/net/wireless/ath/ath9k/ar9003_hw.c |3

[ath9k-devel] [PATCH -next 0/8] ath9k: ASPM fixes

2011-08-05 Thread Stanislaw Gruszka
This patch series try to fix ath9k ASPM. Some of patches are cleanup only or do merging common code (with e1000e driver). With CONFIG_PCIEASPM it's possible to change ASPM settings on runtime via /sys/module/pcie_aspm/parameters/policy . However most drivers I looked at assume this setting is

[ath9k-devel] [PATCH -next 3/8] ath9k: do btcoex ASPM disabling at initialization time

2011-08-05 Thread Stanislaw Gruszka
... Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.c |8 +++--- drivers/net/wireless/ath/ath9k/hw.h |4 --- drivers/net/wireless/ath/ath9k/main.c |2 - drivers/net/wireless/ath/ath9k/pci.c | 44 ++-- 4 files changed

[ath9k-devel] [PATCH -next 1/8] ath9k: remove -config_pci_powersave() redundant argument

2011-08-05 Thread Stanislaw Gruszka
We always call -config_pci_powersave() with both restore and power_off arguments equal to 0 or both equal to 1, so merge them into one argument. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |5 ++--- drivers/net/wireless/ath/ath9k

[ath9k-devel] [PATCH -next 7/8] pci: aspm: add settings changed callback

2011-08-05 Thread Stanislaw Gruszka
own ASPM related quirks. Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/pci/pcie/aspm.c |5 - include/linux/pci.h |3 +++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers

[ath9k-devel] [PATCH -next 8/8] ath9k: be prepare for dynamic ASPM settings change

2011-08-05 Thread Stanislaw Gruszka
ASPM change. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw-ops.h |1 + drivers/net/wireless/ath/ath9k/hw.h |1 + drivers/net/wireless/ath/ath9k/main.c |3 +- drivers/net/wireless/ath/ath9k/pci.c| 38

[ath9k-devel] [PATCH -next 4/8] pci: aspm: add function for disabling ASPM

2011-08-05 Thread Stanislaw Gruszka
Add support for disabling ASPM if !CONFIG_PCIEASPM. Patch is based on code from e1000e. Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Cc: Jeff Kirsher jeffrey.t.kirs...@intel.com Cc: e1000-de...@lists.sourceforge.net Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com

[ath9k-devel] [PATCH -next 6/8] e1000e: use common function for disabling ASPM

2011-08-05 Thread Stanislaw Gruszka
Cc: Jeff Kirsher jeffrey.t.kirs...@intel.com Cc: e1000-de...@lists.sourceforge.net Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/e1000e/netdev.c | 31 +-- 1 files changed, 1 insertions(+), 30 deletions(-) diff --git a/drivers/net/e1000e

Re: [ath9k-devel] [RFC/RFT v2 00/12] ath9k: ASPM fixes

2011-07-29 Thread Stanislaw Gruszka
On Wed, Jul 27, 2011 at 09:11:50AM -0700, Jesse Barnes wrote: On Wed, 27 Jul 2011 14:14:47 +0200 Stanislaw Gruszka sgrus...@redhat.com wrote: This patch series try to fix ath9k ASPM. Some of patches are cleanup only or do merging common code (with e1000e driver). With CONFIG_PCIEASPM

[ath9k-devel] [PATCH] ath9k: skip -config_pci_powersave() if PCIe port has ASPM disabled

2011-07-29 Thread Stanislaw Gruszka
, but this is probably some other bug). Tested-by: Camilo Mesias cam...@mesias.co.uk Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |6 +- drivers/net/wireless/ath/ath9k/ar9003_hw.c |6 +- drivers/net/wireless/ath

[ath9k-devel] [RFC/RFT v2 01/12] ath9k: skip -config_pci_powersave() if PCIe port has ASPM disabled

2011-07-27 Thread Stanislaw Gruszka
is connected to, has ASPM disabled. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |6 +- drivers/net/wireless/ath/ath9k/ar9003_hw.c |6 +- drivers/net/wireless/ath/ath9k/hw.c|1 - drivers/net/wireless/ath/ath9k/hw.h

[ath9k-devel] [RFC/RFT v2 00/12] ath9k: ASPM fixes

2011-07-27 Thread Stanislaw Gruszka
This patch series try to fix ath9k ASPM. Some of patches are cleanup only or do merging common code (with e1000e driver). With CONFIG_PCIEASPM it's possible to change ASPM settings on runtime via /sys/module/pcie_aspm/parameters/policy . However most drivers I looked at assume this setting is

[ath9k-devel] [RFC/RFT v2 02/12] ath9k: remove -config_pci_powersave() redundant argument

2011-07-27 Thread Stanislaw Gruszka
We always call -config_pci_powersave() with both restore and power_off arguments equal to 0 or both equal to 1, so merge them into one argument. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |5 ++--- drivers/net/wireless/ath/ath9k

[ath9k-devel] [RFC/RFT v2 05/12] ath9k: do btcoex ASPM disabling at initialization time

2011-07-27 Thread Stanislaw Gruszka
. This need to be fixed for CONFIG_PCIEASPM, that will be done later ... Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.h |1 - drivers/net/wireless/ath/ath9k/main.c |2 - drivers/net/wireless/ath/ath9k/pci.c | 52 +--- 3

[ath9k-devel] [RFC/RFT v2 03/12] ath9k: merge common -config_pci_powersave() checks

2011-07-27 Thread Stanislaw Gruszka
Move common checks into wrapper function. Since ASPM can be only enabled on PCIe devices -is_pciexpress check is unneeded. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |3 --- drivers/net/wireless/ath/ath9k/ar9003_hw.c |3

[ath9k-devel] [RFC/RFT v2 04/12] ath9k: use common PCIe ASPM definces instead of custom ones

2011-07-27 Thread Stanislaw Gruszka
Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.h |4 drivers/net/wireless/ath/ath9k/pci.c | 17 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless

[ath9k-devel] [RFC/RFT v2 06/12] ath9k: init PCIe PM and SERDES registers if ASPM is enabled

2011-07-27 Thread Stanislaw Gruszka
During init, we currently skip calling -config_pci_powersave() because ah-aspm_enabled is not initialized. Fix that and initialize registers after we discover if ASPM is enabled. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.c |5 + drivers

[ath9k-devel] [RFC/RFT v2 07/12] pci: aspm: add function for disabling ASPM

2011-07-27 Thread Stanislaw Gruszka
Add support for disabling ASPM if !CONFIG_PCIEASPM. Patch is based on code from e1000e. Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/pci/pcie/Makefile |3 +-- drivers/pci/pcie/aspm.c | 41

[ath9k-devel] [RFC/RFT v2 08/12] ath9k: use common function for disabling ASPM

2011-07-27 Thread Stanislaw Gruszka
Disable ASPM using common function, this works also with CONFIG_PCIEASPM=y. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/pci.c | 29 ++--- 1 files changed, 6 insertions(+), 23 deletions(-) diff --git a/drivers/net/wireless/ath

[ath9k-devel] [RFC/RFT v2 10/12] pci: aspm: add settings changed callback

2011-07-27 Thread Stanislaw Gruszka
Inform drivers that register pci_drviver-aspm_changed(), about new ASPM settings. Callback is only called for child (endpoint) devices. Cc: Jesse Barnes jbar...@virtuousgeek.org Cc: linux-...@vger.kernel.org Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/pci/pcie/aspm.c |5

[ath9k-devel] [RFC/RFT v2 11/12] ath9k: be prepare for dynamic ASPM settings change

2011-07-27 Thread Stanislaw Gruszka
ASPM change. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw-ops.h |1 + drivers/net/wireless/ath/ath9k/hw.h |1 + drivers/net/wireless/ath/ath9k/pci.c| 31 +++ 3 files changed, 33 insertions(+), 0 deletions

[ath9k-devel] [RFC/RFT v2 12/12] ath9k: fix initialization ordering issues

2011-07-27 Thread Stanislaw Gruszka
We should initialize registers before ieee80211_register_hw(). For non RFC posting, this patch will be merged with previous patch ath9k: do btcoex ASPM disabling at initialization time Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.c | 11

[ath9k-devel] [RFC/RFT v2 09/12] e1000e: use common function for disabling ASPM

2011-07-27 Thread Stanislaw Gruszka
Cc: Jeff Kirsher jeffrey.t.kirs...@intel.com Cc: e1000-de...@lists.sourceforge.net Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/e1000e/netdev.c | 31 +-- 1 files changed, 1 insertions(+), 30 deletions(-) diff --git a/drivers/net/e1000e

Re: [ath9k-devel] [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM

2011-07-25 Thread Stanislaw Gruszka
On Sat, Jul 23, 2011 at 10:41:30AM +0530, Rajkumar Manoharan wrote: + /* initalize PCIe PM registers if device introduce itself as PCIe */ + if (ah-is_pciexpress) + ath9k_hw_ops(ah)-config_pci_powersave(ah, false); + Use ath9k_hw_configpcipowersave wrapper instead. I changed

Re: [ath9k-devel] [RFC/RFT 4/6] ath9k: use common PCIe ASPM definces instead of custom ones

2011-07-25 Thread Stanislaw Gruszka
On Sat, Jul 23, 2011 at 10:16:32AM +0530, Rajkumar Manoharan wrote: + pci_read_config_byte(pdev, PCI_EXP_LNKCTL, aspm); + aspm = ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); + pci_write_config_byte(pdev, PCI_EXP_LNKCTL, aspm); } There seems to be where address diff b/w

Re: [ath9k-devel] [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM

2011-07-25 Thread Stanislaw Gruszka
On Mon, Jul 25, 2011 at 11:29:30AM +0200, Stanislaw Gruszka wrote: On Sat, Jul 23, 2011 at 10:41:30AM +0530, Rajkumar Manoharan wrote: + /* initalize PCIe PM registers if device introduce itself as PCIe */ + if (ah-is_pciexpress) + ath9k_hw_ops(ah)-config_pci_powersave(ah, false

Re: [ath9k-devel] APSM, AR9285 and bus hangs

2011-07-22 Thread Stanislaw Gruszka
On Fri, Jul 15, 2011 at 06:18:58PM +0200, Stanislaw Gruszka wrote: On Tue, Jun 14, 2011 at 08:02:54AM +0800, Adrian Chadd wrote: I think the problem on these laptops is that -disabling- the APSM bits causes some systems to hang. It is interesting if below patch works, people who can

[ath9k-devel] [RFC/RFT 1/6] ath9k: skip -config_pci_powersave() if PCIe port has ASPM disabled

2011-07-22 Thread Stanislaw Gruszka
is connected to, has ASPM disabled. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |6 +- drivers/net/wireless/ath/ath9k/ar9003_hw.c |6 +- drivers/net/wireless/ath/ath9k/hw.c|1 - drivers/net/wireless/ath/ath9k/hw.h

[ath9k-devel] [RFC/RFT 2/6] ath9k: remove -config_pci_powersave() redundant argument

2011-07-22 Thread Stanislaw Gruszka
We always call -config_pci_powersave() with both restore and power_off arguments equal to 0 or both equal to 1, so merge them into one argument. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |5 ++--- drivers/net/wireless/ath/ath9k

[ath9k-devel] [RFC/RFT 3/6] ath9k: merge common -config_pci_powersave() checks

2011-07-22 Thread Stanislaw Gruszka
Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/ar9002_hw.c |3 --- drivers/net/wireless/ath/ath9k/ar9003_hw.c |3 --- drivers/net/wireless/ath/ath9k/hw-ops.h|3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net

[ath9k-devel] [RFC/RFT 4/6] ath9k: use common PCIe ASPM definces instead of custom ones

2011-07-22 Thread Stanislaw Gruszka
Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.h |4 drivers/net/wireless/ath/ath9k/pci.c | 11 ++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k

[ath9k-devel] [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM

2011-07-22 Thread Stanislaw Gruszka
We might not initialize registers if ah-aspm_enabled == false, assure we do this. Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/hw.c |5 + drivers/net/wireless/ath/ath9k/pci.c |4 2 files changed, 5 insertions(+), 4 deletions(-) diff

Re: [ath9k-devel] APSM, AR9285 and bus hangs

2011-07-15 Thread Stanislaw Gruszka
interested on comments :-) --- From 6f6f488156d60b44adeb68bbd0cb474b92111681 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka sgrus...@redhat.com Date: Fri, 15 Jul 2011 17:50:48 +0200 Subject: [PATCH] ath9k: skip -config_pci_powersave quirks if PCIe port has ASPM disabled We receive many bug reports about

Re: [ath9k-devel] APSM, AR9285 and bus hangs

2011-06-14 Thread Stanislaw Gruszka
On Mon, Jun 13, 2011 at 07:10:56PM +0530, Mohammed Shafi wrote: I see this commit in 2.6.39, missed in 2.6.38 and 2.6.35 currently. Is possible this is the fix which do not break other things? hi, no, this fix only affects AR9280 and it does not affects AR9285. That could be another

Re: [ath9k-devel] APSM, AR9285 and bus hangs

2011-06-13 Thread Stanislaw Gruszka
On Mon, Jun 13, 2011 at 09:01:57PM +0800, Adrian Chadd wrote: On 13 June 2011 19:00, Stanislaw Gruszka sgrus...@redhat.com wrote: cam a fedora user, confirms that patch fixes the locks-ups https://bugzilla.redhat.com/show_bug.cgi?id=697157#c26 We are waiting for fix now :-) Cool

[ath9k-devel] [PATCH] ath9k: fix race conditions when stop device

2011-01-25 Thread Stanislaw Gruszka
from: http://marc.info/?l=linux-wirelessm=129438358921501w=2 Cc: sta...@kernel.org Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/init.c |5 - drivers/net/wireless/ath/ath9k/main.c |9 + 2 files changed, 9 insertions(+), 5 deletions

[ath9k-devel] [PATCH] ath9k_htc: fix race conditions when stop device

2011-01-25 Thread Stanislaw Gruszka
We do not kill any scheduled tasklets when stopping device, that may cause usage of resources after free. Disable interrupts, kill tasklets and then works in correct order. Cc: sta...@kernel.org Tested-by: Sujith m.suj...@gmail.com Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers

[ath9k-devel] [RFC/RFT] ath9k_htc: fix race conditions when stop device

2011-01-20 Thread Stanislaw Gruszka
there is no synchronize_irq, which IMHO should be added somewhere in htc/wmi stop. RFC/RTC for now (note I'm not able to test patch). Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com --- drivers/net/wireless/ath/ath9k/htc_drv_init.c |3 --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 21