net/mlx5: E-Switch, Return the correct devlink e-switch mode
commitef78618b9d29d40c95ca7092493545b8487e226c
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 18 Aug 2016 18:09:09 +0000 (18 21:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 23:09:56 +0000 (19 16:09 -0700)
tree5b157b49ffeb9257e92035176f83c5b069d6be5d
parentdbe413e3bb93e0634f6d8d00b01cda6f141e0acd
net/mlx5: E-Switch, Return the correct devlink e-switch mode

Since mlx5 has also the NONE e-switch mode, we must translate from mlx5
mode to devlink mode on the devlink eswitch mode get call, do that.

While here, remove the mlx5_ prefix from the static function helpers
that deal with the mode to comply with the rest of the code.

Fixes: c930a3ad7453 ('net/mlx5e: Add devlink based SRIOV mode change')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c