All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ath9k patches
@ 2015-03-09  8:50 Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 1/5] ath9k: Add PCIE powersave macros Sujith Manoharan
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-09  8:50 UTC (permalink / raw)
  To: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

For -next.

Sujith Manoharan (5):
  ath9k: Add PCIE powersave macros
  ath9k: Fix PLL powersave for AR9485
  ath9k: Initialize pll_pwrsave for AR9462/AR9565
  ath9k: Check allowed PCIE powersave configuration
  ath9k: Fix RTT chainmask usage

 drivers/net/wireless/ath/ath9k/ar9003_hw.c  | 83 +++++++++++++++++++++--------
 drivers/net/wireless/ath/ath9k/ar9003_rtt.c |  6 +--
 drivers/net/wireless/ath/ath9k/hw.c         |  3 ++
 drivers/net/wireless/ath/ath9k/hw.h         |  8 ++-
 drivers/net/wireless/ath/ath9k/init.c       |  9 +++-
 5 files changed, 83 insertions(+), 26 deletions(-)

-- 
2.3.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/5] ath9k: Add PCIE powersave macros
  2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
@ 2015-03-09  8:50 ` Sujith Manoharan
  2015-03-13 13:20   ` [1/5] " Kalle Valo
  2015-03-09  8:50 ` [PATCH 2/5] ath9k: Fix PLL powersave for AR9485 Sujith Manoharan
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-09  8:50 UTC (permalink / raw)
  To: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

These will be used to handle chip-specific
power save configuration.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 29a25d9..2bb3b33 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -309,6 +309,12 @@ enum ath9k_hw_hang_checks {
 	HW_MAC_HANG               = BIT(5),
 };
 
+#define AR_PCIE_PLL_PWRSAVE_CONTROL BIT(0)
+#define AR_PCIE_PLL_PWRSAVE_ON_D3   BIT(1)
+#define AR_PCIE_PLL_PWRSAVE_ON_D0   BIT(2)
+#define AR_PCIE_CDR_PWRSAVE_ON_D3   BIT(3)
+#define AR_PCIE_CDR_PWRSAVE_ON_D0   BIT(4)
+
 struct ath9k_ops_config {
 	int dma_beacon_response_time;
 	int sw_beacon_response_time;
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] ath9k: Fix PLL powersave for AR9485
  2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 1/5] ath9k: Add PCIE powersave macros Sujith Manoharan
@ 2015-03-09  8:50 ` Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 3/5] ath9k: Initialize pll_pwrsave for AR9462/AR9565 Sujith Manoharan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-09  8:50 UTC (permalink / raw)
  To: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Use the value in ah->config.pll_pwrsave to determine
which array needs to be loaded. Also, initialize
pll_pwrsave to 1 by default.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_hw.c | 10 +++++-----
 drivers/net/wireless/ath/ath9k/hw.h        |  2 +-
 drivers/net/wireless/ath/ath9k/init.c      |  8 +++++++-
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 4335ccb..ea33f8d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -195,16 +195,16 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
 		INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
 			       ar9485_1_1_baseband_core_txfir_coeff_japan_2484);
 
-		if (ah->config.no_pll_pwrsave) {
+		if (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) {
 			INIT_INI_ARRAY(&ah->iniPcieSerdes,
-				       ar9485_1_1_pcie_phy_clkreq_disable_L1);
+				       ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1);
 			INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
-				       ar9485_1_1_pcie_phy_clkreq_disable_L1);
+				       ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1);
 		} else {
 			INIT_INI_ARRAY(&ah->iniPcieSerdes,
-				       ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1);
+				       ar9485_1_1_pcie_phy_clkreq_disable_L1);
 			INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
-				       ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1);
+				       ar9485_1_1_pcie_phy_clkreq_disable_L1);
 		}
 	} else if (AR_SREV_9462_21(ah)) {
 		INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 2bb3b33..e124ee2 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -341,7 +341,7 @@ struct ath9k_ops_config {
 	u32 ant_ctrl_comm2g_switch_enable;
 	bool xatten_margin_cfg;
 	bool alt_mingainidx;
-	bool no_pll_pwrsave;
+	bool pll_pwrsave;
 	bool tx_gain_buffalo;
 	bool led_active_high;
 };
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 6c6e884..ca66fab 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -437,8 +437,14 @@ static void ath9k_init_pcoem_platform(struct ath_softc *sc)
 		ath_info(common, "Enable WAR for ASPM D3/L1\n");
 	}
 
