Networking: Fix backward conditional in test to see if address is in ARP table. From Max Holtzberg

This commit is contained in:
Gregory Nutt 2013-09-27 08:27:35 -06:00
parent 95d462cb02
commit cdb56b81b8
3 changed files with 8 additions and 9 deletions

View File

@ -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).

View File

@ -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);
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);
}

View File

@ -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
{