]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[igbvf] Allow changing of MAC address
authorHannes Reinecke <hare@suse.de>
Tue, 3 Jun 2014 12:01:17 +0000 (14:01 +0200)
committerMichael Brown <mcb30@ipxe.org>
Thu, 12 Jun 2014 16:46:12 +0000 (17:46 +0100)
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 <hare@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/igbvf/igbvf_main.c

index 901bba95ed10d9638de37152a431ce9384b0365b..aace5ad569c3c445b442913371314f3d4c6ffc5d 100644 (file)
@@ -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) {