net/mlx5e: Fix wrong field name in FEC related functions
authorShay Agroskin <shayag@mellanox.com>
Sun, 28 Oct 2018 07:17:29 +0000 (09:17 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 19 Nov 2018 23:33:31 +0000 (15:33 -0800)
This bug would result in reading wrong FEC capabilities for 10G/40G.

Fixes: 2095b2641477 ("net/mlx5e: Add port FEC get/set functions")
Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/port.c

index c16351eb9e54e81303c9041cb9871da68487628c..83ba9ea201d8eb2ac99b96d959dd2e7057145b53 100644 (file)
@@ -258,7 +258,7 @@ static int mlx5e_fec_admin_field(u32 *pplm,
        case 40000:
                if (!write)
                        *fec_policy = MLX5_GET(pplm_reg, pplm,
-                                              fec_override_cap_10g_40g);
+                                              fec_override_admin_10g_40g);
                else
                        MLX5_SET(pplm_reg, pplm,
                                 fec_override_admin_10g_40g, *fec_policy);
@@ -310,7 +310,7 @@ static int mlx5e_get_fec_cap_field(u32 *pplm,
        case 10000:
        case 40000:
                *fec_cap = MLX5_GET(pplm_reg, pplm,
-                                   fec_override_admin_10g_40g);
+                                   fec_override_cap_10g_40g);
                break;
        case 25000:
                *fec_cap = MLX5_GET(pplm_reg, pplm,