From: Amir Vadai Date: Sun, 2 Mar 2014 08:24:57 +0000 (+0200) Subject: net/mlx4_en: Fix UP limit in ieee_ets->prio_tc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fd8daa45f2bd9b876e0dbb9503ccc5a5252844f2;p=openwrt%2Fstaging%2Fblogic.git net/mlx4_en: Fix UP limit in ieee_ets->prio_tc User priority limit has to be less than MLX4_EN_NUM_UP. Signed-off-by: Amir Vadai Signed-off-by: Eugenia Emantayev Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c index b4881b686159..c95ca252187c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c @@ -62,7 +62,7 @@ static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets) int has_ets_tc = 0; for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { - if (ets->prio_tc[i] > MLX4_EN_NUM_UP) { + if (ets->prio_tc[i] >= MLX4_EN_NUM_UP) { en_err(priv, "Bad priority in UP <=> TC mapping. TC: %d, UP: %d\n", i, ets->prio_tc[i]); return -EINVAL;