mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
net: set dev->addr_assign_type correctly
Not a bitfield, but a plain value. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f652151640
commit
e41b2d7fe7
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user