From 37a0aab4ff2c86f4d109d4cd479535be97d07a94 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 11 Aug 2009 20:19:53 +0100 Subject: [netdevice] Separate out the concept of hardware and link-layer addresses The hardware address is an intrinsic property of the hardware, while the link-layer address can be changed at runtime. This separation is exposed via APIs such as PXE and EFI, but is currently elided by gPXE. Expose the hardware and link-layer addresses as separate properties within a net device. Drivers should now fill in hw_addr, which will be used to initialise ll_addr at the time of calling register_netdev(). --- src/drivers/net/phantom/phantom.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/drivers/net/phantom') diff --git a/src/drivers/net/phantom/phantom.c b/src/drivers/net/phantom/phantom.c index 85949c296..4c3f22f6e 100644 --- a/src/drivers/net/phantom/phantom.c +++ b/src/drivers/net/phantom/phantom.c @@ -1897,10 +1897,10 @@ static int phantom_init_cmdpeg ( struct phantom_nic *phantom ) { * Read Phantom MAC address * * @v phanton_port Phantom NIC - * @v ll_addr Buffer to fill with MAC address + * @v hw_addr Buffer to fill with MAC address */ static void phantom_get_macaddr ( struct phantom_nic *phantom, - uint8_t *ll_addr ) { + uint8_t *hw_addr ) { union { uint8_t mac_addr[2][ETH_ALEN]; uint32_t dwords[3]; @@ -1917,11 +1917,11 @@ static void phantom_get_macaddr ( struct phantom_nic *phantom, /* Copy out the relevant MAC address */ for ( i = 0 ; i < ETH_ALEN ; i++ ) { - ll_addr[ ETH_ALEN - i - 1 ] = + hw_addr[ ETH_ALEN - i - 1 ] = u.mac_addr[ phantom->port & 1 ][i]; } DBGC ( phantom, "Phantom %p MAC address is %s\n", - phantom, eth_ntoa ( ll_addr ) ); + phantom, eth_ntoa ( hw_addr ) ); } /** @@ -2045,7 +2045,7 @@ static int phantom_probe ( struct pci_device *pci, goto err_init_rcvpeg; /* Read MAC addresses */ - phantom_get_macaddr ( phantom, netdev->ll_addr ); + phantom_get_macaddr ( phantom, netdev->hw_addr ); /* Skip if boot disabled on NIC */ if ( ( rc = phantom_check_boot_enable ( phantom ) ) != 0 ) -- cgit v1.2.3-55-g7522