+	/*
+	 * The default value of pll_pwrsave is 1.
+	 * For certain AR9485 cards, it is set to 0.
+	 */
+	ah->config.pll_pwrsave = 1;
+
 	if (sc->driver_data & ATH9K_PCI_NO_PLL_PWRSAVE) {
-		ah->config.no_pll_pwrsave = true;
+		ah->config.pll_pwrsave = 0;
 		ath_info(common, "Disable PLL PowerSave\n");
 	}
 
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] ath9k: Initialize pll_pwrsave for AR9462/AR9565
  2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 1/5] ath9k: Add PCIE powersave macros Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 2/5] ath9k: Fix PLL powersave for AR9485 Sujith Manoharan
@ 2015-03-09  8:50 ` Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 4/5] ath9k: Check allowed PCIE powersave configuration Sujith Manoharan
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-09  8:50 UTC (permalink / raw)
  To: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Cards based on AR9462/AR9565 support more PCIE
power save mechanisms, so register them correctly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c   | 3 +++
 drivers/net/wireless/ath/ath9k/hw.h   | 2 +-
 drivers/net/wireless/ath/ath9k/init.c | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 60aa8d7..cc8bea8 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -366,6 +366,9 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
 		ah->config.rimt_first = 700;
 	}
 
+	if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
+		ah->config.pll_pwrsave = 7;
+
 	/*
 	 * We need this for PCI devices only (Cardbus, PCI, miniPCI)
 	 * _and_ if on non-uniprocessor systems (Multiprocessor/HT).
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index e124ee2..2067cb5 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -341,7 +341,7 @@ struct ath9k_ops_config {
 	u32 ant_ctrl_comm2g_switch_enable;
 	bool xatten_margin_cfg;
 	bool alt_mingainidx;
-	bool pll_pwrsave;
+	u8 pll_pwrsave;
 	bool tx_gain_buffalo;
 	bool led_active_high;
 };
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index ca66fab..de862ad 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -440,6 +440,7 @@ static void ath9k_init_pcoem_platform(struct ath_softc *sc)
 	/*
 	 * The default value of pll_pwrsave is 1.
 	 * For certain AR9485 cards, it is set to 0.
+	 * For AR9462, AR9565 it's set to 7.
 	 */
 	ah->config.pll_pwrsave = 1;
 
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] ath9k: Check allowed PCIE powersave configuration
  2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
                   ` (2 preceding siblings ...)
  2015-03-09  8:50 ` [PATCH 3/5] ath9k: Initialize pll_pwrsave for AR9462/AR9565 Sujith Manoharan
@ 2015-03-09  8:50 ` Sujith Manoharan
  2015-03-09  8:50 ` [PATCH 5/5] ath9k: Fix RTT chainmask usage Sujith Manoharan
  2015-03-13 13:31 ` [PATCH 0/5] ath9k patches Kalle Valo
  5 siblings, 0 replies; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-09  8:50 UTC (permalink / raw)
  To: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

When assigning the initvals for PCIE sleep/awake
registers, check the configuration that has been
assigned to pll_pwrsave during initialization. Also,
display a warning if we don't have valid arrays.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_hw.c | 73 +++++++++++++++++++++++-------
 1 file changed, 57 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index ea33f8d..df176e6 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -231,10 +231,20 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
 			       ar9462_2p1_modes_fast_clock);
 		INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
 			       ar9462_2p1_baseband_core_txfir_coeff_japan_2484);
-		INIT_INI_ARRAY(&ah->iniPcieSerdes,
-			       ar9462_2p1_pciephy_clkreq_disable_L1);
-		INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
-			       ar9462_2p1_pciephy_clkreq_disable_L1);
+
+		/* Awake -> Sleep Setting */
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdes,
+				       ar9462_2p1_pciephy_clkreq_disable_L1);
+		}
+
+		/* Sleep -> Awake Setting */
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
+				       ar9462_2p1_pciephy_clkreq_disable_L1);
+		}
 	} else if (AR_SREV_9462_20(ah)) {
 
 		INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_2p0_mac_core);
@@ -262,11 +272,18 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
 				ar9462_2p0_common_rx_gain);
 
 		/* Awake -> Sleep Setting */
-		INIT_INI_ARRAY(&ah->iniPcieSerdes,
-			       ar9462_2p0_pciephy_clkreq_disable_L1);
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdes,
+				       ar9462_2p0_pciephy_clkreq_disable_L1);
+		}
+
 		/* Sleep -> Awake Setting */
-		INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
-			       ar9462_2p0_pciephy_clkreq_disable_L1);
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
+				       ar9462_2p0_pciephy_clkreq_disable_L1);
+		}
 
 		/* Fast clock modal settings */
 		INIT_INI_ARRAY(&ah->iniModesFastClock,
@@ -456,10 +473,19 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
 		INIT_INI_ARRAY(&ah->iniModesTxGain,
 			       ar9565_1p1_Modes_lowest_ob_db_tx_gain_table);
 
-		INIT_INI_ARRAY(&ah->iniPcieSerdes,
-			       ar9565_1p1_pciephy_clkreq_disable_L1);
-		INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
-			       ar9565_1p1_pciephy_clkreq_disable_L1);
+		/* Awake -> Sleep Setting */
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdes,
+				       ar9565_1p1_pciephy_clkreq_disable_L1);
+		}
+
+		/* Sleep -> Awake Setting */
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
+				       ar9565_1p1_pciephy_clkreq_disable_L1);
+		}
 
 		INIT_INI_ARRAY(&ah->iniModesFastClock,
 				ar9565_1p1_modes_fast_clock);
