All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ath9k patches
@ 2015-03-13  3:43 ` Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

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

More support for AIC, for -next.

Sujith Manoharan (4):
  ath9k: Handle MCI_STATE_AIC_CAL_RESET
  ath9k: Handle MCI_STATE_AIC_START
  ath9k: Handle MCI_STATE_AIC_CAL
  ath9k: Start AIC calibration during MCI reset

 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 69 ++++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath9k/ar9003_aic.h |  3 ++
 drivers/net/wireless/ath/ath9k/ar9003_mci.c | 15 +++++++
 3 files changed, 85 insertions(+), 2 deletions(-)

-- 
2.3.1


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

* [ath9k-devel] [PATCH 0/4] ath9k patches
@ 2015-03-13  3:43 ` Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: ath9k-devel

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

More support for AIC, for -next.

Sujith Manoharan (4):
  ath9k: Handle MCI_STATE_AIC_CAL_RESET
  ath9k: Handle MCI_STATE_AIC_START
  ath9k: Handle MCI_STATE_AIC_CAL
  ath9k: Start AIC calibration during MCI reset

 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 69 ++++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath9k/ar9003_aic.h |  3 ++
 drivers/net/wireless/ath/ath9k/ar9003_mci.c | 15 +++++++
 3 files changed, 85 insertions(+), 2 deletions(-)

-- 
2.3.1

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

* [PATCH 1/4] ath9k: Handle MCI_STATE_AIC_CAL_RESET
  2015-03-13  3:43 ` [ath9k-devel] " Sujith Manoharan
@ 2015-03-13  3:43   ` Sujith Manoharan
  -1 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

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

Add a routine to handle the MCI_STATE_AIC_CAL_RESET
message.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 8 ++++++++
 drivers/net/wireless/ath/ath9k/ar9003_aic.h | 1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.c b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
index 7bdbc7a..4e8cf08 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
@@ -512,6 +512,14 @@ exit:
 
 }
 
