diff options
author | Amir Vadai <amirv@mellanox.com> | 2012-07-19 00:33:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-19 17:34:37 +0200 |
commit | af22d9de45caf8b2a99f2b27a927169c029528b4 (patch) | |
tree | 62299712c84e193a737d5d9e5ce474a01485a9a8 /drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | |
parent | ipv4: fix address selection in fib_compute_spec_dst (diff) | |
download | linux-af22d9de45caf8b2a99f2b27a927169c029528b4.tar.xz linux-af22d9de45caf8b2a99f2b27a927169c029528b4.zip |
net/mlx4: Move MAC_MASK to a common place
Define this macro is one common place instead of duplicating it over the code
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index dd6a77b21149..9d0b88eea02b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -34,12 +34,12 @@ #include <linux/kernel.h> #include <linux/ethtool.h> #include <linux/netdevice.h> +#include <linux/mlx4/driver.h> #include "mlx4_en.h" #include "en_port.h" #define EN_ETHTOOL_QP_ATTACH (1ull << 63) -#define EN_ETHTOOL_MAC_MASK 0xffffffffffffULL #define EN_ETHTOOL_SHORT_MASK cpu_to_be16(0xffff) #define EN_ETHTOOL_WORD_MASK cpu_to_be32(0xffffffff) @@ -751,7 +751,7 @@ static int mlx4_en_ethtool_to_net_trans_rule(struct net_device *dev, struct ethhdr *eth_spec; struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_spec_list *spec_l2; - __be64 mac_msk = cpu_to_be64(EN_ETHTOOL_MAC_MASK << 16); + __be64 mac_msk = cpu_to_be64(MLX4_MAC_MASK << 16); err = mlx4_en_validate_flow(dev, cmd); if (err) @@ -761,7 +761,7 @@ static int mlx4_en_ethtool_to_net_trans_rule(struct net_device *dev, if (!spec_l2) return -ENOMEM; - mac = priv->mac & EN_ETHTOOL_MAC_MASK; + mac = priv->mac & MLX4_MAC_MASK; be_mac = cpu_to_be64(mac << 16); spec_l2->id = MLX4_NET_TRANS_RULE_ID_ETH; |