@@ -491,10 +517,19 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
 		INIT_INI_ARRAY(&ah->iniModesTxGain,
 			       ar9565_1p0_Modes_lowest_ob_db_tx_gain_table);
 
-		INIT_INI_ARRAY(&ah->iniPcieSerdes,
-			       ar9565_1p0_pciephy_clkreq_disable_L1);
-		INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
-			       ar9565_1p0_pciephy_clkreq_disable_L1);
+		/* Awake -> Sleep Setting */
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdes,
+				       ar9565_1p0_pciephy_clkreq_disable_L1);
+		}
+
+		/* Sleep -> Awake Setting */
+		if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) &&
+		    (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) {
+			INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
+				       ar9565_1p0_pciephy_clkreq_disable_L1);
+		}
 
 		INIT_INI_ARRAY(&ah->iniModesFastClock,
 				ar9565_1p0_modes_fast_clock);
@@ -1130,6 +1165,12 @@ void ar9003_hw_attach_ops(struct ath_hw *ah)
 	struct ath_hw_ops *ops = ath9k_hw_ops(ah);
 
 	ar9003_hw_init_mode_regs(ah);
+
+	if (AR_SREV_9003_PCOEM(ah)) {
+		WARN_ON(!ah->iniPcieSerdes.ia_array);
+		WARN_ON(!ah->iniPcieSerdesLowPower.ia_array);
+	}
+
 	priv_ops->init_mode_gain_regs = ar9003_hw_init_mode_gain_regs;
 	priv_ops->init_hang_checks = ar9003_hw_init_hang_checks;
 	priv_ops->detect_mac_hang = ar9003_hw_detect_mac_hang;
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] ath9k: Fix RTT chainmask usage
  2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
                   ` (3 preceding siblings ...)
  2015-03-09  8:50 ` [PATCH 4/5] ath9k: Check allowed PCIE powersave configuration Sujith Manoharan
@ 2015-03-09  8:50 ` Sujith Manoharan
  2015-03-13 13:31 ` [PATCH 0/5] ath9k patches Kalle Valo
  5 siblings, 0 replies; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-09  8:50 UTC (permalink / raw)
  To: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Since the RTT registers need to be configured for all
valid chains irrespective of the runtime chainmask,
use the actual chainmask of the chip.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_rtt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_rtt.c b/drivers/net/wireless/ath/ath9k/ar9003_rtt.c
index 9344188..e4d11fa 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_rtt.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_rtt.c
@@ -106,7 +106,7 @@ void ar9003_hw_rtt_load_hist(struct ath_hw *ah)
 	int chain, i;
 
 	for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
