lkml.org 
[lkml]   [2012]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/8] bnx2x: adopt bnx2x_validate_addr() to .ndo_validate_addr changes
    From
    Date
    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 :)






    \
     
     \ /
      Last update: 2012-02-29 18:19    [W:0.022 / U:30.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site