net/mlx5e: Allow mlx5e_safe_switch_channels to work with channels closed
mlx5e_safe_switch_channels is used to modify channel parameters and/or hardware configuration in a safe way, so that if anything goes wrong, everything reverts to the old configuration and remains in a consistent state. However, this function only works when the channels are open. When the caller needs to modify some parameters, first it has to check that the channels are open, otherwise it has to assign parameters directly, and such boilerplate repeats in many different places. This commit prepares for the refactoring of such places by allowing mlx5e_safe_switch_channels to work when the channels are closed. In this case it will assign the new parameters and run the preactivate hook. Signed-off-by:Maxim Mikityanskiy <maximmi@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@nvidia.com>
Loading
Please sign in to comment