yang: wifi: Use correct type for counters

This commit is contained in:
Mattias Walström
2026-01-23 13:03:57 +01:00
parent 2b6c343b91
commit 1f913b5c7e
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -401,23 +401,23 @@ submodule infix-if-wifi {
}
leaf rx-packets {
type uint32;
type yang:counter64;
description "Packets received from this client.";
}
leaf tx-packets {
type uint32;
type yang:counter64;
description "Packets transmitted to this client.";
}
leaf rx-bytes {
type uint32;
type yang:counter64;
units "octets";
description "Bytes received from this client.";
}
leaf tx-bytes {
type uint32;
type yang:counter64;
units "octets";
description "Bytes transmitted to this client.";
}
@@ -152,13 +152,13 @@ def parse_iw_stations(output):
seconds = int(value.split()[0])
current_station["connected-time"] = seconds
elif key == "rx packets":
current_station["rx-packets"] = int(value)
current_station["rx-packets"] = value
elif key == "tx packets":
current_station["tx-packets"] = int(value)
current_station["tx-packets"] = value
elif key == "rx bytes":
current_station["rx-bytes"] = int(value)
current_station["rx-bytes"] = value
elif key == "tx bytes":
current_station["tx-bytes"] = int(value)
current_station["tx-bytes"] = value
elif key == "tx bitrate":
# Format: "866.7 MBit/s ..." - extract speed and convert to 100kbit/s units
speed_mbps = float(value.split()[0])