]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2fa6d929948c29c9cf7c42a0bdb51a8427f1a7a8
tree26b31fbcf0995c22b073394946717eba0151fbe5
parent241155e4ffdf59b8edb8687f7ab8a07da0f8c876
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