Patchwork [22/41] virtio-net: change tx_timer_active to uint32_t

login
register
mail settings
Submitter Juan Quintela
Date Dec. 2, 2009, 12:04 p.m.
Message ID <168fe53b1defe35b632266570fe07220b863f703.1259754427.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/40027/
State New
Headers show

Comments

Juan Quintela - Dec. 2, 2009, 12:04 p.m.
It is only used with values 0 and 1

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio-net.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 1b8ce14..fda6a76 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -33,7 +33,7 @@  typedef struct VirtIONet
     VirtQueue *ctrl_vq;
     VLANClientState *vc;
     QEMUTimer *tx_timer;
-    int tx_timer_active;
+    uint32_t tx_timer_active;
     uint32_t has_vnet_hdr;
     uint8_t has_ufo;
     struct {
@@ -693,7 +693,7 @@  static void virtio_net_save(QEMUFile *f, void *opaque)
     virtio_save(&n->vdev, f);

     qemu_put_buffer(f, n->mac, ETH_ALEN);
-    qemu_put_be32(f, n->tx_timer_active);
+    qemu_put_be32s(f, &n->tx_timer_active);
     qemu_put_be32(f, n->mergeable_rx_bufs);
     qemu_put_be16(f, n->status);
     qemu_put_byte(f, n->promisc);
@@ -722,7 +722,7 @@  static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
     virtio_load(&n->vdev, f);

     qemu_get_buffer(f, n->mac, ETH_ALEN);
-    n->tx_timer_active = qemu_get_be32(f);
+    qemu_get_be32s(f, &n->tx_timer_active);
     n->mergeable_rx_bufs = qemu_get_be32(f);

     if (version_id >= 3)