diff --git a/fs/hmdfs/comm/connection.c b/fs/hmdfs/comm/connection.c index 046688747d83784d57501ceb6aeef512c2c6ae2f..5804fbf010c2898327d35fc9ff34b1e10b8afef0 100644 --- a/fs/hmdfs/comm/connection.c +++ b/fs/hmdfs/comm/connection.c @@ -590,26 +590,6 @@ void peer_online(struct hmdfs_peer *peer) hmdfs_queue_raw_node_evt(peer, RAW_NODE_EVT_ON); } -void connection_to_working(struct hmdfs_peer *node) -{ - struct connection *conn_impl = NULL; - struct tcp_handle *tcp = NULL; - - if (!node) - return; - mutex_lock(&node->conn_impl_list_lock); - list_for_each_entry(conn_impl, &node->conn_impl_list, list) { - if (conn_impl->type == CONNECT_TYPE_TCP && - conn_impl->status == CONNECT_STAT_WAIT_RESPONSE) { - tcp = conn_impl->connect_handle; - hmdfs_info("fd %d to working", tcp->fd); - conn_impl->status = CONNECT_STAT_WORKING; - } - } - mutex_unlock(&node->conn_impl_list_lock); - peer_online(node); -} - void connection_handshake_recv_handler(struct connection *conn_impl, void *buf, void *data, __u32 data_len) { @@ -640,12 +620,6 @@ void connection_handshake_recv_handler(struct connection *conn_impl, void *buf, hmdfs_info( "Recved handshake response: device_id = %llu, cmd->status = %hhu, tcp->fd = %d", conn_impl->node->device_id, status, fd); - if (status == CONNECT_STAT_WAIT_REQUEST) { - // must be 10.1 device, no need to set ktls - connection_to_working(conn_impl->node); - goto out; - } - ret = hs_proc_msg_data(conn_impl, ops, data, data_len); if (ret) goto nego_err; diff --git a/fs/hmdfs/comm/connection.h b/fs/hmdfs/comm/connection.h index 1988e99f78089aba55f67925786bce73e4b749f1..3c660aca69d6c28e828ee05da93ad312d1b02fb9 100644 --- a/fs/hmdfs/comm/connection.h +++ b/fs/hmdfs/comm/connection.h @@ -328,8 +328,6 @@ void hmdfs_connections_stop(struct hmdfs_sb_info *sbi); void hmdfs_disconnect_node(struct hmdfs_peer *node); -void connection_to_working(struct hmdfs_peer *node); - int hmdfs_alloc_msg_idr(struct hmdfs_peer *peer, enum MSG_IDR_TYPE type, void *ptr, struct hmdfs_cmd operations); struct hmdfs_msg_idr_head *hmdfs_find_msg_head(struct hmdfs_peer *peer, int id,