+u8 ar9003_aic_cal_reset(struct ath_hw *ah)
+{
+	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+
+	aic->aic_cal_state = AIC_CAL_STATE_IDLE;
+	return aic->aic_cal_state;
+}
+
 u8 ar9003_aic_calibration_single(struct ath_hw *ah)
 {
 	struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 9651bcd..5e48710 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
 	struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
 
 #endif /* AR9003_AIC_H */
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index 6fa98e5..d6ed628 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
 		value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
 		mci->need_flush_btinfo = false;
 		break;
+	case MCI_STATE_AIC_CAL_RESET:
+		if (ath9k_hw_is_aic_enabled(ah))
+			value = ar9003_aic_cal_reset(ah);
+		break;
 	case MCI_STATE_AIC_CAL_SINGLE:
 		if (ath9k_hw_is_aic_enabled(ah))
 			value = ar9003_aic_calibration_single(ah);
-- 
2.3.1


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

* [ath9k-devel] [PATCH 1/4] ath9k: Handle MCI_STATE_AIC_CAL_RESET
@ 2015-03-13  3:43   ` Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: ath9k-devel

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

Add a routine to handle the MCI_STATE_AIC_CAL_RESET
message.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 8 ++++++++
 drivers/net/wireless/ath/ath9k/ar9003_aic.h | 1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.c b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
index 7bdbc7a..4e8cf08 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
@@ -512,6 +512,14 @@ exit:
 
 }
 
+u8 ar9003_aic_cal_reset(struct ath_hw *ah)
+{
+	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+
+	aic->aic_cal_state = AIC_CAL_STATE_IDLE;
+	return aic->aic_cal_state;
+}
+
 u8 ar9003_aic_calibration_single(struct ath_hw *ah)
 {
 	struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 9651bcd..5e48710 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
 	struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
 
 #endif /* AR9003_AIC_H */
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index 6fa98e5..d6ed628 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
 		value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
 		mci->need_flush_btinfo = false;
 		break;
+	case MCI_STATE_AIC_CAL_RESET:
+		if (ath9k_hw_is_aic_enabled(ah))
+			value = ar9003_aic_cal_reset(ah);
+		break;
 	case MCI_STATE_AIC_CAL_SINGLE:
 		if (ath9k_hw_is_aic_enabled(ah))
 			value = ar9003_aic_calibration_single(ah);
-- 
2.3.1

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

* [PATCH 2/4] ath9k: Handle MCI_STATE_AIC_START
  2015-03-13  3:43 ` [ath9k-devel] " Sujith Manoharan
@ 2015-03-13  3:43   ` Sujith Manoharan
  -1 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

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

This patch adds a function to handle the
MCI message MCI_STATE_AIC_START.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 33 +++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/ar9003_aic.h |  1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c |  4 ++++
 3 files changed, 38 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.c b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
index 4e8cf08..5b4f818 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
@@ -18,6 +18,7 @@
 #include "hw-ops.h"
 #include "ar9003_mci.h"
 #include "ar9003_aic.h"
+#include "ar9003_phy.h"
 #include "reg_aic.h"
 
 static const u8 com_att_db_table[ATH_AIC_MAX_COM_ATT_DB_TABLE] = {
@@ -512,6 +513,38 @@ exit:
 
 }
 
+u8 ar9003_aic_start_normal(struct ath_hw *ah)
+{
+	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+	int16_t i;
+
+	if (aic->aic_cal_state != AIC_CAL_STATE_DONE)
+		return 1;
+
+	ar9003_aic_gain_table(ah);
+
+	REG_WRITE(ah, AR_PHY_AIC_SRAM_ADDR_B1, ATH_AIC_SRAM_AUTO_INCREMENT);
+
+	for (i = 0; i < ATH_AIC_MAX_BT_CHANNEL; i++) {
+		REG_WRITE(ah, AR_PHY_AIC_SRAM_DATA_B1, aic->aic_sram[i]);
+	}
+
+	/* FIXME: Replace these with proper register names */
+	REG_WRITE(ah, 0xa6b0, 0x80);
+	REG_WRITE(ah, 0xa6b4, 0x5b2df0);
+	REG_WRITE(ah, 0xa6b8, 0x10762cc8);
+	REG_WRITE(ah, 0xa6bc, 0x1219a4b);
+	REG_WRITE(ah, 0xa6c0, 0x1e01);
+	REG_WRITE(ah, 0xb6b4, 0xf0);
+	REG_WRITE(ah, 0xb6c0, 0x1e01);
+	REG_WRITE(ah, 0xb6b0, 0x81);
+	REG_WRITE(ah, AR_PHY_65NM_CH1_RXTX4, 0x40000000);
+
+	aic->aic_enabled = true;
+
+	return 0;
+}
+
 u8 ar9003_aic_cal_reset(struct ath_hw *ah)
 {
 	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 5e48710..1ee5a8c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
 	struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_start_normal(struct ath_hw *ah);
 u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
 
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index d6ed628..b559d75 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
 		value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
 		mci->need_flush_btinfo = false;
 		break;
+	case MCI_STATE_AIC_START:
+		if (ath9k_hw_is_aic_enabled(ah))
+			ar9003_aic_start_normal(ah);
+		break;
 	case MCI_STATE_AIC_CAL_RESET:
 		if (ath9k_hw_is_aic_enabled(ah))
 			value = ar9003_aic_cal_reset(ah);
-- 
2.3.1


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

* [ath9k-devel] [PATCH 2/4] ath9k: Handle MCI_STATE_AIC_START
@ 2015-03-13  3:43   ` Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: ath9k-devel

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

This patch adds a function to handle the
MCI message MCI_STATE_AIC_START.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 33 +++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/ar9003_aic.h |  1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c |  4 ++++
 3 files changed, 38 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.c b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
index 4e8cf08..5b4f818 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
@@ -18,6 +18,7 @@
 #include "hw-ops.h"
 #include "ar9003_mci.h"
 #include "ar9003_aic.h"
+#include "ar9003_phy.h"
 #include "reg_aic.h"
 
 static const u8 com_att_db_table[ATH_AIC_MAX_COM_ATT_DB_TABLE] = {
@@ -512,6 +513,38 @@ exit:
 
 }
 
+u8 ar9003_aic_start_normal(struct ath_hw *ah)
+{
+	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+	int16_t i;
+
+	if (aic->aic_cal_state != AIC_CAL_STATE_DONE)
+		return 1;
+
+	ar9003_aic_gain_table(ah);
+
+	REG_WRITE(ah, AR_PHY_AIC_SRAM_ADDR_B1, ATH_AIC_SRAM_AUTO_INCREMENT);
+
+	for (i = 0; i < ATH_AIC_MAX_BT_CHANNEL; i++) {
+		REG_WRITE(ah, AR_PHY_AIC_SRAM_DATA_B1, aic->aic_sram[i]);
+	}
+
+	/* FIXME: Replace these with proper register names */
+	REG_WRITE(ah, 0xa6b0, 0x80);
+	REG_WRITE(ah, 0xa6b4, 0x5b2df0);
+	REG_WRITE(ah, 0xa6b8, 0x10762cc8);
+	REG_WRITE(ah, 0xa6bc, 0x1219a4b);
+	REG_WRITE(ah, 0xa6c0, 0x1e01);
+	REG_WRITE(ah, 0xb6b4, 0xf0);
+	REG_WRITE(ah, 0xb6c0, 0x1e01);
+	REG_WRITE(ah, 0xb6b0, 0x81);
+	REG_WRITE(ah, AR_PHY_65NM_CH1_RXTX4, 0x40000000);
+
+	aic->aic_enabled = true;
+
+	return 0;
+}
+
 u8 ar9003_aic_cal_reset(struct ath_hw *ah)
 {
 	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 5e48710..1ee5a8c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
 	struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_start_normal(struct ath_hw *ah);
 u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
 
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index d6ed628..b559d75 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
 		value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
 		mci->need_flush_btinfo = false;
 		break;
+	case MCI_STATE_AIC_START:
+		if (ath9k_hw_is_aic_enabled(ah))
+			ar9003_aic_start_normal(ah);
+		break;
 	case MCI_STATE_AIC_CAL_RESET:
 		if (ath9k_hw_is_aic_enabled(ah))
 			value = ar9003_aic_cal_reset(ah);
-- 
2.3.1

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

* [PATCH 3/4] ath9k: Handle MCI_STATE_AIC_CAL
  2015-03-13  3:43 ` [ath9k-devel] " Sujith Manoharan
@ 2015-03-13  3:43   ` Sujith Manoharan
  -1 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

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

Add the main AIC calibration function to
handle MCI_STATE_AIC_CAL.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 28 ++++++++++++++++++++++++++--
 drivers/net/wireless/ath/ath9k/ar9003_aic.h |  1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c |  4 ++++
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.c b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
index 5b4f818..1db119d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
@@ -162,7 +162,7 @@ static void ar9003_aic_gain_table(struct ath_hw *ah)
 	}
 }
 
