diff options
author | Yuval Shaia <yuval.shaia@oracle.com> | 2017-03-14 15:01:57 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-04-25 20:21:34 +0200 |
commit | 4d6f28591fe415fc5233e9148c66a1b81ad17425 (patch) | |
tree | cfcf61242386fa118ed79b39291d14b7eae7fbef /drivers/infiniband/sw/rxe/rxe.c | |
parent | IB/usnic: Remove unused functions (diff) | |
download | linux-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.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index cfadd8d8593a..c21c913f911a 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -31,6 +31,7 @@ * SOFTWARE. */ +#include <net/addrconf.h> #include "rxe.h" #include "rxe_loc.h" @@ -180,7 +181,8 @@ static int rxe_init_ports(struct rxe_dev *rxe) return -ENOMEM; port->pkey_tbl[0] = 0xffff; - port->port_guid = rxe_port_guid(rxe); + addrconf_addr_eui48((unsigned char *)&port->port_guid, + rxe->ndev->dev_addr); spin_lock_init(&port->port_lock); |