All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-22  8:42 Martin Blumenstingl
  2015-07-27 19:13   ` [ath9k-devel] " Adrian Chadd
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-22  8:42 UTC (permalink / raw)
  To: ath9k-devel
  Cc: ath9k-devel, nbd, linville, linux-wireless, Martin Blumenstingl

The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
Using the same values in ath9k results in much better throughput for me.

Before this patch I had a huge amount of packet loss (sometimes up to
40%) and the max transfer speed was somewhere around 5Mbit/s. With this
patch applied I have zero packet loss and ten times the throughput.
My device uses a AR9227 which is the PCI variant of the AR9287.

[0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
Patch has not changed, I am just CC'ing @linux-wireless (instead of
@ath9k-devel only).

 drivers/net/wireless/ath/ath9k/ar9002_phy.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.h b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
index 6314ae2..9d17a53 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
@@ -610,8 +610,8 @@
 #define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ      -127
 #define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ      -116
 
-#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -120
+#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -112
 #define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ    -127
-#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -110
+#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -97
 
 #endif
-- 
2.4.6


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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-22  8:42 [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227 Martin Blumenstingl
@ 2015-07-27 19:13   ` Adrian Chadd
  2015-09-27 18:31   ` [ath9k-devel] " Adrian Chadd
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-27 19:13 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

Hi,

I wonder if this is a mis-merge on my part (I'm the freebsd maintainer.)

can you log the noisefloor calibrated values before and after the
patch? I'd like to see how low it calibrrates to.


-a


On 22 July 2015 at 01:42, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
>
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
>
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> Patch has not changed, I am just CC'ing @linux-wireless (instead of
> @ath9k-devel only).
>
>  drivers/net/wireless/ath/ath9k/ar9002_phy.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.h b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> index 6314ae2..9d17a53 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> @@ -610,8 +610,8 @@
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ      -127
>  #define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ      -116
>
> -#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -120
> +#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -112
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ    -127
> -#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -110
> +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -97
>
>  #endif
> --
> 2.4.6
>
> --
> 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

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-27 19:13   ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-27 19:13 UTC (permalink / raw)
  To: ath9k-devel

Hi,

I wonder if this is a mis-merge on my part (I'm the freebsd maintainer.)

can you log the noisefloor calibrated values before and after the
patch? I'd like to see how low it calibrrates to.


-a


On 22 July 2015 at 01:42, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
>
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
>
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> Patch has not changed, I am just CC'ing @linux-wireless (instead of
> @ath9k-devel only).
>
>  drivers/net/wireless/ath/ath9k/ar9002_phy.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.h b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> index 6314ae2..9d17a53 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> @@ -610,8 +610,8 @@
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ      -127
>  #define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ      -116
>
> -#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -120
> +#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -112
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ    -127
> -#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -110
> +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -97
>
>  #endif
> --
> 2.4.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-27 19:13   ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-27 22:30   ` Martin Blumenstingl
  2015-07-27 23:50       ` [ath9k-devel] " Adrian Chadd
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-27 22:30 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

Hi Adrian,

On Mon, Jul 27, 2015 at 9:13 PM, Adrian Chadd <adrian@freebsd.org> wrote:
> I wonder if this is a mis-merge on my part (I'm the freebsd maintainer.)
>
> can you log the noisefloor calibrated values before and after the
> patch? I'd like to see how low it calibrrates to.
Sure, I hope dump_nfcal provides all values you need.

result with my patch applied (HT20):
# cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
Channel Noise Floor : -95
Chain | privNF | # Readings | NF Readings
0       -106    5               -110 -105 -109 -106 -106
1       -97     5               -97 -97 -97 -97 -97

Result before my patch (HT20):
# cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
Channel Noise Floor : -91
Chain | privNF | # Readings | NF Readings
0 -120 0
1 -120 0

Result before my patch (HT40):
# cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
Channel Noise Floor : -91
Chain | privNF | # Readings | NF Readings
0 -110 5 -110 -110 -110 -110 -110
1 -110 5 -110 -110 -110 -110 -110
3 -110 5 -110 -110 -110 -110 -110
4 -110 5 -110 -110 -110 -110 -110


Let me know if this helps you or if you need more information.


Regards,
Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-27 22:30   ` Martin Blumenstingl
@ 2015-07-27 23:50       ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-27 23:50 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

is it never getting any readings before your patch? NF Readings all
look empty...




-adrian


