aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorYan Burman <yanb@mellanox.com>2013-04-02 09:49:45 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-02 12:07:56 -0400
commitbab6a9eac05360db25c81b0090f6b1195dd986cc (patch)
tree2fa01c1613e8d72eb63b572799a82ef0454a557c /drivers/net/ethernet/mellanox/mlx4/en_netdev.c
parentfcd99434fb5c137274d2e15dd2a6a7455f0f29ff (diff)
net/mlx4_en: Fix setting initial MAC address
Commit 6bbb6d9 "net/mlx4_en: Optimize Rx fast path filter checks" introduced a regression under which the MAC address read from the card was not converted correctly (the most significant byte was not handled), fix that. Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Yan Burman <yanb@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_netdev.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index f278b10ef714..30d78f806dc3 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -411,8 +411,8 @@ static int mlx4_en_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
411 411
412static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac) 412static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac)
413{ 413{
414 unsigned int i; 414 int i;
415 for (i = ETH_ALEN - 1; i; --i) { 415 for (i = ETH_ALEN - 1; i >= 0; --i) {
416 dst_mac[i] = src_mac & 0xff; 416 dst_mac[i] = src_mac & 0xff;
417 src_mac >>= 8; 417 src_mac >>= 8;
418 } 418 }