Revision cc1f0f45 hw/etraxfs_eth.c

b/hw/etraxfs_eth.c
523 523
static ssize_t eth_receive(NetClientState *nc, const uint8_t *buf, size_t size)
524 524
{
525 525
    unsigned char sa_bcast[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
526
    struct fs_eth *eth = DO_UPCAST(NICState, nc, nc)->opaque;
526
    struct fs_eth *eth = qemu_get_nic_opaque(nc);
527 527
    int use_ma0 = eth->regs[RW_REC_CTRL] & 1;
528 528
    int use_ma1 = eth->regs[RW_REC_CTRL] & 2;
529 529
    int r_bcast = eth->regs[RW_REC_CTRL] & 8;
......
561 561

  
562 562
static void eth_set_link(NetClientState *nc)
563 563
{
564
    struct fs_eth *eth = DO_UPCAST(NICState, nc, nc)->opaque;
564
    struct fs_eth *eth = qemu_get_nic_opaque(nc);
565 565
    D(printf("%s %d\n", __func__, nc->link_down));
566 566
    eth->phy.link = !nc->link_down;
567 567
}
......
578 578

  
579 579
static void eth_cleanup(NetClientState *nc)
580 580
{
581
    struct fs_eth *eth = DO_UPCAST(NICState, nc, nc)->opaque;
581
    struct fs_eth *eth = qemu_get_nic_opaque(nc);
582 582

  
583 583
    /* Disconnect the client.  */
584 584
    eth->dma_out->client.push = NULL;

Also available in: Unified diff