From 1f913b5c7e171857b13c60fcd4dba3bda46ad70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Sun, 11 Jan 2026 19:22:37 +0100 Subject: [PATCH] yang: wifi: Use correct type for counters --- src/confd/yang/confd/infix-if-wifi.yang | 8 ++++---- src/statd/python/yanger/ietf_interfaces/wifi.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/confd/yang/confd/infix-if-wifi.yang b/src/confd/yang/confd/infix-if-wifi.yang index 843421f9..687fab56 100644 --- a/src/confd/yang/confd/infix-if-wifi.yang +++ b/src/confd/yang/confd/infix-if-wifi.yang @@ -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."; } diff --git a/src/statd/python/yanger/ietf_interfaces/wifi.py b/src/statd/python/yanger/ietf_interfaces/wifi.py index c298e78e..2d1afdb8 100644 --- a/src/statd/python/yanger/ietf_interfaces/wifi.py +++ b/src/statd/python/yanger/ietf_interfaces/wifi.py @@ -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])