aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/core/agent.c')
-rw-r--r--drivers/infiniband/core/agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c
index c7dcfe4ca5f1..0429040304fd 100644
--- a/drivers/infiniband/core/agent.c
+++ b/drivers/infiniband/core/agent.c
@@ -88,7 +88,7 @@ void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *
88 struct ib_ah *ah; 88 struct ib_ah *ah;
89 struct ib_mad_send_wr_private *mad_send_wr; 89 struct ib_mad_send_wr_private *mad_send_wr;
90 90
91 if (device->node_type == RDMA_NODE_IB_SWITCH) 91 if (rdma_cap_ib_switch(device))
92 port_priv = ib_get_agent_port(device, 0); 92 port_priv = ib_get_agent_port(device, 0);
93 else 93 else
94 port_priv = ib_get_agent_port(device, port_num); 94 port_priv = ib_get_agent_port(device, port_num);
@@ -122,7 +122,7 @@ void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *
122 memcpy(send_buf->mad, mad_hdr, resp_mad_len); 122 memcpy(send_buf->mad, mad_hdr, resp_mad_len);
123 send_buf->ah = ah; 123 send_buf->ah = ah;
124 124
125 if (device->node_type == RDMA_NODE_IB_SWITCH) { 125 if (rdma_cap_ib_switch(device)) {
126 mad_send_wr = container_of(send_buf, 126 mad_send_wr = container_of(send_buf,
127 struct ib_mad_send_wr_private, 127 struct ib_mad_send_wr_private,
128 send_buf); 128 send_buf);