Commit 5619f4c9 authored by Adam Kropelin's avatar Adam Kropelin Committed by Jeff Garzik

Last ewrk3 update for now. Updates the changelog to cover previous patches, bumps the

revision number, and replaces the horrific EthwrkSignature function with
something (slightly) less horrific.
parent 78c104aa
...@@ -137,6 +137,8 @@ ...@@ -137,6 +137,8 @@
0.45 19-Jul-02 fix unaligned access on alpha <martin@bruli.net> 0.45 19-Jul-02 fix unaligned access on alpha <martin@bruli.net>
0.46 10-Oct-02 Multiple NIC support when module <akropel1@rochester.rr.com> 0.46 10-Oct-02 Multiple NIC support when module <akropel1@rochester.rr.com>
0.47 18-Oct-02 ethtool support <akropel1@rochester.rr.com> 0.47 18-Oct-02 ethtool support <akropel1@rochester.rr.com>
0.48 18-Oct-02 cli/sti removal for 2.5 <vda@port.imtp.ilyichevsk.odessa.ua>
ioctl locking, signature search cleanup <akropel1@rochester.rr.com>
========================================================================= =========================================================================
*/ */
...@@ -171,10 +173,10 @@ ...@@ -171,10 +173,10 @@
#include "ewrk3.h" #include "ewrk3.h"
#define DRV_NAME "ewrk3" #define DRV_NAME "ewrk3"
#define DRV_VERSION "0.47" #define DRV_VERSION "0.48"
static char version[] __initdata = static char version[] __initdata =
DRV_NAME ":v" DRV_VERSION " 2002/10/17 davies@maniac.ultranet.com\n"; DRV_NAME ":v" DRV_VERSION " 2002/10/18 davies@maniac.ultranet.com\n";
#ifdef EWRK3_DEBUG #ifdef EWRK3_DEBUG
static int ewrk3_debug = EWRK3_DEBUG; static int ewrk3_debug = EWRK3_DEBUG;
...@@ -1478,27 +1480,20 @@ static int Write_EEPROM(short data, u_long iobase, u_char eaddr) ...@@ -1478,27 +1480,20 @@ static int Write_EEPROM(short data, u_long iobase, u_char eaddr)
*/ */
static void __init EthwrkSignature(char *name, char *eeprom_image) static void __init EthwrkSignature(char *name, char *eeprom_image)
{ {
u_long i, j, k; int i;
char *signatures[] = EWRK3_SIGNATURE; char *signatures[] = EWRK3_SIGNATURE;
strcpy(name, ""); for (i=0; *signatures[i] != '\0'; i++)
for (i = 0; *signatures[i] != '\0' && *name == '\0'; i++) { if( !strncmp(eeprom_image+EEPROM_PNAME7, signatures[i], strlen(signatures[i])) )
for (j = EEPROM_PNAME7, k = 0; j <= EEPROM_PNAME0 && k < strlen(signatures[i]); j++) { break;
if (signatures[i][k] == eeprom_image[j]) { /* track signature */
k++; if (*signatures[i] != '\0') {
} else { /* lost signature; begin search again */ memcpy(name, eeprom_image+EEPROM_PNAME7, EWRK3_STRLEN);
k = 0;
}
}
if (k == strlen(signatures[i])) {
for (k = 0; k < EWRK3_STRLEN; k++) {
name[k] = eeprom_image[EEPROM_PNAME7 + k];
name[EWRK3_STRLEN] = '\0'; name[EWRK3_STRLEN] = '\0';
} } else
} name[0] = '\0';
}
return; /* return the device name string */ return;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment