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
@@ -108,7 +108,7 @@ void lldp_send(void) __banked __reentrant
*/
uip_len = MAC_ADDR_LEN + MAC_ADDR_LEN + sizeof(struct rtl_tag) + LLDP_ETHERTYPE_LENGTH + (p - LLDP_O->payload);
for (uint8_t port = machine.min_port; port <= machine.max_port; port++) {
for (uint8_t port = MACHINE_MIN_PORT; port <= MACHINE_MAX_PORT; port++) {
if ((1 << port) & lldp_logical_port_status) {
LLDP_O->payload[port_position] = '0' + machine.log_to_phys_port[port];