-		if (!(ah->rxchainmask & (1 << chain)))
+		if (!(ah->caps.rx_chainmask & (1 << chain)))
 			continue;
 		for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++) {
 			ar9003_hw_rtt_load_hist_entry(ah, chain, i,
@@ -171,7 +171,7 @@ void ar9003_hw_rtt_fill_hist(struct ath_hw *ah)
 	int chain, i;
 
 	for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
-		if (!(ah->rxchainmask & (1 << chain)))
+		if (!(ah->caps.rx_chainmask & (1 << chain)))
 			continue;
 		for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++) {
 			ah->caldata->rtt_table[chain][i] =
@@ -193,7 +193,7 @@ void ar9003_hw_rtt_clear_hist(struct ath_hw *ah)
 	int chain, i;
 
 	for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
-		if (!(ah->rxchainmask & (1 << chain)))
+		if (!(ah->caps.rx_chainmask & (1 << chain)))
 			continue;
 		for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++)
 			ar9003_hw_rtt_load_hist_entry(ah, chain, i, 0);
-- 
2.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [1/5] ath9k: Add PCIE powersave macros
  2015-03-09  8:50 ` [PATCH 1/5] ath9k: Add PCIE powersave macros Sujith Manoharan
@ 2015-03-13 13:20   ` Kalle Valo
  0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2015-03-13 13:20 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: linux-wireless


> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> 
> These will be used to handle chip-specific
> power save configuration.
> 
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Thanks, 5 patches applied to wireless-drivers-next.git:

e519f78f1191 ath9k: Add PCIE powersave macros
afa7e6dbd91d ath9k: Fix PLL powersave for AR9485
656cd75c3873 ath9k: Initialize pll_pwrsave for AR9462/AR9565
93f7d6f3d5aa ath9k: Check allowed PCIE powersave configuration
dd2951124838 ath9k: Fix RTT chainmask usage

Kalle Valo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ath9k patches
  2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
                   ` (4 preceding siblings ...)
  2015-03-09  8:50 ` [PATCH 5/5] ath9k: Fix RTT chainmask usage Sujith Manoharan
@ 2015-03-13 13:31 ` Kalle Valo
  2015-03-14  0:21   ` Sujith Manoharan
  5 siblings, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2015-03-13 13:31 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: linux-wireless

Sujith Manoharan <sujith@msujith.org> writes:

> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
>
> For -next.
>
> Sujith Manoharan (5):
>   ath9k: Add PCIE powersave macros
>   ath9k: Fix PLL powersave for AR9485
>   ath9k: Initialize pll_pwrsave for AR9462/AR9565
>   ath9k: Check allowed PCIE powersave configuration
>   ath9k: Fix RTT chainmask usage

With these patches I got a new warning:

drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process':
drivers/net/wireless/ath/ath9k/ar9003_aic.c:431:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Is it a valid warning?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ath9k patches
  2015-03-13 13:31 ` [PATCH 0/5] ath9k patches Kalle Valo
@ 2015-03-14  0:21   ` Sujith Manoharan
  2015-03-14  4:35     ` Felix Fietkau
  0 siblings, 1 reply; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-14  0:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

Kalle Valo wrote:
> With these patches I got a new warning:
> 
> drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process':
> drivers/net/wireless/ath/ath9k/ar9003_aic.c:431:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> Is it a valid warning?

When CONFIG_FRAME_WARN is set to 1024, this will be hit.
On my machine, the value is 2048, so the stack doesn't overflow.

But, 1024 could be a valid limit in some architectures, so I'll
rework ar9003_aic_cal_post_process() to avoid using the stack
excessively and post another series.

Sujith

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ath9k patches
  2015-03-14  0:21   ` Sujith Manoharan
@ 2015-03-14  4:35     ` Felix Fietkau
  2015-03-14  5:56       ` Sujith Manoharan
  0 siblings, 1 reply; 11+ messages in thread
From: Felix Fietkau @ 2015-03-14  4:35 UTC (permalink / raw)
  To: Sujith Manoharan, Kalle Valo; +Cc: linux-wireless

On 2015-03-14 01:21, Sujith Manoharan wrote:
> Kalle Valo wrote:
>> With these patches I got a new warning:
>> 
>> drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process':
>> drivers/net/wireless/ath/ath9k/ar9003_aic.c:431:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>> 
>> Is it a valid warning?
> 
> When CONFIG_FRAME_WARN is set to 1024, this will be hit.
> On my machine, the value is 2048, so the stack doesn't overflow.
> 
> But, 1024 could be a valid limit in some architectures, so I'll
> rework ar9003_aic_cal_post_process() to avoid using the stack
> excessively and post another series.
It's probably enough to just change struct ath_aic_sram_info to make it
fit: Just put the bool fields together and make them single-bit.
This should save more than 300 bytes.

- Felix

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ath9k patches
  2015-03-14  4:35     ` Felix Fietkau
@ 2015-03-14  5:56       ` Sujith Manoharan
  0 siblings, 0 replies; 11+ messages in thread
From: Sujith Manoharan @ 2015-03-14  5:56 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: Kalle Valo, linux-wireless

Felix Fietkau wrote:
> It's probably enough to just change struct ath_aic_sram_info to make it
> fit: Just put the bool fields together and make them single-bit.
> This should save more than 300 bytes.

Yes, that works too. Thanks.

Sujith

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-03-14  5:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09  8:50 [PATCH 0/5] ath9k patches Sujith Manoharan
2015-03-09  8:50 ` [PATCH 1/5] ath9k: Add PCIE powersave macros Sujith Manoharan
2015-03-13 13:20   ` [1/5] " Kalle Valo
2015-03-09  8:50 ` [PATCH 2/5] ath9k: Fix PLL powersave for AR9485 Sujith Manoharan
2015-03-09  8:50 ` [PATCH 3/5] ath9k: Initialize pll_pwrsave for AR9462/AR9565 Sujith Manoharan
2015-03-09  8:50 ` [PATCH 4/5] ath9k: Check allowed PCIE powersave configuration Sujith Manoharan
2015-03-09  8:50 ` [PATCH 5/5] ath9k: Fix RTT chainmask usage Sujith Manoharan
2015-03-13 13:31 ` [PATCH 0/5] ath9k patches Kalle Valo
2015-03-14  0:21   ` Sujith Manoharan
2015-03-14  4:35     ` Felix Fietkau
2015-03-14  5:56       ` Sujith Manoharan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.