Revision 6cdfab28 hw/e1000.c

b/hw/e1000.c
625 625
        set_ics(s, 0, E1000_ICR_LSC);
626 626
}
627 627

  
628
static int
629
e1000_can_receive(VLANClientState *nc)
630
{
631
    E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
632

  
633
    return (s->mac_reg[RCTL] & E1000_RCTL_EN);
634
}
635

  
636 628
static bool e1000_has_rxbufs(E1000State *s, size_t total_size)
637 629
{
638 630
    int bufs;
......
651 643
    return total_size <= bufs * s->rxbuf_size;
652 644
}
653 645

  
646
static int
647
e1000_can_receive(VLANClientState *nc)
648
{
649
    E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque;
650

  
651
    return (s->mac_reg[RCTL] & E1000_RCTL_EN) && e1000_has_rxbufs(s, 1);
652
}
653

  
654 654
static ssize_t
655 655
e1000_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
656 656
{

Also available in: Unified diff