2012-11-09 17:06:13

by Bernhard Urban

[permalink] [raw]
Subject: [PATCH] ath9k_htc: update RSSI values only when the device is associated

add an if-guard, otherwise iw(8) reports weird signal strengths.

The behaviour was fine before this commit:
7c277349ecbd66e19fad3d949fa6ef6c131a3b62
This patch is therefore a partially revert of it.

Tested with "TP-Link TL-WN722N"

Thanks to indoo.rs http://indoo.rs/ for sponsoring

Reported-by: Markus Krainz <[email protected]>
Tested-by: Markus Krainz <[email protected]>
Signed-off-by: Bernhard Urban <[email protected]>
---
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 27 ++++++++++++++-----------
1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..d0d329c 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -1060,22 +1060,25 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
rxbuf->rxstatus.rs_flags);

- if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
- !rxbuf->rxstatus.rs_moreaggr)
- ATH_RSSI_LPF(priv->rx.last_rssi,
- rxbuf->rxstatus.rs_rssi);
+ if (priv->num_sta_assoc_vif != 0) {
+ if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
+ !rxbuf->rxstatus.rs_moreaggr)
+ ATH_RSSI_LPF(priv->rx.last_rssi,
+ rxbuf->rxstatus.rs_rssi);

- last_rssi = priv->rx.last_rssi;
+ last_rssi = priv->rx.last_rssi;

- if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
- rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
- ATH_RSSI_EP_MULTIPLIER);
+ if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
+ s8 rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
+ rxbuf->rxstatus.rs_rssi = rssi;
+ }

- if (rxbuf->rxstatus.rs_rssi < 0)
- rxbuf->rxstatus.rs_rssi = 0;
+ if (rxbuf->rxstatus.rs_rssi < 0)
+ rxbuf->rxstatus.rs_rssi = 0;

- if (ieee80211_is_beacon(fc))
- priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
+ if (ieee80211_is_beacon(fc))
+ priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
+ }

rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
rx_status->band = hw->conf.channel->band;
--
1.7.9.5



2012-11-10 09:16:00

by Felix Fietkau

[permalink] [raw]
Subject: Re: [PATCH] ath9k_htc: update RSSI values only when the device is associated

On 2012-11-09 6:09 PM, Bernhard Urban wrote:
> add an if-guard, otherwise iw(8) reports weird signal strengths.
>
> The behaviour was fine before this commit:
> 7c277349ecbd66e19fad3d949fa6ef6c131a3b62
> This patch is therefore a partially revert of it.
>
> Tested with "TP-Link TL-WN722N"
>
> Thanks to indoo.rs http://indoo.rs/ for sponsoring
>
> Reported-by: Markus Krainz <[email protected]>
> Tested-by: Markus Krainz <[email protected]>
> Signed-off-by: Bernhard Urban <[email protected]>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 27 ++++++++++++++-----------
> 1 file changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> index 47e61d0..d0d329c 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> @@ -1060,22 +1060,25 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
> ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
> rxbuf->rxstatus.rs_flags);
>
> - if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
> - !rxbuf->rxstatus.rs_moreaggr)
> - ATH_RSSI_LPF(priv->rx.last_rssi,
> - rxbuf->rxstatus.rs_rssi);
> + if (priv->num_sta_assoc_vif != 0) {
> + if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
> + !rxbuf->rxstatus.rs_moreaggr)
> + ATH_RSSI_LPF(priv->rx.last_rssi,
> + rxbuf->rxstatus.rs_rssi);
>
> - last_rssi = priv->rx.last_rssi;
> + last_rssi = priv->rx.last_rssi;
>
> - if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
> - rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
> - ATH_RSSI_EP_MULTIPLIER);
> + if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
> + s8 rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
> + rxbuf->rxstatus.rs_rssi = rssi;
> + }
>
> - if (rxbuf->rxstatus.rs_rssi < 0)
> - rxbuf->rxstatus.rs_rssi = 0;
> + if (rxbuf->rxstatus.rs_rssi < 0)
> + rxbuf->rxstatus.rs_rssi = 0;
>
> - if (ieee80211_is_beacon(fc))
> - priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
> + if (ieee80211_is_beacon(fc))
> + priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
> + }
>
> rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
> rx_status->band = hw->conf.channel->band;
>
Please check how RSSI is handled in ath9k, and use that as reference.
The per-packet RSSI should not be set from some internal average, it
should contain the real RSSI value of the packet. This change disables
RSSI reporting for anything but station mode, which is not a good idea.

- Felix

2012-11-10 08:42:37

by Sujith

[permalink] [raw]
Subject: [PATCH] ath9k_htc: update RSSI values only when the device is associated

