diagnostic: include AverageRSSI in GetDiagnostics

This commit is contained in:
James Prestwood 2021-03-16 08:38:34 -07:00 committed by Denis Kenzior
parent f6801be8a3
commit fb0a1fba2a
2 changed files with 6 additions and 0 deletions

View File

@ -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:

View File

@ -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;