diff --git a/ChangeLog b/ChangeLog index f685333cac..42e07a27f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5646,5 +5646,8 @@ if the packet is being sent out of our subnet (via a router). The fallback here is just to use "eth0" if the subnet lookup fails. This will, of course, will have to be revisited if/when - multiple NICs are supported (2013-9-27). + multiple NICs are supported. From Max Holtzberg (2013-9-27). + * net/send.c: Fix some backward conditional logic in check + to see if we should check if the ARP address in the table. From + Max Holzberg (2013-9-27). diff --git a/arch/arm/src/sama5/sam_gmac.c b/arch/arm/src/sama5/sam_gmac.c index b25d74b578..6971d7a85a 100644 --- a/arch/arm/src/sama5/sam_gmac.c +++ b/arch/arm/src/sama5/sam_gmac.c @@ -1831,7 +1831,7 @@ static void sam_phydump(struct sam_gmac_s *priv) static void sam_enablemdio(struct sam_gmac_s *priv) { uint32_t regval; - uint32_t enables; + uint32_t ncr; /* Enable management port */ @@ -2489,14 +2489,11 @@ static void sam_mdcclock(struct sam_gmac_s *priv) { uint32_t ncfgr; uint32_t ncr; - uint32_t enables; /* Disable RX and TX momentarily */ - ncr = sam_getreg(priv, SAM_GMAC_NCR); - enables = ncr & (GMAC_NCR_RXEN | GMAC_NCR_TXEN); - ncr &= ~(GMAC_NCR_RXEN | GMAC_NCR_TXEN); - sam_putreg(priv, SAM_GMAC_NCR, ncr); + ncr = sam_getreg(priv, SAM_GMAC_NCR); + sam_putreg(priv, SAM_GMAC_NCR, ncr & ~(GMAC_NCR_RXEN | GMAC_NCR_TXEN)); /* Modify the NCFGR register based on the configured board MCK frequency */ @@ -2523,7 +2520,6 @@ static void sam_mdcclock(struct sam_gmac_s *priv) /* Restore RX and TX enable settings */ - ncr |= enables; sam_putreg(priv, SAM_GMAC_NCR, ncr); } diff --git a/net/send.c b/net/send.c index 9f7c71f134..2d66f26f0c 100644 --- a/net/send.c +++ b/net/send.c @@ -379,7 +379,7 @@ static uint16_t send_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, * should already be in the ARP table. */ -#if defined(CONFIG_NET_ETHERNET) && defined (CONFIG_NET_ARP_IPIN) +#if defined(CONFIG_NET_ETHERNET) && !defined(CONFIG_NET_ARP_IPIN) if (pstate->snd_sent != 0 || uip_arp_find(conn->ripaddr) != NULL) #endif {