Browse Source

eth_ntoa cleanup. still has warnings. needs work.

tags/v0.9.3
Marty Connor 18 years ago
parent
commit
cd8168b071
1 changed files with 5 additions and 9 deletions
  1. 5
    9
      src/drivers/net/via-velocity.c

+ 5
- 9
src/drivers/net/via-velocity.c View File

38
 *    Indent Options: indent -kr -i8
38
 *    Indent Options: indent -kr -i8
39
 *************************************************************************/
39
 *************************************************************************/
40
 
40
 
41
-/* to get some global routines like printf */
42
 #include "etherboot.h"
41
 #include "etherboot.h"
43
-/* to get the interface to the body of the program */
44
 #include "nic.h"
42
 #include "nic.h"
45
-/* to get the PCI support functions, if this is a PCI NIC */
46
 #include <gpxe/pci.h>
43
 #include <gpxe/pci.h>
47
-
44
+#include <gpxe/ethernet.h>
48
 
45
 
49
 #include "via-velocity.h"
46
 #include "via-velocity.h"
50
 
47
 
476
 POLL - Wait for a frame
473
 POLL - Wait for a frame
477
 ***************************************************************************/
474
 ***************************************************************************/
478
 //EB53 static int velocity_poll(struct nic *nic, int retrieve)
475
 //EB53 static int velocity_poll(struct nic *nic, int retrieve)
479
-static int velocity_poll(struct nic *nic __unused)
476
+static int  velocity_poll(struct nic *nic __unused)
480
 {
477
 {
481
 	/* Work out whether or not there's an ethernet packet ready to
478
 	/* Work out whether or not there's an ethernet packet ready to
482
 	 * read.  Return 0 if not.
479
 	 * read.  Return 0 if not.
600
 /**************************************************************************
597
 /**************************************************************************
601
 DISABLE - Turn off ethernet interface
598
 DISABLE - Turn off ethernet interface
602
 ***************************************************************************/
599
 ***************************************************************************/
603
-static void velocity_disable(struct dev *dev __unused)
600
+static void velocity_disable(struct nic *nic __unused)
604
 {
601
 {
605
 	/* put the card in its initial state */
602
 	/* put the card in its initial state */
606
 	/* This function serves 3 purposes.
603
 	/* This function serves 3 purposes.
669
 /**************************************************************************
666
 /**************************************************************************
670
 PROBE - Look for an adapter, this routine's visible to the outside
667
 PROBE - Look for an adapter, this routine's visible to the outside
671
 ***************************************************************************/
668
 ***************************************************************************/
672
-static int velocity_probe(struct dev *dev, struct pci_device *pci)
669
+static int velocity_probe(struct pci_device *dev, struct pci_device *pci)
673
 {
670
 {
674
 	struct nic *nic = (struct nic *) dev;
671
 	struct nic *nic = (struct nic *) dev;
675
 	int ret, i;
672
 	int ret, i;
708
 	for (i = 0; i < 6; i++)
705
 	for (i = 0; i < 6; i++)
709
 		nic->node_addr[i] = readb(&regs->PAR[i]);
706
 		nic->node_addr[i] = readb(&regs->PAR[i]);
710
 
707
 
711
-	/* Print out some hardware info */
712
-	printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, BASE);
708
+	DBG ( "%s: %s at ioaddr %#hX\n", pci->name, eth_ntoa ( nic->node_addr ), BASE );
713
 
709
 
714
 	velocity_get_options(&vptr->options, 0, pci->name);
710
 	velocity_get_options(&vptr->options, 0, pci->name);
715
 
711
 

Loading…
Cancel
Save