diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-05-18 13:33:03 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2009-06-09 11:38:49 +0100 |
commit | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch) | |
tree | e49989391834350755b1138d07ac3e464a5dbd6c /hw/stellaris_enet.c | |
parent | cda9046ba7dbba45f3016e5d60caffa2d72960fa (diff) |
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/stellaris_enet.c')
-rw-r--r-- | hw/stellaris_enet.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c index 3ee9a8832c..7f308290da 100644 --- a/hw/stellaris_enet.c +++ b/hw/stellaris_enet.c @@ -78,9 +78,9 @@ static void stellaris_enet_update(stellaris_enet_state *s) } /* TODO: Implement MAC address filtering. */ -static void stellaris_enet_receive(void *opaque, const uint8_t *buf, size_t size) +static void stellaris_enet_receive(VLANClientState *vc, const uint8_t *buf, size_t size) { - stellaris_enet_state *s = (stellaris_enet_state *)opaque; + stellaris_enet_state *s = vc->opaque; int n; uint8_t *p; uint32_t crc; @@ -118,9 +118,9 @@ static void stellaris_enet_receive(void *opaque, const uint8_t *buf, size_t size stellaris_enet_update(s); } -static int stellaris_enet_can_receive(void *opaque) +static int stellaris_enet_can_receive(VLANClientState *vc) { - stellaris_enet_state *s = (stellaris_enet_state *)opaque; + stellaris_enet_state *s = vc->opaque; if ((s->rctl & SE_RCTL_RXEN) == 0) return 1; @@ -128,9 +128,9 @@ static int stellaris_enet_can_receive(void *opaque) return (s->np < 31); } -static uint32_t stellaris_enet_read(void *opaque, target_phys_addr_t offset) +static uint32_t stellaris_enet_read(VLANClientState *vc, target_phys_addr_t offset) { - stellaris_enet_state *s = (stellaris_enet_state *)opaque; + stellaris_enet_state *s = vc->opaque; uint32_t val; switch (offset) { |