From cb457d7679840b95de361c42921e601bd224ecf5 Mon Sep 17 00:00:00 2001 From: aliguori Date: Tue, 13 Jan 2009 19:47:10 +0000 Subject: Make pci_nic_init() use qemu_setup_nic_model() (Mark McLoughlin) Add a table of PCI NIC models to pass to qemu_setup_nic_model(). While we're at it, also add a corresponding table of NIC init functions. Signed-off-by: Mark McLoughlin Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6287 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/ppc440_bamboo.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'hw/ppc440_bamboo.c') diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index a6fc75823c..bc8a47b468 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -90,7 +90,6 @@ static void bamboo_init(ram_addr_t ram_size, int vga_ram_size, const char *cpu_model) { unsigned int pci_irq_nrs[4] = { 28, 27, 26, 25 }; - NICInfo *nd; PCIBus *pcibus; CPUState *env; uint64_t elf_entry; @@ -118,13 +117,9 @@ static void bamboo_init(ram_addr_t ram_size, int vga_ram_size, /* Register network interfaces. */ for (i = 0; i < nb_nics; i++) { - nd = &nd_table[i]; - if (!nd->model) { - /* There are no PCI NICs on the Bamboo board, but there are - * PCI slots, so we can pick model whatever we want. */ - nd->model = "e1000"; - } - pci_nic_init(pcibus, nd, -1); + /* There are no PCI NICs on the Bamboo board, but there are + * PCI slots, so we can pick whatever default model we want. */ + pci_nic_init(pcibus, &nd_table[i], -1, "e1000"); } } -- cgit v1.2.3