Bernhard Urban wrote:
> add an if-guard, otherwise iw(8) reports weird signal strengths.
>
> The behaviour was fine before this commit:
> 7c277349ecbd66e19fad3d949fa6ef6c131a3b62
> This patch is therefore a partially revert of it.
>
> Tested with "TP-Link TL-WN722N"

Looks good, but a cleaner fix would be to update the RSSI only for
beacons that are destined for the station.

Sujith

2012-11-17 19:12:43

by Bernhard Urban

[permalink] [raw]
Subject: Re: [PATCH] ath9k_htc: update RSSI values only when the device is associated

Thanks for the reviews!


On Sat, Nov 10, 2012 at 9:42 AM, Sujith <[email protected]> wrote:
> Looks good, but a cleaner fix would be to update the RSSI only for
> beacons that are destined for the station.

You mean like in recv.c? There's a `is_mybeacon' field, which is computed in
`ath_rx_tasklet(...)' and used in `ath9k_process_rssi(...)'.

Adding this check to the if-guard changes nothing at the result, so I think
it's fine if you consider it as cleaner. See attached patch.

Btw, could you please elaborate what `is_mybeacon' represents?


On Sat, Nov 10, 2012 at 10:15 AM, Felix Fietkau <[email protected]> wrote:
> Please check how RSSI is handled in ath9k, and use that as reference.
> The per-packet RSSI should not be set from some internal average, it
> should contain the real RSSI value of the packet. This change disables
> RSSI reporting for anything but station mode, which is not a good idea.

Replacing
if (priv->num_sta_assoc_vif != 0)
with
if (priv->ah->opmode == NL80211_IFTYPE_STATION)

works out well (which makes sense to me). However, adding
`&& priv->ah->opmode == NL80211_IFTYPE_ADHOC' (like in ath9k/recv.c) produces
bad results like before. I don't understand the effect, as my device is always
in "managed mode" according to `iw wlan0 info'. I'm right by assuming "managed
mode" is the same as NL80211_IFTYPE_STATION?

Also, I don't know what you mean with "some internal average". Can you please
elaborate that?


Thanks for your help,
Bernhard


>From fc14c46ce75044485229be5bb12682a8fffcf178 Mon Sep 17 00:00:00 2001
From: Bernhard Urban <[email protected]>
Date: Sat, 17 Nov 2012 00:22:16 +0100
Subject: [PATCH] ath9k_htc: update RSSI values only when the device is
associated

add an if-guard, otherwise iw(8) reports weird signal strengths.

The behaviour was fine before this commit:
7c277349ecbd66e19fad3d949fa6ef6c131a3b62
This patch is therefore a partially revert of it.

Tested with "TP-Link TL-WN722N"

Thanks to indoo.rs http://indoo.rs/ for sponsoring

Reported-by: Markus Krainz <[email protected]>
Tested-by: Markus Krainz <[email protected]>
Signed-off-by: Bernhard Urban <[email protected]>
---
drivers/net/wireless/ath/ath9k/htc.h | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 29 +++++++++++++++----------
2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..00ebf1c 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -22,6 +22,7 @@
#include <linux/firmware.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
#include <linux/leds.h>
#include <linux/slab.h>
#include <net/mac80211.h>
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..8b4da3d 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -969,6 +969,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
int hdrlen, padpos, padsize;
int last_rssi = ATH_RSSI_DUMMY_MARKER;
__le16 fc;
+ u8 is_mybeacon;

if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
@@ -1060,22 +1061,28 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
rxbuf->rxstatus.rs_flags);

- if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
- !rxbuf->rxstatus.rs_moreaggr)
- ATH_RSSI_LPF(priv->rx.last_rssi,
- rxbuf->rxstatus.rs_rssi);
+ is_mybeacon = ieee80211_is_beacon(fc) &&
+ !is_zero_ether_addr(common->curbssid) &&
+ ether_addr_equal(hdr->addr3, common->curbssid);

- last_rssi = priv->rx.last_rssi;
+ if (is_mybeacon && priv->ah->opmode == NL80211_IFTYPE_STATION) {
+ if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
+ !rxbuf->rxstatus.rs_moreaggr)
+ ATH_RSSI_LPF(priv->rx.last_rssi,
+ rxbuf->rxstatus.rs_rssi);

- if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
- rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
- ATH_RSSI_EP_MULTIPLIER);
+ last_rssi = priv->rx.last_rssi;

- if (rxbuf->rxstatus.rs_rssi < 0)
- rxbuf->rxstatus.rs_rssi = 0;
+ if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
+ s8 rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
+ rxbuf->rxstatus.rs_rssi = rssi;
+ }
+
+ if (rxbuf->rxstatus.rs_rssi < 0)
+ rxbuf->rxstatus.rs_rssi = 0;

- if (ieee80211_is_beacon(fc))
priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
+ }

rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
rx_status->band = hw->conf.channel->band;
--
1.7.9.5


2012-12-05 22:28:19

by Bernhard Urban

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k_htc: update RSSI values only when the device is associated

On Tue, Dec 4, 2012 at 6:02 PM, Holger Schurig <[email protected]> wrote:
> And I think the commercial for your sponsor should be after the "---"
> line, not inside the commit description ...

well, try `git log | grep -i sponsor' in the git tree. I don't find
something in the docs though.

