diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 3d78b6267308..a3fb7215cd89 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -922,6 +922,12 @@ static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params, | |||
922 | const u8 max_num_of_cos = (port) ? DCBX_E3B0_MAX_NUM_COS_PORT1 : | 922 | const u8 max_num_of_cos = (port) ? DCBX_E3B0_MAX_NUM_COS_PORT1 : |
923 | DCBX_E3B0_MAX_NUM_COS_PORT0; | 923 | DCBX_E3B0_MAX_NUM_COS_PORT0; |
924 | 924 | ||
925 | if (pri >= max_num_of_cos) { | ||
926 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " | ||
927 | "parameter Illegal strict priority\n"); | ||
928 | return -EINVAL; | ||
929 | } | ||
930 | |||
925 | if (sp_pri_to_cos[pri] != DCBX_INVALID_COS) { | 931 | if (sp_pri_to_cos[pri] != DCBX_INVALID_COS) { |
926 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " | 932 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " |
927 | "parameter There can't be two COS's with " | 933 | "parameter There can't be two COS's with " |
@@ -929,12 +935,6 @@ static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params, | |||
929 | return -EINVAL; | 935 | return -EINVAL; |
930 | } | 936 | } |
931 | 937 | ||
932 | if (pri > max_num_of_cos) { | ||
933 | DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " | ||
934 | "parameter Illegal strict priority\n"); | ||
935 | return -EINVAL; | ||
936 | } | ||
937 | |||
938 | sp_pri_to_cos[pri] = cos_entry; | 938 | sp_pri_to_cos[pri] = cos_entry; |
939 | return 0; | 939 | return 0; |
940 | 940 | ||