aboutsummaryrefslogtreecommitdiff
path: root/hw/pcnet.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-05-18 13:33:03 +0100
committerMark McLoughlin <markmc@redhat.com>2009-06-09 11:38:49 +0100
commite3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch)
treee49989391834350755b1138d07ac3e464a5dbd6c /hw/pcnet.c
parentcda9046ba7dbba45f3016e5d60caffa2d72960fa (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/pcnet.c')
-rw-r--r--hw/pcnet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 4defc437b3..a8297df2af 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1062,9 +1062,9 @@ static int pcnet_tdte_poll(PCNetState *s)
return !!(CSR_CXST(s) & 0x8000);
}
-static int pcnet_can_receive(void *opaque)
+static int pcnet_can_receive(VLANClientState *vc)
{
- PCNetState *s = opaque;
+ PCNetState *s = vc->opaque;
if (CSR_STOP(s) || CSR_SPND(s))
return 0;
@@ -1076,9 +1076,9 @@ static int pcnet_can_receive(void *opaque)
#define MIN_BUF_SIZE 60
-static void pcnet_receive(void *opaque, const uint8_t *buf, size_t size)
+static void pcnet_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
- PCNetState *s = opaque;
+ PCNetState *s = vc->opaque;
int is_padr = 0, is_bcast = 0, is_ladr = 0;
uint8_t buf1[60];
int remaining;
@@ -1302,7 +1302,7 @@ static void pcnet_transmit(PCNetState *s)
if (BCR_SWSTYLE(s) == 1)
add_crc = !GET_FIELD(tmd.status, TMDS, NOFCS);
s->looptest = add_crc ? PCNET_LOOPTEST_CRC : PCNET_LOOPTEST_NOCRC;
- pcnet_receive(s, s->buffer, s->xmit_pos);
+ pcnet_receive(s->vc, s->buffer, s->xmit_pos);
s->looptest = 0;
} else
if (s->vc)