RE: [PATCH] r8152: Add MAC passthrough support to new device

From: Hayes Wang
Date: Wed Jan 15 2020 - 01:19:26 EST


Kai-Heng Feng [mailto:kai.heng.feng@xxxxxxxxxxxxx]
> Sent: Tuesday, January 14, 2020 12:41 PM
[...]
> if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO &&
> - le16_to_cpu(udev->descriptor.idProduct) == 0x3082)
> + (le16_to_cpu(udev->descriptor.idProduct) == 0x3082 ||
> + le16_to_cpu(udev->descriptor.idProduct) == 0xa387))

How about using
switch (le16_to_cpu(udev->descriptor.idProduct)) {
...
}

> set_bit(LENOVO_MACPASSTHRU, &tp->flags);
>
> if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial
> &&
> --
> 2.17.1


Best Regards,
Hayes