On 27 July 2015 at 15:30, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Hi Adrian,
>
> On Mon, Jul 27, 2015 at 9:13 PM, Adrian Chadd <adrian@freebsd.org> wrote:
>> I wonder if this is a mis-merge on my part (I'm the freebsd maintainer.)
>>
>> can you log the noisefloor calibrated values before and after the
>> patch? I'd like to see how low it calibrrates to.
> Sure, I hope dump_nfcal provides all values you need.
>
> result with my patch applied (HT20):
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -95
> Chain | privNF | # Readings | NF Readings
> 0       -106    5               -110 -105 -109 -106 -106
> 1       -97     5               -97 -97 -97 -97 -97
>
> Result before my patch (HT20):
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -91
> Chain | privNF | # Readings | NF Readings
> 0 -120 0
> 1 -120 0
>
> Result before my patch (HT40):
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -91
> Chain | privNF | # Readings | NF Readings
> 0 -110 5 -110 -110 -110 -110 -110
> 1 -110 5 -110 -110 -110 -110 -110
> 3 -110 5 -110 -110 -110 -110 -110
> 4 -110 5 -110 -110 -110 -110 -110
>
>
> Let me know if this helps you or if you need more information.
>
>
> Regards,
> Martin

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-27 23:50       ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-27 23:50 UTC (permalink / raw)
  To: ath9k-devel

is it never getting any readings before your patch? NF Readings all
look empty...




-adrian


On 27 July 2015 at 15:30, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Hi Adrian,
>
> On Mon, Jul 27, 2015 at 9:13 PM, Adrian Chadd <adrian@freebsd.org> wrote:
>> I wonder if this is a mis-merge on my part (I'm the freebsd maintainer.)
>>
>> can you log the noisefloor calibrated values before and after the
>> patch? I'd like to see how low it calibrrates to.
> Sure, I hope dump_nfcal provides all values you need.
>
> result with my patch applied (HT20):
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -95
> Chain | privNF | # Readings | NF Readings
> 0       -106    5               -110 -105 -109 -106 -106
> 1       -97     5               -97 -97 -97 -97 -97
>
> Result before my patch (HT20):
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -91
> Chain | privNF | # Readings | NF Readings
> 0 -120 0
> 1 -120 0
>
> Result before my patch (HT40):
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -91
> Chain | privNF | # Readings | NF Readings
> 0 -110 5 -110 -110 -110 -110 -110
> 1 -110 5 -110 -110 -110 -110 -110
> 3 -110 5 -110 -110 -110 -110 -110
> 4 -110 5 -110 -110 -110 -110 -110
>
>
> Let me know if this helps you or if you need more information.
>
>
> Regards,
> Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-27 23:50       ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-27 23:55       ` Martin Blumenstingl
  2015-07-28  3:47           ` [ath9k-devel] " Adrian Chadd
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-27 23:55 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On Tue, Jul 28, 2015 at 1:50 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> is it never getting any readings before your patch? NF Readings all
> look empty...
Yes, looks like it. Unfortunately I haven't saved a complete kernel
log (with ath9k debug level = 0x00004449) but only a few parts. Here
are the interesting bits:
<7>[ 449.746679] ath: phy1: NF calibrated [ctl] [chain 0] is -106
<7>[ 449.746697] ath: phy1: NF[0] (-106) > MAX (-110), correcting to MAX
<7>[ 449.746714] ath: phy1: NF calibrated [ctl] [chain 1] is -90
<7>[ 449.746731] ath: phy1: NF[1] (-90) > MAX (-110), correcting to MAX
<7>[ 449.746748] ath: phy1: NF calibrated [ext] [chain 0] is -103
<7>[ 449.746765] ath: phy1: NF[3] (-103) > MAX (-110), correcting to MAX
<7>[ 449.746781] ath: phy1: NF calibrated [ext] [chain 1] is -86
<7>[ 449.746798] ath: phy1: NF[4] (-86) > MAX (-110), correcting to MAX
<7>[ 449.746878] ath: phy1: Calibration @37407 finished: long ani, caldone: true

I'd assume (because I don't know the ath9k code) that ath9k simply
ignores NF readings that are "out of range" (as suggested by those
messages).


Regards,
Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-27 23:55       ` Martin Blumenstingl
@ 2015-07-28  3:47           ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28  3:47 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

Those are some high values (eg from noise/spur somewhere) and the
driver is deciding to program in -110. So the radio thinks its deaf.

Hm, I think that explains a few other NICs behaving badly too....

-a


On 27 July 2015 at 16:55, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Tue, Jul 28, 2015 at 1:50 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>> is it never getting any readings before your patch? NF Readings all
>> look empty...
> Yes, looks like it. Unfortunately I haven't saved a complete kernel
> log (with ath9k debug level = 0x00004449) but only a few parts. Here
> are the interesting bits:
> <7>[ 449.746679] ath: phy1: NF calibrated [ctl] [chain 0] is -106
> <7>[ 449.746697] ath: phy1: NF[0] (-106) > MAX (-110), correcting to MAX
> <7>[ 449.746714] ath: phy1: NF calibrated [ctl] [chain 1] is -90
> <7>[ 449.746731] ath: phy1: NF[1] (-90) > MAX (-110), correcting to MAX
> <7>[ 449.746748] ath: phy1: NF calibrated [ext] [chain 0] is -103
> <7>[ 449.746765] ath: phy1: NF[3] (-103) > MAX (-110), correcting to MAX
> <7>[ 449.746781] ath: phy1: NF calibrated [ext] [chain 1] is -86
> <7>[ 449.746798] ath: phy1: NF[4] (-86) > MAX (-110), correcting to MAX
> <7>[ 449.746878] ath: phy1: Calibration @37407 finished: long ani, caldone: true
>
> I'd assume (because I don't know the ath9k code) that ath9k simply
> ignores NF readings that are "out of range" (as suggested by those
> messages).
>
>
> Regards,
> Martin

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-28  3:47           ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28  3:47 UTC (permalink / raw)
  To: ath9k-devel

Those are some high values (eg from noise/spur somewhere) and the
driver is deciding to program in -110. So the radio thinks its deaf.

Hm, I think that explains a few other NICs behaving badly too....

-a


On 27 July 2015 at 16:55, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Tue, Jul 28, 2015 at 1:50 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>> is it never getting any readings before your patch? NF Readings all
>> look empty...
> Yes, looks like it. Unfortunately I haven't saved a complete kernel
> log (with ath9k debug level = 0x00004449) but only a few parts. Here
> are the interesting bits:
> <7>[ 449.746679] ath: phy1: NF calibrated [ctl] [chain 0] is -106
> <7>[ 449.746697] ath: phy1: NF[0] (-106) > MAX (-110), correcting to MAX
> <7>[ 449.746714] ath: phy1: NF calibrated [ctl] [chain 1] is -90
> <7>[ 449.746731] ath: phy1: NF[1] (-90) > MAX (-110), correcting to MAX
> <7>[ 449.746748] ath: phy1: NF calibrated [ext] [chain 0] is -103
> <7>[ 449.746765] ath: phy1: NF[3] (-103) > MAX (-110), correcting to MAX
> <7>[ 449.746781] ath: phy1: NF calibrated [ext] [chain 1] is -86
> <7>[ 449.746798] ath: phy1: NF[4] (-86) > MAX (-110), correcting to MAX
> <7>[ 449.746878] ath: phy1: Calibration @37407 finished: long ani, caldone: true
>
> I'd assume (because I don't know the ath9k code) that ath9k simply
> ignores NF readings that are "out of range" (as suggested by those
> messages).
>
>
> Regards,
> Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28  3:47           ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-28  8:07           ` Martin Blumenstingl
  2015-07-28 17:25               ` [ath9k-devel] " Adrian Chadd
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-28  8:07 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On Tue, Jul 28, 2015 at 5:47 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> Those are some high values (eg from noise/spur somewhere) and the
> driver is deciding to program in -110. So the radio thinks its deaf.
That made me think... I have a second ath9k device, this time with an
AR9300 (note, this is 3x3 instead of 2x2). I have set it up with
similar settings as the AR9227 (= AP mode) and this is the result:
# cat /sys/kernel/debug/ieee80211/phy0/ath9k/dump_nfcal
Channel Noise Floor : -95
Chain | privNF | # Readings | NF Readings
0       -122    5               -122 -122 -121 -122 -121
1       -119    5               -119 -119 -119 -119 -119
2       -121    5               -121 -121 -120 -120 -121

The values on that AR9300 device seem to be much better.

While I was at it, here is the output from a third device (TP-Link
TL-WR1043ND), which uses an Atheros AR9100 MAC/BB Rev:7 AR2133 RF
Rev:a2
Please note that this device is "STA" mode, whereas all other devices
are in "AP" mode.
# cat /sys/kernel/debug/ieee80211/phy0/ath9k/dump_nfcal
Channel Noise Floor : -95
Chain | privNF | # Readings | NF Readings
0       -89     5               -89 -89 -88 -89 -89
1       -88     5               -88 -88 -88 -88 -88
2       -81     5               -81 -81 -80 -82 -82

> Hm, I think that explains a few other NICs behaving badly too....
I have found an OpenWrt ticket where users are describing similar
problems, but on an TP-Link TL-WR1043ND (AR9100 + AR2133) ([0]
Now here comes the interesting part: Only my device with the AR9227
shows bad performance. All other devices (including the AR9100 +
AR2133 based one, which also ready "bad values") are performing fine -
at least for me.


Regards,
Martin

[0] https://dev.openwrt.org/ticket/17582

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28  8:07           ` Martin Blumenstingl
@ 2015-07-28 17:25               ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28 17:25 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

So the values aren't "bad" on the 1043nd - they're in 1/2 or 1/4dB,
but there's no scalar quantity (ie, it's not in dBm.) The 1043nd
calibrates down to around -95 or so, which "sounds" like it's in dBm
but it isn't, and any similarity is just coincidence.

