@@ -2517,7 +2517,7 @@ int ib_send_cm_drep(struct ib_cm_id *cm_id,
void *data;
int ret;
- if (private_data && private_data_len > IB_CM_DREP_PRIVATE_DATA_SIZE)
+ if (private_data && private_data_len > CM_DREP_PRIVATE_DATA_SIZE)
return -EINVAL;
data = cm_copy_private_data(private_data, private_data_len);
@@ -2678,7 +2678,7 @@ static int cm_drep_handler(struct cm_work *work)
return -EINVAL;
work->cm_event.private_data = &drep_msg->private_data;
- work->cm_event.private_data_len = IB_CM_DREP_PRIVATE_DATA_SIZE;
+ work->cm_event.private_data_len = CM_DREP_PRIVATE_DATA_SIZE;
spin_lock_irq(&cm_id_priv->lock);
if (cm_id_priv->id.state != IB_CM_DREQ_SENT &&
@@ -615,7 +615,7 @@ struct cm_drep_msg {
__be32 local_comm_id;
__be32 remote_comm_id;
- u8 private_data[IB_CM_DREP_PRIVATE_DATA_SIZE];
+ u8 private_data[CM_DREP_PRIVATE_DATA_SIZE];
} __packed;
@@ -65,7 +65,6 @@ enum ib_cm_event_type {
};
enum ib_cm_data_size {
- IB_CM_DREP_PRIVATE_DATA_SIZE = 224,
IB_CM_LAP_PRIVATE_DATA_SIZE = 168,
IB_CM_APR_PRIVATE_DATA_SIZE = 148,
IB_CM_APR_INFO_LENGTH = 72,
@@ -139,4 +139,10 @@
#define CM_DREQ_PRIVATE_DATA CM_FIELD_MLOC(struct cm_dreq_msg, 12, 1760)
#define CM_DREQ_PRIVATE_DATA_SIZE 220
+/* Table 113 DREP Message Contents */
+#define CM_DREP_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_drep_msg, 0, 32)
+#define CM_DREP_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_drep_msg, 4, 32)
+#define CM_DREP_PRIVATE_DATA CM_FIELD_MLOC(struct cm_drep_msg, 8, 1792)
+#define CM_DREP_PRIVATE_DATA_SIZE 224
+
#endif /* _IBTA_VOL1_C12_H_ */