Re: [PATCH 2/8] bnx2x: adopt bnx2x_validate_addr() to.ndo_validate_addr changes

From: Dmitry Kravkov
Date: Wed Feb 29 2012 - 12:16:40 EST


On Wed, 2012-02-29 at 18:08 +0100, Danny Kukawka wrote:

> Do you mean something like this:
>
> int eth_validate_addr(struct net_device *dev, void *addr)
> {
> u8 *vaddr;
>
> if (addr)
> vaddr = ((struct sockaddr *) addr)->sa_data;
> else
> vaddr = dev->dev_addr;
>
> if (!is_valid_ether_addr(vaddr))
> return -EADDRNOTAVAIL;
>
> return 0;
> }
>
Exactly :)




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/