linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Bernhard Urban <lewurm@gmail.com>
Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org,
	c_manoha@qca.qualcomm.com, Sujith.Manoharan@atheros.com,
	linville@tuxdriver.com, m.sujith@gmail.com,
	shafi.wireless@gmail.com, markus@indoo.rs
Subject: Re: [PATCH] ath9k_htc: update RSSI values only when the device is associated
Date: Tue, 05 Feb 2013 23:05:31 +0100	[thread overview]
Message-ID: <5111822B.9050309@openwrt.org> (raw)
In-Reply-To: <1359723012-9488-1-git-send-email-lewurm@gmail.com>

On 2013-02-01 1:50 PM, Bernhard Urban wrote:
> add an if-guard, otherwise iw(8) reports weird signal strengths.
> 
> The behaviour was fine before this commit:
> 	7c277349ecbd66e19fad3d949fa6ef6c131a3b62
> Therefore, this patch is a partially revert of it.
I think your commit message is a bit misleading. The main problem with
signal strength reporting is not that it's missing some checks for if
the device is associated, or if the received frame is a local beacon.

The main problem is in these lines below:
> +		if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
> +			s8 rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
> +			rxbuf->rxstatus.rs_rssi = rssi;
> +		}
It does not make any sense to update the per-frame RSSI value with any
sort of average. ath9k filters out invalid RSSI values by ignoring rssi
for ANI when rx_stats->rs_moreaggr is set. In that case it also sets the
RX_FLAG_NO_SIGNAL_VAL flag to tell mac80211 to ignore the value for its
own signal strength averages.

- Felix


  reply	other threads:[~2013-02-05 22:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 12:50 [PATCH] ath9k_htc: update RSSI values only when the device is associated Bernhard Urban
2013-02-05 22:05 ` Felix Fietkau [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-01 20:21 Bernhard Urban
2012-12-01 20:26 ` Bernhard Urban
2012-12-03  6:41   ` Mohammed Shafi
2012-12-05 22:13     ` Bernhard Urban
2012-11-09 17:09 Bernhard Urban
2012-11-10  8:42 ` Sujith
2012-11-10  9:15 ` Felix Fietkau
2012-11-17 19:12   ` Bernhard Urban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5111822B.9050309@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=Sujith.Manoharan@atheros.com \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=c_manoha@qca.qualcomm.com \
    --cc=lewurm@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=m.sujith@gmail.com \
    --cc=markus@indoo.rs \
    --cc=shafi.wireless@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).