Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[sfrench/cifs-2.6.git] / net / smc / smc_clc.c
index 0fda5156eef031ae4afc391fa873e7ea2012a831..95e19aa3e7692ab6bb09a05d0733e88638079542 100644 (file)
@@ -1005,6 +1005,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
 {
        struct smc_connection *conn = &smc->conn;
        struct smc_clc_first_contact_ext_v2x fce;
+       struct smcd_dev *smcd = conn->lgr->smcd;
        struct smc_clc_msg_accept_confirm *clc;
        struct smc_clc_fce_gid_ext gle;
        struct smc_clc_msg_trail trl;
@@ -1022,17 +1023,15 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
                memcpy(clc->hdr.eyecatcher, SMCD_EYECATCHER,
                       sizeof(SMCD_EYECATCHER));
                clc->hdr.typev1 = SMC_TYPE_D;
-               clc->d0.gid =
-                       conn->lgr->smcd->ops->get_local_gid(conn->lgr->smcd);
-               clc->d0.token = conn->rmb_desc->token;
+               clc->d0.gid = htonll(smcd->ops->get_local_gid(smcd));
+               clc->d0.token = htonll(conn->rmb_desc->token);
                clc->d0.dmbe_size = conn->rmbe_size_comp;
                clc->d0.dmbe_idx = 0;
                memcpy(&clc->d0.linkid, conn->lgr->id, SMC_LGR_ID_SIZE);
                if (version == SMC_V1) {
                        clc->hdr.length = htons(SMCD_CLC_ACCEPT_CONFIRM_LEN);
                } else {
-                       clc_v2->d1.chid =
-                               htons(smc_ism_get_chid(conn->lgr->smcd));
+                       clc_v2->d1.chid = htons(smc_ism_get_chid(smcd));
                        if (eid && eid[0])
                                memcpy(clc_v2->d1.eid, eid, SMC_MAX_EID_LEN);
                        len = SMCD_CLC_ACCEPT_CONFIRM_LEN_V2;