Skip to content

Commit

Permalink
[smc9000] Avoid using CONFIG as a preprocessor macro
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Aug 19, 2014
1 parent 8ab9f3c commit 3953ddd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/drivers/net/smc9000.c
Expand Up @@ -882,7 +882,7 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {

/* is it using AUI or 10BaseT ? */
SMC_SELECT_BANK(nic->ioaddr, 1);
if (inw(nic->ioaddr + CONFIG) & CFG_AUI_SELECT)
if (inw(nic->ioaddr + CFG) & CFG_AUI_SELECT)
media = 2;
else
media = 1;
Expand Down Expand Up @@ -911,12 +911,12 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) {
/* Select which interface to use */
SMC_SELECT_BANK(nic->ioaddr, 1);
if ( media == 1 ) {
_outw( inw( nic->ioaddr + CONFIG ) & ~CFG_AUI_SELECT,
nic->ioaddr + CONFIG );
_outw( inw( nic->ioaddr + CFG ) & ~CFG_AUI_SELECT,
nic->ioaddr + CFG );
}
else if ( media == 2 ) {
_outw( inw( nic->ioaddr + CONFIG ) | CFG_AUI_SELECT,
nic->ioaddr + CONFIG );
_outw( inw( nic->ioaddr + CFG ) | CFG_AUI_SELECT,
nic->ioaddr + CFG );
}

smc_phy_configure(nic->ioaddr);
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/smc9000.h
Expand Up @@ -131,7 +131,7 @@ typedef unsigned long int dword;
#define RPC_DEFAULT (RPC_ANEG | (RPC_LED_100 << RPC_LSXA_SHFT) | (RPC_LED_FD << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)

/* BANK 1 */
#define CONFIG 0
#define CFG 0
#define CFG_AUI_SELECT 0x100
#define BASE 2
#define ADDR0 4
Expand Down

0 comments on commit 3953ddd

Please sign in to comment.