-static void ar9003_aic_cal_start(struct ath_hw *ah, u8 min_valid_count)
+static u8 ar9003_aic_cal_start(struct ath_hw *ah, u8 min_valid_count)
 {
 	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
 	int i;
@@ -257,6 +257,8 @@ static void ar9003_aic_cal_start(struct ath_hw *ah, u8 min_valid_count)
 
 	aic->aic_caled_chan = 0;
 	aic->aic_cal_state = AIC_CAL_STATE_STARTED;
+
+	return aic->aic_cal_state;
 }
 
 static bool ar9003_aic_cal_post_process(struct ath_hw *ah)
@@ -513,6 +515,28 @@ exit:
 
 }
 
+u8 ar9003_aic_calibration(struct ath_hw *ah)
+{
+	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+	u8 cal_ret = AIC_CAL_STATE_ERROR;
+
+	switch (aic->aic_cal_state) {
+	case AIC_CAL_STATE_IDLE:
+		cal_ret = ar9003_aic_cal_start(ah, 1);
+		break;
+	case AIC_CAL_STATE_STARTED:
+		cal_ret = ar9003_aic_cal_continue(ah, false);
+		break;
+	case AIC_CAL_STATE_DONE:
+		cal_ret = AIC_CAL_STATE_DONE;
+		break;
+	default:
+		break;
+	}
+
+	return cal_ret;
+}
+
 u8 ar9003_aic_start_normal(struct ath_hw *ah)
 {
 	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
@@ -561,7 +585,7 @@ u8 ar9003_aic_calibration_single(struct ath_hw *ah)
 
 	num_chan = MS(mci_hw->config, ATH_MCI_CONFIG_AIC_CAL_NUM_CHAN);
 
-	ar9003_aic_cal_start(ah, num_chan);
+	(void) ar9003_aic_cal_start(ah, num_chan);
 	cal_ret = ar9003_aic_cal_continue(ah, true);
 
 	return cal_ret;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 1ee5a8c..509d1f5 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
 	struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_calibration(struct ath_hw *ah);
 u8 ar9003_aic_start_normal(struct ath_hw *ah);
 u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index b559d75..cdd83d4 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
 		value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
 		mci->need_flush_btinfo = false;
 		break;
+	case MCI_STATE_AIC_CAL:
+		if (ath9k_hw_is_aic_enabled(ah))
+			value = ar9003_aic_calibration(ah);
+		break;
 	case MCI_STATE_AIC_START:
 		if (ath9k_hw_is_aic_enabled(ah))
 			ar9003_aic_start_normal(ah);
-- 
2.3.1


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

* [ath9k-devel] [PATCH 3/4] ath9k: Handle MCI_STATE_AIC_CAL
@ 2015-03-13  3:43   ` Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: ath9k-devel

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

Add the main AIC calibration function to
handle MCI_STATE_AIC_CAL.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_aic.c | 28 ++++++++++++++++++++++++++--
 drivers/net/wireless/ath/ath9k/ar9003_aic.h |  1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c |  4 ++++
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.c b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
index 5b4f818..1db119d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.c
@@ -162,7 +162,7 @@ static void ar9003_aic_gain_table(struct ath_hw *ah)
 	}
 }
 
-static void ar9003_aic_cal_start(struct ath_hw *ah, u8 min_valid_count)
+static u8 ar9003_aic_cal_start(struct ath_hw *ah, u8 min_valid_count)
 {
 	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
 	int i;
@@ -257,6 +257,8 @@ static void ar9003_aic_cal_start(struct ath_hw *ah, u8 min_valid_count)
 
 	aic->aic_caled_chan = 0;
 	aic->aic_cal_state = AIC_CAL_STATE_STARTED;
+
+	return aic->aic_cal_state;
 }
 
 static bool ar9003_aic_cal_post_process(struct ath_hw *ah)
@@ -513,6 +515,28 @@ exit:
 
 }
 
+u8 ar9003_aic_calibration(struct ath_hw *ah)
+{
+	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
+	u8 cal_ret = AIC_CAL_STATE_ERROR;
+
+	switch (aic->aic_cal_state) {
+	case AIC_CAL_STATE_IDLE:
+		cal_ret = ar9003_aic_cal_start(ah, 1);
+		break;
+	case AIC_CAL_STATE_STARTED:
+		cal_ret = ar9003_aic_cal_continue(ah, false);
+		break;
+	case AIC_CAL_STATE_DONE:
+		cal_ret = AIC_CAL_STATE_DONE;
+		break;
+	default:
+		break;
+	}
+
+	return cal_ret;
+}
+
 u8 ar9003_aic_start_normal(struct ath_hw *ah)
 {
 	struct ath9k_hw_aic *aic = &ah->btcoex_hw.aic;
@@ -561,7 +585,7 @@ u8 ar9003_aic_calibration_single(struct ath_hw *ah)
 
 	num_chan = MS(mci_hw->config, ATH_MCI_CONFIG_AIC_CAL_NUM_CHAN);
 
-	ar9003_aic_cal_start(ah, num_chan);
+	(void) ar9003_aic_cal_start(ah, num_chan);
 	cal_ret = ar9003_aic_cal_continue(ah, true);
 
 	return cal_ret;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 1ee5a8c..509d1f5 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -53,6 +53,7 @@ struct ath_aic_out_info {
 	struct ath_aic_sram_info sram;
 };
 
+u8 ar9003_aic_calibration(struct ath_hw *ah);
 u8 ar9003_aic_start_normal(struct ath_hw *ah);
 u8 ar9003_aic_cal_reset(struct ath_hw *ah);
 u8 ar9003_aic_calibration_single(struct ath_hw *ah);
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index b559d75..cdd83d4 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1363,6 +1363,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
 		value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
 		mci->need_flush_btinfo = false;
 		break;
+	case MCI_STATE_AIC_CAL:
+		if (ath9k_hw_is_aic_enabled(ah))
+			value = ar9003_aic_calibration(ah);
+		break;
 	case MCI_STATE_AIC_START:
 		if (ath9k_hw_is_aic_enabled(ah))
 			ar9003_aic_start_normal(ah);
-- 
2.3.1

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

* [PATCH 4/4] ath9k: Start AIC calibration during MCI reset
  2015-03-13  3:43 ` [ath9k-devel] " Sujith Manoharan
@ 2015-03-13  3:43   ` Sujith Manoharan
  -1 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

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

When a MCI reset is done, make sure that AIC
is started.

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

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index cdd83d4..af5ee41 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1017,6 +1017,9 @@ int ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g,
 	if (en_int)
 		ar9003_mci_enable_interrupt(ah);
 
+	if (ath9k_hw_is_aic_enabled(ah))
+		ar9003_aic_start_normal(ah);
+
 	return 0;
 }
 
-- 
2.3.1


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

* [ath9k-devel] [PATCH 4/4] ath9k: Start AIC calibration during MCI reset
@ 2015-03-13  3:43   ` Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2015-03-13  3:43 UTC (permalink / raw)
  To: ath9k-devel

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

When a MCI reset is done, make sure that AIC
is started.

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

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index cdd83d4..af5ee41 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1017,6 +1017,9 @@ int ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g,
 	if (en_int)
 		ar9003_mci_enable_interrupt(ah);
 
+	if (ath9k_hw_is_aic_enabled(ah))
+		ar9003_aic_start_normal(ah);
+
 	return 0;
 }
 
