stp: name the port count instead of spelling out ten

Review of #397 pointed at the bare 10, which shows up in fifteen places. It
is the width of the port field in the MSTP register, so it is the CPU port
index plus one and it gets a name.

The web page counted to ten as well when listing a group's members. It uses
numPorts now, like the rest of that page does.

The aggregation section of the doc no longer names the OEM firmware or calls
a group a trunk, and it says plainly that the hardware keeps no per-group
state, so the firmware writes the members itself.

Generated code is unchanged: the only difference in the assembly is the
version string.
This commit is contained in:
d00f committed 2026-09-09 20:58:35 +02:00
1 parent 02c816647c
commit eab927f52a
3 files changed
+33 -27

No files matched your search

+3 -1
View File
@@ -2,6 +2,7 @@
#define _RTL837X_STP_H_
#include <stdint.h>
#include "rtl837x_common.h"
void stp_in(void) __banked;
void stp_setup(void) __banked;
void stp_timers(void) __banked;
@@ -12,7 +13,8 @@ void stp_defaults(void) __banked;
/* Tick rate of stp_timers(), also used by the web UI. */
#define STP_HZ 50
#define STP_LAG_BASE 10
#define STP_PORTS (CPU_PORT + 1)
#define STP_LAG_BASE STP_PORTS
#define STP_LAG_COUNT 4
#define STP_ENTITIES (STP_LAG_BASE + STP_LAG_COUNT)