summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/e1000.c
diff options
context:
space:
mode:
authorMichael Brown2005-04-13 03:31:44 +0200
committerMichael Brown2005-04-13 03:31:44 +0200
commitf39cc6d978e29b7371f94d38de231a0d534e8d86 (patch)
treeee4885e45d688e995760cdd663feaa3abe37285b /src/drivers/net/e1000.c
parentFix type of dummy_irq() (diff)
downloadipxe-f39cc6d978e29b7371f94d38de231a0d534e8d86.tar.gz
ipxe-f39cc6d978e29b7371f94d38de231a0d534e8d86.tar.xz
ipxe-f39cc6d978e29b7371f94d38de231a0d534e8d86.zip
Finished by hand
Diffstat (limited to 'src/drivers/net/e1000.c')
-rw-r--r--src/drivers/net/e1000.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c
index 163fc66d..3cd91f73 100644
--- a/src/drivers/net/e1000.c
+++ b/src/drivers/net/e1000.c
@@ -85,6 +85,9 @@ typedef enum {
#include "e1000_hw.h"
/* NIC specific static variables go here */
+static struct nic_operations e1000_operations;
+static struct pci_driver e1000_driver;
+
static struct e1000_hw hw;
static char tx_pool[128 + 16];
static char rx_pool[128 + 16];
@@ -3580,15 +3583,14 @@ PROBE - Look for an adapter, this routine's visible to the outside
You should omit the last argument struct pci_device * for a non-PCI NIC
***************************************************************************/
static int e1000_probe ( struct dev *dev ) {
-
struct nic *nic = nic_device ( dev );
-
struct pci_device *p = pci_device ( dev );
unsigned long mmio_start, mmio_len;
int ret_val, i;
- if (p == 0)
+ if ( ! find_pci_device ( p, &e1000_driver ) )
return 0;
+
/* Initialize hw with default values */
memset(&hw, 0, sizeof(hw));
hw.pdev = p;
@@ -3663,17 +3665,18 @@ static int e1000_probe ( struct dev *dev ) {
init_descriptor();
/* point to NIC specific routines */
-static struct nic_operations e1000_operations;
+ nic->nic_op = &e1000_operations;
+
+ return 1;
+}
+
static struct nic_operations e1000_operations = {
.connect = dummy_connect,
.poll = e1000_poll,
.transmit = e1000_transmit,
.irq = e1000_irq,
.disable = e1000_disable,
-}; nic->nic_op = &e1000_operations;
-
- return 1;
-}
+};
static struct pci_id e1000_nics[] = {
PCI_ROM(0x8086, 0x1000, "e1000-82542", "Intel EtherExpressPro1000"),