Subject: Re: [PATCH net-next 10/10] staging: vt6656: inherit addr_assign_type along with dev_addr

From: Bjørn Mork <[email-masked]>
Date: Fri, 23 Aug 2013 14:06:21 +0200

Dan Carpenter <[email-masked]> writes:

> Ah...  Here is the first patch which adds eth_hw_addr_inherit()
>
> http://patchwork.ozlabs.org/patch/269365/
>
> I don't think we've actually set dst->addr_len yet at this point so
> it doesn't do the memcpy().  This doesn't work.

Ouch.  Yes, I see. The net_device is allocated using kzalloc just a few
lines earlier and there is no ether_setup or similar.  Actually, it
doesn't look like it ever sets addr_len. Is that right?  Does it work
even before this patch?

Anyway, thanks for spotting this.  I'll drop this patch for now as I
clearly don't understand how this driver works.

I do note that the otherwise very similar code in the vt6655 driver uses
alloc_etherdev, and therefore has a fair chance of working both before
and after my change.

Bjørn
_______________________________________________
devel mailing list
[email-masked]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel