aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/x300/x300/x300_init.c3
-rw-r--r--firmware/x300/x300/x300_main.c27
2 files changed, 14 insertions, 16 deletions
diff --git a/firmware/x300/x300/x300_init.c b/firmware/x300/x300/x300_init.c
index 978168b09..66fb120f3 100644
--- a/firmware/x300/x300/x300_init.c
+++ b/firmware/x300/x300/x300_init.c
@@ -76,8 +76,7 @@ static void init_network(void)
printf("PKT RAM0 BASE 0x%x\n", (&pkt_config)->base);
u3_net_stack_init(&pkt_config);
- //FIXME: Uncomment when feature is required
- //link_state_route_proto_init();
+ link_state_route_proto_init();
//read everything from eeprom
static const uint8_t eeprom_cmd[2] = {0, 0}; //the command is 16 bits of address offset
diff --git a/firmware/x300/x300/x300_main.c b/firmware/x300/x300/x300_main.c
index 92368ec9c..d7fd32ac3 100644
--- a/firmware/x300/x300/x300_main.c
+++ b/firmware/x300/x300/x300_main.c
@@ -372,22 +372,22 @@ static void handle_uarts(void)
**********************************************************************/
static void update_forwarding(const uint8_t e)
{
- /* FIXME: This code is broken.
+ /* FIXME: This code is broken.
* It blindly enables forwarding without regard to whether or not
* packets can be forwarded. If one of the Ethernet interfaces is not
* connected, data backs up until the first interface becomes unresponsive.
- * Uncomment and fix when topologies requiring forwarding are supported.
*
- //update forwarding rules
- uint32_t forward = 0;
- if (!link_state_route_proto_causes_cycle_cached(e, (e+1)%2))
- {
- forward |= (1 << 0); //forward bcast
- forward |= (1 << 1); //forward not mac dest
- }
- const uint32_t eth_base = (e == 0)? SR_ETHINT0 : SR_ETHINT1;
- wb_poke32(SR_ADDR(SET0_BASE, eth_base + 8 + 4), forward);
- */
+ * //update forwarding rules
+ * uint32_t forward = 0;
+ * if (!link_state_route_proto_causes_cycle_cached(e, (e+1)%2))
+ * {
+ * forward |= (1 << 0); //forward bcast
+ * forward |= (1 << 1); //forward not mac dest
+ * }
+ * const uint32_t eth_base = (e == 0)? SR_ETHINT0 : SR_ETHINT1;
+ * wb_poke32(SR_ADDR(SET0_BASE, eth_base + 8 + 4), forward);
+ */
+
}
static void handle_link_state(void)
@@ -445,8 +445,7 @@ int main(void)
static const uint32_t tick_delta = CPU_CLOCK/1000;
if (ticks_passed > tick_delta)
{
- //FIXME: Uncomment when feature is required
- //handle_link_state(); //deal with router table update
+ handle_link_state(); //deal with router table update
handle_claim(); //deal with the host claim register
update_leds(); //run the link and activity leds
garp(); //send periodic garps