diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2013-03-06 10:39:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-07 15:29:46 -0500 |
commit | 75a75ee46bab6f580bde5514a08f75f4db1f0a2d (patch) | |
tree | f4a6410d076b70225ea89ae387c2baf670862e34 /drivers/net/ethernet/mellanox | |
parent | faaf02d24ce393032e9b60128cce529d09f7190e (diff) |
mlx4: Remove driver specific fdb handlers.
Remove driver specific fdb hadlers since they are the same as
the default ones.
CC: Amir Vadai <amirv@mellanox.com>
CC: Yan Burman <yanb@mellanox.com>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index bb4d8d99f36d..4c37d487bb03 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -1924,79 +1924,6 @@ static int mlx4_en_set_features(struct net_device *netdev, | |||
1924 | 1924 | ||
1925 | } | 1925 | } |
1926 | 1926 | ||
1927 | static int mlx4_en_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], | ||
1928 | struct net_device *dev, | ||
1929 | const unsigned char *addr, u16 flags) | ||
1930 | { | ||
1931 | struct mlx4_en_priv *priv = netdev_priv(dev); | ||
1932 | struct mlx4_dev *mdev = priv->mdev->dev; | ||
1933 | int err; | ||
1934 | |||
1935 | if (!mlx4_is_mfunc(mdev)) | ||
1936 | return -EOPNOTSUPP; | ||
1937 | |||
1938 | /* Hardware does not support aging addresses, allow only | ||
1939 | * permanent addresses if ndm_state is given | ||
1940 | */ | ||
1941 | if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) { | ||
1942 | en_info(priv, "Add FDB only supports static addresses\n"); | ||
1943 | return -EINVAL; | ||
1944 | } | ||
1945 | |||
1946 | if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr)) | ||
1947 | err = dev_uc_add_excl(dev, addr); | ||
1948 | else if (is_multicast_ether_addr(addr)) | ||
1949 | err = dev_mc_add_excl(dev, addr); | ||
1950 | else | ||
1951 | err = -EINVAL; | ||
1952 | |||
1953 | /* Only return duplicate errors if NLM_F_EXCL is set */ | ||
1954 | if (err == -EEXIST && !(flags & NLM_F_EXCL)) | ||
1955 | err = 0; | ||
1956 | |||
1957 | return err; | ||
1958 | } | ||
1959 | |||
1960 | static int mlx4_en_fdb_del(struct ndmsg *ndm, | ||
1961 | struct nlattr *tb[], | ||
1962 | struct net_device *dev, | ||
1963 | const unsigned char *addr) | ||
1964 | { | ||
1965 | struct mlx4_en_priv *priv = netdev_priv(dev); | ||
1966 | struct mlx4_dev *mdev = priv->mdev->dev; | ||
1967 | int err; | ||
1968 | |||
1969 | if (!mlx4_is_mfunc(mdev)) | ||
1970 | return -EOPNOTSUPP; | ||
1971 | |||
1972 | if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) { | ||
1973 | en_info(priv, "Del FDB only supports static addresses\n"); | ||
1974 | return -EINVAL; | ||
1975 | } | ||
1976 | |||
1977 | if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr)) | ||
1978 | err = dev_uc_del(dev, addr); | ||
1979 | else if (is_multicast_ether_addr(addr)) | ||
1980 | err = dev_mc_del(dev, addr); | ||
1981 | else | ||
1982 | err = -EINVAL; | ||
1983 | |||
1984 | return err; | ||
1985 | } | ||
1986 | |||
1987 | static int mlx4_en_fdb_dump(struct sk_buff *skb, | ||
1988 | struct netlink_callback *cb, | ||
1989 | struct net_device *dev, int idx) | ||
1990 | { | ||
1991 | struct mlx4_en_priv *priv = netdev_priv(dev); | ||
1992 | struct mlx4_dev *mdev = priv->mdev->dev; | ||
1993 | |||
1994 | if (mlx4_is_mfunc(mdev)) | ||
1995 | idx = ndo_dflt_fdb_dump(skb, cb, dev, idx); | ||
1996 | |||
1997 | return idx; | ||
1998 | } | ||
1999 | |||
2000 | static const struct net_device_ops mlx4_netdev_ops = { | 1927 | static const struct net_device_ops mlx4_netdev_ops = { |
2001 | .ndo_open = mlx4_en_open, | 1928 | .ndo_open = mlx4_en_open, |
2002 | .ndo_stop = mlx4_en_close, | 1929 | .ndo_stop = mlx4_en_close, |
@@ -2018,9 +1945,6 @@ static const struct net_device_ops mlx4_netdev_ops = { | |||
2018 | #ifdef CONFIG_RFS_ACCEL | 1945 | #ifdef CONFIG_RFS_ACCEL |
2019 | .ndo_rx_flow_steer = mlx4_en_filter_rfs, | 1946 | .ndo_rx_flow_steer = mlx4_en_filter_rfs, |
2020 | #endif | 1947 | #endif |
2021 | .ndo_fdb_add = mlx4_en_fdb_add, | ||
2022 | .ndo_fdb_del = mlx4_en_fdb_del, | ||
2023 | .ndo_fdb_dump = mlx4_en_fdb_dump, | ||
2024 | }; | 1948 | }; |
2025 | 1949 | ||
2026 | int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | 1950 | int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, |