Explorar el Código

eth_ntoa and compilation warnings fixes

tags/v0.9.3
Marty Connor hace 18 años
padre
commit
cf84605271
Se han modificado 3 ficheros con 11 adiciones y 12 borrados
  1. 6
    5
      src/drivers/net/prism2.c
  2. 2
    3
      src/drivers/net/prism2_pci.c
  3. 3
    4
      src/drivers/net/prism2_plx.c

+ 6
- 5
src/drivers/net/prism2.c Ver fichero

@@ -13,12 +13,10 @@ $Id$
13 13
  * your option) any later version.
14 14
  */
15 15
 
16
-/* to get some global routines like printf */
17 16
 #include "etherboot.h"
18
-/* to get the interface to the body of the program */
19 17
 #include "nic.h"
20
-/* to get the PCI support functions, if this is a PCI NIC */
21 18
 #include <gpxe/pci.h>
19
+#include <gpxe/ethernet.h>
22 20
 
23 21
 /*
24 22
  * Hard-coded SSID
@@ -770,9 +768,10 @@ static int prism2_probe ( struct nic *nic, hfa384x_t *hw ) {
770 768
   hfa384x_setreg(hw, 0, HFA384x_INTEN); /* Disable interrupts */
771 769
   hfa384x_setreg(hw, 0xffff, HFA384x_EVACK); /* Acknowledge any spurious events */
772 770
 
771
+  DBG ( "MAC address %s\n", eth_ntoa ( nic->node_addr ) );
772
+
773 773
   /* Retrieve MAC address (and fill out nic->node_addr) */
774 774
   hfa384x_drvr_getconfig ( hw, HFA384x_RID_CNFOWNMACADDR, nic->node_addr, HFA384x_RID_CNFOWNMACADDR_LEN );
775
-  printf ( "MAC address %!\n", nic->node_addr );
776 775
 
777 776
   /* Prepare card for autojoin */
778 777
   /* This procedure is reverse-engineered from a register-level trace of the Linux driver's join process */
@@ -841,7 +840,9 @@ static int prism2_probe ( struct nic *nic, hfa384x_t *hw ) {
841 840
     
842 841
   /* Retrieve BSSID and print Connected message */
843 842
   result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CURRENTBSSID, hw->bssid, WLAN_BSSID_LEN);
844
-  printf ( "Link connected (BSSID %! - MAC address %!)\n", hw->bssid, nic->node_addr );
843
+
844
+  DBG ( "Link connected (BSSID %s - ", eth_ntoa ( hw->bssid ) );
845
+  DBG ( " MAC address %s)\n", eth_ntoa (nic->node_addr ) );
845 846
   
846 847
   /* point to NIC specific routines */
847 848
   nic->nic_op	= &prism2_operations;

+ 2
- 3
src/drivers/net/prism2_pci.c Ver fichero

@@ -28,14 +28,13 @@ static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) {
28 28
   pci_read_config_dword( pci, PRISM2_PCI_MEM_BASE, &membase);
29 29
   membase &= PCI_BASE_ADDRESS_MEM_MASK;
30 30
   hw->membase = (uint32_t) phys_to_virt(membase);
31
-  printf ( "Prism2.5 has registers at %#x\n", hw->membase );
31
+  printf ( "Prism2.5 has registers at %#lx\n", hw->membase );
32 32
   nic->ioaddr = hw->membase;
33 33
 
34 34
   return prism2_probe ( nic, hw );
35 35
 }
36 36
 
37
-static void prism2_pci_disable ( struct nic *nic,
38
-				 struct pci_device *pci __unused ) {
37
+static void prism2_pci_disable ( struct nic *nic ) {
39 38
   prism2_disable ( nic );
40 39
 }
41 40
 

+ 3
- 4
src/drivers/net/prism2_plx.c Ver fichero

@@ -50,8 +50,8 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p )
50 50
   /* Fill out hw structure */
51 51
   hw->membase = attr_mem;
52 52
   hw->iobase = iobase;
53
-  printf ( "PLX9052 has local config registers at %#hx\n", plx_lcr );
54
-  printf ( "Prism2 has attribute memory at %#x and I/O base at %#hx\n", attr_mem, iobase );
53
+  printf ( "PLX9052 has local config registers at %#lx\n", plx_lcr );
54
+  printf ( "Prism2 has attribute memory at %#lx and I/O base at %#lx\n", attr_mem, iobase );
55 55
 
56 56
   /* Search for CIS strings */
57 57
   printf ( "Searching for PCMCIA card...\n" );
@@ -90,8 +90,7 @@ static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) {
90 90
   return prism2_probe ( nic, hw );
91 91
 }
92 92
 
93
-static void prism2_plx_disable ( struct nic *nic,
94
-				 struct pci_device *pci __unused ) {
93
+static void prism2_plx_disable ( struct nic *nic ) {
95 94
   prism2_disable ( nic );
96 95
 }
97 96
 

Loading…
Cancelar
Guardar