aboutsummaryrefslogtreecommitdiff
path: root/hw/rtl8139.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/rtl8139.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/rtl8139.c')
-rw-r--r--hw/rtl8139.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 14119d476e..8626d5e6b8 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -790,9 +790,9 @@ static inline target_phys_addr_t rtl8139_addr64(uint32_t low, uint32_t high)
#endif
}
-static int rtl8139_can_receive(void *opaque)
+static int rtl8139_can_receive(VLANClientState *vc)
{
- RTL8139State *s = opaque;
+ RTL8139State *s = vc->opaque;
int avail;
/* Receive (drop) packets if card is disabled. */
@@ -812,9 +812,9 @@ static int rtl8139_can_receive(void *opaque)
}
}
-static void rtl8139_do_receive(void *opaque, const uint8_t *buf, int size, int do_interrupt)
+static void rtl8139_do_receive(VLANClientState *vc, const uint8_t *buf, int size, int do_interrupt)
{
- RTL8139State *s = opaque;
+ RTL8139State *s = vc->opaque;
uint32_t packet_header = 0;
@@ -1158,9 +1158,9 @@ static void rtl8139_do_receive(void *opaque, const uint8_t *buf, int size, int d
}
}
-static void rtl8139_receive(void *opaque, const uint8_t *buf, size_t size)
+static void rtl8139_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
- rtl8139_do_receive(opaque, buf, size, 1);
+ rtl8139_do_receive(vc, buf, size, 1);
}
static void rtl8139_reset_rxring(RTL8139State *s, uint32_t bufferSize)
@@ -1757,7 +1757,7 @@ static void rtl8139_transfer_frame(RTL8139State *s, const uint8_t *buf, int size
if (TxLoopBack == (s->TxConfig & TxLoopBack))
{
DEBUG_PRINT(("RTL8139: +++ transmit loopback mode\n"));
- rtl8139_do_receive(s, buf, size, do_interrupt);
+ rtl8139_do_receive(s->vc, buf, size, do_interrupt);
}
else
{