diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/port.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/port.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c index f44ae555bf43..98e776261ead 100644 --- a/drivers/net/ethernet/mellanox/mlx4/port.c +++ b/drivers/net/ethernet/mellanox/mlx4/port.c @@ -79,15 +79,15 @@ static int mlx4_uc_steer_add(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn) { struct mlx4_qp qp; u8 gid[16] = {0}; + __be64 be_mac; int err; qp.qpn = *qpn; mac &= 0xffffffffffffULL; - mac = cpu_to_be64(mac << 16); - memcpy(&gid[10], &mac, ETH_ALEN); + be_mac = cpu_to_be64(mac << 16); + memcpy(&gid[10], &be_mac, ETH_ALEN); gid[5] = port; - gid[7] = MLX4_UC_STEER << 1; err = mlx4_unicast_attach(dev, &qp, gid, 0, MLX4_PROT_ETH); if (err) @@ -101,13 +101,13 @@ static void mlx4_uc_steer_release(struct mlx4_dev *dev, u8 port, { struct mlx4_qp qp; u8 gid[16] = {0}; + __be64 be_mac; qp.qpn = qpn; mac &= 0xffffffffffffULL; - mac = cpu_to_be64(mac << 16); - memcpy(&gid[10], &mac, ETH_ALEN); + be_mac = cpu_to_be64(mac << 16); + memcpy(&gid[10], &be_mac, ETH_ALEN); gid[5] = port; - gid[7] = MLX4_UC_STEER << 1; mlx4_unicast_detach(dev, &qp, gid, MLX4_PROT_ETH); } |