Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753587Ab2BQPqZ (ORCPT ); Fri, 17 Feb 2012 10:46:25 -0500 Received: from wp188.webpack.hosteurope.de ([80.237.132.195]:42609 "EHLO wp188.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371Ab2BQPnt (ORCPT ); Fri, 17 Feb 2012 10:43:49 -0500 From: Danny Kukawka To: Jeff Kirsher Cc: Danny Kukawka , Jesse Brandeburg , Bruce Allan , Carolyn Wyborny , Don Skidmore , Greg Rose , Peter P Waskiewicz Jr , Alex Duyck , John Ronciak , "David S. Miller" , e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/10] igbvf: reset netdevice addr_assign_type if changed Date: Fri, 17 Feb 2012 16:43:26 +0100 Message-Id: <1329493411-25750-6-git-send-email-danny.kukawka@bisect.de> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1329493411-25750-1-git-send-email-danny.kukawka@bisect.de> References: <1329493411-25750-1-git-send-email-danny.kukawka@bisect.de> X-bounce-key: webpack.hosteurope.de;danny.kukawka@bisect.de;1329493429;6105b8ea; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 30 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 --- 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 -- 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/