From: Hannes Reinecke Date: Tue, 3 Jun 2014 12:01:17 +0000 (+0200) Subject: [igbvf] Allow changing of MAC address X-Git-Tag: v1.20.1~1156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb5a4a111b6cb8b8e05029d6b2e5608477cf420e;p=thirdparty%2Fipxe.git [igbvf] Allow changing of MAC address The VF might not have assigned a MAC address upon startup, and will end up with a random MAC address during probe(). With this patch the MAC address can be changed later on. Signed-off-by: Hannes Reinecke Signed-off-by: Michael Brown --- diff --git a/src/drivers/net/igbvf/igbvf_main.c b/src/drivers/net/igbvf/igbvf_main.c index 901bba95e..aace5ad56 100644 --- a/src/drivers/net/igbvf/igbvf_main.c +++ b/src/drivers/net/igbvf/igbvf_main.c @@ -617,6 +617,10 @@ static int igbvf_open ( struct net_device *netdev ) DBG ("igbvf_open\n"); + /* Update MAC address */ + memcpy ( adapter->hw.mac.addr, netdev->ll_addr, ETH_ALEN ); + igbvf_reset( adapter ); + /* allocate transmit descriptors */ err = igbvf_setup_tx_resources ( adapter ); if (err) {