]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: handle more mesh station info
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Mon, 3 Aug 2020 15:33:36 +0000 (17:33 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 27 Aug 2020 11:35:23 +0000 (13:35 +0200)
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200803153336.319773-4-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
station.c

index f8600b7196abc6be54992d87166c8d4f6d6d01bc..b2c5b9c205054c6689227eea0c4e69a5f14d5a62 100644 (file)
--- a/station.c
+++ b/station.c
@@ -328,6 +328,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
                [NL80211_STA_INFO_TX_DURATION] = { .type = NLA_U64 },
                [NL80211_STA_INFO_ACK_SIGNAL] = {.type = NLA_U8 },
                [NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
+               [NL80211_STA_INFO_AIRTIME_LINK_METRIC] = { .type = NLA_U32 },
+               [NL80211_STA_INFO_CONNECTED_TO_AS] = { .type = NLA_FLAG },
+               [NL80211_STA_INFO_CONNECTED_TO_GATE] = { .type = NLA_FLAG },
        };
        char *chain;
        struct timeval now;
@@ -497,6 +500,18 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
                }
                printf("\n\tmesh plink:\t%s", state_name);
        }
+       if (sinfo[NL80211_STA_INFO_AIRTIME_LINK_METRIC])
+               printf("\n\tmesh airtime link metric: %d",
+                       nla_get_u32(sinfo[NL80211_STA_INFO_AIRTIME_LINK_METRIC]));
+       if (sinfo[NL80211_STA_INFO_CONNECTED_TO_GATE])
+               printf("\n\tmesh connected to gate:\t%s",
+                       nla_get_u8(sinfo[NL80211_STA_INFO_CONNECTED_TO_GATE]) ?
+                       "yes" : "no");
+       if (sinfo[NL80211_STA_INFO_CONNECTED_TO_AS])
+               printf("\n\tmesh connected to auth server:\t%s",
+                       nla_get_u8(sinfo[NL80211_STA_INFO_CONNECTED_TO_AS]) ?
+                       "yes" : "no");
+
        if (sinfo[NL80211_STA_INFO_LOCAL_PM]) {
                printf("\n\tmesh local PS mode:\t");
                print_power_mode(sinfo[NL80211_STA_INFO_LOCAL_PM]);