summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/phantom/phantom.c
diff options
context:
space:
mode:
authorMichael Brown2009-08-11 21:19:53 +0200
committerMichael Brown2009-08-12 01:19:14 +0200
commit37a0aab4ff2c86f4d109d4cd479535be97d07a94 (patch)
tree5a2f06a22cf2c647b36d254fc1699072c3c88392 /src/drivers/net/phantom/phantom.c
parent[doc] Expand scope of doxygen-generated documentation (diff)
downloadipxe-37a0aab4ff2c86f4d109d4cd479535be97d07a94.tar.gz
ipxe-37a0aab4ff2c86f4d109d4cd479535be97d07a94.tar.xz
ipxe-37a0aab4ff2c86f4d109d4cd479535be97d07a94.zip
[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().
Diffstat (limited to 'src/drivers/net/phantom/phantom.c')
-rw-r--r--src/drivers/net/phantom/phantom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/net/phantom/phantom.c b/src/drivers/net/phantom/phantom.c
index 85949c29..4c3f22f6 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 )