diff options
author | root <root@ka-ata-killa.ourano.james.local> | 2021-03-20 19:37:18 +0000 |
---|---|---|
committer | root <root@ka-ata-killa.ourano.james.local> | 2021-03-20 19:37:18 +0000 |
commit | 8c8218f878609af4719252d16ac0f42bccd9ba5b (patch) | |
tree | 3efcff988ae500c028868ab547979fd9f56dd5fa /app/steth.c | |
parent | f211fe6461aae73f5ffdbe58961dbe3dd1309854 (diff) | |
download | clock-8c8218f878609af4719252d16ac0f42bccd9ba5b.tar.gz clock-8c8218f878609af4719252d16ac0f42bccd9ba5b.tar.bz2 clock-8c8218f878609af4719252d16ac0f42bccd9ba5b.zip |
add mdns responder
Diffstat (limited to 'app/steth.c')
-rw-r--r-- | app/steth.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/steth.c b/app/steth.c index 9245d17..b31bfe3 100644 --- a/app/steth.c +++ b/app/steth.c @@ -327,7 +327,7 @@ steth_lwip_init (struct netif *netif) netif->mtu = 1500; /* device capabilities */ - netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_IGMP; return ERR_OK; } @@ -338,7 +338,7 @@ static void my_eth_init (uint8_t phy, enum eth_clk clock) ETH_MACCR = ETH_MACCR_CSTF | ETH_MACCR_FES | ETH_MACCR_DM | ETH_MACCR_APCS | ETH_MACCR_RD; - ETH_MACFFR = ETH_MACFFR_RA | ETH_MACFFR_PM; + ETH_MACFFR = ETH_MACFFR_RA | ETH_MACFFR_PM | ETH_MACFFR_PAM; ETH_MACHTHR = 0; /* pass all frames */ ETH_MACHTLR = 0; ETH_MACFCR = (0x100 << ETH_MACFCR_PT_SHIFT); @@ -508,6 +508,7 @@ void steth_slow_tick (void) ETH_MACCR |= ETH_MACCR_RD; running = 0; + dhcp_stop (&if0); netif_set_link_down (&if0); } @@ -555,7 +556,10 @@ void steth_slow_tick (void) printf ("starting nic\r\n"); running++; + netif_set_link_up (&if0); + dhcp_start (&if0); + mdns_resp_restart (&if0); } // printf("end slow tick\r\n"); |