]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[infiniband] Allow drivers to override the eIPoIB LEMAC
authorMichael Brown <mcb30@ipxe.org>
Mon, 21 Mar 2016 09:29:54 +0000 (09:29 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 21 Mar 2016 09:30:42 +0000 (09:30 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/ipoib.c
src/include/ipxe/infiniband.h

index a245cce1b89ebd64108dbfc59d1ba69ce8179520..8a65c87ba22a4f492df589ee17cd96370896d46b 100644 (file)
@@ -956,6 +956,7 @@ static int ipoib_probe ( struct ib_device *ibdev ) {
        /* Extract hardware address */
        memcpy ( netdev->hw_addr, &ibdev->gid.s.guid,
                 sizeof ( ibdev->gid.s.guid ) );
+       memcpy ( netdev->ll_addr, ibdev->lemac, ETH_ALEN );
 
        /* Set local MAC address */
        memcpy ( &ipoib->mac.gid.s.guid, &ibdev->gid.s.guid,
index 5910390da3127af3310434325e705e00c9d215b3..d7ecd162375669f0cd70d9065466dbbe2742ae18 100644 (file)
@@ -15,6 +15,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 #include <ipxe/tables.h>
 #include <ipxe/ib_packet.h>
 #include <ipxe/ib_mad.h>
+#include <ipxe/if_ether.h>
 
 /** Subnet management interface QPN */
 #define IB_QPN_SMI 0
@@ -457,6 +458,9 @@ struct ib_device {
        /** General services interface */
        struct ib_mad_interface *gsi;
 
+       /** IPoIB LEMAC (if non-default) */
+       uint8_t lemac[ETH_ALEN];
+
        /** Driver private data */
        void *drv_priv;
 };