|
@@ -67,6 +67,7 @@
|
|
|
#include <linux/mutex.h>
|
|
|
#include <linux/freezer.h>
|
|
|
#include <linux/slab.h>
|
|
|
+#include <linux/kernel.h>
|
|
|
|
|
|
#include <asm/unaligned.h>
|
|
|
|
|
@@ -2436,7 +2437,6 @@ UEA_ATTR(firmid, 0);
|
|
|
|
|
|
/* Retrieve the device End System Identifier (MAC) */
|
|
|
|
|
|
-#define htoi(x) (isdigit(x) ? x-'0' : toupper(x)-'A'+10)
|
|
|
static int uea_getesi(struct uea_softc *sc, u_char * esi)
|
|
|
{
|
|
|
unsigned char mac_str[2 * ETH_ALEN + 1];
|
|
@@ -2447,7 +2447,8 @@ static int uea_getesi(struct uea_softc *sc, u_char * esi)
|
|
|
return 1;
|
|
|
|
|
|
for (i = 0; i < ETH_ALEN; i++)
|
|
|
- esi[i] = htoi(mac_str[2 * i]) * 16 + htoi(mac_str[2 * i + 1]);
|
|
|
+ esi[i] = hex_to_bin(mac_str[2 * i]) * 16 +
|
|
|
+ hex_to_bin(mac_str[2 * i + 1]);
|
|
|
|
|
|
return 0;
|
|
|
}
|