It does sound like your AR9227 sees noise. can you fire up the
spectral analysis stuff to plot what the NIC is seeing? (yes, the
AR9287/AR9227 has spectral analysis mode, same as the AR9280, AR9285,
and >= AR9300.)


-adrian

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-28 17:25               ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28 17:25 UTC (permalink / raw)
  To: ath9k-devel

So the values aren't "bad" on the 1043nd - they're in 1/2 or 1/4dB,
but there's no scalar quantity (ie, it's not in dBm.) The 1043nd
calibrates down to around -95 or so, which "sounds" like it's in dBm
but it isn't, and any similarity is just coincidence.

It does sound like your AR9227 sees noise. can you fire up the
spectral analysis stuff to plot what the NIC is seeing? (yes, the
AR9287/AR9227 has spectral analysis mode, same as the AR9280, AR9285,
and >= AR9300.)


-adrian

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28 17:25               ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-28 22:07               ` Martin Blumenstingl
  2015-07-28 22:22                   ` [ath9k-devel] " Adrian Chadd
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-28 22:07 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On Tue, Jul 28, 2015 at 7:25 PM, Adrian Chadd <adrian@freebsd.org> wrote:
> So the values aren't "bad" on the 1043nd - they're in 1/2 or 1/4dB,
> but there's no scalar quantity (ie, it's not in dBm.) The 1043nd
> calibrates down to around -95 or so, which "sounds" like it's in dBm
> but it isn't, and any similarity is just coincidence.
Ok, then we'll ignore the 1043nd from now on.

