@@ -1438,8 +1438,6 @@ int siw_connect(struct iw_cm_id *id, struct iw_cm_conn_param *params)
*/
siw_cep_socket_assoc(cep, s);
- cep->state = SIW_EPSTATE_AWAIT_MPAREP;
-
/*
* Set MPA Request bits: CRC if required, no MPA Markers,
* MPA Rev. according to module parameter 'mpa_version', Key 'Request'.
@@ -1482,6 +1480,8 @@ int siw_connect(struct iw_cm_id *id, struct iw_cm_conn_param *params)
}
memcpy(cep->mpa.hdr.key, MPA_KEY_REQ, 16);
+ cep->state = SIW_EPSTATE_AWAIT_MPAREP;
+
rv = siw_send_mpareqrep(cep, params->private_data, pd_len);
/*
* Reset private data.
There's no real change made in this commit, but it makes the follwing commits easier to review. The idea is that we stay in SIW_EPSTATE_CONNECTING as long as we only deal with tcp and not started the MPA negotiation. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher <metze@samba.org> Cc: Bernard Metzler <bmt@zurich.ibm.com> Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/sw/siw/siw_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)