linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 1/1] ath9k_hw: Fix enabling of MCI and RTT
@ 2012-03-08 10:08 Mohammed Shafi Shajakhan
  2012-03-08 12:40 ` [ath9k-devel] " Sujith Manoharan
  0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-03-08 10:08 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Rodriguez Luis, ath9k-devel,
	Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c  |   11 +++++++++--
 drivers/net/wireless/ath/ath9k/reg.h |    1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index d582cf7..e3598c5 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2390,8 +2390,15 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
 		if (AR_SREV_9485_OR_LATER(ah))
 			ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
 	}
-	if (AR_SREV_9462(ah))
-		pCap->hw_caps |= ATH9K_HW_CAP_RTT | ATH9K_HW_CAP_MCI;
+
+	if (AR_SREV_9462(ah)) {
+		ah->ent_mode = REG_READ(ah, AR_ENT_OTP);
+		if (!(ah->ent_mode & AR_ENT_OTP_49GHZ_DISABLE))
+			pCap->hw_caps |= ATH9K_HW_CAP_MCI;
+	}
+
+	if (AR_SREV_9462_20(ah))
+		pCap->hw_caps |= ATH9K_HW_CAP_RTT;
 
 	return 0;
 }
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 80b1856..458f81b 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -1151,6 +1151,7 @@ enum {
 #define AR_INTR_PRIO_ASYNC_ENABLE (AR_SREV_9340(ah) ? 0x4094 : 0x40d4)
 #define AR_ENT_OTP		  0x40d8
 #define AR_ENT_OTP_CHAIN2_DISABLE               0x00020000
+#define AR_ENT_OTP_49GHZ_DISABLE		0x00100000
 #define AR_ENT_OTP_MIN_PKT_SIZE_DISABLE		0x00800000
 
 #define AR_CH0_BB_DPLL1		 0x16180
-- 
1.7.0.4


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

* [ath9k-devel] [RFC 1/1] ath9k_hw: Fix enabling of MCI and RTT
  2012-03-08 10:08 [RFC 1/1] ath9k_hw: Fix enabling of MCI and RTT Mohammed Shafi Shajakhan
@ 2012-03-08 12:40 ` Sujith Manoharan
  2012-03-08 12:51   ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 3+ messages in thread
From: Sujith Manoharan @ 2012-03-08 12:40 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan
  Cc: John W. Linville, Mohammed, ath9k-devel, linux-wireless,
	Rodriguez Luis

Mohammed Shafi Shajakhan wrote:
> +
> +	if (AR_SREV_9462(ah)) {
> +		ah->ent_mode = REG_READ(ah, AR_ENT_OTP);
> +		if (!(ah->ent_mode & AR_ENT_OTP_49GHZ_DISABLE))
> +			pCap->hw_caps |= ATH9K_HW_CAP_MCI;
> +	}
> +
> +	if (AR_SREV_9462_20(ah))
> +		pCap->hw_caps |= ATH9K_HW_CAP_RTT;

ah->ent_mode is already being updated earlier in ath9k_hw_fill_cap_info(),
so there is no need to read AR_ENT_OTP again.

Sujith

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

* Re: [ath9k-devel] [RFC 1/1] ath9k_hw: Fix enabling of MCI and RTT
  2012-03-08 12:40 ` [ath9k-devel] " Sujith Manoharan
@ 2012-03-08 12:51   ` Mohammed Shafi Shajakhan
  0 siblings, 0 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-03-08 12:51 UTC (permalink / raw)
  To: Sujith Manoharan
  Cc: John W. Linville, Mohammed, ath9k-devel, linux-wireless,
	Rodriguez Luis

Hi Sujith,

On Thursday 08 March 2012 06:10 PM, Sujith Manoharan wrote:
> Mohammed Shafi Shajakhan wrote:
>> +
>> +	if (AR_SREV_9462(ah)) {
>> +		ah->ent_mode = REG_READ(ah, AR_ENT_OTP);
>> +		if (!(ah->ent_mode&  AR_ENT_OTP_49GHZ_DISABLE))
>> +			pCap->hw_caps |= ATH9K_HW_CAP_MCI;
>> +	}
>> +
>> +	if (AR_SREV_9462_20(ah))
>> +		pCap->hw_caps |= ATH9K_HW_CAP_RTT;
>
> ah->ent_mode is already being updated earlier in ath9k_hw_fill_cap_info(),
> so there is no need to read AR_ENT_OTP again.

did notice the check AR9300_20_LATER :). just thought if we change 
something and 'ent_mode' holds some other value. anyway will just leave 
the check.

>
> Sujith


-- 
thanks,
shafi

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

end of thread, other threads:[~2012-03-08 12:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 10:08 [RFC 1/1] ath9k_hw: Fix enabling of MCI and RTT Mohammed Shafi Shajakhan
2012-03-08 12:40 ` [ath9k-devel] " Sujith Manoharan
2012-03-08 12:51   ` Mohammed Shafi Shajakhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).