From: Arik Nemtsov Date: Wed, 3 Jun 2015 08:32:23 +0000 (+0300) Subject: iw: add connected time to station info X-Git-Tag: v4.3~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=087d778f6f82346debfd275ddbb8f646f9a1a167;p=thirdparty%2Fiw.git iw: add connected time to station info Useful for long testing scenarios Signed-off-by: Arik Nemtsov -- As a side note, I had to change version.sh to make this compile in the intel git. The "4.1" tag is missing here, so this line fails in version.sh: [ "${descr%%-*}" = "v$VERSION" ] || exit 2 --- diff --git a/station.c b/station.c index 2b2eef8..894d978 100644 --- a/station.c +++ b/station.c @@ -338,6 +338,10 @@ static int print_sta_handler(struct nl_msg *msg, void *arg) } } + if (sinfo[NL80211_STA_INFO_CONNECTED_TIME]) + printf("\n\tconnected time:\t%u seconds", + nla_get_u32(sinfo[NL80211_STA_INFO_CONNECTED_TIME])); + printf("\n"); return NL_SKIP; }