-- 
2.3.1

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

* [PATCH 0/4] ath9k patches
@ 2014-12-11  1:53 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2014-12-11  1:53 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel

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

This series adds initial support for QCA956x.

Miaoqing Pan (4):
  ath9k: Add HW IDs for QCA956x
  ath9k: Add initvals for QCA956x
  ath9k: Fix register definitions for QCA956x
  ath9k: Add QCA956x HW support

 drivers/net/wireless/ath/ath9k/ahb.c             |    4 +
 drivers/net/wireless/ath/ath9k/ani.c             |    3 +-
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c   |   15 +-
 drivers/net/wireless/ath/ath9k/ar9003_hw.c       |   61 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.c      |   47 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h      |   19 +-
 drivers/net/wireless/ath/ath9k/ar956x_initvals.h | 1046 ++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/hw.c              |   41 +-
 drivers/net/wireless/ath/ath9k/hw.h              |    1 +
 drivers/net/wireless/ath/ath9k/mac.c             |    3 +-
 drivers/net/wireless/ath/ath9k/recv.c            |    3 +-
 drivers/net/wireless/ath/ath9k/reg.h             |    4 +
 12 files changed, 1206 insertions(+), 41 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath9k/ar956x_initvals.h

-- 
2.1.3


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

* [PATCH 0/4] ath9k patches
@ 2014-08-27  6:37 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2014-08-27  6:37 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel

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

