* [PATCH 3/4] ath9k: Modify CCK spur mitigation for AR9462
@ 2012-02-14 8:39 Sujith Manoharan
2012-02-14 9:07 ` Mohammed Shafi
0 siblings, 1 reply; 3+ messages in thread
From: Sujith Manoharan @ 2012-02-14 8:39 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel
This improves sensitivity for CCK at specific channels.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 70e27d2..941b915 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -171,6 +171,7 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah,
struct ath9k_channel *chan)
{
static const u32 spur_freq[4] = { 2420, 2440, 2464, 2480 };
+ static const u32 spur_freq_AR9462[2] = { 2440, 2464 };
int cur_bb_spur, negative = 0, cck_spur_freq;
int i;
int range, max_spur_cnts, synth_freq;
@@ -198,8 +199,12 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah,
range = 10;
synth_freq = chan->channel;
}
+ } else if (AR_SREV_9462(ah)) {
+ range = 5;
+ max_spur_cnts = 2;
+ synth_freq = chan->channel;
} else {
- range = AR_SREV_9462(ah) ? 5 : 10;
+ range = 10;
max_spur_cnts = 4;
synth_freq = chan->channel;
}
@@ -211,6 +216,8 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah,
if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah))
cur_bb_spur = FBIN2FREQ(spur_fbin_ptr[i],
IS_CHAN_2GHZ(chan)) - synth_freq;
+ else if (AR_SREV_9462(ah))
+ cur_bb_spur = spur_freq_AR9462[i] - synth_freq;
else
cur_bb_spur = spur_freq[i] - synth_freq;
--
1.7.9
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 3/4] ath9k: Modify CCK spur mitigation for AR9462
2012-02-14 8:39 [PATCH 3/4] ath9k: Modify CCK spur mitigation for AR9462 Sujith Manoharan
@ 2012-02-14 9:07 ` Mohammed Shafi
2012-02-14 9:23 ` Sujith Manoharan
0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi @ 2012-02-14 9:07 UTC (permalink / raw)
To: Sujith Manoharan; +Cc: linville, linux-wireless, ath9k-devel
Hi Sujith,
On Tue, Feb 14, 2012 at 2:09 PM, Sujith Manoharan
<c_manoha@qca.qualcomm.com> wrote:
> This improves sensitivity for CCK at specific channels.
>
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath9k/ar9003_phy.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
> index 70e27d2..941b915 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
> @@ -171,6 +171,7 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah,
> struct ath9k_channel *chan)
> {
> static const u32 spur_freq[4] = { 2420, 2440, 2464, 2480 };
> + static const u32 spur_freq_AR9462[2] = { 2440, 2464 };
> int cur_bb_spur, negative = 0, cck_spur_freq;
> int i;
> int range, max_spur_cnts, synth_freq;
> @@ -198,8 +199,12 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah,
> range = 10;
> synth_freq = chan->channel;
> }
> + } else if (AR_SREV_9462(ah)) {
> + range = 5;
> + max_spur_cnts = 2;
> + synth_freq = chan->channel;
> } else {
> - range = AR_SREV_9462(ah) ? 5 : 10;
> + range = 10;
> max_spur_cnts = 4;
> synth_freq = chan->channel;
> }
> @@ -211,6 +216,8 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah,
> if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah))
> cur_bb_spur = FBIN2FREQ(spur_fbin_ptr[i],
> IS_CHAN_2GHZ(chan)) - synth_freq;
> + else if (AR_SREV_9462(ah))
> + cur_bb_spur = spur_freq_AR9462[i] - synth_freq;
> else
> cur_bb_spur = spur_freq[i] - synth_freq;
i saw this some time back ,the check will not take care of this logic
if (AR_SREV_9462(ah) && (i == 0 || i == 3))
continue;
please let me know if i had missed something
>
> --
> 1.7.9
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
shafi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-14 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 8:39 [PATCH 3/4] ath9k: Modify CCK spur mitigation for AR9462 Sujith Manoharan
2012-02-14 9:07 ` Mohammed Shafi
2012-02-14 9:23 ` Sujith Manoharan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox