http://git.etherboot.org
/
people
/
pcmattman
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b1e63d
)
[iscsi] Use the "Ethernet-compatible" MAC address in the iBFT
author
Michael Brown
<mcb30@etherboot.org>
Fri, 23 Oct 2009 21:18:04 +0000
(22:18 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Fri, 23 Oct 2009 21:18:23 +0000
(22:18 +0100)
src/arch/i386/interface/pcbios/ibft.c
patch
|
blob
|
history
diff --git
a/src/arch/i386/interface/pcbios/ibft.c
b/src/arch/i386/interface/pcbios/ibft.c
index
e0baaa2
..
adf8e6b
100644
(file)
--- a/
src/arch/i386/interface/pcbios/ibft.c
+++ b/
src/arch/i386/interface/pcbios/ibft.c
@@
-37,6
+37,7
@@
FILE_LICENCE ( BSD2 );
#include <gpxe/acpi.h>
#include <gpxe/in.h>
#include <gpxe/netdevice.h>
#include <gpxe/acpi.h>
#include <gpxe/in.h>
#include <gpxe/netdevice.h>
+#include <gpxe/ethernet.h>
#include <gpxe/dhcp.h>
#include <gpxe/iscsi.h>
#include <gpxe/ibft.h>
#include <gpxe/dhcp.h>
#include <gpxe/iscsi.h>
#include <gpxe/ibft.h>
@@
-251,6
+252,7
@@
static const char * ibft_string ( struct ibft_string_block *strings,
static int ibft_fill_nic ( struct ibft_nic *nic,
struct ibft_string_block *strings,
struct net_device *netdev ) {
static int ibft_fill_nic ( struct ibft_nic *nic,
struct ibft_string_block *strings,
struct net_device *netdev ) {
+ struct ll_protocol *ll_protocol = netdev->ll_protocol;
struct in_addr netmask_addr = { 0 };
unsigned int netmask_count = 0;
int rc;
struct in_addr netmask_addr = { 0 };
unsigned int netmask_count = 0;
int rc;
@@
-279,10
+281,12
@@
static int ibft_fill_nic ( struct ibft_nic *nic,
DBG ( "iBFT NIC subnet = /%d\n", nic->subnet_mask_prefix );
/* Extract values from net-device configuration */
DBG ( "iBFT NIC subnet = /%d\n", nic->subnet_mask_prefix );
/* Extract values from net-device configuration */
- memcpy ( nic->mac_address, netdev->ll_addr,
- sizeof ( nic->mac_address ) );
- DBG ( "iBFT NIC MAC = %s\n",
- netdev->ll_protocol->ntoa ( nic->mac_address ) );
+ if ( ( rc = ll_protocol->eth_addr ( netdev->ll_addr,
+ nic->mac_address ) ) != 0 ) {
+ DBG ( "Could not determine iBFT MAC: %s\n", strerror ( rc ) );
+ return rc;
+ }
+ DBG ( "iBFT NIC MAC = %s\n", eth_ntoa ( nic->mac_address ) );
nic->pci_bus_dev_func = netdev->dev->desc.location;
DBG ( "iBFT NIC PCI = %04x\n", nic->pci_bus_dev_func );
nic->pci_bus_dev_func = netdev->dev->desc.location;
DBG ( "iBFT NIC PCI = %04x\n", nic->pci_bus_dev_func );