More channel context fixes.
Pending patches: http://msujith.org/dir/patches/wl/Aug-27-2014/

Sujith

Sujith Manoharan (4):
  ath9k: Fix channel context transition
  ath9k: Disable fastcc for channel context mode
  ath9k: Add more debug statements for channel context
  ath9k: Fix channel context timer

 drivers/net/wireless/ath/ath9k/ath9k.h   |  10 +-
 drivers/net/wireless/ath/ath9k/channel.c | 158 ++++++++++++++++++++++++++++---
 drivers/net/wireless/ath/ath9k/main.c    |   6 ++
 drivers/net/wireless/ath/ath9k/recv.c    |  12 +--
 4 files changed, 163 insertions(+), 23 deletions(-)

-- 
2.1.0


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

* [PATCH 0/4] ath9k patches
@ 2014-08-24 15:46 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2014-08-24 15:46 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel

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

More channel context fixes.

All pending patches: http://msujith.org/dir/patches/wl/Aug-24-2014/

Sujith

Sujith Manoharan (4):
  ath9k: Add new chanctx events
  ath9k: Print the event/state in ath_chanctx_event
  ath9k: Fix interface limits
  ath9k: Fix channel context creation

 drivers/net/wireless/ath/ath9k/ath9k.h   |  5 +++
 drivers/net/wireless/ath/ath9k/channel.c | 63 ++++++++++++++++++++++++++++++--
 drivers/net/wireless/ath/ath9k/init.c    |  6 ++-
 drivers/net/wireless/ath/ath9k/main.c    |  2 +
 4 files changed, 71 insertions(+), 5 deletions(-)

