summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Reinecke2014-06-03 14:01:17 +0200
committerMichael Brown2014-06-12 18:46:12 +0200
commitbb5a4a111b6cb8b8e05029d6b2e5608477cf420e (patch)
tree9d15dd62addded3055705ca904c36ba51acca2e8
parent[igbvf] Assign random MAC address if none is set (diff)
downloadipxe-bb5a4a111b6cb8b8e05029d6b2e5608477cf420e.tar.gz
ipxe-bb5a4a111b6cb8b8e05029d6b2e5608477cf420e.tar.xz
ipxe-bb5a4a111b6cb8b8e05029d6b2e5608477cf420e.zip
[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 <hare@suse.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/drivers/net/igbvf/igbvf_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/net/igbvf/igbvf_main.c b/src/drivers/net/igbvf/igbvf_main.c
index 901bba95..aace5ad5 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) {