summaryrefslogtreecommitdiff
path: root/hw/mips_malta.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/mips_malta.c')
-rw-r--r--hw/mips_malta.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index 972c71c9d8..3ca036bba0 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -487,19 +487,16 @@ static void audio_init (PCIBus *pci_bus)
static void network_init (PCIBus *pci_bus)
{
int i;
- NICInfo *nd;
for(i = 0; i < nb_nics; i++) {
- nd = &nd_table[i];
- if (!nd->model) {
- nd->model = "pcnet";
- }
- if (i == 0 && strcmp(nd->model, "pcnet") == 0) {
+ NICInfo *nd = &nd_table[i];
+ int devfn = -1;
+
+ if (i == 0 && (!nd->model || strcmp(nd->model, "pcnet") == 0))
/* The malta board has a PCNet card using PCI SLOT 11 */
- pci_nic_init(pci_bus, nd, 88);
- } else {
- pci_nic_init(pci_bus, nd, -1);
- }
+ devfn = 88;
+
+ pci_nic_init(pci_bus, nd, devfn, "pcnet");
}
}