don't pollute global namespace with valid_Ether_p, instead, prepend
fe_ to it.
This commit is contained in:
parent
077d7b73aa
commit
aa7fbf0f61
@ -232,7 +232,7 @@ fe_simple_probe (struct fe_softc const * sc,
|
||||
address. "Vendor" is an expected vendor code (first three bytes,)
|
||||
or a zero when nothing expected. */
|
||||
int
|
||||
valid_Ether_p (u_char const * addr, unsigned vendor)
|
||||
fe_valid_Ether_p (u_char const * addr, unsigned vendor)
|
||||
{
|
||||
#ifdef FE_DEBUG
|
||||
printf("fe?: validating %6D against %06x\n", addr, ":", vendor);
|
||||
|
@ -320,7 +320,7 @@ fe_probe_re1000(device_t dev)
|
||||
fe_inblk(sc, 0x18, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
/* Make sure it is Allied-Telesis's. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x0000F4))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x0000F4))
|
||||
return ENXIO;
|
||||
#if 1
|
||||
/* Calculate checksum. */
|
||||
@ -371,7 +371,7 @@ fe_probe_jli_re1000p(struct fe_softc * sc, u_char const * eeprom)
|
||||
/* Get our station address from EEPROM, and make sure the
|
||||
EEPROM contains Allied-Telesis's address. */
|
||||
bcopy(eeprom + 8, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x0000F4))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x0000F4))
|
||||
return NULL;
|
||||
|
||||
/* I don't know any sub-model identification. */
|
||||
@ -544,7 +544,7 @@ fe_probe_cnet9ne (device_t dev)
|
||||
fe_inblk(sc, 0x18, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
/* Make sure it is Contec's. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x00804C))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x00804C))
|
||||
return ENXIO;
|
||||
|
||||
/* Determine the card type. */
|
||||
@ -630,7 +630,7 @@ fe_probe_ssi(device_t dev)
|
||||
fe_read_eeprom_ssi(sc, eeprom);
|
||||
|
||||
/* Make sure the Ethernet (MAC) station address is of Contec's. */
|
||||
if (!valid_Ether_p(eeprom + FE_SSI_EEP_ADDR, 0x00804C))
|
||||
if (!fe_valid_Ether_p(eeprom + FE_SSI_EEP_ADDR, 0x00804C))
|
||||
return ENXIO;
|
||||
bcopy(eeprom + FE_SSI_EEP_ADDR, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
@ -700,7 +700,7 @@ fe_probe_lnx(device_t dev)
|
||||
fe_read_eeprom_lnx(sc, eeprom);
|
||||
|
||||
/* Make sure the Ethernet (MAC) station address is of TDK/LANX's. */
|
||||
if (!valid_Ether_p(eeprom, 0x008098))
|
||||
if (!fe_valid_Ether_p(eeprom, 0x008098))
|
||||
return ENXIO;
|
||||
bcopy(eeprom, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
@ -768,12 +768,12 @@ fe_probe_gwy(device_t dev)
|
||||
|
||||
/* Get our station address from EEPROM. */
|
||||
fe_inblk(sc, 0x18, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x000000))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x000000))
|
||||
return ENXIO;
|
||||
|
||||
/* Determine the card type. */
|
||||
sc->typestr = "Generic MB86960 Ethernet";
|
||||
if (valid_Ether_p(sc->sc_enaddr, 0x000061))
|
||||
if (fe_valid_Ether_p(sc->sc_enaddr, 0x000061))
|
||||
sc->typestr = "Gateway Ethernet (Fujitsu chipset)";
|
||||
|
||||
/* Gateway's board requires an explicit IRQ to work, since it
|
||||
@ -834,7 +834,7 @@ fe_probe_ubn(device_t dev)
|
||||
|
||||
/* Get our station address form ID ROM and make sure it is UBN's. */
|
||||
fe_inblk(sc, 0x18, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x00DD01))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x00DD01))
|
||||
goto fail_ubn;
|
||||
#if 1
|
||||
/* Calculate checksum. */
|
||||
@ -975,8 +975,8 @@ fe_probe_rex(device_t dev)
|
||||
sc->sc_enaddr[i] = eeprom[7 - i];
|
||||
|
||||
/* Make sure it is RATOC's. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x00C0D0) &&
|
||||
!valid_Ether_p(sc->sc_enaddr, 0x00803D))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x00C0D0) &&
|
||||
!fe_valid_Ether_p(sc->sc_enaddr, 0x00803D))
|
||||
return 0;
|
||||
|
||||
/* Setup the board type. */
|
||||
|
@ -252,7 +252,7 @@ fe_probe_fmv(device_t dev)
|
||||
/* Get our station address from EEPROM, and make sure it is
|
||||
Fujitsu's. */
|
||||
fe_inblk(sc, FE_FMV4, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x00000E))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x00000E))
|
||||
return ENXIO;
|
||||
|
||||
/* Find the supported media and "hardware revision" to know
|
||||
@ -387,7 +387,7 @@ fe_probe_jli_ati(struct fe_softc * sc, u_char const * eeprom)
|
||||
/* Get our station address from EEPROM, and make sure the
|
||||
EEPROM contains ATI's address. */
|
||||
bcopy(eeprom + 8, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x0000F4))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x0000F4))
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
@ -508,12 +508,12 @@ fe_probe_jli_icl(struct fe_softc * sc, u_char const * eeprom)
|
||||
/* Make sure the EEPROM contains ICL's permanent station
|
||||
address. If it isn't, probably this board is not an
|
||||
ICL's. */
|
||||
if (!valid_Ether_p(eeprom+122, 0x00004B))
|
||||
if (!fe_valid_Ether_p(eeprom+122, 0x00004B))
|
||||
return NULL;
|
||||
|
||||
/* Check if the "configured" Ethernet address in the EEPROM is
|
||||
valid. Use it if it is, or use the "permanent" address instead. */
|
||||
if (valid_Ether_p(eeprom+4, 0x020000)) {
|
||||
if (fe_valid_Ether_p(eeprom+4, 0x020000)) {
|
||||
/* The configured address is valid. Use it. */
|
||||
bcopy(eeprom+4, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
} else {
|
||||
@ -621,7 +621,7 @@ fe_probe_jli_rex(struct fe_softc * sc, u_char const * eeprom)
|
||||
sc->sc_enaddr[5] = eeprom[6];
|
||||
|
||||
/* Make sure the EEPROM contains RATOC's station address. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x00C0D0))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x00C0D0))
|
||||
return NULL;
|
||||
|
||||
/* I don't know any sub-model identification. */
|
||||
@ -658,7 +658,7 @@ fe_probe_jli_unk(struct fe_softc * sc, u_char const * eeprom)
|
||||
|
||||
/* Look for a bit pattern which looks like a MAC address. */
|
||||
for (n = 2; n <= romsize - ETHER_ADDR_LEN; n += 2) {
|
||||
if (!valid_Ether_p(eeprom + n, 0x000000))
|
||||
if (!fe_valid_Ether_p(eeprom + n, 0x000000))
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -839,7 +839,7 @@ fe_probe_ssi(device_t dev)
|
||||
fe_read_eeprom_ssi(sc, eeprom);
|
||||
|
||||
/* Make sure the Ethernet (MAC) station address is of TDK's. */
|
||||
if (!valid_Ether_p(eeprom+FE_SSI_EEP_ADDR, 0x008098))
|
||||
if (!fe_valid_Ether_p(eeprom+FE_SSI_EEP_ADDR, 0x008098))
|
||||
return ENXIO;
|
||||
bcopy(eeprom + FE_SSI_EEP_ADDR, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
@ -900,7 +900,7 @@ fe_probe_lnx(device_t dev)
|
||||
fe_read_eeprom_lnx(sc, eeprom);
|
||||
|
||||
/* Make sure the Ethernet (MAC) station address is of TDK/LANX's. */
|
||||
if (!valid_Ether_p(eeprom, 0x008098))
|
||||
if (!fe_valid_Ether_p(eeprom, 0x008098))
|
||||
return ENXIO;
|
||||
bcopy(eeprom, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
@ -965,7 +965,7 @@ fe_probe_gwy(device_t dev)
|
||||
fe_inblk(sc, 0x18, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
/* Make sure it is Gateway Communication's. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x000061))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x000061))
|
||||
return ENXIO;
|
||||
|
||||
/* Gateway's board requires an explicit IRQ to work, since it
|
||||
@ -1017,7 +1017,7 @@ fe_probe_ubn(device_t dev)
|
||||
|
||||
/* Get our station address form ID ROM and make sure it is UBN's. */
|
||||
fe_inblk(sc, 0x18, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0x00DD01))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0x00DD01))
|
||||
return ENXIO;
|
||||
#if 0
|
||||
/* Calculate checksum. */
|
||||
|
@ -243,7 +243,7 @@ fe_probe_mbh(device_t dev)
|
||||
fe_inblk(sc, FE_MBH10, sc->sc_enaddr, ETHER_ADDR_LEN);
|
||||
|
||||
/* Make sure we got a valid station address. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0))
|
||||
return ENXIO;
|
||||
|
||||
/* Determine the card type. */
|
||||
@ -299,7 +299,7 @@ fe_probe_tdk (device_t dev)
|
||||
sc->typestr = "Generic MB8696x/78Q837x Ethernet (PCMCIA)";
|
||||
|
||||
/* Make sure we got a valid station address. */
|
||||
if (!valid_Ether_p(sc->sc_enaddr, 0))
|
||||
if (!fe_valid_Ether_p(sc->sc_enaddr, 0))
|
||||
return ENXIO;
|
||||
|
||||
return 0;
|
||||
|
@ -139,7 +139,7 @@ void fe_release_resource(device_t);
|
||||
|
||||
int fe_simple_probe(struct fe_softc const *,
|
||||
struct fe_simple_probe_struct const *);
|
||||
int valid_Ether_p(u_char const *, unsigned);
|
||||
int fe_valid_Ether_p(u_char const *, unsigned);
|
||||
void fe_softc_defaults(struct fe_softc *);
|
||||
void fe_stop(struct fe_softc *sc);
|
||||
void fe_irq_failure(char const *, int, int, char const *);
|
||||
|
Loading…
Reference in New Issue
Block a user