Browse Source

[smc9000] Avoid using CONFIG as a preprocessor macro

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
3953ddd2ac
2 changed files with 6 additions and 6 deletions
  1. 5
    5
      src/drivers/net/smc9000.c
  2. 1
    1
      src/drivers/net/smc9000.h

+ 5
- 5
src/drivers/net/smc9000.c View File

882
 
882
 
883
    /* is it using AUI or 10BaseT ? */
883
    /* is it using AUI or 10BaseT ? */
884
    SMC_SELECT_BANK(nic->ioaddr, 1);
884
    SMC_SELECT_BANK(nic->ioaddr, 1);
885
-   if (inw(nic->ioaddr + CONFIG) & CFG_AUI_SELECT)
885
+   if (inw(nic->ioaddr + CFG) & CFG_AUI_SELECT)
886
      media = 2;
886
      media = 2;
887
    else
887
    else
888
      media = 1;
888
      media = 1;
911
    /* Select which interface to use */
911
    /* Select which interface to use */
912
    SMC_SELECT_BANK(nic->ioaddr, 1);
912
    SMC_SELECT_BANK(nic->ioaddr, 1);
913
    if ( media == 1 ) {
913
    if ( media == 1 ) {
914
-      _outw( inw( nic->ioaddr + CONFIG ) & ~CFG_AUI_SELECT,
915
-	   nic->ioaddr + CONFIG );
914
+      _outw( inw( nic->ioaddr + CFG ) & ~CFG_AUI_SELECT,
915
+	   nic->ioaddr + CFG );
916
    }
916
    }
917
    else if ( media == 2 ) {
917
    else if ( media == 2 ) {
918
-      _outw( inw( nic->ioaddr + CONFIG ) | CFG_AUI_SELECT,
919
-	   nic->ioaddr + CONFIG );
918
+      _outw( inw( nic->ioaddr + CFG ) | CFG_AUI_SELECT,
919
+	   nic->ioaddr + CFG );
920
    }
920
    }
921
 
921
 
922
    smc_phy_configure(nic->ioaddr);
922
    smc_phy_configure(nic->ioaddr);

+ 1
- 1
src/drivers/net/smc9000.h View File

131
 #define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
131
 #define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
132
 
132
 
133
 /* BANK 1 */
133
 /* BANK 1 */
134
-#define CONFIG			0
134
+#define CFG			0
135
 #define CFG_AUI_SELECT		0x100
135
 #define CFG_AUI_SELECT		0x100
136
 #define	BASE			2
136
 #define	BASE			2
137
 #define	ADDR0			4
137
 #define	ADDR0			4

Loading…
Cancel
Save