summaryrefslogtreecommitdiffstats
path: root/hw/e1000.c
diff options
context:
space:
mode:
authorMark McLoughlin2009-05-18 14:33:03 +0200
committerMark McLoughlin2009-06-09 12:38:49 +0200
commite3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch)
treee49989391834350755b1138d07ac3e464a5dbd6c /hw/e1000.c
parentnet: re-name vc->fd_read() to vc->receive() (diff)
downloadqemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.gz
qemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.xz
qemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.zip
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'hw/e1000.c')
-rw-r--r--hw/e1000.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index 20544d2943..6d3eb313ec 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -592,17 +592,17 @@ e1000_set_link_status(VLANClientState *vc)
}
static int
-e1000_can_receive(void *opaque)
+e1000_can_receive(VLANClientState *vc)
{
- E1000State *s = opaque;
+ E1000State *s = vc->opaque;
return (s->mac_reg[RCTL] & E1000_RCTL_EN);
}
static void
-e1000_receive(void *opaque, const uint8_t *buf, size_t size)
+e1000_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
- E1000State *s = opaque;
+ E1000State *s = vc->opaque;
struct e1000_rx_desc desc;
target_phys_addr_t base;
unsigned int n, rdt;