net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
authorEli Cohen <eli@mellanox.com>
Mon, 16 Jul 2018 08:49:27 +0000 (11:49 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 31 Jul 2018 19:58:43 +0000 (12:58 -0700)
commit5f5991f36dce1e69dd8bd7495763eec2e28f08e7
tree0c6eee78d4b1f7e715efc9225846fa8e2d8cbf39
parent6751e7c66cb8689491b89fe02c71d1d44394412b
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager

Execute mlx5_eswitch_init() only if we have MLX5_ESWITCH_MANAGER
capabilities.
Do the same for mlx5_eswitch_cleanup().

Fixes: a9f7705ffd66 ("net/mlx5: Unify vport manager capability check")
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c