All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] doc: document new AverageRSSI diagnostics key
@ 2021-03-16 15:38 James Prestwood
  2021-03-16 15:38 ` [PATCH 2/4] diagnostic: include AverageRSSI in GetDiagnostics James Prestwood
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: James Prestwood @ 2021-03-16 15:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

---
 doc/station-diagnostic-api.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/station-diagnostic-api.txt b/doc/station-diagnostic-api.txt
index af82229b..b5a73b5d 100644
--- a/doc/station-diagnostic-api.txt
+++ b/doc/station-diagnostic-api.txt
@@ -25,6 +25,8 @@ Methods		dict GetDiagnostics()
 
 			RSSI [optional] - The RSSI of the currently connected BSS.
 
+			AverageRSSI [optional] - Average RSSI of currently connected BSS.
+
 			RxMode [optional] -	The phy technology being used
 						(802.11n, 802.11ac or 802.11ax).
 
-- 
2.26.2

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

* [PATCH 2/4] diagnostic: include AverageRSSI in GetDiagnostics
  2021-03-16 15:38 [PATCH 1/4] doc: document new AverageRSSI diagnostics key James Prestwood
@ 2021-03-16 15:38 ` James Prestwood
  2021-03-16 15:38 ` [PATCH 3/4] netdev: parse SIGNAL_AVG when building diagnostics object James Prestwood
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: James Prestwood @ 2021-03-16 15:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]

---
 src/diagnostic.c | 4 ++++
 src/diagnostic.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/src/diagnostic.c b/src/diagnostic.c
index 034229a7..d690cf3a 100644
--- a/src/diagnostic.c
+++ b/src/diagnostic.c
@@ -39,10 +39,14 @@ bool diagnostic_info_to_dict(const struct diagnostic_station_info *info,
 				struct l_dbus_message_builder *builder)
 {
 	int16_t rssi = (int16_t)info->cur_rssi;
+	int16_t avg_rssi = (int16_t)info->avg_rssi;
 
 	if (info->have_cur_rssi)
 		dbus_append_dict_basic(builder, "RSSI", 'n', &rssi);
 
+	if (info->have_avg_rssi)
+		dbus_append_dict_basic(builder, "AverageRSSI", 'n', &avg_rssi);
+
 	if (info->have_rx_mcs) {
 		switch (info->rx_mcs_type) {
 		case DIAGNOSTIC_MCS_TYPE_HT:
diff --git a/src/diagnostic.h b/src/diagnostic.h
index cd23bb61..dab45c0b 100644
--- a/src/diagnostic.h
+++ b/src/diagnostic.h
@@ -30,6 +30,7 @@ enum diagnostic_mcs_type {
 struct diagnostic_station_info {
 	uint8_t addr[6];
 	int8_t cur_rssi;
+	int8_t avg_rssi;
 
 	enum diagnostic_mcs_type rx_mcs_type;
 	uint32_t rx_bitrate;
@@ -41,6 +42,7 @@ struct diagnostic_station_info {
 	uint32_t expected_throughput;
 
 	bool have_cur_rssi : 1;
+	bool have_avg_rssi : 1;
 	bool have_rx_mcs : 1;
 	bool have_tx_mcs : 1;
 	bool have_rx_bitrate : 1;
-- 
2.26.2

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

* [PATCH 3/4] netdev: parse SIGNAL_AVG when building diagnostics object
  2021-03-16 15:38 [PATCH 1/4] doc: document new AverageRSSI diagnostics key James Prestwood
  2021-03-16 15:38 ` [PATCH 2/4] diagnostic: include AverageRSSI in GetDiagnostics James Prestwood
@ 2021-03-16 15:38 ` James Prestwood
  2021-03-16 15:38 ` [PATCH 4/4] client: add AverageRSSI to list of diagnostic values James Prestwood
  2021-03-16 16:26 ` [PATCH 1/4] doc: document new AverageRSSI diagnostics key Denis Kenzior
  3 siblings, 0 replies; 5+ messages in thread
From: James Prestwood @ 2021-03-16 15:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

---
 src/netdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/netdev.c b/src/netdev.c
index 0a603fc1..66a781bc 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -452,6 +452,14 @@ static bool netdev_parse_sta_info(struct l_genl_attr *attr,
 			info->cur_rssi = *(const int8_t *) data;
 			info->have_cur_rssi = true;
 
+			break;
+		case NL80211_STA_INFO_SIGNAL_AVG:
+			if (len != 1)
+				return false;
+
+			info->avg_rssi = *(const int8_t *) data;
+			info->have_avg_rssi = true;
+
 			break;
 		case NL80211_STA_INFO_RX_BITRATE:
 			if (!l_genl_attr_recurse(attr, &nested))
-- 
2.26.2

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

* [PATCH 4/4] client: add AverageRSSI to list of diagnostic values
  2021-03-16 15:38 [PATCH 1/4] doc: document new AverageRSSI diagnostics key James Prestwood
  2021-03-16 15:38 ` [PATCH 2/4] diagnostic: include AverageRSSI in GetDiagnostics James Prestwood
  2021-03-16 15:38 ` [PATCH 3/4] netdev: parse SIGNAL_AVG when building diagnostics object James Prestwood
@ 2021-03-16 15:38 ` James Prestwood
  2021-03-16 16:26 ` [PATCH 1/4] doc: document new AverageRSSI diagnostics key Denis Kenzior
  3 siblings, 0 replies; 5+ messages in thread
From: James Prestwood @ 2021-03-16 15:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

---
 client/diagnostic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/client/diagnostic.c b/client/diagnostic.c
index 153598ed..58c646d7 100644
--- a/client/diagnostic.c
+++ b/client/diagnostic.c
@@ -88,6 +88,7 @@ static const struct diagnostic_dict_mapping diagnostic_mapping[] = {
 	{ "TxBitrate", 0, NULL, display_bitrate_100kbps },
 	{ "ExpectedThroughput", 'u', "Kbit/s" },
 	{ "RSSI", 'n', "dBm" },
+	{ "AverageRSSI", 'n', "dBm" },
 	{ "RxMCS", 'y' },
 	{ "TxMCS", 'y' },
 	{ "Frequency", 'u' },
-- 
2.26.2

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

* Re: [PATCH 1/4] doc: document new AverageRSSI diagnostics key
  2021-03-16 15:38 [PATCH 1/4] doc: document new AverageRSSI diagnostics key James Prestwood
                   ` (2 preceding siblings ...)
  2021-03-16 15:38 ` [PATCH 4/4] client: add AverageRSSI to list of diagnostic values James Prestwood
@ 2021-03-16 16:26 ` Denis Kenzior
  3 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2021-03-16 16:26 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

Hi James,

On 3/16/21 10:38 AM, James Prestwood wrote:
> ---
>   doc/station-diagnostic-api.txt | 2 ++
>   1 file changed, 2 insertions(+)
> 

All applied, thanks.

Regards,
-Denis

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

end of thread, other threads:[~2021-03-16 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 15:38 [PATCH 1/4] doc: document new AverageRSSI diagnostics key James Prestwood
2021-03-16 15:38 ` [PATCH 2/4] diagnostic: include AverageRSSI in GetDiagnostics James Prestwood
2021-03-16 15:38 ` [PATCH 3/4] netdev: parse SIGNAL_AVG when building diagnostics object James Prestwood
2021-03-16 15:38 ` [PATCH 4/4] client: add AverageRSSI to list of diagnostic values James Prestwood
2021-03-16 16:26 ` [PATCH 1/4] doc: document new AverageRSSI diagnostics key Denis Kenzior

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.