-- 
2.0.4


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

* [PATCH 0/4] ath9k patches
@ 2014-08-23 13:42 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2014-08-23 13:42 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel

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

Third series cleaning up the channel context code. Most of the code
has been moved inside CONFIG_ATH9K_CHANNEL_CONTEXT. Since the normal
path also makes use of certain channel context specific variables,
they have been left unmodified - like 'cur_chan', 'cur_chandef' etc.

After this series, just 3 functions in channel.c are outside
CONFIG_ATH9K_CHANNEL_CONTEXT.

All the pending patches are in:
http://msujith.org/dir/patches/wl/Aug-23-2014/

Sujith

Sujith Manoharan (4):
  ath9k: Fix channel context variables in ath_softc
  ath9k: Remove redundant ifdef
  ath9k: Move ath9k_beacon_add_noa to channel.c
  ath9k: Fix ath_chanctx_get()

 drivers/net/wireless/ath/ath9k/ath9k.h   | 29 ++++++++++++++----
 drivers/net/wireless/ath/ath9k/beacon.c  | 49 ------------------------------
 drivers/net/wireless/ath/ath9k/channel.c | 51 ++++++++++++++++++++++++++++++--
 3 files changed, 72 insertions(+), 57 deletions(-)

-- 
2.0.4


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

* [PATCH 0/4] ath9k patches
@ 2014-08-22  7:53 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2014-08-22  7:53 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel

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

With the introduction of channel context support, ath9k now supports
two types of operation, with separate paths for HW scan and SW scan.
The paths interleave in many places with code overlap and this makes the code
a bit hard to follow. This series begins to separate the two modes by making
the channel context code more self-contained. There is still lots to
be done, though.

Sujith Manoharan (4):
  ath9k: Add a config option for channel context
  ath9k: Move P2P functions to channel.c
  ath9k: Isolate P2P powersave routines
  ath9k: Isolate ath9k_use_chanctx module parameter

 drivers/net/wireless/ath/ath9k/Kconfig   |   9 ++
 drivers/net/wireless/ath/ath9k/ath9k.h   |  47 +++++++++-
 drivers/net/wireless/ath/ath9k/channel.c | 149 +++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/init.c    |  72 ++++++++-------
 drivers/net/wireless/ath/ath9k/main.c    | 119 +++---------------------
 drivers/net/wireless/ath/ath9k/recv.c    |   6 +-
 6 files changed, 258 insertions(+), 144 deletions(-)

