diff options
author | Yan Burman <yanb@mellanox.com> | 2013-04-02 16:49:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-02 12:07:56 -0400 |
commit | bab6a9eac05360db25c81b0090f6b1195dd986cc (patch) | |
tree | 2fa01c1613e8d72eb63b572799a82ef0454a557c | |
parent | fcd99434fb5c137274d2e15dd2a6a7455f0f29ff (diff) | |
download | linux-3.10-bab6a9eac05360db25c81b0090f6b1195dd986cc.tar.gz linux-3.10-bab6a9eac05360db25c81b0090f6b1195dd986cc.tar.bz2 linux-3.10-bab6a9eac05360db25c81b0090f6b1195dd986cc.zip |
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 |
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 f278b10ef71..30d78f806dc 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) static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac) { - unsigned int i; - for (i = ETH_ALEN - 1; i; --i) { + int i; + for (i = ETH_ALEN - 1; i >= 0; --i) { dst_mac[i] = src_mac & 0xff; src_mac >>= 8; } |