diff --git a/cmd_parser.c b/cmd_parser.c index de7e1d49..8c21d9f8 100644 --- a/cmd_parser.c +++ b/cmd_parser.c @@ -33,7 +33,7 @@ extern __code const struct machine machine; extern __xdata bool stp_enabled; extern __code const uint8_t log_to_phys_port[9]; -extern __xdata uint8_t lldp_enabled; +extern __xdata bool lldp_enabled; extern volatile __xdata uint32_t ticks; extern volatile __xdata uint8_t sfr_data[4]; diff --git a/rtl837x_lldp.c b/rtl837x_lldp.c index 24e774c6..032d4746 100644 --- a/rtl837x_lldp.c +++ b/rtl837x_lldp.c @@ -1,5 +1,5 @@ -#pragma codeseg BANK2 -#pragma constseg BANK2 +#pragma codeseg BANK3 +#pragma constseg BANK3 #include "rtl837x_common.h" #include "rtl837x_lldp.h" @@ -10,7 +10,7 @@ #include "uip/uip.h" #include "machine.h" -extern __xdata uint8_t lldp_enabled; +extern __xdata bool lldp_enabled; extern __code const struct machine machine; uint8_t lldp_seconds; @@ -178,4 +178,4 @@ void lldp_sysdesc(uint8_t *p, uint16_t *len) __banked p[(*len)++] = *mp++; } p[(*len)-machine_name_length-1] = machine_name_length; -} \ No newline at end of file +} diff --git a/rtlplayground.c b/rtlplayground.c index 738b6ab2..4fb22009 100644 --- a/rtlplayground.c +++ b/rtlplayground.c @@ -128,7 +128,7 @@ __xdata uint8_t tx_seq; __xdata bool stp_enabled; __xdata uint8_t igmpEnabled; -__xdata uint8_t lldp_enabled; +__xdata bool lldp_enabled; __xdata char hostname[24]; /* device hostname, default set at boot, see rtl837x_common.h */ __code const uint16_t bit_mask[16] = { @@ -1072,9 +1072,6 @@ void handle_rx(void) && uip_buf[3] == 0x00 && uip_buf[4] == 0x00 && uip_buf[5] == 0x0e && uip_buf[12] == 0x88 && uip_buf[13] == 0xcc) { //LLDP Mac + EtherType check // LLDP packets shouldn't be passed elsewhere - if(uip_len){ - print_string("LLDP received\n"); - } } else if (ETH_IN->ether_type == HTONS(0x0806)) { // ARP uip_arp_arpin(); if (uip_len) {