> It does sound like your AR9227 sees noise. can you fire up the
> spectral analysis stuff to plot what the NIC is seeing? (yes, the
> AR9287/AR9227 has spectral analysis mode, same as the AR9280, AR9285,
> and >= AR9300.)
I am assuming that "background" mode is what you want, see [0].
Thus I ran the following on my AR9227 device:
# echo background > /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl
# echo trigger > /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl
# cat /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan0 > /tmp/samples

The result can be found here: [1].
Note that at this point no client was connected to my AP. My patch
(from the initial mail) was applied - but that shouldn't have any
effect on the spectral scan output (at least that's what I'm
assuming).

Just for documentation purposes - those are the NF values that I have
seen a few seconds before getting the spectral scan data:
# cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
Channel Noise Floor : -93
Chain | privNF | # Readings | NF Readings
0     -104   5          -109 -109 -109 -104 -104
1     -97    5          -97 -97 -97 -97 -97


Regards,
Martin


[0] https://wireless.wiki.kernel.org/en/users/drivers/ath9k/spectral_scan
[1] https://dl.dropboxusercontent.com/u/26940713/tmp/spectral_out

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28 22:07               ` Martin Blumenstingl
@ 2015-07-28 22:22                   ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28 22:22 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

Hm, doesn't someone have a graphical frontend for this on linux?


-a


On 28 July 2015 at 15:07, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Tue, Jul 28, 2015 at 7:25 PM, Adrian Chadd <adrian@freebsd.org> wrote:
>> So the values aren't "bad" on the 1043nd - they're in 1/2 or 1/4dB,
>> but there's no scalar quantity (ie, it's not in dBm.) The 1043nd
>> calibrates down to around -95 or so, which "sounds" like it's in dBm
>> but it isn't, and any similarity is just coincidence.
> Ok, then we'll ignore the 1043nd from now on.
>
>> It does sound like your AR9227 sees noise. can you fire up the
>> spectral analysis stuff to plot what the NIC is seeing? (yes, the
>> AR9287/AR9227 has spectral analysis mode, same as the AR9280, AR9285,
>> and >= AR9300.)
> I am assuming that "background" mode is what you want, see [0].
> Thus I ran the following on my AR9227 device:
> # echo background > /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl
> # echo trigger > /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan0 > /tmp/samples
>
> The result can be found here: [1].
> Note that at this point no client was connected to my AP. My patch
> (from the initial mail) was applied - but that shouldn't have any
> effect on the spectral scan output (at least that's what I'm
> assuming).
>
> Just for documentation purposes - those are the NF values that I have
> seen a few seconds before getting the spectral scan data:
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -93
> Chain | privNF | # Readings | NF Readings
> 0     -104   5          -109 -109 -109 -104 -104
> 1     -97    5          -97 -97 -97 -97 -97
>
>
> Regards,
> Martin
>
>
> [0] https://wireless.wiki.kernel.org/en/users/drivers/ath9k/spectral_scan
> [1] https://dl.dropboxusercontent.com/u/26940713/tmp/spectral_out

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-28 22:22                   ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28 22:22 UTC (permalink / raw)
  To: ath9k-devel

Hm, doesn't someone have a graphical frontend for this on linux?


-a


On 28 July 2015 at 15:07, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Tue, Jul 28, 2015 at 7:25 PM, Adrian Chadd <adrian@freebsd.org> wrote:
>> So the values aren't "bad" on the 1043nd - they're in 1/2 or 1/4dB,
>> but there's no scalar quantity (ie, it's not in dBm.) The 1043nd
>> calibrates down to around -95 or so, which "sounds" like it's in dBm
>> but it isn't, and any similarity is just coincidence.
> Ok, then we'll ignore the 1043nd from now on.
>
>> It does sound like your AR9227 sees noise. can you fire up the
>> spectral analysis stuff to plot what the NIC is seeing? (yes, the
>> AR9287/AR9227 has spectral analysis mode, same as the AR9280, AR9285,
>> and >= AR9300.)
> I am assuming that "background" mode is what you want, see [0].
> Thus I ran the following on my AR9227 device:
> # echo background > /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl
> # echo trigger > /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan_ctl
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/spectral_scan0 > /tmp/samples
>
> The result can be found here: [1].
> Note that at this point no client was connected to my AP. My patch
> (from the initial mail) was applied - but that shouldn't have any
> effect on the spectral scan output (at least that's what I'm
> assuming).
>
> Just for documentation purposes - those are the NF values that I have
> seen a few seconds before getting the spectral scan data:
> # cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
> Channel Noise Floor : -93
> Chain | privNF | # Readings | NF Readings
> 0     -104   5          -109 -109 -109 -104 -104
> 1     -97    5          -97 -97 -97 -97 -97
>
>
> Regards,
> Martin
>
>
> [0] https://wireless.wiki.kernel.org/en/users/drivers/ath9k/spectral_scan
> [1] https://dl.dropboxusercontent.com/u/26940713/tmp/spectral_out

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28 22:22                   ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-28 22:33                   ` Martin Blumenstingl
  2015-07-28 23:37                       ` [ath9k-devel] " Adrian Chadd
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-28 22:33 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On Wed, Jul 29, 2015 at 12:22 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> Hm, doesn't someone have a graphical frontend for this on linux?
Yep, I just found FFT_eval (screenshot: [0] and ath_spectral
(screenshot [1]) in the ath9k spectral scan wiki page.


[0] http://abload.de/img/athscanfjsvv.png
[1] http://abload.de/img/fft-evaldqsbq.png

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28 22:33                   ` Martin Blumenstingl
@ 2015-07-28 23:37                       ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28 23:37 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On 28 July 2015 at 15:33, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Wed, Jul 29, 2015 at 12:22 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>> Hm, doesn't someone have a graphical frontend for this on linux?
> Yep, I just found FFT_eval (screenshot: [0] and ath_spectral
> (screenshot [1]) in the ath9k spectral scan wiki page.
>
>
> [0] http://abload.de/img/athscanfjsvv.png
> [1] http://abload.de/img/fft-evaldqsbq.png

Cool! Does it let you capture lots of samples over time and plot them?
Or is the second one that as well?

Is this before or after the NF patches?


-adrian

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-28 23:37                       ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-28 23:37 UTC (permalink / raw)
  To: ath9k-devel

On 28 July 2015 at 15:33, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Wed, Jul 29, 2015 at 12:22 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>> Hm, doesn't someone have a graphical frontend for this on linux?
> Yep, I just found FFT_eval (screenshot: [0] and ath_spectral
> (screenshot [1]) in the ath9k spectral scan wiki page.
>
>
> [0] http://abload.de/img/athscanfjsvv.png
> [1] http://abload.de/img/fft-evaldqsbq.png

Cool! Does it let you capture lots of samples over time and plot them?
Or is the second one that as well?

Is this before or after the NF patches?


-adrian

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28 23:37                       ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-28 23:43                       ` Martin Blumenstingl
  2015-07-29  7:49                           ` [ath9k-devel] " Adrian Chadd
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-28 23:43 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On Wed, Jul 29, 2015 at 1:37 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> Cool! Does it let you capture lots of samples over time and plot them?
At least FFT_eval would allow capturing samples, but the device with
the AR9227 is a small router -> no screen there, so I have to dump it
on that device, copy it to my PC and look at the samples there.
I have also just seen that in FFT_eval one can "Navigate through the
currently selected datasets using the arrow keys (left and right)."
This would require me to make many screenshots. Is there a chance you
can compile FFT_eval on FreeBSD (it "only" seems to require SDL and
SDL_ttf) and run it yourself?

> Or is the second one that as well?
What do you mean exactly?

> Is this before or after the NF patches?
This is after my NF patch.


Regards,
Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-28 23:43                       ` Martin Blumenstingl
@ 2015-07-29  7:49                           ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-29  7:49 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

ok, can you re-run this again before the NF patch, so I can compare?

And yeah, I can compile up fft_eval for freebsd. I think I've done it
once or twice before..


-a


On 28 July 2015 at 16:43, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Wed, Jul 29, 2015 at 1:37 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>> Cool! Does it let you capture lots of samples over time and plot them?
> At least FFT_eval would allow capturing samples, but the device with
> the AR9227 is a small router -> no screen there, so I have to dump it
> on that device, copy it to my PC and look at the samples there.
> I have also just seen that in FFT_eval one can "Navigate through the
> currently selected datasets using the arrow keys (left and right)."
> This would require me to make many screenshots. Is there a chance you
> can compile FFT_eval on FreeBSD (it "only" seems to require SDL and
> SDL_ttf) and run it yourself?
>
>> Or is the second one that as well?
> What do you mean exactly?
>
>> Is this before or after the NF patches?
> This is after my NF patch.
>
>
> Regards,
> Martin

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-07-29  7:49                           ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-07-29  7:49 UTC (permalink / raw)
  To: ath9k-devel

ok, can you re-run this again before the NF patch, so I can compare?

And yeah, I can compile up fft_eval for freebsd. I think I've done it
once or twice before..


-a


On 28 July 2015 at 16:43, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> On Wed, Jul 29, 2015 at 1:37 AM, Adrian Chadd <adrian@freebsd.org> wrote:
>> Cool! Does it let you capture lots of samples over time and plot them?
> At least FFT_eval would allow capturing samples, but the device with
> the AR9227 is a small router -> no screen there, so I have to dump it
> on that device, copy it to my PC and look at the samples there.
> I have also just seen that in FFT_eval one can "Navigate through the
> currently selected datasets using the arrow keys (left and right)."
> This would require me to make many screenshots. Is there a chance you
> can compile FFT_eval on FreeBSD (it "only" seems to require SDL and
> SDL_ttf) and run it yourself?
>
>> Or is the second one that as well?
> What do you mean exactly?
>
>> Is this before or after the NF patches?
> This is after my NF patch.
>
>
> Regards,
> Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-29  7:49                           ` [ath9k-devel] " Adrian Chadd
  (?)
@ 2015-07-29  8:49                           ` Martin Blumenstingl
  2015-08-08 21:16                             ` Martin Blumenstingl
  -1 siblings, 1 reply; 31+ messages in thread
From: Martin Blumenstingl @ 2015-07-29  8:49 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

On Wed, Jul 29, 2015 at 9:49 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> ok, can you re-run this again before the NF patch, so I can compare?
Sure, here they are: [0]

And here are the NF values reported by ath9k right before that:
# cat /sys/kernel/debug/ieee80211/phy1/ath9k/dump_nfcal
Channel Noise Floor : -91
Chain | privNF | # Readings | NF Readings
0       -110    2               -110 -110
1       -110    2               -110 -110


Regards,
Martin

[0] https://dl.dropboxusercontent.com/u/26940713/tmp/spectral_out_nopatch

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-29  8:49                           ` Martin Blumenstingl
@ 2015-08-08 21:16                             ` Martin Blumenstingl
  0 siblings, 0 replies; 31+ messages in thread
From: Martin Blumenstingl @ 2015-08-08 21:16 UTC (permalink / raw)
  To: Adrian Chadd
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

Hi Adrian,

On Wed, Jul 29, 2015 at 10:49 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Sure, here they are: [0]
Was this data useful for you?
Let me know if you need more information.


Regards,
Martin

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-22  8:42 [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227 Martin Blumenstingl
@ 2015-09-27 18:31   ` Adrian Chadd
  2015-09-27 18:31   ` [ath9k-devel] " Adrian Chadd
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-09-27 18:31 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, Felix Fietkau, John Linville, linux-wireless

hiya,

for what it's worth - this looks okay to me. His noise floor looks
about as low as I'd expect on his plots.


-adrian


On 22 July 2015 at 01:42, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
>
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
>
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> Patch has not changed, I am just CC'ing @linux-wireless (instead of
> @ath9k-devel only).
>
>  drivers/net/wireless/ath/ath9k/ar9002_phy.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.h b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> index 6314ae2..9d17a53 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> @@ -610,8 +610,8 @@
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ      -127
>  #define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ      -116
>
> -#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -120
> +#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -112
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ    -127
> -#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -110
> +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -97
>
>  #endif
> --
> 2.4.6
>
> --
> 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

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-09-27 18:31   ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-09-27 18:31 UTC (permalink / raw)
  To: ath9k-devel

hiya,

for what it's worth - this looks okay to me. His noise floor looks
about as low as I'd expect on his plots.


-adrian


On 22 July 2015 at 01:42, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
>
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
>
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> Patch has not changed, I am just CC'ing @linux-wireless (instead of
> @ath9k-devel only).
>
>  drivers/net/wireless/ath/ath9k/ar9002_phy.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.h b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> index 6314ae2..9d17a53 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
> @@ -610,8 +610,8 @@
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ      -127
>  #define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ      -116
>
> -#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -120
> +#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -112
>  #define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ    -127
> -#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -110
> +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -97
>
>  #endif
> --
> 2.4.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-22  8:42 [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227 Martin Blumenstingl
@ 2015-10-06 14:16   ` Kalle Valo
  2015-09-27 18:31   ` [ath9k-devel] " Adrian Chadd
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2015-10-06 14:16 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, nbd, linville, linux-wireless

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
>
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
>
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

So what should I do with this patch? Is this good to apply?

Discussion here:

https://patchwork.kernel.org/patch/6841051/

-- 
Kalle Valo

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-10-06 14:16   ` Kalle Valo
  0 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2015-10-06 14:16 UTC (permalink / raw)
  To: ath9k-devel

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
>
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
>
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

So what should I do with this patch? Is this good to apply?

Discussion here:

https://patchwork.kernel.org/patch/6841051/

-- 
Kalle Valo

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

* Re: [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-10-06 14:16   ` [ath9k-devel] " Kalle Valo
@ 2015-10-06 16:07     ` Adrian Chadd
  -1 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-10-06 16:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Martin Blumenstingl, ath9k-devel, ath9k-devel, Felix Fietkau,
	John Linville, linux-wireless

from qca-wifi-1.2:

ar5416phy.h:#define AR_PHY_CCA_NOM_VAL_KIWI_2GHZ           -120
ar5416phy.h:#define AR_PHY_CCA_MIN_GOOD_VAL_KIWI_2GHZ    -127
ar5416phy.h:#define AR_PHY_CCA_MAX_GOOD_VAL_KIWI_2GHZ    -110

.. and:

ar5416phy.h:#define AR_PHY_CCA_NOM_VAL_MERLIN_2GHZ         -112
ar5416phy.h:#define AR_PHY_CCA_MIN_GOOD_VAL_MERLIN_2GHZ  -127
ar5416phy.h:#define AR_PHY_CCA_MAX_GOOD_VAL_MERLIN_2GHZ  -97

.. so although the reference driver has the lower values for AR9287,
the AR9280 values work better for him.

So, hm. I think I recall finding the same when I did the initial
AR9287 support and found the AR9280 ANI/CCA values behaved better. It
doesn't look like he has any noise spurs in the spectral scan output
in his NIC; it just looks like everything needs to be slightly higher
to deal with ambient noise.

I'm okay with including it but I'd like other feedback/testing from
AR9287/AR9227 users. I used the AR9287 in a laptop for about a year w/
the AR9280 values (running FreeBSD-HEAD) and it performed great.



-adrian


On 6 October 2015 at 07:16, Kalle Valo <kvalo@codeaurora.org> wrote:
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
>> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
>> Using the same values in ath9k results in much better throughput for me.
>>
>> Before this patch I had a huge amount of packet loss (sometimes up to
>> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
>> patch applied I have zero packet loss and ten times the throughput.
>> My device uses a AR9227 which is the PCI variant of the AR9287.
>>
>> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>>
>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>
> So what should I do with this patch? Is this good to apply?
>
> Discussion here:
>
> https://patchwork.kernel.org/patch/6841051/
>
> --
> Kalle Valo
> --
> 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

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

* [ath9k-devel] [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-10-06 16:07     ` Adrian Chadd
  0 siblings, 0 replies; 31+ messages in thread
From: Adrian Chadd @ 2015-10-06 16:07 UTC (permalink / raw)
  To: ath9k-devel

from qca-wifi-1.2:

ar5416phy.h:#define AR_PHY_CCA_NOM_VAL_KIWI_2GHZ           -120
ar5416phy.h:#define AR_PHY_CCA_MIN_GOOD_VAL_KIWI_2GHZ    -127
ar5416phy.h:#define AR_PHY_CCA_MAX_GOOD_VAL_KIWI_2GHZ    -110

.. and:

ar5416phy.h:#define AR_PHY_CCA_NOM_VAL_MERLIN_2GHZ         -112
ar5416phy.h:#define AR_PHY_CCA_MIN_GOOD_VAL_MERLIN_2GHZ  -127
ar5416phy.h:#define AR_PHY_CCA_MAX_GOOD_VAL_MERLIN_2GHZ  -97

.. so although the reference driver has the lower values for AR9287,
the AR9280 values work better for him.

So, hm. I think I recall finding the same when I did the initial
AR9287 support and found the AR9280 ANI/CCA values behaved better. It
doesn't look like he has any noise spurs in the spectral scan output
in his NIC; it just looks like everything needs to be slightly higher
to deal with ambient noise.

I'm okay with including it but I'd like other feedback/testing from
AR9287/AR9227 users. I used the AR9287 in a laptop for about a year w/
the AR9280 values (running FreeBSD-HEAD) and it performed great.



-adrian


On 6 October 2015 at 07:16, Kalle Valo <kvalo@codeaurora.org> wrote:
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
>> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
>> Using the same values in ath9k results in much better throughput for me.
>>
>> Before this patch I had a huge amount of packet loss (sometimes up to
>> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
>> patch applied I have zero packet loss and ten times the throughput.
>> My device uses a AR9227 which is the PCI variant of the AR9287.
>>
>> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
>>
>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>
> So what should I do with this patch? Is this good to apply?
>
> Discussion here:
>
> https://patchwork.kernel.org/patch/6841051/
>
> --
> Kalle Valo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
  2015-07-22  8:42 [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227 Martin Blumenstingl
@ 2015-10-14 11:13   ` Kalle Valo
  2015-09-27 18:31   ` [ath9k-devel] " Adrian Chadd
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2015-10-14 11:13 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ath9k-devel, ath9k-devel, nbd, linville, linux-wireless,
	Martin Blumenstingl


> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
> 
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
> 
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

* [ath9k-devel] [RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227
@ 2015-10-14 11:13   ` Kalle Valo
  0 siblings, 0 replies; 31+ messages in thread
From: Kalle Valo @ 2015-10-14 11:13 UTC (permalink / raw)
  To: ath9k-devel


> The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
> Using the same values in ath9k results in much better throughput for me.
> 
> Before this patch I had a huge amount of packet loss (sometimes up to
> 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
> patch applied I have zero packet loss and ten times the throughput.
> My device uses a AR9227 which is the PCI variant of the AR9287.
> 
> [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

end of thread, other threads:[~2015-10-14 11:13 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22  8:42 [PATCH RESEND] ath9k: Fix NF CCA limits for AR9287 and AR9227 Martin Blumenstingl
2015-07-27 19:13 ` Adrian Chadd
2015-07-27 19:13   ` [ath9k-devel] " Adrian Chadd
2015-07-27 22:30   ` Martin Blumenstingl
2015-07-27 23:50     ` Adrian Chadd
2015-07-27 23:50       ` [ath9k-devel] " Adrian Chadd
2015-07-27 23:55       ` Martin Blumenstingl
2015-07-28  3:47         ` Adrian Chadd
2015-07-28  3:47           ` [ath9k-devel] " Adrian Chadd
2015-07-28  8:07           ` Martin Blumenstingl
2015-07-28 17:25             ` Adrian Chadd
2015-07-28 17:25               ` [ath9k-devel] " Adrian Chadd
2015-07-28 22:07               ` Martin Blumenstingl
2015-07-28 22:22                 ` Adrian Chadd
2015-07-28 22:22                   ` [ath9k-devel] " Adrian Chadd
2015-07-28 22:33                   ` Martin Blumenstingl
2015-07-28 23:37                     ` Adrian Chadd
2015-07-28 23:37                       ` [ath9k-devel] " Adrian Chadd
2015-07-28 23:43                       ` Martin Blumenstingl
2015-07-29  7:49                         ` Adrian Chadd
2015-07-29  7:49                           ` [ath9k-devel] " Adrian Chadd
2015-07-29  8:49                           ` Martin Blumenstingl
2015-08-08 21:16                             ` Martin Blumenstingl
2015-09-27 18:31 ` Adrian Chadd
2015-09-27 18:31   ` [ath9k-devel] " Adrian Chadd
2015-10-06 14:16 ` Kalle Valo
2015-10-06 14:16   ` [ath9k-devel] " Kalle Valo
2015-10-06 16:07   ` Adrian Chadd
2015-10-06 16:07     ` [ath9k-devel] " Adrian Chadd
2015-10-14 11:13 ` [RESEND] " Kalle Valo
2015-10-14 11:13   ` [ath9k-devel] " Kalle Valo

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.