virtio-net: introduce a new control to set macaddr
authorAmos Kong <akong@redhat.com>
Mon, 21 Jan 2013 01:17:23 +0000 (01:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jan 2013 19:07:44 +0000 (14:07 -0500)
commit7e58d5aea8abb993983a3f3088fd4a3f06180a1c
tree26b31fbcf0995c22b073394946717eba0151fbe5
parentfa0879e37b59e8e3f130a30a9e6fa515717c5bdd
virtio-net: introduce a new control to set macaddr

Currently we write MAC address to pci config space byte by byte,
this means that we have an intermediate step where mac is wrong.
This patch introduced a new control command to set MAC address,
it's atomic.

VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c
include/uapi/linux/virtio_net.h