Hi Mike,

On Fri, Feb 3, 2012 at 6:25 AM, Mike Frysinger <vap...@gentoo.org> wrote:
> 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 ?

I don't see a very clean way ATM.  Maybe some future refactoring will
make that more obvious.

-Joe
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to