use macro for min_port and max_port for code optimization

This commit is contained in:
HL Yi committed 2026-10-21 19:40:19 -05:00
1 parent c9e8403c6e
commit 7346977f91
12 files changed
+64 -61

No files matched your search

+1 -1
View File
@@ -246,7 +246,7 @@ void rtl8372_init(void) __banked
// [...]
///
uint16_t reg = 0x1238 + 0x300; // Port base register for the bits we set
for (char i = machine.min_port; i <= machine.max_port; i++) {
for (char i = MACHINE_MIN_PORT; i <= MACHINE_MAX_PORT; i++) {
// Bit 7 (0x40) enables replacement of the RTL-VLAN tag with an 802.1Q VLAN tag
REG_SET(reg, 0xe77);
reg += 0x100;