From: Leon Romanovsky <leonro@xxxxxxxxxxxx> Convert LAP flow label field. Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> --- drivers/infiniband/core/cm.c | 3 ++- drivers/infiniband/core/cm_msgs.h | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 25a20c04e07b..2fe1e8908445 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -3121,7 +3121,8 @@ static void cm_format_path_from_lap(struct cm_id_private *cm_id_priv, { path->dgid = lap_msg->alt_local_gid; path->sgid = lap_msg->alt_remote_gid; - path->flow_label = cm_lap_get_flow_label(lap_msg); + path->flow_label = + cpu_to_be32(CM_GET(LAP_ALTERNATE_FLOW_LABEL, lap_msg)); path->hop_limit = lap_msg->alt_hop_limit; path->traffic_class = cm_lap_get_traffic_class(lap_msg); path->reversible = 1; diff --git a/drivers/infiniband/core/cm_msgs.h b/drivers/infiniband/core/cm_msgs.h index 41193dc44fee..fa475a59ed53 100644 --- a/drivers/infiniband/core/cm_msgs.h +++ b/drivers/infiniband/core/cm_msgs.h @@ -522,11 +522,6 @@ struct cm_lap_msg { u8 private_data[CM_LAP_PRIVATE_DATA_SIZE]; } __packed; -static inline __be32 cm_lap_get_flow_label(struct cm_lap_msg *lap_msg) -{ - return cpu_to_be32(be32_to_cpu(lap_msg->offset56) >> 12); -} - static inline u8 cm_lap_get_traffic_class(struct cm_lap_msg *lap_msg) { return (u8) be32_to_cpu(lap_msg->offset56); -- 2.20.1