Commit 64cb9c6a authored by Hal Rosenstock's avatar Hal Rosenstock Committed by Roland Dreier

IB/mad: Fix RMPP version check during agent registration

Only check that RMPP version is not specified when MAD class does not
support RMPP.  Just because a class is allowed to use RMPP doesn't
mean that rmpp_version needs to be set for the MAD agent to
register. Checking this was a recent change which was too pedantic.
Signed-off-by: default avatarHal Rosenstock <halr@voltaire.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent f80887d0
...@@ -228,10 +228,7 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, ...@@ -228,10 +228,7 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
goto error1; goto error1;
} }
/* Make sure class supplied is consistent with RMPP */ /* Make sure class supplied is consistent with RMPP */
if (ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) { if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) {
if (!rmpp_version)
goto error1;
} else {
if (rmpp_version) if (rmpp_version)
goto error1; goto error1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment