datapath: use eth_hw_addr_random() and reset addr_assign_type
authorDanny Kukawka <danny.kukawka@bisect.de>
Wed, 15 Feb 2012 23:13:19 +0000 (15:13 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 15 Feb 2012 23:16:36 +0000 (15:16 -0800)
commit550534413c31d7c91181305962fc7fc982465ac0
treedfc063b4cf9dcbb4c6433c47f9bc6198c9986a4a
parent0e553d9c1063be047824c6f1afce9ffc6db6c671
datapath: use eth_hw_addr_random() and reset addr_assign_type

Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
[jesse: add backporting to older kernels]
Signed-off-by: Jesse Gross <jesse@nicira.com>
AUTHORS
datapath/linux/Modules.mk
datapath/linux/compat/include/linux/etherdevice.h [new file with mode: 0644]
datapath/vport-internal_dev.c