summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHadar Hen Zion <hadarh@mellanox.com>2013-02-04 03:01:21 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-02-04 18:26:50 (GMT)
commitf9d96862cacd1177d76d82f70f88ac57cb05e6e0 (patch)
tree72f1ba10902c434df4053ef312d006f176413d44 /drivers
parent377d97393d93cca146937058986050a30857eec7 (diff)
downloadlinux-fsl-qoriq-f9d96862cacd1177d76d82f70f88ac57cb05e6e0.tar.xz
net/mlx4_en: Fix compilation error when CONFIG_INET isn't defined
ip_eth_mc_map function can't be used when CONFIG_INET isn't defined. Fixed compilation error by adding CONFIG_INET define check before using the function. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_ethtool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index 3e993d5..f523f02 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -711,6 +711,7 @@ static int mlx4_en_ethtool_add_mac_rule_by_ipv4(struct mlx4_en_priv *priv,
struct mlx4_spec_list *spec_l2,
__be32 ipv4_dst)
{
+#ifdef CONFIG_INET
__be64 be_mac = 0;
unsigned char mac[ETH_ALEN];
@@ -726,6 +727,9 @@ static int mlx4_en_ethtool_add_mac_rule_by_ipv4(struct mlx4_en_priv *priv,
}
return mlx4_en_ethtool_add_mac_rule(cmd, rule_list_h, spec_l2, &mac[0]);
+#else
+ return -EINVAL;
+#endif
}
static int add_ip_rule(struct mlx4_en_priv *priv,