usteer: add connected-since

Fetch the age of the association for STAs in order to implement minimum
intervals after which a STA is considered kickable.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2022-08-17 02:17:40 +02:00
parent 9e6002d29a
commit 837f144f6c
4 changed files with 8 additions and 0 deletions

View File

@@ -269,6 +269,9 @@ static void nl80211_update_sta(struct usteer_node *node, struct sta_info *si)
if (tb_sta[NL80211_STA_INFO_SIGNAL_AVG])
signal = (int8_t) nla_get_u8(tb_sta[NL80211_STA_INFO_SIGNAL_AVG]);
if (tb_sta[NL80211_STA_INFO_CONNECTED_TIME])
si->connected_since = current_time - (nla_get_u32(tb_sta[NL80211_STA_INFO_CONNECTED_TIME]) * 1000);
usteer_sta_info_update(si, signal, true);