RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address
From: Hayes Wang
Date: Thu Jun 02 2016 - 02:15:58 EST
Mario Limonciello [mailto:mario_limonciello@xxxxxxxx]
[...]
> static int set_ethernet_addr(struct r8152 *tp)
> {
> struct net_device *dev = tp->netdev;
> @@ -1041,6 +1075,9 @@ static int set_ethernet_addr(struct r8152 *tp)
> else
> ret = pla_ocp_read(tp, PLA_BACKUP, 8, sa.sa_data);
>
> + /* if system provides auxiliary MAC address */
> + set_auxiliary_addr(&sa);
> +
> if (ret < 0) {
> netif_err(tp, probe, dev, "Get ether addr fail\n");
> } else if (!is_valid_ether_addr(sa.sa_data)) {
When tp->version == RTL_VER_01, you would have different MAC address
between SW and HW. You may use the MAC address from ACPI for dev_addr.
However, the device uses another one, because you don't set it to the device.
Best Regards,
Hayes