lkml.org 
[lkml]   [2012]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 23/50] efx: use dev_hw_addr_random() instead of random_ether_addr()
From
Date
On Wed, 2012-02-08 at 22:10 +0100, Danny Kukawka wrote:
> Use dev_hw_addr_random() instead of calling random_ether_addr()
> to set addr_assign_type correctly to NET_ADDR_RANDOM.
>
> Reset the state to NET_ADDR_PERM as soon as the MAC get
> changed via .ndo_set_mac_address.
>
> Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
> ---
> drivers/net/ethernet/sfc/efx.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index e43702f..cce339a 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -940,7 +940,7 @@ static int efx_probe_port(struct efx_nic *efx)
> rc = -EINVAL;
> goto err;
> }
> - random_ether_addr(efx->net_dev->dev_addr);
> + dev_hw_addr_random(efx->net_dev, efx->net_dev->dev_addr);
> netif_info(efx, probe, efx->net_dev,
> "using locally-generated MAC %pM\n",
> efx->net_dev->dev_addr);
[...]

This code no longer exists in net-next.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.



\
 
 \ /
  Last update: 2012-02-08 22:31    [from the cache]
©2003-2011 Jasper Spaans