From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Fri, 3 Feb 2012 07:25:04 -0500 Subject: [U-Boot] [PATCH 18/28] net: Add NetUpdateEther() to handle ARP or Ping replies (VLAN or SNAP) In-Reply-To: <1327020811-1538-19-git-send-email-joe.hershberger@ni.com> References: <1327020811-1538-1-git-send-email-joe.hershberger@ni.com> <1327020811-1538-19-git-send-email-joe.hershberger@ni.com> Message-ID: <201202030725.05867.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 19 January 2012 19:53:21 Joe Hershberger wrote: > --- a/net/net.c > +++ b/net/net.c > > +int > +NetUpdateEther(struct Ethernet_t *et, uchar *addr, uint prot) > +{ > + ushort protlen; > + > + memcpy(et->et_dest, addr, 6); > + memcpy(et->et_src, NetOurEther, 6); > + protlen = ntohs(et->et_protlen); > + if (protlen == PROT_VLAN) { > + struct VLAN_Ethernet_t *vet = (struct VLAN_Ethernet_t *)et; > + vet->vet_type = htons(prot); > + return VLAN_ETHER_HDR_SIZE; > + } else if (protlen > 1514) { > + et->et_protlen = htons(prot); > + return ETHER_HDR_SIZE; > + } else { > + /* 802.2 + SNAP */ > + et->et_prot = htons(prot); > + return E802_HDR_SIZE; > + } > +} seems to overlap a bit with NetSetEther. can't you have one use the other ? -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: