All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balaji Pothunoori <bpothuno@codeaurora.org>
To: johannes@sipsolutions.net, ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
	Balaji Pothunoori <bpothuno@codeaurora.org>
Subject: [PATCH v2 2/3] mac80211: Extend avg ack rssi support for mgmt frames
Date: Thu, 19 Jul 2018 18:56:28 +0530	[thread overview]
Message-ID: <1532006789-32454-3-git-send-email-bpothuno@codeaurora.org> (raw)
In-Reply-To: <1532006789-32454-1-git-send-email-bpothuno@codeaurora.org>

Used defined API to make common average ack rssi
support irrespective of data or mamagement tx ack packet.

Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
---
v2: Addressed Johannes comments
    Modified subject and commit log

 net/mac80211/sta_info.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index aa8fe77..1364f0b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2317,19 +2317,19 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 		sinfo->expected_throughput = thr;
 	}
 
-	if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL)) &&
-	    sta->status_stats.ack_signal_filled) {
-		sinfo->ack_signal = sta->status_stats.last_ack_signal;
-		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(
-				&sta->status_stats.avg_ack_signal);
-		sinfo->filled |=
-			BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG);
+	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_ACK_SIGNAL_AVG);
+		}
 	}
 }
 
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Balaji Pothunoori <bpothuno@codeaurora.org>
To: johannes@sipsolutions.net, ath10k@lists.infradead.org
Cc: Balaji Pothunoori <bpothuno@codeaurora.org>,
	linux-wireless@vger.kernel.org
Subject: [PATCH v2 2/3] mac80211: Extend avg ack rssi support for mgmt frames
Date: Thu, 19 Jul 2018 18:56:28 +0530	[thread overview]
Message-ID: <1532006789-32454-3-git-send-email-bpothuno@codeaurora.org> (raw)
In-Reply-To: <1532006789-32454-1-git-send-email-bpothuno@codeaurora.org>

Used defined API to make common average ack rssi
support irrespective of data or mamagement tx ack packet.

Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
---
v2: Addressed Johannes comments
    Modified subject and commit log

 net/mac80211/sta_info.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index aa8fe77..1364f0b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2317,19 +2317,19 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 		sinfo->expected_throughput = thr;
 	}
 
-	if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL)) &&
-	    sta->status_stats.ack_signal_filled) {
-		sinfo->ack_signal = sta->status_stats.last_ack_signal;
-		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(
-				&sta->status_stats.avg_ack_signal);
-		sinfo->filled |=
-			BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG);
+	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_ACK_SIGNAL_AVG);
+		}
 	}
 }
 
-- 
2.7.4


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2018-07-19 14:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 13:26 [PATCH v2 0/3] cfg80211/mac80211/ath10k: Extend avg ack rssi support for mgmt frames Balaji Pothunoori
2018-07-19 13:26 ` Balaji Pothunoori
2018-07-19 13:26 ` [PATCH v2 1/3] cfg80211: " Balaji Pothunoori
2018-07-19 13:26   ` Balaji Pothunoori
2018-07-19 13:26 ` Balaji Pothunoori [this message]
2018-07-19 13:26   ` [PATCH v2 2/3] mac80211: " Balaji Pothunoori
2018-07-19 13:26 ` [PATCH v2 3/3] ath10k: management tx ack rssi capability check Balaji Pothunoori
2018-07-19 13:26   ` Balaji Pothunoori
2018-08-29  8:53   ` Johannes Berg
2018-08-29  8:53     ` Johannes Berg
2018-09-06 10:25     ` Balaji Pothunoori
2018-09-06 10:25       ` Balaji Pothunoori
2018-08-29  8:53 ` [PATCH v2 0/3] cfg80211/mac80211/ath10k: Extend avg ack rssi support for mgmt frames Johannes Berg
2018-08-29  8:53   ` Johannes Berg

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=1532006789-32454-3-git-send-email-bpothuno@codeaurora.org \
    --to=bpothuno@codeaurora.org \
    --cc=ath10k@lists.infradead.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.