mirror: show the configured monitor port in "mirror status"

"mirror status" printed the local mirroring_port, which is still 0 at
that point, so it named the same port whatever was configured. Print
the port from RTL837x_MIRROR_CTRL instead, which the function has
already read to tell whether mirroring is enabled. send_mirror() decodes
the register the same way for the web interface.
This commit is contained in:
bloqaudio committed 2026-10-12 12:02:02 -05:00
1 parent 1856aeba28
commit c2980e42d8
1 file changed
+1 -1
+1 -1
View File
@@ -826,7 +826,7 @@ void parse_mirror(void)
print_string("NOT Enabled: "); print_string("NOT Enabled: ");
} }
print_string("Mirroring port: "); print_string("Mirroring port: ");
print_phys_port(mirroring_port); print_phys_port(mPort >> 1);
reg_read_m(RTL837x_MIRROR_CONF); reg_read_m(RTL837x_MIRROR_CONF);
uint16_t m = sfr_data[0]; uint16_t m = sfr_data[0];
m = (m << 8) | sfr_data[1]; m = (m << 8) | sfr_data[1];