Browse Source

[infiniband] Allow drivers to override the eIPoIB LEMAC

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
173c0c2536
2 changed files with 5 additions and 0 deletions
  1. 1
    0
      src/drivers/net/ipoib.c
  2. 4
    0
      src/include/ipxe/infiniband.h

+ 1
- 0
src/drivers/net/ipoib.c View File

@@ -956,6 +956,7 @@ static int ipoib_probe ( struct ib_device *ibdev ) {
956 956
 	/* Extract hardware address */
957 957
 	memcpy ( netdev->hw_addr, &ibdev->gid.s.guid,
958 958
 		 sizeof ( ibdev->gid.s.guid ) );
959
+	memcpy ( netdev->ll_addr, ibdev->lemac, ETH_ALEN );
959 960
 
960 961
 	/* Set local MAC address */
961 962
 	memcpy ( &ipoib->mac.gid.s.guid, &ibdev->gid.s.guid,

+ 4
- 0
src/include/ipxe/infiniband.h View File

@@ -15,6 +15,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
15 15
 #include <ipxe/tables.h>
16 16
 #include <ipxe/ib_packet.h>
17 17
 #include <ipxe/ib_mad.h>
18
+#include <ipxe/if_ether.h>
18 19
 
19 20
 /** Subnet management interface QPN */
20 21
 #define IB_QPN_SMI 0
@@ -457,6 +458,9 @@ struct ib_device {
457 458
 	/** General services interface */
458 459
 	struct ib_mad_interface *gsi;
459 460
 
461
+	/** IPoIB LEMAC (if non-default) */
462
+	uint8_t lemac[ETH_ALEN];
463
+
460 464
 	/** Driver private data */
461 465
 	void *drv_priv;
462 466
 };

Loading…
Cancel
Save