-- 
2.0.4


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

* [PATCH 0/4] ath9k patches
@ 2013-12-30  4:16 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2013-12-30  4:16 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

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

QCA9531 is a 2x2 2.4 GHz SoC platform. This series starts adding support
for it.

Sujith Manoharan (4):
  ath9k: Add version/revision macros for QCA9531
  ath9k: Assign macVersion for QCA9531
  ath9k: Add QCA953x initvals
  ath9k: Initialize QCA953x INI arrays

 drivers/net/wireless/ath/ath9k/ar9003_hw.c       |  48 +-
 drivers/net/wireless/ath/ath9k/ar953x_initvals.h | 718 +++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/hw.c              |   5 +
 drivers/net/wireless/ath/ath9k/hw.h              |   1 +
 drivers/net/wireless/ath/ath9k/reg.h             |  13 +-
 5 files changed, 783 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath9k/ar953x_initvals.h

-- 
1.8.5.2


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

* [PATCH 0/4] ath9k patches
@ 2013-12-17 18:06 Sujith Manoharan
  0 siblings, 0 replies; 17+ messages in thread
From: Sujith Manoharan @ 2013-12-17 18:06 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

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

This series has a few RTC fixes. There are still two missing pieces:

* When a cold reset is performed, AR9100 requires the AHB/WMAC interface
  to be reset.
* AR955x requires an SoC RTC reset.

Both have to be done via the external_reset() platform interface.

Sujith Manoharan (4):
  ath9k: Remove ath9k_hw_gettsf32()
  ath9k: Add a delay between RTC reset/clear for AR9003
  ath9k: Fix RTC reset delay
  ath9k: Fix AR9330 external reset

 drivers/net/wireless/ath/ath9k/ar9003_mci.c |  2 +-
 drivers/net/wireless/ath/ath9k/hw.c         | 86 ++++++++++++++---------------
 drivers/net/wireless/ath/ath9k/hw.h         |  2 +-
 drivers/net/wireless/ath/ath9k/init.c       |  3 +-
 4 files changed, 45 insertions(+), 48 deletions(-)

-- 
1.8.5.1


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

end of thread, other threads:[~2015-03-13  3:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13  3:43 [PATCH 0/4] ath9k patches Sujith Manoharan
2015-03-13  3:43 ` [ath9k-devel] " Sujith Manoharan
2015-03-13  3:43 ` [PATCH 1/4] ath9k: Handle MCI_STATE_AIC_CAL_RESET Sujith Manoharan
2015-03-13  3:43   ` [ath9k-devel] " Sujith Manoharan
2015-03-13  3:43 ` [PATCH 2/4] ath9k: Handle MCI_STATE_AIC_START Sujith Manoharan
2015-03-13  3:43   ` [ath9k-devel] " Sujith Manoharan
2015-03-13  3:43 ` [PATCH 3/4] ath9k: Handle MCI_STATE_AIC_CAL Sujith Manoharan
2015-03-13  3:43   ` [ath9k-devel] " Sujith Manoharan
2015-03-13  3:43 ` [PATCH 4/4] ath9k: Start AIC calibration during MCI reset Sujith Manoharan
2015-03-13  3:43   ` [ath9k-devel] " Sujith Manoharan
  -- strict thread matches above, loose matches on Subject: below --
2014-12-11  1:53 [PATCH 0/4] ath9k patches Sujith Manoharan
2014-08-27  6:37 Sujith Manoharan
2014-08-24 15:46 Sujith Manoharan
2014-08-23 13:42 Sujith Manoharan
2014-08-22  7:53 Sujith Manoharan
2013-12-30  4:16 Sujith Manoharan
2013-12-17 18:06 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.