2012-12-04 17:02:54

by Holger Schurig

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k_htc: update RSSI values only when the device is associated

And I think the commercial for your sponsor should be after the "---"
line, not inside the commit description ...

2012-12-05 22:21:21

by Bernhard Urban

[permalink] [raw]
Subject: Re: [PATCH] ath9k_htc: update RSSI values only when the device is associated

Hi Mohammed,

thanks for your comment

On Mon, Dec 3, 2012 at 7:41 AM, Mohammed Shafi <[email protected]> wrote:
> >> - last_rssi = priv->rx.last_rssi;
> >> + if (is_mybeacon && priv->ah->opmode == NL80211_IFTYPE_STATION) {
> >> + if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
> >> + !rxbuf->rxstatus.rs_moreaggr)
> >> + ATH_RSSI_LPF(priv->rx.last_rssi,
> >> + rxbuf->rxstatus.rs_rssi);
>
> should we account for IBSS mode ?

Yeah, it would make sense but it changes my measureresults
significantly, although my device is never in ad-hoc mode. I already
posted a question regarding this topic:
http://www.mail-archive.com/[email protected]/msg09470.html


Thanks,
Bernhard

2012-12-01 20:35:38

by Bernhard Urban

[permalink] [raw]
Subject: Re: [PATCH] ath9k_htc: update RSSI values only when the device is associated

On Sat, Dec 1, 2012 at 9:21 PM, Bernhard Urban <[email protected]> wrote:
> add an if-guard, otherwise iw(8) reports weird signal strengths.
>
> The behaviour was fine before this commit:
> 7c277349ecbd66e19fad3d949fa6ef6c131a3b62
> This patch is therefore a partially revert of it.
>
> Tested with "TP-Link TL-WN722N"
>
> Thanks to indoo.rs http://indoo.rs/ for sponsoring
>
> Reported-by: Markus Krainz <[email protected]>
> Tested-by: Markus Krainz <[email protected]>
> Signed-off-by: Bernhard Urban <[email protected]>
> ---
> drivers/net/wireless/ath/ath9k/htc.h | 1 +
> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 29 +++++++++++++++----------
> 2 files changed, 19 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
> index 936e920..00ebf1c 100644
> --- a/drivers/net/wireless/ath/ath9k/htc.h
> +++ b/drivers/net/wireless/ath/ath9k/htc.h
> @@ -22,6 +22,7 @@
> #include <linux/firmware.h>
> #include <linux/skbuff.h>
> #include <linux/netdevice.h>
> +#include <linux/etherdevice.h>
> #include <linux/leds.h>
> #include <linux/slab.h>
> #include <net/mac80211.h>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> index 47e61d0..8b4da3d 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> @@ -969,6 +969,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
> int hdrlen, padpos, padsize;
> int last_rssi = ATH_RSSI_DUMMY_MARKER;
> __le16 fc;
> + u8 is_mybeacon;
>
> if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
> ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
> @@ -1060,22 +1061,28 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
> ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
> rxbuf->rxstatus.rs_flags);
>
> - if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
> - !rxbuf->rxstatus.rs_moreaggr)
> - ATH_RSSI_LPF(priv->rx.last_rssi,
> - rxbuf->rxstatus.rs_rssi);
> + is_mybeacon = ieee80211_is_beacon(fc) &&
> + !is_zero_ether_addr(common->curbssid) &&
> + ether_addr_equal(hdr->addr3, common->curbssid);
>
> - last_rssi = priv->rx.last_rssi;
> + if (is_mybeacon && priv->ah->opmode == NL80211_IFTYPE_STATION) {
> + if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
> + !rxbuf->rxstatus.rs_moreaggr)
> + ATH_RSSI_LPF(priv->rx.last_rssi,
> + rxbuf->rxstatus.rs_rssi);
>
> - if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
> - rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
> - ATH_RSSI_EP_MULTIPLIER);
> + last_rssi = priv->rx.last_rssi;
>
> - if (rxbuf->rxstatus.rs_rssi < 0)
> - rxbuf->rxstatus.rs_rssi = 0;
> + if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
> + s8 rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
> + rxbuf->rxstatus.rs_rssi = rssi;
> + }
> +
> + if (rxbuf->rxstatus.rs_rssi < 0)
> + rxbuf->rxstatus.rs_rssi = 0;
>
> - if (ieee80211_is_beacon(fc))
> priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
> + }
>
> rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
> rx_status->band = hw->conf.channel->band;
> --
> 1.7.9.5
>

