summaryrefslogtreecommitdiff
path: root/net/smc
diff options
context:
space:
mode:
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_ib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/smc/smc_ib.c b/net/smc/smc_ib.c
index 16b7c801f8b6..3a720f03e2da 100644
--- a/net/smc/smc_ib.c
+++ b/net/smc/smc_ib.c
@@ -80,11 +80,9 @@ static int smc_ib_modify_qp_rtr(struct smc_link *lnk)
memset(&qp_attr, 0, sizeof(qp_attr));
qp_attr.qp_state = IB_QPS_RTR;
qp_attr.path_mtu = min(lnk->path_mtu, lnk->peer_mtu);
- qp_attr.ah_attr.port_num = lnk->ibport;
- qp_attr.ah_attr.ah_flags = IB_AH_GRH;
- qp_attr.ah_attr.grh.hop_limit = 1;
- memcpy(&qp_attr.ah_attr.grh.dgid, lnk->peer_gid,
- sizeof(lnk->peer_gid));
+ rdma_ah_set_port_num(&qp_attr.ah_attr, lnk->ibport);
+ rdma_ah_set_grh(&qp_attr.ah_attr, NULL, 0, 0, 1, 0);
+ rdma_ah_set_dgid_raw(&qp_attr.ah_attr, lnk->peer_gid);
memcpy(&qp_attr.ah_attr.dmac, lnk->peer_mac,
sizeof(lnk->peer_mac));
qp_attr.dest_qp_num = lnk->peer_qpn;