diff options
author | Amos Kong <akong@redhat.com> | 2013-01-22 23:44:46 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-01-30 01:31:09 +0200 |
commit | dd23454ba2c83168b453155365671e67723b881f (patch) | |
tree | 646dbbb5b946158382e20a65260bcd158f24dff8 /hw/virtio-net.c | |
parent | c1943a3f3774ee1aad51e8cc5b8cd24e66e198a5 (diff) |
virtio-net: rename ctrl rx commands
This patch makes rx commands consistent with specification.
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio-net.c')
-rw-r--r-- | hw/virtio-net.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 04834e99a7..dfb9687d2f 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -327,17 +327,17 @@ static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd, return VIRTIO_NET_ERR; } - if (cmd == VIRTIO_NET_CTRL_RX_MODE_PROMISC) { + if (cmd == VIRTIO_NET_CTRL_RX_PROMISC) { n->promisc = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_ALLMULTI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_ALLMULTI) { n->allmulti = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_ALLUNI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_ALLUNI) { n->alluni = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOMULTI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOMULTI) { n->nomulti = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOUNI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOUNI) { n->nouni = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOBCAST) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOBCAST) { n->nobcast = on; } else { return VIRTIO_NET_ERR; @@ -474,7 +474,7 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) iov_discard_front(&iov, &iov_cnt, sizeof(ctrl)); if (s != sizeof(ctrl)) { status = VIRTIO_NET_ERR; - } else if (ctrl.class == VIRTIO_NET_CTRL_RX_MODE) { + } else if (ctrl.class == VIRTIO_NET_CTRL_RX) { status = virtio_net_handle_rx_mode(n, ctrl.cmd, iov, iov_cnt); } else if (ctrl.class == VIRTIO_NET_CTRL_MAC) { status = virtio_net_handle_mac(n, ctrl.cmd, iov, iov_cnt); |