From ada8449960fe9de86438631a9e38305449986a80 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 25 Feb 2012 13:54:09 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3981 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/mac_lld.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/os/hal/platforms/STM32/mac_lld.c b/os/hal/platforms/STM32/mac_lld.c index d620c3e47..a302df540 100644 --- a/os/hal/platforms/STM32/mac_lld.c +++ b/os/hal/platforms/STM32/mac_lld.c @@ -296,10 +296,10 @@ void mac_lld_start(MACDriver *macp) { /* PHY in power up mode.*/ mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) & ~BMCR_PDOWN); - /* MAC configuration: - ETH_MACFFR_SAF - Source address filter. Broadcast frames are not - filtered.*/ - ETH->MACFFR = ETH_MACFFR_SAF; + /* MAC configuration.*/ + ETH->MACFFR = 0; + ETH->MACFCR = 0; + ETH->MACVLANTR = 0; /* MAC address setup.*/ if (macp->config->mac_address == NULL) @@ -307,14 +307,10 @@ void mac_lld_start(MACDriver *macp) { else mac_lld_set_address(macp->config->mac_address); - /* MAC flow control not used, VLAN not used.*/ - ETH->MACFCR = 0; - ETH->MACVLANTR = 0; - /* Transmitter and receiver enabled. Note that the complete setup of the MAC is performed when the link status is detected.*/ - ETH->MACCR = ETH_MACCR_RE | ETH_MACCR_TE; + ETH->MACCR = ETH_MACCR_IPCO | ETH_MACCR_RE | ETH_MACCR_TE; /* DMA configuration: Descriptor chains pointers.*/ @@ -604,7 +600,7 @@ bool_t mac_lld_poll_link_status(MACDriver *macp) { if (bmcr & BMCR_ANENABLE) { uint32_t lpa; - /* Auto-nogotiation enabled, checks the LPA register.*/ + /* Auto-negotiation enabled, checks the LPA register.*/ lpa = mii_read(macp, MII_LPA); /* Check on link speed.*/