Skip to content

Commit bab6a9e

Browse files
Yan Burmandavem330
authored andcommitted
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>
1 parent fcd9943 commit bab6a9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlx4/en_netdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ static int mlx4_en_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
411411

412412
static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac)
413413
{
414-
unsigned int i;
415-
for (i = ETH_ALEN - 1; i; --i) {
414+
int i;
415+
for (i = ETH_ALEN - 1; i >= 0; --i) {
416416
dst_mac[i] = src_mac & 0xff;
417417
src_mac >>= 8;
418418
}

0 commit comments

Comments
 (0)