lkml.org 
[lkml]   [2012]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 05/10] igbvf: reset netdevice addr_assign_type if changed
Date
Reset the state of addr_assign_type to NET_ADDR_PERM as soon as
the MAC get changed via .ndo_set_mac_address.

v2: use bitops to reset addr_assign_type

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
drivers/net/ethernet/intel/igbvf/netdev.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index 9e335f7..d5faf99 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1695,6 +1695,7 @@ static int igbvf_set_mac(struct net_device *netdev, void *p)
return -EADDRNOTAVAIL;

memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+ netdev->addr_assign_type &= ~NET_ADDR_RANDOM;

return 0;
}
--
1.7.8.3


\
 
 \ /
  Last update: 2012-02-17 16:49    [W:0.107 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site