diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/core/cma.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 533193d4e5df..9e0ab048c878 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -1088,10 +1088,21 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event) | |||
1088 | *sin = iw_event->local_addr; | 1088 | *sin = iw_event->local_addr; |
1089 | sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr; | 1089 | sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr; |
1090 | *sin = iw_event->remote_addr; | 1090 | *sin = iw_event->remote_addr; |
1091 | if (iw_event->status) | 1091 | switch (iw_event->status) { |
1092 | event.event = RDMA_CM_EVENT_REJECTED; | 1092 | case 0: |
1093 | else | ||
1094 | event.event = RDMA_CM_EVENT_ESTABLISHED; | 1093 | event.event = RDMA_CM_EVENT_ESTABLISHED; |
1094 | break; | ||
1095 | case -ECONNRESET: | ||
1096 | case -ECONNREFUSED: | ||
1097 | event.event = RDMA_CM_EVENT_REJECTED; | ||
1098 | break; | ||
1099 | case -ETIMEDOUT: | ||
1100 | event.event = RDMA_CM_EVENT_UNREACHABLE; | ||
1101 | break; | ||
1102 | default: | ||
1103 | event.event = RDMA_CM_EVENT_CONNECT_ERROR; | ||
1104 | break; | ||
1105 | } | ||
1095 | break; | 1106 | break; |
1096 | case IW_CM_EVENT_ESTABLISHED: | 1107 | case IW_CM_EVENT_ESTABLISHED: |
1097 | event.event = RDMA_CM_EVENT_ESTABLISHED; | 1108 | event.event = RDMA_CM_EVENT_ESTABLISHED; |