Search Linux Wireless

[PATCH 4/4] iw: handle more mesh station info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Markus Theil <markus.theil@xxxxxxxxxxxxx>
---
 station.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/station.c b/station.c
index f8600b7..b2c5b9c 100644
--- 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]);
-- 
2.28.0




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux