Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932306Ab2BHVWX (ORCPT ); Wed, 8 Feb 2012 16:22:23 -0500 Received: from wp188.webpack.hosteurope.de ([80.237.132.195]:34338 "EHLO wp188.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932226Ab2BHVWQ (ORCPT ); Wed, 8 Feb 2012 16:22:16 -0500 From: Danny Kukawka To: "David S. Miller" Cc: Danny Kukawka , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Kirsher , Jesse Brandeburg , Bruce Allan , Carolyn Wyborny , Don Skidmore , Greg Rose , Peter P Waskiewicz Jr , Alex Duyck , John Ronciak , Mitch Williams , Jiri Pirko , Eric Dumazet , e1000-devel@lists.sourceforge.net Subject: [PATCH 36/50] igbvf: reset netdevice addr_assign_type if changed from random Date: Wed, 8 Feb 2012 22:10:43 +0100 Message-Id: <1328735457-29986-37-git-send-email-danny.kukawka@bisect.de> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1328735457-29986-1-git-send-email-danny.kukawka@bisect.de> References: <1328735457-29986-1-git-send-email-danny.kukawka@bisect.de> X-bounce-key: webpack.hosteurope.de;danny.kukawka@bisect.de;1328736136;5385fcff; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1044 Lines: 29 Reset the state of addr_assign_type to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address. Signed-off-by: Danny Kukawka --- drivers/net/ethernet/intel/igbvf/netdev.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index a4b20c8..af652bf 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c @@ -1695,6 +1695,8 @@ static int igbvf_set_mac(struct net_device *netdev, void *p) return -EADDRNOTAVAIL; memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); + if (netdev->addr_assign_type & NET_ADDR_RANDOM) + netdev->addr_assign_type ^= NET_ADDR_RANDOM; return 0; } -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/