aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 8e8fb69fa871..58209bd0c94c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -130,7 +130,7 @@ static enum mlx4_net_trans_rule_id mlx4_ip_proto_to_trans_rule_id(u8 ip_proto)
130 case IPPROTO_TCP: 130 case IPPROTO_TCP:
131 return MLX4_NET_TRANS_RULE_ID_TCP; 131 return MLX4_NET_TRANS_RULE_ID_TCP;
132 default: 132 default:
133 return -EPROTONOSUPPORT; 133 return MLX4_NET_TRANS_RULE_NUM;
134 } 134 }
135}; 135};
136 136
@@ -177,7 +177,7 @@ static void mlx4_en_filter_work(struct work_struct *work)
177 int rc; 177 int rc;
178 __be64 mac_mask = cpu_to_be64(MLX4_MAC_MASK << 16); 178 __be64 mac_mask = cpu_to_be64(MLX4_MAC_MASK << 16);
179 179
180 if (spec_tcp_udp.id < 0) { 180 if (spec_tcp_udp.id >= MLX4_NET_TRANS_RULE_NUM) {
181 en_warn(priv, "RFS: ignoring unsupported ip protocol (%d)\n", 181 en_warn(priv, "RFS: ignoring unsupported ip protocol (%d)\n",
182 filter->ip_proto); 182 filter->ip_proto);
183 goto ignore; 183 goto ignore;