Browse Source

[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>
tags/v1.20.1
Hannes Reinecke 10 years ago
parent
commit
bb5a4a111b
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/drivers/net/igbvf/igbvf_main.c

+ 4
- 0
src/drivers/net/igbvf/igbvf_main.c View File

@@ -617,6 +617,10 @@ static int igbvf_open ( struct net_device *netdev )
617 617
 
618 618
 	DBG ("igbvf_open\n");
619 619
 
620
+	/* Update MAC address */
621
+	memcpy ( adapter->hw.mac.addr, netdev->ll_addr, ETH_ALEN );
622
+	igbvf_reset( adapter );
623
+
620 624
 	/* allocate transmit descriptors */
621 625
 	err = igbvf_setup_tx_resources ( adapter );
622 626
 	if (err) {

Loading…
Cancel
Save