Revision b356f76d hw/lan9118.c
b/hw/lan9118.c | ||
---|---|---|
341 | 341 |
|
342 | 342 |
static void lan9118_mac_changed(lan9118_state *s) |
343 | 343 |
{ |
344 |
qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
|
|
344 |
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
|
|
345 | 345 |
} |
346 | 346 |
|
347 | 347 |
static void lan9118_reload_eeprom(lan9118_state *s) |
... | ... | |
373 | 373 |
static void phy_update_link(lan9118_state *s) |
374 | 374 |
{ |
375 | 375 |
/* Autonegotiation status mirrors link status. */ |
376 |
if (s->nic->nc.link_down) {
|
|
376 |
if (qemu_get_queue(s->nic)->link_down) {
|
|
377 | 377 |
s->phy_status &= ~0x0024; |
378 | 378 |
s->phy_int |= PHY_INT_DOWN; |
379 | 379 |
} else { |
... | ... | |
657 | 657 |
/* FIXME: Honor TX disable, and allow queueing of packets. */ |
658 | 658 |
if (s->phy_control & 0x4000) { |
659 | 659 |
/* This assumes the receive routine doesn't touch the VLANClient. */ |
660 |
lan9118_receive(&s->nic->nc, s->txp->data, s->txp->len);
|
|
660 |
lan9118_receive(qemu_get_queue(s->nic), s->txp->data, s->txp->len);
|
|
661 | 661 |
} else { |
662 |
qemu_send_packet(&s->nic->nc, s->txp->data, s->txp->len);
|
|
662 |
qemu_send_packet(qemu_get_queue(s->nic), s->txp->data, s->txp->len);
|
|
663 | 663 |
} |
664 | 664 |
s->txp->fifo_used = 0; |
665 | 665 |
|
... | ... | |
1335 | 1335 |
|
1336 | 1336 |
s->nic = qemu_new_nic(&net_lan9118_info, &s->conf, |
1337 | 1337 |
object_get_typename(OBJECT(dev)), dev->qdev.id, s); |
1338 |
qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
|
|
1338 |
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
|
|
1339 | 1339 |
s->eeprom[0] = 0xa5; |
1340 | 1340 |
for (i = 0; i < 6; i++) { |
1341 | 1341 |
s->eeprom[i + 1] = s->conf.macaddr.a[i]; |
Also available in: Unified diff