summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_verbs.c
diff options
context:
space:
mode:
authorYuval Shaia <yuval.shaia@oracle.com>2017-03-14 15:01:57 +0100
committerDoug Ledford <dledford@redhat.com>2017-04-25 20:21:34 +0200
commit4d6f28591fe415fc5233e9148c66a1b81ad17425 (patch)
treecfcf61242386fa118ed79b39291d14b7eae7fbef /drivers/infiniband/sw/rxe/rxe_verbs.c
parentIB/usnic: Remove unused functions (diff)
downloadlinux-4d6f28591fe415fc5233e9148c66a1b81ad17425.tar.xz
linux-4d6f28591fe415fc5233e9148c66a1b81ad17425.zip
{net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function
This logic seems to be duplicated in (at least) three separate files. Move it to one place so code can be re-use. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_verbs.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_verbs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 486035a85bac..350ab443b21d 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -32,6 +32,7 @@
*/
#include <linux/dma-mapping.h>
+#include <net/addrconf.h>
#include "rxe.h"
#include "rxe_loc.h"
#include "rxe_queue.h"
@@ -1238,7 +1239,8 @@ int rxe_register_device(struct rxe_dev *rxe)
dev->num_comp_vectors = RXE_NUM_COMP_VECTORS;
dev->dev.parent = rxe_dma_device(rxe);
dev->local_dma_lkey = 0;
- dev->node_guid = rxe_node_guid(rxe);
+ addrconf_addr_eui48((unsigned char *)&dev->node_guid,
+ rxe->ndev->dev_addr);
dev->dev.dma_ops = &dma_virt_ops;
dev->uverbs_abi_ver = RXE_UVERBS_ABI_VERSION;