]> git.baikalelectronics.ru Git - kernel.git/commit
rndis_host: Set valid random MAC on buggy devices
authorKristian Evensen <kristian.evensen@gmail.com>
Thu, 14 Jul 2016 08:23:03 +0000 (10:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Jul 2016 03:03:04 +0000 (20:03 -0700)
commit83f7d30f1337bb6bdd687bac93033a832f1669f2
tree8665fdf76228b8825bfdbf3ec01b1a6530755a37
parentf5a1a8fa57b653321606442fd41e0fb5aa5bb92e
rndis_host: Set valid random MAC on buggy devices

Some devices of the same type all export the same, random MAC address. This
behavior has been seen on the ZTE MF910, MF823 and MF831, and there are
probably more devices out there. Fix this by generating a valid random MAC
address if we read a random MAC from device.

Also, changed the memcpy() to ether_addr_copy(), as pointed out by
checkpatch.

Suggested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/rndis_host.c