From 05ded88f85ba12e1755d324a346d62328b6cdbed Mon Sep 17 00:00:00 2001 From: d00f <8052722+DrDoof@users.noreply.github.com> Date: Mon, 31 Aug 2026 22:12:35 +0200 Subject: [PATCH] stp: keep the FDB update's counters to the function that uses them Both only ever served stp_fdb_update(), so they belong there. Internal RAM has room for them on this branch and on the one that carries the aggregation module too. --- rtl837x_stp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtl837x_stp.c b/rtl837x_stp.c index 83d351c..32bac99 100644 --- a/rtl837x_stp.c +++ b/rtl837x_stp.c @@ -24,8 +24,6 @@ extern __code struct machine machine; extern __xdata uint8_t sfr_data[4]; extern __xdata struct machine_runtime machine_detected; -__xdata uint16_t stp_fdb_vid; -__xdata uint8_t stp_fdb_i; extern __xdata struct uip_eth_addr uip_ethaddr; @@ -691,6 +689,9 @@ void stp_defaults(void) __banked */ static void stp_fdb_update(__xdata uint16_t pmask) { + uint16_t stp_fdb_vid; + uint8_t stp_fdb_i; + /* Unlike LACPDUs (always untagged, so per-PVID entries suffice), BPDUs * can arrive VLAN-tagged and then classify into the tag's VID - cover * every VLAN that exists in the VLAN table, plus every port's PVID for