Skip to content

Commit

Permalink
net: set dev->addr_assign_type correctly
Browse files Browse the repository at this point in the history
Not a bitfield, but a plain value.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jan 4, 2013
1 parent f652151 commit e41b2d7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
if (atl1c_read_mac_addr(&adapter->hw)) {
/* got a random MAC address, set NET_ADDR_RANDOM to netdev */
netdev->addr_assign_type |= NET_ADDR_RANDOM;
netdev->addr_assign_type = NET_ADDR_RANDOM;
}
memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len);
memcpy(netdev->perm_addr, adapter->hw.mac_addr, netdev->addr_len);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,7 @@ static int atl1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* copy the MAC address out of the EEPROM */
if (atl1_read_mac_addr(&adapter->hw)) {
/* mark random mac */
netdev->addr_assign_type |= NET_ADDR_RANDOM;
netdev->addr_assign_type = NET_ADDR_RANDOM;
}
memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ static int ethoc_probe(struct platform_device *pdev)
}

if (random_mac)
netdev->addr_assign_type |= NET_ADDR_RANDOM;
netdev->addr_assign_type = NET_ADDR_RANDOM;

/* register MII bus */
priv->mdio = mdiobus_alloc();
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/lantiq_etop.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ ltq_etop_init(struct net_device *dev)

/* Set addr_assign_type here, ltq_etop_set_mac_address would reset it. */
if (random_mac)
dev->addr_assign_type |= NET_ADDR_RANDOM;
dev->addr_assign_type = NET_ADDR_RANDOM;

ltq_etop_set_multicast_list(dev);
err = ltq_etop_mdio_init(dev);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/etherdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static inline void eth_zero_addr(u8 *addr)
*/
static inline void eth_hw_addr_random(struct net_device *dev)
{
dev->addr_assign_type |= NET_ADDR_RANDOM;
dev->addr_assign_type = NET_ADDR_RANDOM;
eth_random_addr(dev->dev_addr);
}

Expand Down

0 comments on commit e41b2d7

Please sign in to comment.