2012-09-24 18:45:30

by John W. Linville

[permalink] [raw]
Subject: [PATCH] ath5k: add missing breaks in ath5k_hw_set_spur_mitigation_filter

From: "John W. Linville" <[email protected]>

https://bugzilla.kernel.org/show_bug.cgi?id=47681

Reported-by: David Binderman <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
---
drivers/net/wireless/ath/ath5k/phy.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 8b71a2d..d605217 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1975,11 +1975,13 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah,
spur_delta_phase = (spur_offset << 18) / 25;
spur_freq_sigma_delta = (spur_delta_phase >> 10);
symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 2;
+ break;
case AR5K_BWMODE_5MHZ:
/* Both sample_freq and chip_freq are 10MHz (?) */
spur_delta_phase = (spur_offset << 19) / 25;
spur_freq_sigma_delta = (spur_delta_phase >> 10);
symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4;
+ break;
default:
if (channel->band == IEEE80211_BAND_5GHZ) {
/* Both sample_freq and chip_freq are 40MHz */
--
1.7.11.4



2012-09-26 20:19:22

by Adrian Chadd

[permalink] [raw]
Subject: Re: [PATCH] ath5k: add missing breaks in ath5k_hw_set_spur_mitigation_filter

On 25 September 2012 12:33, Nick Kossifidis <[email protected]> wrote:

> The idea is that we don't know if these settings for half/quarter rate
> channels even work (that's why I've put the question marks there), I
> just put them there so that others can see them / test them and report
> back (mostly people working on 802.11p with ath5k). Without the breaks
> it always uses the default witch is what we have from HAL sources.
>
> Anyway I guess enabling them will result more testing and if something
> breaks we 'll hear from the 802.11p people soon, so

Well, I know the HAL code in FreeBSD implements half/quarter rate
"right" for the ar5k series chips that do support it (save the odd
frequency channel centre mis-calculation).. that's due to chip RF
synth limitations though.

So the HAL code in FreeBSD should be fine as a reference.


Adrian

2012-09-25 19:33:48

by Nick Kossifidis

[permalink] [raw]
Subject: Re: [PATCH] ath5k: add missing breaks in ath5k_hw_set_spur_mitigation_filter

2012/9/24 John W. Linville <[email protected]>:
> From: "John W. Linville" <[email protected]>
>
> https://bugzilla.kernel.org/show_bug.cgi?id=47681
>
> Reported-by: David Binderman <[email protected]>
> Signed-off-by: John W. Linville <[email protected]>
> ---
> drivers/net/wireless/ath/ath5k/phy.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
> index 8b71a2d..d605217 100644
> --- a/drivers/net/wireless/ath/ath5k/phy.c
> +++ b/drivers/net/wireless/ath/ath5k/phy.c
> @@ -1975,11 +1975,13 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah,
> spur_delta_phase = (spur_offset << 18) / 25;
> spur_freq_sigma_delta = (spur_delta_phase >> 10);
> symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 2;
> + break;
> case AR5K_BWMODE_5MHZ:
> /* Both sample_freq and chip_freq are 10MHz (?) */
> spur_delta_phase = (spur_offset << 19) / 25;
> spur_freq_sigma_delta = (spur_delta_phase >> 10);
> symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4;
> + break;
> default:
> if (channel->band == IEEE80211_BAND_5GHZ) {
> /* Both sample_freq and chip_freq are 40MHz */
> --
> 1.7.11.4
>

The idea is that we don't know if these settings for half/quarter rate
channels even work (that's why I've put the question marks there), I
just put them there so that others can see them / test them and report
back (mostly people working on 802.11p with ath5k). Without the breaks
it always uses the default witch is what we have from HAL sources.

Anyway I guess enabling them will result more testing and if something
breaks we 'll hear from the 802.11p people soon, so


Acked-by: Nick Kossifidis <[email protected]>

--
GPG ID: 0xEE878588
As you read this post global entropy rises. Have Fun ;-)
Nick