Commit cda9046b authored by Mark McLoughlin's avatar Mark McLoughlin
Browse files

net: re-name vc->fd_read() to vc->receive()



VLANClientState's fd_read() handler doesn't read from file
descriptors, it adds a buffer to the client's receive queue.

Re-name the handlers to make things a little less confusing.

Signed-off-by: default avatarMark McLoughlin <markmc@redhat.com>
parent 463af534
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ static void do_transmit_packets(dp8393xState *s)
            s->regs[SONIC_TCR] |= SONIC_TCR_CRSL;
            if (s->vc->fd_can_read(s)) {
                s->loopback_packet = 1;
                s->vc->fd_read(s, s->tx_buffer, tx_len);
                s->vc->receive(s, s->tx_buffer, tx_len);
            }
        } else {
            /* Transmit packet */
@@ -725,7 +725,7 @@ static int receive_filter(dp8393xState *s, const uint8_t * buf, int size)
    return -1;
}

static void nic_receive(void *opaque, const uint8_t * buf, int size)
static void nic_receive(void *opaque, const uint8_t * buf, size_t size)
{
    uint16_t data[10];
    dp8393xState *s = opaque;
+3 −3
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ e1000_can_receive(void *opaque)
}

static void
e1000_receive(void *opaque, const uint8_t *buf, int size)
e1000_receive(void *opaque, const uint8_t *buf, size_t size)
{
    E1000State *s = opaque;
    struct e1000_rx_desc desc;
@@ -614,8 +614,8 @@ e1000_receive(void *opaque, const uint8_t *buf, int size)
        return;

    if (size > s->rxbuf_size) {
        DBGOUT(RX, "packet too large for buffers (%d > %d)\n", size,
               s->rxbuf_size);
        DBGOUT(RX, "packet too large for buffers (%lu > %d)\n",
               (unsigned long)size, s->rxbuf_size);
        return;
    }

+1 −1
Original line number Diff line number Diff line
@@ -1441,7 +1441,7 @@ static int nic_can_receive(void *opaque)
    //~ return !eepro100_buffer_full(s);
}

static void nic_receive(void *opaque, const uint8_t * buf, int size)
static void nic_receive(void *opaque, const uint8_t * buf, size_t size)
{
    /* TODO:
     * - Magic packets should set bit 30 in power management driver register.
+1 −1
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ static int eth_can_receive(void *opaque)
	return 1;
}

static void eth_receive(void *opaque, const uint8_t *buf, int size)
static void eth_receive(void *opaque, const uint8_t *buf, size_t size)
{
	unsigned char sa_bcast[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
	struct fs_eth *eth = opaque;
+1 −1
Original line number Diff line number Diff line
@@ -353,7 +353,7 @@ static int mcf_fec_can_receive(void *opaque)
    return s->rx_enabled;
}

static void mcf_fec_receive(void *opaque, const uint8_t *buf, int size)
static void mcf_fec_receive(void *opaque, const uint8_t *buf, size_t size)
{
    mcf_fec_state *s = (mcf_fec_state *)opaque;
    mcf_fec_bd bd;
Loading