change constant to macros and move RXIE enable to boot.c for portability.

This commit is contained in:
HL Yi committed 2026-10-17 16:42:39 -05:00
1 parent 424a963301
commit 6a5d3cdf2c
6 files changed
+5 -5

No files matched your search

+1
View File
@@ -296,6 +296,7 @@ void nic_setup(void) __banked
// Sequence number of TX packets
tx_seq = 0;
REG_SET(RTL837X_NIC_INT_MSK, NIC_INT_RXIE);
}
+1 -1
View File
@@ -745,7 +745,7 @@ void parse_isolate(void)
if (cmd_compare(2, "off")) {
for (uint8_t i = machine.min_port; i <= machine.max_port; i++)
members |= ((uint16_t)1) << i;
members |= 0x200; // CPU-port
members |= PMASK_CPU; // CPU-port
port_isolate(port_configured, members);
return;
}
+1 -1
View File
@@ -23,7 +23,7 @@
// Define Port-masks for 9-port devices and 6-port devices
#define PMASK_9 0x1ff
#define PMASK_6 0x1f8
#define PMASK_CPU 0x200
#define PMASK_CPU ((uint16_t)(1 << CPU_PORT))
// Defines a port mask for dropping all packets on Lookup-miss
#define LOOKUP_MISS_DROP_6 0x00015540
+1 -1
View File
@@ -57,7 +57,7 @@ void port_mirror_del(void) __banked
bool port_ingress_filter(__xdata uint8_t port, __xdata vlan_ingress_mode_t type) __banked
{
if (port > 9 || type >= VLAN_INVALID) {
if (port > CPU_PORT || type >= VLAN_INVALID) {
print_string("Invalid port or ingress filter type\n");
return false;
}
+1 -1
View File
@@ -46,7 +46,7 @@ extern __xdata uint8_t stp_pflags[STP_ENTITIES];
extern __xdata uint32_t stp_pcost[STP_ENTITIES]; /* path cost; 0 = auto (20000) */
extern __xdata uint8_t stp_pprio[STP_ENTITIES];
extern __xdata uint8_t stp_pp2p[STP_ENTITIES];
extern __xdata uint8_t stp_ent_of[10]; /* the STP entity a port answers to: itself, or its lag */
extern __xdata uint8_t stp_ent_of[STP_PORTS]; /* the STP entity a port answers to: itself, or its lag */
extern __xdata uint16_t stp_lag_mask[STP_LAG_COUNT]; /* member ports of each lag; 0 = not part of STP */
/* Last-heard designated info per port (from received BPDUs); consult
-1
View File
@@ -1805,7 +1805,6 @@ void main(void)
lacpEnabled = 0;
lacp_init();
nic_setup();
REG_SET(RTL837X_NIC_INT_MSK, NIC_INT_RXIE);
trap_init();
vlan_setup();
port_l2_setup();