I'm sending this patch again, because I'm not sure if I messed up
something with my mail client in this reply:
http://www.mail-archive.com/[email protected]/msg09470.html

It doesn't show up on gmane for linux-wireless and I didn't get an
answer so far.


Thanks,
Bernhard

2012-12-03 06:41:32

by Mohammed Shafi

[permalink] [raw]
Subject: Re: [PATCH] ath9k_htc: update RSSI values only when the device is associated

Hi Bernhard,

On Sun, Dec 2, 2012 at 1:56 AM, Bernhard Urban <[email protected]> wrote:
> On Sat, Dec 1, 2012 at 9:21 PM, Bernhard Urban <[email protected]> wrote:
>> add an if-guard, otherwise iw(8) reports weird signal strengths.
>>
>> The behaviour was fine before this commit:
>> 7c277349ecbd66e19fad3d949fa6ef6c131a3b62
>> This patch is therefore a partially revert of it.
>>
>> Tested with "TP-Link TL-WN722N"
>>
>> Thanks to indoo.rs http://indoo.rs/ for sponsoring
>>
>> Reported-by: Markus Krainz <[email protected]>
>> Tested-by: Markus Krainz <[email protected]>
>> Signed-off-by: Bernhard Urban <[email protected]>
>> ---
>> drivers/net/wireless/ath/ath9k/htc.h | 1 +
>> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 29 +++++++++++++++----------
>> 2 files changed, 19 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
>> index 936e920..00ebf1c 100644
>> --- a/drivers/net/wireless/ath/ath9k/htc.h
>> +++ b/drivers/net/wireless/ath/ath9k/htc.h
>> @@ -22,6 +22,7 @@
>> #include <linux/firmware.h>
>> #include <linux/skbuff.h>
>> #include <linux/netdevice.h>
>> +#include <linux/etherdevice.h>
>> #include <linux/leds.h>
>> #include <linux/slab.h>
>> #include <net/mac80211.h>
>> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
>> index 47e61d0..8b4da3d 100644
>> --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
>> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
>> @@ -969,6 +969,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
>> int hdrlen, padpos, padsize;
>> int last_rssi = ATH_RSSI_DUMMY_MARKER;
>> __le16 fc;
>> + u8 is_mybeacon;
>>
>> if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
>> ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
>> @@ -1060,22 +1061,28 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
>> ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
>> rxbuf->rxstatus.rs_flags);
>>
>> - if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
>> - !rxbuf->rxstatus.rs_moreaggr)
>> - ATH_RSSI_LPF(priv->rx.last_rssi,
>> - rxbuf->rxstatus.rs_rssi);
>> + is_mybeacon = ieee80211_is_beacon(fc) &&
>> + !is_zero_ether_addr(common->curbssid) &&
>> + ether_addr_equal(hdr->addr3, common->curbssid);
>>
>> - last_rssi = priv->rx.last_rssi;
>> + if (is_mybeacon && priv->ah->opmode == NL80211_IFTYPE_STATION) {
>> + if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
>> + !rxbuf->rxstatus.rs_moreaggr)
>> + ATH_RSSI_LPF(priv->rx.last_rssi,
>> + rxbuf->rxstatus.rs_rssi);

should we account for IBSS mode ?

>>
>> - if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
>> - rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
>> - ATH_RSSI_EP_MULTIPLIER);
>> + last_rssi = priv->rx.last_rssi;
>>
>> - if (rxbuf->rxstatus.rs_rssi < 0)
>> - rxbuf->rxstatus.rs_rssi = 0;
>> + if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
>> + s8 rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
>> + rxbuf->rxstatus.rs_rssi = rssi;
>> + }
>> +
>> + if (rxbuf->rxstatus.rs_rssi < 0)
>> + rxbuf->rxstatus.rs_rssi = 0;
>>
>> - if (ieee80211_is_beacon(fc))
>> priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
>> + }


please cross-verify with ath9k's ath9k_process_rssi, otherwise should be fine.

>>
>> rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
>> rx_status->band = hw->conf.channel->band;
>> --
>> 1.7.9.5
>>
>
> I'm sending this patch again, because I'm not sure if I messed up
> something with my mail client in this reply:
> http://www.mail-archive.com/[email protected]/msg09470.html
>
> It doesn't show up on gmane for linux-wireless and I didn't get an
> answer so far.
>
>
> Thanks,
> Bernhard
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
thanks,
shafi