diff options
author | Sean Hefty <sean.hefty@intel.com> | 2009-11-19 12:57:18 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-11-19 12:57:18 -0800 |
commit | c4315d85f9b76834289fd503796c01b8311c4b84 (patch) | |
tree | 12a74b92f3b00c8d515811e131c850402cd1588a /drivers/infiniband/core/addr.c | |
parent | d2e0886245aa9eebc1a4710c861d263b09eac493 (diff) |
IB/addr: Store net_device type instead of translating to RDMA transport
The struct rdma_dev_addr stores net_device address information:
the source device address, destination hardware address, and
broadcast address. For consistency, store the net_device type
rather than converting it to the rdma_node_type.
The type indicates the format of the various hardware addresses,
which is what we're concerned with, and not the RDMA node type
that the address may map to.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r-- | drivers/infiniband/core/addr.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index b59ba7ccef0e..de5fe161a1b9 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -36,7 +36,6 @@ #include <linux/mutex.h> #include <linux/inetdevice.h> #include <linux/workqueue.h> -#include <linux/if_arp.h> #include <net/arp.h> #include <net/neighbour.h> #include <net/route.h> @@ -92,17 +91,7 @@ EXPORT_SYMBOL(rdma_addr_unregister_client); int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev, const unsigned char *dst_dev_addr) { - switch (dev->type) { - case ARPHRD_INFINIBAND: - dev_addr->dev_type = RDMA_NODE_IB_CA; - break; - case ARPHRD_ETHER: - dev_addr->dev_type = RDMA_NODE_RNIC; - break; - default: - return -EADDRNOTAVAIL; - } - + dev_addr->dev_type = dev->type; memcpy(dev_addr->src_dev_addr, dev->dev_addr, MAX_ADDR_LEN); memcpy(dev_addr->broadcast, dev->broadcast, MAX_ADDR_LEN); if (dst_dev_addr) |