summaryrefslogtreecommitdiffstats
path: root/src/net/netdevice.c
diff options
context:
space:
mode:
authorMichael Brown2007-07-03 19:17:14 +0200
committerMichael Brown2007-07-03 19:17:14 +0200
commit0924cf678e67020de2e928dbbe773e45be1c8551 (patch)
treeb87e818d32b7a35c73dcf4c9c30b43db09ef03bf /src/net/netdevice.c
parentReport our interface type as "gPXE" to avoid working around Etherboot (diff)
downloadipxe-0924cf678e67020de2e928dbbe773e45be1c8551.tar.gz
ipxe-0924cf678e67020de2e928dbbe773e45be1c8551.tar.xz
ipxe-0924cf678e67020de2e928dbbe773e45be1c8551.zip
Implemented (untested) PXENV_START_UNDI.
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r--src/net/netdevice.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index 8a099107..971830d9 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -356,15 +356,17 @@ struct net_device * find_netdev ( const char *name ) {
/**
* Get network device by PCI bus:dev.fn address
*
- * @v busdevfn PCI bus:dev.fn address
+ * @v bus_type Bus type
+ * @v location Bus location
* @ret netdev Network device, or NULL
*/
-struct net_device * find_pci_netdev ( unsigned int busdevfn ) {
+struct net_device * find_netdev_by_location ( unsigned int bus_type,
+ unsigned int location ) {
struct net_device *netdev;
list_for_each_entry ( netdev, &net_devices, list ) {
- if ( ( netdev->dev->desc.bus_type == BUS_TYPE_PCI ) &&
- ( netdev->dev->desc.location == busdevfn ) )
+ if ( ( netdev->dev->desc.bus_type == bus_type ) &&
+ ( netdev->dev->desc.location == location ) )
return netdev;
}