Correct TX and RX good MIB counter

The counters for good TX and RX packages were swapped. Fix this
and also use propper names for the counters.
This commit is contained in:
logicog
2026-01-11 07:51:18 +01:00
parent d2d7ab7ff1
commit 48c12fa0bb
2 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -400,17 +400,17 @@ void port_stats_print(void) __banked
print_string("Up\t");
break;
}
STAT_GET(0x2f, i);
STAT_GET(STAT_COUNTER_TX_PKTS, i);
print_reg(RTL837X_STAT_V_LOW); write_char('\t');
STAT_GET(0x30, i);
STAT_GET(STAT_COUNTER_ERR_PKTS, i);
print_reg(RTL837X_STAT_V_LOW); write_char('\t');
STAT_GET(STAT_COUNTER_RX_PKTS, i);
print_reg(RTL837X_STAT_V_LOW); write_char('\t');
STAT_GET(STAT_COUNTER_ERR_PKTS, i);
print_reg(RTL837X_STAT_V_HIGH); write_char('\t');
STAT_GET(0x2e, i);
print_reg(RTL837X_STAT_V_LOW); write_char('\t');
STAT_GET(0x30, i);
print_reg(RTL837X_STAT_V_LOW); write_char('\t');
print_string("\n");
}
}
+3 -3
View File
@@ -3,9 +3,9 @@
#include <stdint.h>
#define STAT_COUNTER_TX_PKTS 0x2e
#define STAT_COUNTER_RX_PKTS 0x2f
#define STAT_COUNTER_ERR_PKTS 0x30
#define STAT_COUNTER_TX_PKTS 46
#define STAT_COUNTER_RX_PKTS 47
#define STAT_COUNTER_ERR_PKTS 48
#define STAT_GET(cnt, port) \
REG_WRITE(RTL837X_STAT_GET, 0x00, 0x00, cnt >> 3, (cnt << 5) | (port << 1) | 1); \