All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balaji Pothunoori <bpothuno@codeaurora.org>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Balaji Pothunoori <bpothuno@codeaurora.org>
Subject: [PATCH 2/2] mac80211: last ack singal support in station dump
Date: Fri, 25 May 2018 14:50:05 +0530	[thread overview]
Message-ID: <1527240005-8508-3-git-send-email-bpothuno@codeaurora.org> (raw)
In-Reply-To: <1527240005-8508-1-git-send-email-bpothuno@codeaurora.org>

This patch adds "last ack signal" and "avg ack signal" support
in station dump for valid ack rssi.

Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
---
 net/mac80211/sta_info.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 6428f1a..12b618e 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2310,13 +2310,21 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
 	}
 
-	if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS) &&
-	    !(sinfo->filled & BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG))) {
-		sinfo->avg_ack_signal =
-			-(s8)ewma_avg_signal_read(
+	if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS)) {
+		if (sta->status_stats.ack_signal_filled && ((!(sinfo->filled &
+		    BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL))) ||
+		    (!(sinfo->filled &
+		    BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG))))) {
+			sinfo->ack_signal =
+				sta->status_stats.last_ack_signal;
+			sinfo->filled |=
+				BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
+			sinfo->avg_ack_signal =
+				-(s8)ewma_avg_signal_read(
 				&sta->status_stats.avg_ack_signal);
-		sinfo->filled |=
-			BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG);
+			sinfo->filled |=
+				BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG);
+		}
 	}
 }
 
-- 
2.7.4

      parent reply	other threads:[~2018-05-25  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25  9:20 [PATCH 0/2] cfg80211/mac80211: last ack singal support in station dump Balaji Pothunoori
2018-05-25  9:20 ` [PATCH 1/2] cfg80211: " Balaji Pothunoori
2018-05-27  9:48   ` kbuild test robot
2018-05-31  6:12     ` Balaji Pothunoori
2018-05-25  9:20 ` Balaji Pothunoori [this message]

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=1527240005-8508-3-git-send-email-bpothuno@codeaurora.org \
    --to=bpothuno@codeaurora.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 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.