diff options
author | Yan Burman <yanb@mellanox.com> | 2012-12-12 02:13:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-12 13:02:30 -0500 |
commit | c402b9477b44f768c232726d10bd103ec6e46b07 (patch) | |
tree | 1d726ce346117a253144e2ec4d0ab574cbd3ea86 | |
parent | d4676eac0de2e6d88eb3e2c02b4e9813d7d7f205 (diff) | |
download | linux-c402b9477b44f768c232726d10bd103ec6e46b07.tar.gz linux-c402b9477b44f768c232726d10bd103ec6e46b07.tar.bz2 linux-c402b9477b44f768c232726d10bd103ec6e46b07.zip |
net/mlx4_en: Use generic etherdevice.h functions.
Get rid of full_mac, zero_mac in favour of
is_zero_ether_addr and is_broadcast_ether_addr.
Signed-off-by: Yan Burman <yanb@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 4aaa7c3ad22f..cc7bb25c7e40 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -613,8 +613,6 @@ static int mlx4_en_validate_flow(struct net_device *dev, struct ethtool_usrip4_spec *l3_mask; struct ethtool_tcpip4_spec *l4_mask; struct ethhdr *eth_mask; - u64 full_mac = ~0ull; - u64 zero_mac = 0; if (cmd->fs.location >= MAX_NUM_OF_FS_RULES) return -EINVAL; @@ -644,11 +642,11 @@ static int mlx4_en_validate_flow(struct net_device *dev, case ETHER_FLOW: eth_mask = &cmd->fs.m_u.ether_spec; /* source mac mask must not be set */ - if (memcmp(eth_mask->h_source, &zero_mac, ETH_ALEN)) + if (!is_zero_ether_addr(eth_mask->h_source)) return -EINVAL; /* dest mac mask must be ff:ff:ff:ff:ff:ff */ - if (memcmp(eth_mask->h_dest, &full_mac, ETH_ALEN)) + if (!is_broadcast_ether_addr(eth_mask->h_dest)) return -EINVAL; if (!all_zeros_or_all_ones(eth_mask->h_proto)) |